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.

2D All the way! / 2D DX Game Framework - Parallax Starfield Example

Author
Message
AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 10th May 2009 20:50 Edited at: 16th May 2009 21:32
I'm working on a simple 2D game framework using DirectX. Although it's still in the early stages of dev I wanted to post it here so I could get some early feedback and sort out any big issues.

Parallax Starfield Demo: http://www.mediafire.com/download.php?mjnxtnmiztz
Parallax Starfield + Particles Demo: http://www.mediafire.com/download.php?mh5zynnvyxo
Particle Editor: http://www.mediafire.com/download.php?42clwjnjznm

Anyways if you have any problems please tell me, especially if it crashes or something. Thanks.

i like orange
jezza
16
Years of Service
User Offline
Joined: 8th Mar 2008
Location: Bham, UK
Posted: 10th May 2009 20:58
Application failed to start because d3dx9_41.dll was not found. Has a sort of irony that it was from you. Feedback Now can I have some more please on pdEngine?
AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 10th May 2009 21:38
Quote: "Application failed to start because d3dx9_41.dll was not found. Has a sort of irony that it was from you."




However it's weird that you got that, as I tested it on my laptop as well and I'm not getting any missing DLL error. Do you have the latest version of DX?

As for pdEngine, I'm no longer getting the missing DLL error but instead it's simply crashing on me with the typical "[App goes here].exe has stopped working...". However I'll make a post about it on your thread rather than continue here.

i like orange
jezza
16
Years of Service
User Offline
Joined: 8th Mar 2008
Location: Bham, UK
Posted: 10th May 2009 21:47
I have DX 9.0c 4.09.0000.0904

AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 10th May 2009 21:55
I *think* d3dx9_41.dll is part of DirectX 9.0c 4.10.xxxx.xxxx so if I were you I'd download this.

i like orange
jezza
16
Years of Service
User Offline
Joined: 8th Mar 2008
Location: Bham, UK
Posted: 10th May 2009 22:05
That did it . Yeah its good. the asteroids stop after a bit, maybe you should generate them randomly when the camera gets close. Using frustum culling there should be no significant performance issue. Also the asteroid sprites are bit strange but thats not saying anything about the engine.

AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 10th May 2009 22:12 Edited at: 10th May 2009 22:18
Quote: "That did it . Yeah its good. the asteroids stop after a bit, maybe you should generate them randomly when the camera gets close. Using frustum culling there should be no significant performance issue. Also the asteroid sprites are bit strange but thats not saying anything about the engine."


I'm not totally sure what you mean by "the asteroids stop", as they're not moving. They're just rotating while staying in place. Earlier I had it setup so that the camera could move forward and backward, however it didn't look totally right so I'm working on it right now. As for the frustum culling, that's very easy to do, as there's no frustum--everything's in 2D, so I can just not draw anything outside the boundaries of the screen.

Thanks for the feedback.

i like orange
jezza
16
Years of Service
User Offline
Joined: 8th Mar 2008
Location: Bham, UK
Posted: 10th May 2009 22:24
I mean there are no more asteroids after you move right... they run out.

AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 10th May 2009 22:26
Quote: "I mean there are no more asteroids after you move right... they run out."


Oh. Ya, I know, I added the movement mainly to show the appearance of depth, however as you explained it would be pretty easy to have them randomly generate in front of the camera when you move.

i like orange
jezza
16
Years of Service
User Offline
Joined: 8th Mar 2008
Location: Bham, UK
Posted: 10th May 2009 22:31
Oh and stars are many times larger than asteroids, yet they are rendering in front smaller. You seems to have small star sprites and large asteroid sprites on the same distance levels.

AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 10th May 2009 22:38 Edited at: 10th May 2009 22:38
Ahhh, nice catch! I didn't notice that. I made the stars smaller intentionally because it made more sense to use small white points than actual drawn-to-scale sprites, because if they were drawn to scale they would be much bigger and would clutter up the screen.

Anyways I'm working on particles now, hopefully I can have a demo up tonight.

i like orange
jezza
16
Years of Service
User Offline
Joined: 8th Mar 2008
Location: Bham, UK
Posted: 12th May 2009 23:31
Any news on the particle demo? Are you using dx point sprites or textured quads or normal sprites?

AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 13th May 2009 00:12 Edited at: 13th May 2009 00:13
Working on particles right now. I had to take the night off last night to work on my laptop. I regret to inform you that he did not make it through the surgical procedure ...time of death, 9:25 PM EST.

Fortunately I do all my dev on this PC so nothing major lost.

