Community
Message Board

Chat room - users
Game Over
( 394431 downloads)
Work In Progress
( 523201 downloads)
Links

Code Exchange
Downloads
Tutorials
Add to Favourites

Submit news

DIV ARENA FORUMS
Not logged in [Login - Register]
Go To Bottom

Printable Version  
Author: Subject: Tutorial 7 Christmas Special
dom cook
Div Pro
******




Posts: 386
Registered: 4-3-2016
Member Is Offline


[*] posted on 25-12-2016 at 12:48 AM
Tutorial 7 Christmas Special




SNAP0001.PNG - 48kB
View user's profile View All Posts By User
dom cook
Div Pro
******




Posts: 386
Registered: 4-3-2016
Member Is Offline


[*] posted on 26-12-2016 at 08:32 PM


In the absence of a Christmas competition, This is my Festive offering
So far I've got:
A 3d Christmas tree.
A star that fires a laserbeam
Mouse aiming in 3d
Collisions using something akin to raycasting
Voxel (ahem) presents under the tree that I assure you look better in real life.

My idea is to put in a bunch of drones that will attempt to knick the pressies from under the tree, which will be able to fight them off by temporarily disabling them with its laser.
The game would be over when all the presents are gone or when the sun comes up and overwhelms the evil IR signals that are controlling the drones.

Any comments? (nice ones obviously)

Happy New Year Divvers.

SNAP0002.PNG - 15kB
View user's profile View All Posts By User
dom cook
Div Pro
******




Posts: 386
Registered: 4-3-2016
Member Is Offline


[*] posted on 28-12-2016 at 11:46 AM


Humbug it is then!
I can see I'm going to have to try harder to get a response

Check this screenshot. It illustrates a working search light.


SNAP0003.PNG - 15kB
View user's profile View All Posts By User
MikeDX
DIV Nerd
*********


Avatar


Posts: 8388607
Registered: 25-2-2016
Member Is Offline


[*] posted on 28-12-2016 at 12:38 PM


Sorry Dom I've had a crazy Christmas been traveling a lot and computer time limited somewhat.

I should have setup a Christmas compo.

What you've done there is really impressive! Going to try it on my new(ish) phone and see how well it runs!
View user's profile View All Posts By User
BreadCaster
Loyalty Card Holder
******


Avatar


Posts: 321
Registered: 2-3-2016
Member Is Offline


[*] posted on 29-12-2016 at 08:06 PM


the search light feature is cool, but i bet youve got like 5 other colours left in the pallete to use after rendering it x)

I remember back in the day there was a code snippet for mode 7 distance fogging floating around on the forums, god knows how it worked. Is that something you'd be able to replicate, dom? Could be useful if anyone wanted to make anything atmospheric. Just a thought =)




~*~ Princess of Pies and Pastries ~*~
View user's profile View All Posts By User
MikeDX
DIV Nerd
*********


Avatar


Posts: 8388607
Registered: 25-2-2016
Member Is Offline


[*] posted on 29-12-2016 at 08:53 PM


Would you share the code and fpg with us Dom so we can have a play please? :)
View user's profile View All Posts By User
dom cook
Div Pro
******




Posts: 386
Registered: 4-3-2016
Member Is Offline


[*] posted on 29-12-2016 at 09:05 PM


Well I'm using 64 shades of grey and then 32 of each of the 6 primary colours.
You can check the palette if you're interested.
There are several techniques in this that I haven't tried before. I think some are pretty cool.

I was even toying with the idea of making a depth map so I've now basically figured that out in principle. That might be what you'd need for a fog effect but as I never saw the one you mentioned I don't know if that would be overkill.

Anyway thanks for the feedback boys.


By the way Mike I was thinking about implementing the snow into a DLL as a learning project so I tired to use the stars one you posted in the DLLs thread for guidance but, as usual I couldn't get it to work. I think I built it right but I just crashes DIV each time. Any suggestions?



SNAP0004.Png - 19kB



Attachment: yulewars.FPG (1.5MB)
This file has been downloaded 2360 times

[Edited on 29-12-2016 by dom cook]

Attachment: Yulewars13.PRG (27kB)
This file has been downloaded 2336 times

