Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Particles For A 2d Game

Author
Message
Poof Master
14
Years of Service
User Offline
Joined: 14th Jan 2010
Location:
Posted: 1st Jun 2010 03:19
So I am at a point in my game where I want to try some basic particles when my objects collide. Now I know Dark GDK has dbMakeParticle() but I don't know how to set up a basic particle. Like what program do I make it in and is it like sprite sheets?

Can anyone give me a quick example so I can see how it all works or an explanation. Any help or links will greatly be appreciated.
haliop
User Banned
Posted: 1st Jun 2010 09:49 Edited at: 1st Jun 2010 09:55
check the tutorials section inside Start->Programs->theGameCreators->DarkGDK->Tutorials
there is a good 2D particle tutorial over there which is pretty simple and looks nice.

beside that you can always make a small bitmap with windows painter and just use a manipulation of it inside GDK , you create one Object and one image dbLoadImage, assign the bitmap to it , hide the object.

then inside the main loop whenever there is a Collision or whatever you want to do , you paste the hidden Object into that Collision Location and just randomly send it somewhere or not randomly.

take a look at this example


i hope this help , i may have forget something tell me if it works.

edit i forgot the GetFreeObject();
Poof Master
14
Years of Service
User Offline
Joined: 14th Jan 2010
Location:
Posted: 1st Jun 2010 09:57
What if I am doing a 2d game though how will that work with a camera. Would I have to do it another way if it is pure 2d?
haliop
User Banned
Posted: 1st Jun 2010 09:59
ohh , sorry man
i didnt see it as a 2D,
ok , 2D is pretty simple aswell,
just forget about the Object and place a Sprite Instead and ofcourse you dont need to worry about the camera in 2D .. so its even simplier to implent.

but i do suggest you take a look at the tutorials that comes with GDK its pretty cool.
haliop
User Banned
Posted: 1st Jun 2010 10:19
poof tell me if you get it to work.
Poof Master
14
Years of Service
User Offline
Joined: 14th Jan 2010
Location:
Posted: 1st Jun 2010 11:02 Edited at: 1st Jun 2010 11:02
Okay I have read through your code a little but it's getting a little late over here so I am going to try this tomorrow and get back to you. I will also check out the tutorial and see how its done.
Poof Master
14
Years of Service
User Offline
Joined: 14th Jan 2010
Location:
Posted: 2nd Jun 2010 01:06
Hey Haliop I am not seeing the particle tutorial in any of the tutorials that come with the GDK installation. These are all of the tutorials that I have.

3D objects
Dark invaders
Game Level
GEtting Started
shaders beginner and advanced
game terrains

I did a search on all of them for particles and nothing came up. Is there a newer installation that I didn't get or am I missing something?
haliop
User Banned
Posted: 2nd Jun 2010 08:38
no its out there ,
Start-> Programs -> The Game Creators -> Samples

select the Prjects file , a new VC++ window will open containing about 12 projects that show what DarkGDK has to offer and one of them is the Particle , however i just looked at it and theres not too many explanation over there, but it should be enough to understand, and if you see whats in there its pretty simple as the one i suggested jus turn the 3D objects into Sprites..
Poof Master
14
Years of Service
User Offline
Joined: 14th Jan 2010
Location:
Posted: 2nd Jun 2010 08:50
Okay cool haven't had to much time to try particles. It's more of a side project at the moment while I get a few more things into my game but I will check those out and try the code that you gave.

Thanks for the help thus far

Login to post a reply

Server time is: 2024-11-19 23:16:18
Your offset time is: 2024-11-19 23:16:18