Game programming

Moderators: None (Apply to moderate this forum)
Number of threads: 2070
Number of posts: 5361

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Scorched Earth Posted by Enterich on 29 May 2001 at 11:16 AM
Hey I'm making a Scorched Earth type of game in Windows/DirectX/C++ and I was wondering how I should keep up the screen. For Example, when the bomb hits the sand, and each separate piece of sand (pixel) falls down. Should I make a matrix (screenwidth*screenheight) to represent each particle of sand? Or is there a better way to do this?

Thanks
Enterich.

Report
Re: Scorched Earth Posted by Xenogenesis on 31 May 2001 at 7:56 PM

I would set up on array of size (width*height) of type int to represent each particle of sand and the tanks using flags. As you update the position of the missile being fired, check to see if it hits an object, and if it does, take the appropiate action (obviously).



----
A figure divine
Her radiance shadows sun
The wind is her song


Report
Re: Scorched Earth Posted by Enterich on 31 May 2001 at 8:15 PM
:
: I would set up on array of size (width*height) of type int to represent each particle of sand and the tanks using flags. As you update the position of the missile being fired, check to see if it hits an object, and if it does, take the appropiate action (obviously).



Ok thanks, that what I was thinking. Now I have a second question. What would be the best way to make the path of the missile? What I was thinking is, have two constant vectors for gravity and wind, then a vector in the chosen direction that gets weaker the longer it is in the air. Would there be a better way to do it than this?

Enterich.



Report
Re: Scorched Earth Posted by DeepFreeze on 8 Jun 2001 at 3:39 AM
: Ok thanks, that what I was thinking. Now I have a second question. What would be the best way to make the path of the missile? What I was thinking is, have two constant vectors for gravity and wind, then a vector in the chosen direction that gets weaker the longer it is in the air. Would there be a better way to do it than this?
:
: Enterich.

Just do it. First try to make a working prog. After that start optimization.




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.