View user's profile View All Posts By User
dom cook
Div Pro
******




Posts: 386
Registered: 4-3-2016
Member Is Offline


[*] posted on 29-12-2016 at 09:14 PM


Oh yes, about the controls:
mouse to look around. Pitch and yaw, and rotate view if you yaw too far.
one of the mouse keys locks the yaw, enabling immediate rotation another one makes the tree drop a bauble.
if you hold down various combinations of keys _q _w _e you prime the death stars laser in one of 6 colours. Then mouse.left will fire it.
arrow keys steer the drone. (it's only got lights at the moment but will get a body next)

There are a bunch of presents lying around you can find them with the light.
View user's profile View All Posts By User
MikeDX
DIV Nerd
*********


Avatar


Posts: 8388607
Registered: 25-2-2016
Member Is Offline


[*] posted on 29-12-2016 at 09:22 PM


The stars DLL is probably not a great one to try with.

If you want to do something with DIV's framebuffer the ss0 and ss1 DLLs are good places to start, as they modify the pixel buffer directly.

Now to test this mode7 goodness
View user's profile View All Posts By User
dom cook
Div Pro
******




Posts: 386
Registered: 4-3-2016
Member Is Offline


[*] posted on 29-12-2016 at 10:40 PM


Quote: Originally posted by MikeDX  

Now to test this mode7 goodness


I hope you like it, I'm actually pretty proud of it. But you should try the reuploaded version (13) rather than the one you first downloaded (12).
There was something wrong with the way the snow moved a bit with the light. Anyway it's fixed now and looks a lot nicer (if you can believe that were possible).
View user's profile View All Posts By User
MikeDX
DIV Nerd
*********


Avatar


Posts: 8388607
Registered: 25-2-2016
Member Is Offline


[*] posted on 30-12-2016 at 12:51 PM


I think this demo is cool but highlights a problen with div when the mouse is trapped in the window.

View user's profile View All Posts By User
CicTec
DIV Pro
******




Posts: 471
Registered: 6-8-2016
Member Is Offline


[*] posted on 31-12-2016 at 12:11 AM


Hi Dom,

Very nice tutorial.

Quote: Originally posted by dom cook  

By the way Mike I was thinking about implementing the snow into a DLL as a learning project so I tired to use the stars one you posted in the DLLs thread for guidance but, as usual I couldn't get it to work. I think I built it right but I just crashes DIV each time. Any suggestions?

The best solution is using the debugger, you need to compile the DLL in debug mode then launch the app with debugger so when it crashes should indicate at what point in the code.
View user's profile View All Posts By User
dom cook
Div Pro
******




Posts: 386
Registered: 4-3-2016
Member Is Offline


[*] posted on 1-1-2017 at 10:01 AM


Thanks CicTec. I had a few other ideas I wanted to put in but I'd given myself till today to see how far I could get. So further development will have to wait till next Christmas now.
Thanks for the tips on DLLS. Figuring them is my new year's resolution. I still don't know the first thing. For example how do you even compile a DLL in debug mode.

View user's profile View All Posts By User
CicTec
DIV Pro
******




Posts: 471
Registered: 6-8-2016
Member Is Offline


[*] posted on 1-1-2017 at 10:49 AM


Ok no problem. :)

Assuming you are using GCC you have several options, the best way is to study a little bit of documentation and examples.

Here Several documentation link:
https://gcc.gnu.org/onlinedocs/gcc/Debugging-Options.html
http://www.delorie.com/gnu/docs/gdb/gdb_17.html

http://stackoverflow.com/questions/10475040/gcc-g-vs-g3-gdb-...

Here, other tutorials and examples link:
http://www.seas.upenn.edu/cets/answers/gcc.html
http://www.rapidtables.com/code/linux/gcc/gcc-g.htm

If you have any difficulties, we are here to help.
View user's profile View All Posts By User
dom cook
Div Pro
******




Posts: 386
Registered: 4-3-2016
Member Is Offline


[*] posted on 1-1-2017 at 01:43 PM


Thanks again.
Now to find out what GCC is.
View user's profile View All Posts By User

  Go To Top

Powered by XMB
XMB Forum Software © 2001-2012 The XMB Group
[Queries: 18]