Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 


Submitted by Jon Frain, posted on January 17, 2002




Image Description, by Jon Frain



This is a screenshot from my first game, and yes it's another asteroid clone. I am posting this at flipcode because I am hoping someone may be kind enough to give me some critiques on the code, which can be downloaded at:

http://www.geocities.com/jonfrain/subdirectory/programming.html

I am hoping for critiques both in terms of optimizations to be made and the overall use/misuse of classes. Any and all suggestions are welcomed/desired, including gameplay issues.

This project has been my first foray into DirectX. The goal was to design a complete game utilizing some basic features of DirectX. I think I've done that. Because the overall design itself wasn't created from the beginning, I started just messing around with directX and moving the ship around, the organization of the C++ design suffers.

My hope is to get some usefull information that will enable me to better design this type of game. I will likely start over from scratch and try to do it as best I can and utilize OOD principles to the best of my abilities.


[prev]
Image of the Day Gallery
www.flipcode.com

[next]

 
Message Center / Reader Comments: ( To Participate in the Discussion, Join the Community )
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
dazzford

January 17, 2002, 12:11 PM

Congrats on completing a game, it is more than many ppl get to do.

 
abdulla

January 17, 2002, 12:16 PM

asteroids rocks!

 
kewldude

January 17, 2002, 12:18 PM

Is that the White Star?

 
Pixelish

January 17, 2002, 12:30 PM

Yep, certainly looks like it.
Man, what a cool ship...

 
Marc G

January 17, 2002, 12:43 PM

Looks nice, but it crashes on Windows XP and Windows 2000 with a Unhandled exception (access violation). I've tried with Win95 compatibility mode in XP, but no luck. :(

 
ghost007

January 17, 2002, 01:02 PM

I don't have concrete evidence, but something tells me that "compatibility" mode is a hoax. I couldn’t even get WinQuake to run on XP with that compat mode.

 
Lars Birkemose

January 17, 2002, 01:07 PM

Congrats on finishing a complete game. Like said above, this is an achievement not to underestimate..

If I were you, I would ease down on the OOD stuff...
Its good to know, but it wont save your day in the end..
Ex the 3 D's ( Data Driven Design ) is IMO much much more important to understand and utilize.

Do you know "Game Programming Gems 1 + 2"
If not, I strongly recommend them... A bit expensive, but worth every "øre" ( insert penny, pfennig or cent here... or is that euro )

-LarsB

 
SirKnight

January 17, 2002, 01:17 PM

I guess the compatibility mode would work if the program only will let itself run if it detected a certain windows OS, like 95 for example and would refuse to start up if it detected anything else. Even if the actual program code itself would work fine on XP if it were not for that OS check.

 
Neil Edelman

January 17, 2002, 01:27 PM

ASTEROIDS caused an invalid page fault (while trying to open it)
This computer looks like an Intel P2 MMX 350, Win 98 4.10

 
jon frain

January 17, 2002, 01:51 PM

Hi,

I'm quite embarressed by the crashes. I'm running Windows 2000 myself and don't have problems. I extracted the zip file in a new location. One issue may be that the game requires 1024x768 resolution and so i'll check into that right away.

Regardless, thanks for letting me know and it should be fixed ASAP.

And yes, that IS a whitestar.

Jon

 
jon frain

January 17, 2002, 01:54 PM

I do have the first book, but it's very specific in terms of what it contains. I have used it and plan on using it for some AI stuff. And I will buy the 2nd book in the near future.

 
Kurt Miller

January 17, 2002, 01:55 PM

It worked well on my machine: P3, Windows XP, TNT2.

 
Dan MacDonald

January 17, 2002, 02:14 PM

That's basically how it works. It fudges WIN32 api calls so that they return Win 9x type data. I have found that it works in some cases. I was able to play full throttle on my laptop (running xp) which has not CD drive, by copying the CD to a folder and then mapping a network drive to it. I was able to play with sound and everything. Not bad for running an old DOS app on a laptop with some unconventional hardware.

 
a_j_harvey

January 17, 2002, 04:22 PM

No, it can actually help.
eg some games check free hdd with a signed int. On a big hdd nt returns 4gb free so you're stuffed. Beetle crazy cup has this problem.

 
lycium

January 17, 2002, 05:10 PM

nice game, great to see you finished it :) i'm working on a smallish game myself at the moment, and i can appreciate the effort and determination that goes into actually finishing it off.

now i know everyone's going to hate me for this, but:

wouldn't it just be cooler if it were software rendered? i'm getting kinda sick of that bland "3d accelerated" look, anyone else?

don't get me wrong, i'm not ripping off your work, this is just something that's been bugging me.

 
DaVEkELLY

January 17, 2002, 07:09 PM


The "bland 3d accelerated" look is simply a case of underutilisation of the hardware. Bring in lights, reflections, bump maps, vertex shaders and pixel shaders. Use of more eye candy like little volcanoes belching smoke on the asteriods.

Software rendering is for geeks like linux users who like to reinvent the wheel.

 
iNsaNEiVaN

January 17, 2002, 07:27 PM

Lycium wasn't dissing hardware rendering. It's just, like anything else, its "good" look gets boring and you want something different. You didn't have to take it personal DaveKelly.

 
shrike

January 17, 2002, 07:31 PM

