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 / alittle help

Author
Message
Uppy
21
Years of Service
User Offline
Joined: 20th Jun 2003
Location:
Posted: 28th Jul 2003 01:43
hi , im pretty new to DarkBASIC and i found it alittle overwhelming at first, though i have no intentions of giving up, i really dont know where to start, i read the "Game programming in darkBASIC" book advertised on the DB website and while it helped alot explaining looping commands, strings, syntaxs and so on it didnt really show HOW or where these commands should go and so im alittle confused, i can make text based games but nothing more...basically any help or suggestions would be appreciated.
indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 28th Jul 2003 06:04
the step into 3d is easier in db but not so obvious from the get go.

A game is basically these steps

the start
the menu
the game data setup
the pre game loop stuff
the actual game loop
the cleanup
the end


In order to excell in 3d its best to know how to visualise the 3d objects in space. Consider the xyz dimensions of an object.

Imagine in your game theres a ground zero location 0,0,0

Know that the x dimension represents the left / right
Know that the x dimension represents the up / down
Know that the z dimension represents the forwards / backwards

Both directions are represented by negative and positive values from the zero point.

ok lets put it into practise now in the smallest of programs with a basic shell to get started.





I want to add some info here about the above code.
We didnt position the object so DB assumes 0,0,0 is its location
We didnt position the camera so DBs camera automatically locks onto it.

lets look at snippet two now





At the end of the day tho you will ultimately decide where things go by asking yourself is it faster this way and can i leave out of my main game loop.

its easy to break your program down into these areas and then break each area down again when things get more complicated.

the start
the menu
the game data setup
the pre game loop stuff
the actual game loop
the cleanup
the end


this is a minor introduction to the 3d aspect.

indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 28th Jul 2003 07:14
oosp typo

Know that the x dimension represents the left / right
Know that the y dimension represents the up / down
Know that the z dimension represents the forwards / backwards

Login to post a reply

Server time is: 2024-09-20 17:35:32
Your offset time is: 2024-09-20 17:35:32