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.

Newcomers DBPro Corner / Strategy Games

Author
Message
Chessplayer
21
Years of Service
User Offline
Joined: 22nd Dec 2002
Location:
Posted: 24th Dec 2002 01:04
I like playing strategy games like Age of Empires, Caesar III, and Star wars galactic battle grounds. Would you recommend Dark Basic to make these type of games. Also, if it is possible to make a strategy game with darkbasic, how do you make a grid?
John H
Retired Moderator
21
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 24th Dec 2002 03:00
Yes it is possible to make strategy games with DB. You need to get good at DB, but ya, its possible.

RPGamer

Current - RPG: Eternal Destiny : Help Wanted!
Upcoming- MMOFPS- Paintball Game: HELP WANTED!
Http://halbrosproductions.netfirms.com
Chessplayer
21
Years of Service
User Offline
Joined: 22nd Dec 2002
Location:
Posted: 25th Dec 2002 00:59
I know. I am going to start out simple. What are some good games for beginners to program?

John H
Retired Moderator
21
Years of Service
User Offline
Joined: 14th Oct 2002
Location: Burlington, VT
Posted: 25th Dec 2002 18:16
Pong I did a calculator when I was bored. Good for input and variables. Just do small little projects look at [url]www.dbheaven.com[/url]

RPGamer

Current - RPG: Eternal Destiny : Help Wanted!
Upcoming- MMOFPS- Paintball Game: HELP WANTED!
Http://halbrosproductions.netfirms.com
Fluffy Paul
21
Years of Service
User Offline
Joined: 16th Dec 2002
Location: United Kingdom
Posted: 27th Dec 2002 01:29
Seriously, RPGgamer is totally right.
The best way to learn game programming is to Start in the 70's and program pong and space invaders then move along to the eighties and program more advanced stuff like pacman and gauntlet and then move on to the 90's and learn some 3D.

If you're new to DB I recommend leaving 3D until later on unless you are good with trigonometry und understand how angles and cartesian coordinates work.

As for making a grid...
if you're doing a 2D game then a grid is a multidimensional array with each element in the array representing a grid tile.
if it's in 3D then the matrix is, in fact, a prefabricated grid system. Since you program how big the matrix is and how many tiles it is divided up into all you need to do is take x and z coordinates, divide by the number of tiles across and down and return the integer (but not the decimal fraction, if any) of the result - hence you can easily work out what tile is beneath any point in 3D space.
Likewise, because you told DB how big to make the tiles you can equally easily work out the centre point of a tile.

e.g. your matrix is 2000 units wide and deep and is divided into 40x40 tiles. Each tile is therefore 50 units by 50 units. Assuming the back left corner of the matrix is at x(0) and z(0) then a random position, say x(1683) by z(816) can be easily resolved thus:

x tile
= round down( xposition / xtile width )
= round down( 1683 /50 )
= round down( 33.66 )
= 33

z tile
= round down( zposition / ztile width )
= round down( 816 /50 )
= round down( 16.32 )
= 16

So a 3D position with x(1683) and z(816) translates to xtile 33 and ztile 16.

The centre of a tile can be calculated thus:
(tile number * tile width) + half a tile width

so the x coordinate in this case...
= (33 * 50) + 25
= 1650 + 25
= 1675

and the z coordinate...
= (16 * 50) +25
= 800 + 25
= 825

so from the original 3D position we have worked out what tile is required and have snapped that 3D position "to grid" in a sense.

Is this helpful?
MattIsFun
21
Years of Service
User Offline
Joined: 4th Jan 2003
Location:
Posted: 5th Jan 2003 18:13
Well, any game that can be programmed with DirectX can theoretically be programmed with DB (all games basically). And yeah, pong is a good place to start. When I got the DB demo, a version of pong was the first thing I tried on it.

Login to post a reply

Server time is: 2024-04-13 17:00:47
Your offset time is: 2024-04-13 17:00:47