Darn. That looks better than my astreoids clone :(

Does it have that annoying alien that always kills you though?

 
shrike

January 17, 2002, 08:48 PM

I tried to play it, and it is god awful slow to load, and crashes after pressing "s" 2 times.

maybe it works for you, but fo nobody else, it would appear.

 
krogoth

January 17, 2002, 08:50 PM

Nothing wrong with an asteroids clone... that game isn't dead yet!

 
MiNDHiVE

January 17, 2002, 09:42 PM

I agree that writing a software renderer IS reinventing the wheel, and that you'll NEVER achieve the image quality (not without producing a 2FPS game) of a Hardware Accelerated API. But writing a software renderer is an invaluable experience in understanding the techniques that go into developing a 3D API.

When I first started using D3D8 (I learned this BEFORE OpenGL) after I got my head around getting setup out of the way I felt like I was using Logo. Point it at vertex buffers, index buffers, some textures and different texturing modes and say "Draw".

This is an oversimplification ofcourse, but my point is developing a software renderer, while not visually being as rewarding as it may once have been, would be an invaluable learning experience.

Basically I agree with both you and the poster above you, with the exception of this:

"Software rendering is for geeks like linux users who like to reinvent the wheel."

Essentially, as coders, we're ALL geeks here. I've got long hair, I go out drinking with my mates, and I play guitar in an extreme metal band. But I also sit in front of my PC (in both Windows AND Linux) and code for hours. Rendering trilinear filtered polygons with perspective correct texturing is alot more complicated than just specifying LINEAR_MIPMAP_LINEAR, and you should respect, not deride those people who get under the hood and learn the mechanics.

 
INFerNa|

January 17, 2002, 10:54 PM

I would have liked to have gotten to the gamelpay part, but it crashed everytime I was about to enter the actuall gameplay. The screenshot looks decent, but I have to say that I found those menu screens quite annoying. They constantly redrew and had my cursor blinking because of the redraws, this just looked bad. Not to mention the fact that to advance through the menus I had to HOLD the S key down a good deal. Perhaps my system isn't fast enough? I myself am working on a 2d scroller (inspired by Kurt's strayfire IOTD) and my game responds perfectly..

anyways I use win2k with 384mb ram, tnt2ultra vid card. installed dx 8.0 sdk (perhaps its interfering).

from what I could mess around with from the demo, I liked the orchestral mp3's. Great touch.

INFerNa|

 
INFerNa|

January 17, 2002, 10:56 PM

make that synth created music. Not real orchestra...

 
ericd

January 18, 2002, 12:07 AM

Could someone please tell me what White Star is from?

My congrats as well on completing a game, it's quite a thing to do.

 
Pitbull Jesus

January 18, 2002, 03:02 AM

Ran this at 121fps on W2k windowed, GF3,AMD1.4. I also got a crash as well? I got the following DSHOW assert after closing the game and another time opening it.

g_cFGObjects == 0
At line 5836 of d:nt_chkmultimediadshowfilterscorefilgraphfilgraphfilgraph.cpp

I didnt look through your code to specifically. But I am thinking that maybe there are no media files? I would probably revisit your Dshow code.

I was also noticing some major latency on non-responsiveness with keyboard input on the startup menu screen.

From a quick glance your project looks to be well on its way. OOD is definitly way the go, especially when your looking for clarity of design. Looks and plays very nice. Nice job Jon. Keep up the great work.

 
Jam Sandwich

January 18, 2002, 03:03 AM

I'd agree with this - there's nothing like doing a software renderer to reveal gaping holes in what you previously thought was a pretty good grasp of elementary linear mathematics/geometry etc ...

You don't have to finish it ... just get a simple one up and running and it'll make doing the more complex hardware accelerated stuff so much easier.

 
mikie

January 18, 2002, 05:48 AM

Looks cool - it is good when you complete something,
As for the 'bland accelerator' look - I agree that it is getting boring, but being a first full game I wouldn't worry about those kind of opinions.

Who says software rendering is for geeks.... huh programmers are
geeks you dumb ass :) I have more respect for someone who codes
a software renderer, than uses an accelerator... you could do that
in blitz basic....

when we look at advanced rendering, and now we have the ability
to program the actual hardware pixel/vertex shaders and stuff and
beyond - we are just begining to get into accelerated software rendering.... at last we are offered some freedom
It is becoming more like it used to be.....

Mikie

 
mikie

January 18, 2002, 05:48 AM

Looks cool - it is good when you complete something,
As for the 'bland accelerator' look - I agree that it is getting boring, but being a first full game I wouldn't worry about those kind of opinions.

Who says software rendering is for geeks.... huh programmers are
geeks you dumb ass :) I have more respect for someone who codes
a software renderer, than uses an accelerator... you could do that
in blitz basic....

when we look at advanced rendering, and now we have the ability
to program the actual hardware pixel/vertex shaders and stuff and
beyond - we are just begining to get into accelerated software rendering.... at last we are offered some freedom
It is becoming more like it used to be.....

Mikie

 
d9930380

January 18, 2002, 05:51 AM

It allways works/looks great on YOUR machine.

It's when its loaded on other machines, then things start going wrong.
Even professional studios which test on LOTS of hardware don't catch ALL the bugs.

The joys of PC Programming ( Why can't drivers go for compatibility/reliability instead of speed ).

 
Niel

January 18, 2002, 06:37 AM

I'm afraid it crashes on my system too (PIII, Win2K, Elsa Gladiac), but I've just had a quick snoop through the code and it looks neat and legible. One thing I did notice though:
don't put global scope "using namespace ..." in your header files - it's bad for you ;)

 
This thread contains 37 messages.
First Previous ( To view more messages, select a page: 0 1 ... out of 1) Next Last
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.