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.

Work in Progress / Falling Dots -- Open Source Space Shooter -- DBC

Author
Message
Izzy545
20
Years of Service
User Offline
Joined: 18th Feb 2004
Location:
Posted: 31st Jan 2006 20:30 Edited at: 31st Jan 2006 20:35
I've been working on this game for a few days now. Basically it's a code-only space shooter that uses dots and boxes as the basis for the game. Ships come from the top and tend to move towards the same position as you and they try to dodge the lasers you shoot.

Here's a screen:


This post's source contains version one. It is fully playable and is set up for 5 levels. After the 5th level it just loops. By changing the variables at the beginning you can vastly change the gameplay. But don't make too many lasers or it may lag a little.

This game contains heavy use of for-next loops. If anyone has any tips to make these run a little faster it would be appreciated. At the time of this posting I can get it to run at a steady 30FPS with 750 enemies and 10 lasers. Of course my computer sucks so feel free to post the highest you can get

I plan on adding bombs that your player can use(this would comprise a circle that radiates out from the player to a certain extent, all dots touched by the circle would die) and possibly adding bosses and special dots(such as ones that shoot bullets at you, exploding dots, kamikaze dots) all of this of course would be generated in-game.

One question... I'm assuming for-next loops are much faster in C++ and the like? If so I may recreate this using C++ and GDI+ or C# and GDI+.

Big Man
19
Years of Service
User Offline
Joined: 4th Feb 2005
Location: BEHIND YOU!!!! (but I live in England)
Posted: 31st Jan 2006 20:46
Thats quite cleaver well done.
ITs really hard but pretty addictive.

BM

Our aim is to keep the loo's clean, your aim can help.
Peter H
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 31st Jan 2006 21:11
i had to replace the variable "timer" with "time1" because timer is a keyword in DBPro, but after that it worked fine!

the little dudes remind me of flys...

anyway, it's a nice game!

"We make the worst games in the universe..."
Big Man
19
Years of Service
User Offline
Joined: 4th Feb 2005
Location: BEHIND YOU!!!! (but I live in England)
Posted: 31st Jan 2006 21:35
Quote: "because timer is a keyword in DBPro"


The title does say dbc I never tried it in dbp but it seems to work fine in dbc

Our aim is to keep the loo's clean, your aim can help.
Izzy545
20
Years of Service
User Offline
Joined: 18th Feb 2004
Location:
Posted: 31st Jan 2006 22:29


This is the newest version of the source code. I added in bombs and attempted to tighten things up a bit, make it run faster... Although I don't think I kept any of the changes I tried to make because they didn't help. Anyways, I'd appreciate it if you guys could tell me the kind of frame rates you get when you do it against say... 1000 or 1500 dots?

With the bombs I can only play with around 300 dots before it starts to lag every time I shoot off a bomb. Once again with all of the for-next loops it runs

Code is up to 395 lines now!

Peter H
20
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 1st Feb 2006 01:11
32-33 FPS with 1,500 dots
32-33 FPS with 1,000 dots
32-33 FPS with 10,000 dots
32-33 FPS with 20,000 dots

(this is all in DBPro of course)

i couldn't faze the frame rate... if i tried too many more dots i'd exceed the limit for the array

Quote: "The title does say dbc I never tried it in dbp but it seems to work fine in dbc"

yeah, i was just pointing out to anybody else who wanted to convert it to DBPro

"We make the worst games in the universe..."
Izzy545
20
Years of Service
User Offline
Joined: 18th Feb 2004
Location:
Posted: 1st Feb 2006 09:22
Thanks a bunch Peter, useful info. Like I said, my computer surely does suck so it's definitely not much of a testing machine.

I was a lil worried because the only way I think I can make this game interesting is with massive amounts of dots. Massssive amounts, hehe.

Azrael
19
Years of Service
User Offline
Joined: 2nd Mar 2005
Location: Germany
Posted: 1st Feb 2006 15:38 Edited at: 1st Feb 2006 15:41
Nice Game

But I got around 1000 FPS

Whenever you draw with the "dot" command use "lock pixels" and "unlock pixels" to speed up. It's enormous.

[edit]
sorry ... didn't notice that u are using dbc
[/edit]
zzz
18
Years of Service
User Offline
Joined: 13th Nov 2005
Location: Sweden
Posted: 1st Feb 2006 17:42 Edited at: 1st Feb 2006 18:16
Wow, like a "massive" space-invaders clone. I ran it in dbc and I got 30fps/changing the sync,550fps. Something that would look nice is to give the enemy dots a tail or something, that would give a cool effect.
Like this: (You may have to maximize the picture )



Attachments

Login to view attachments
Izzy545
20
Years of Service
User Offline
Joined: 18th Feb 2004
Location:
Posted: 1st Feb 2006 17:57
Thanks for the tip zzz, I like the looks of that, and considering the bombs use code similiar to what this will do it should be fairly easy.

Izzy545
20
Years of Service
User Offline
Joined: 18th Feb 2004
Location:
Posted: 1st Feb 2006 18:50
Alrighty, I added some basic enemy trails, and some crazy cool laser trails(well, they're more advanced and I like them at least)

The laser speeds up as it moves along now as well.

Code is now 472 lines long

Next update will have at least the kamikaze dots added in, they'll get within a certain radius of the player and then blow themselves up. The explosion will kill other dots, but also the player.

Login to post a reply

Server time is: 2024-09-29 12:29:06
Your offset time is: 2024-09-29 12:29:06