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 / Tips on my First Game

Author
Message
Gav_b_uk
20
Years of Service
User Offline
Joined: 18th Mar 2004
Location: Midlands, UK
Posted: 19th Mar 2004 02:57
This evening I've spent about an hour putting the following little game together as an experiment to see how easy DarkBasic will be to pick up. Found it pretty simple. I know that my code is very messy, so I'm looking to tidy it up. Can anyone give me any tips on making this code more streamline? Also, i've noticed that the bullets come out very fast and I'd like to slow that down any tips on this would be appreciated. Finally, the rocks are also very fast at coming down the screen....any help on slowing them down/controlling their speed would also be nice?

P.s. Code asks for sounds from the standard DBPro media.
Gav_b_uk
20
Years of Service
User Offline
Joined: 18th Mar 2004
Location: Midlands, UK
Posted: 19th Mar 2004 02:59
Whoops...forgot to add code...here it is:

comando 300
20
Years of Service
User Offline
Joined: 23rd Nov 2003
Location:
Posted: 19th Mar 2004 03:10
maybe using the sync rate command you can fix the speed of the rocks.

Hope it help

CURRENT PROJECT: RETRO PAC-MAN
zircher
21
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 19th Mar 2004 03:16
You can also base your movements, rotations, etc. off of a timer each loop. That way you'll get predictable speeds regardless of frame rates.
--
TAZ

Gav_b_uk
20
Years of Service
User Offline
Joined: 18th Mar 2004
Location: Midlands, UK
Posted: 19th Mar 2004 12:03
Thanks for the tips.

Just tried to run this same program (which was made in DB Pro) on DarkBASIC Classic. There has been some issues in DBC that I resolved but there are still some issues I cant. For example, after shooting the first rock all other rocks wont fall down the screen and all bullets wont move up the screen. Could someone please advise what I need to change in the code to make it DBC compatable as I am going to use this program to teach some others how to program a small game, only problem is that I have to teach them on DBC?
soapyfish
20
Years of Service
User Offline
Joined: 24th Oct 2003
Location: Yorkshire, England
Posted: 20th Mar 2004 02:33
You said you wanted help tidying it up. I just use sub-routines I'll post an example with some of my code. You could replace what is in my do,loop with the pieces of rem you have put in your source. If you don't understand it please say because I can explain it better only I'm in a bit of a rush now.

HEY WHY NOT VISIT OUR TEAM SITE!!!

Login to post a reply

Server time is: 2024-09-22 02:43:08
Your offset time is: 2024-09-22 02:43:08