As for what I'm using, probably normal sprites for the time being, then if they turn out to be slower than expected then I'll go with point sprites.

i like orange
Not_Maindric
16
Years of Service
User Offline
Joined: 10th Jul 2007
Location: Omaha, NE
Posted: 13th May 2009 03:13
I get an invalid file error from mediafire...

I would love to try it out, but thought you should know about this.

AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 13th May 2009 04:48 Edited at: 13th May 2009 04:52
Ahhhhhhh! That happened to the last file I uploaded as well! What's going on?

EDIT: Ohhhhh! I just realized I wasn't posting the correct link. I've edited my first post.

i like orange
Caleb1994
15
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 13th May 2009 16:49
yay! downloading now! and it works!

New Site! Check it out \/
Caleb1994
15
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 13th May 2009 16:52 Edited at: 13th May 2009 17:09
it says and i quote

"This application has failed to start because d3dx9_41.dll was not found. Re-installing the application may fix this problem."


wait this is my moms computer i don't think it has the direct x er the newest one


Edit:

Just dwnloaded dx! it looks great!!!!!!!

New Site! Check it out \/
AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 13th May 2009 21:46
Thanks. I've got particles functional but I'm still working on them, hopefully I can have a demo by tonight or tomorrow.

i like orange
AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 15th May 2009 01:55 Edited at: 15th May 2009 05:05
Particles demo!

http://www.mediafire.com/download.php?mh5zynnvyxo

Up next is either tile maps or render targets.

Oh, and if anyone's curious here's the code for that demo using my framework:



EDIT: I've just added the ability to render to multiple windows using multiple swap chains but I can't post a demo right now cause I have to go to bed. So I'll try and get one up tomorrow.

i like orange
Caleb1994
15
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 15th May 2009 17:29
this is really cool keep up the goodd work!

New Site! Check it out \/
jezza
16
Years of Service
User Offline
Joined: 8th Mar 2008
Location: Bham, UK
Posted: 15th May 2009 18:51
That's very good. For these:

Why are you using dynamic memory, would static not work? And where are you freeing up the memory!?

AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 15th May 2009 21:37 Edited at: 15th May 2009 22:12
Quote: "Why are you using dynamic memory, would static not work?"


I'm afraid I'm not sure what you mean. Are you saying I should be using something other than 'new', or that I simply shouldn't be using pointers in the first place?

Quote: "And where are you freeing up the memory!?"


The memory is freed by the framework once the program returns from the bluApp() function. Basically all my classes--BluTexture, BluSprite, etc. place themselves in a vector in their constructors. For instance, my BluSprite constructor might look like this:



Here's what my WinMain function looks like:



The D3D resources such as ID3DXSprite, IDirect3DTexture9 etc. are released in the destructors of the classes they're used in.

Quote: "this is really cool keep up the goodd work!"


Thanks.

i like orange
AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 16th May 2009 21:30 Edited at: 17th May 2009 18:47
I'm working on a particle system editor using a set of Windows GUI functions I created that make it incredibly simple to integrate BGE with WinGUI. It's just about complete, I just have to add the ability to save and load particle systems.

Download:

http://www.mediafire.com/download.php?42clwjnjznm

Controls are pretty simple, use the trackbars to adjust the properties of the particles and hold the middle mouse button to move the emitter around.

The particles in BGE are extremely flexible--you can adjust everything from their acceleration to their starting and ending scales to the speed of particle emissions, and since they're still a WIP I plan on adding several more features as well.

As always if you have any problems please tell me. It's not necessary to post your FPS as that greatly depends on the particle setup in the app, but if you're receiving an unusually low framerate please mention that a well.

i like orange
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 18th May 2009 05:10 Edited at: 18th May 2009 05:10




Attachments

Login to view attachments
AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 18th May 2009 13:24
Ahhh! I get that error whenever I try anything I make on another computer of mine, and I never know how to fix it.

i like orange
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 18th May 2009 16:06
No help here.



AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 18th May 2009 21:36
Do you have the Visual C++ Redistributable?

i like orange
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 19th May 2009 01:51
Works now. Pretty cool .



Burning Feet Man
16
Years of Service
User Offline
Joined: 4th Jan 2008
Location: Sydney, Australia
Posted: 26th Jun 2009 11:21
Hey guys, checked out this thread, had all of the problems that everyone else had, but also fixed them all too with the recommended downloads.

Needless to say, sweet little application you've got here! Very cool. What other plans have you got in store for it?

Login to post a reply

Server time is: 2024-04-26 18:51:39
Your offset time is: 2024-04-26 18:51:39