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 / Need help with game programming concepts (sorta a space invaders clone)

Author
Message
Rage9999
18
Years of Service
User Offline
Joined: 22nd Nov 2005
Location:
Posted: 23rd Nov 2005 17:54
Hello, recently picked up darkbasic programming and find it very fun yet challanging and after several days of being stuck I decided to come here and post for help. Basicly, im tryin to make a space invaders clone, (sort of) in where ships are drawn at the top of the screen and come down shooting at you, while you have to dodge and shoot back at them. I have posted my entire source code for my game, any suggestions on how to change/improve it? I know the code is a bit sloppy but its my first attempt at a game. Currently im having trouble with spirtes, and how they can relate to arrays, in order to make the program more organised and structured. The main problem besides that is the fact that I dont know what methods/conceps i should use to move the sprites once they exist. Move sprite seems to work. however, for each individiual sprite , it is not very effecient because i would have to write a good 100 lines of code dedicated to move sprite .... movesprite 1,2 movesprite 2,2, movesprite 3,2, ect. if any one can comment on what i should do or what, it would help alot. If you look at it i did try to comment as much as possible but im not the best at commenting. also theres alot of varaibles strewn about (changed the program design several times).
Thanks so much in advance for your replies!! oh and i attached a zip file with all the graphics required for the exe to run.. i made them with paint.

Attachments

Login to view attachments
ThinkDigital
19
Years of Service
User Offline
Joined: 18th Aug 2005
Location: A galaxy far, far away...
Posted: 24th Nov 2005 21:01
Review your the section of your grammar textbook entitled "paragraphs."

Also post your code in a
so that we can see it. That source code thing is broken.

AdamGameSource.com 3d Model Competition

Don't support the ANJL: You were a noob once too.
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 25th Nov 2005 05:29
A bit tired right now for helping with this but one pointer is to use for/next loops to move the sprites, it can take that "100s of lines" and turn it into 3 or 4 lines.

TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 25th Nov 2005 14:10 Edited at: 25th Nov 2005 14:18
Haven't looked at your code, but if you are saying it's your first program and Ruccus is suggesting that you aren't using For...Next loops then you must be new enough to programming to find my beginners tutorials some use.

Check them out on my web site (link in sig below). In particular, at this early stage, pay attention to the section on program layout as it will make life easier when you improve and your programs get bigger.

The Code Box isn't broken BTW - it's just disabled while you are new to the forums. It starts working when you've been a member a while and have made a certain number of posts.

As mentioned, for now, use the code button and place your code in tags and it will appear OK.

TDK_Man

Rage9999
18
Years of Service
User Offline
Joined: 22nd Nov 2005
Location:
Posted: 30th Nov 2005 05:47
okay, I am still stuck, as to what ways i need to use to get sprites to move once they have been drawn. currently, I can get them to move after their drawn by doing movesprite 30,-2, movesprite 31,-2 etc over and over for each enemy but this gets very repetative. is there a way to link certain sprites into a group, and just move the group associate dwith the sprites for easy handling and manipulation?

Iv included my code in the snippet hopefullly it will display right.

Login to post a reply

Server time is: 2024-09-24 09:34:20
Your offset time is: 2024-09-24 09:34:20