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 / Proplems with 2d Space Invaders

Author
Message
Blue Shadow
20
Years of Service
User Offline
Joined: 6th Feb 2004
Location:
Posted: 29th Feb 2004 20:45 Edited at: 29th Feb 2004 20:49


Right there are a few problems with this. The first is that when you load the game it freezes and just displays the shields and the blue aliens. The second is that if you delete the collison part of the program and just leave it as that then the aliens are constantly flashing and when they get to the right side of the screen they just carry on going down. We'd be grateful for any help possible.

Thanks,

Code Monkey Studios (Michael Eddie, Gamemaker Jason and Proshooter)

Intel Celron 2.6ghz, 256 MB Ram, 80gb HD,D DVD Rom, CD Rewriter,17" Flat pannel Monitior and DB Pro
Blue Shadow
20
Years of Service
User Offline
Joined: 6th Feb 2004
Location:
Posted: 29th Feb 2004 21:37
Also if you get rid of the for alien_hit=1 to 30 and the next alien_hit then it still doesn't work. It makes the player invisible when its not moving and makes it flash when it is. when you shoot it also doesnt destroy the aliens.

Any help at all would be grately apreciated,

Code Monkey Studios

Intel Celron 2.6ghz, 256 MB Ram, 80gb HD,D DVD Rom, CD Rewriter,17" Flat pannel Monitior and DB Pro
BearCDPOLD
21
Years of Service
User Offline
Joined: 16th Oct 2003
Location: AZ,USA
Posted: 1st Mar 2004 07:53
I understand you don't just want to put out your media for the taking, but could you give us a list of the images used and their dimensions? Then we can create some image that is a big red block that says something like "representing alien" or something on it.

Crazy Donut Productions
Current Project: KillZone
Saikoro
21
Years of Service
User Offline
Joined: 6th Oct 2003
Location: California
Posted: 3rd Mar 2004 05:04 Edited at: 4th Mar 2004 00:33
Well I know this isnt the clearest puddle in the lake, but this is my Wave 1 code for the game I am currently working on (lucky for you). It displays movement procedures and enemy death and level switching. I know I cant show u my own graphics, but just so you know the enemies are 30 by 30 pixels. Also attached is my main source code so far, please do not take as I have worked hard on it as many of you know.

You can go to my website by clicking on the pic in my sig, there you can see some screenshots of my game in case you absolutely need to have some of these images exact. Hope this helps u some.

-Vash the Stampede

*edit*
by the way the sound files can be found in the media section in Dark Basic Classics folder in Program Files.

Intel Pentium 4 3.0 Ghz 1024MB Ram NVIDIA GeForceFX 5200 128MB 19" LCD DVI Viewsonic

HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 3rd Mar 2004 13:43
Try this for collision detection, only deletes the sprite when it finds a hit, that was what was stopping it going at the start, try F7 when debugging may show you what your code is up to. that how I found this one.


In Space No One can Hear You Scream! (When your comm Line is cut?)
Blue Shadow
20
Years of Service
User Offline
Joined: 6th Feb 2004
Location:
Posted: 3rd Mar 2004 19:03
Thanks for all your help!

@ How do: I used your snippet in replace of mine. However, it only stops it freezing up. It doesnt destroy the sprites when the bullet hits.

Does anybody know how to stop the flashing?

And here are the size of all the images:

all enemies:- 44 x 25
shields :- 41 x 34
ship:- 50 x 30
bulet: 8 x 13

Cheers,

Michael

Intel Celron 2.6ghz, 256 MB Ram, 80gb HD,D DVD Rom, CD Rewriter,17" Flat pannel Monitior and DB Pro
Saikoro
21
Years of Service
User Offline
Joined: 6th Oct 2003
Location: California
Posted: 4th Mar 2004 00:33 Edited at: 4th Mar 2004 00:33
The attached source is what I use to hit people with. enemynum is the amount of enemies in your level, the plus 19 does not need to be put into your code as my enemysprites start at 20, yours may differ. The th(enemyhit) is a good way for the game to detect whether or not the sprite is there or not, I use DBC and have been having a problem with delete sprite, so this is what I use. This code also assumes your weapon is sprite 2, if it is something else then change it. Hope this helps your case as well.

-Vash the Stampede

Intel Pentium 4 3.0 Ghz 1024MB Ram NVIDIA GeForceFX 5200 128MB 19" LCD DVI Viewsonic

HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 4th Mar 2004 01:02
Hi again, by changing the sync rate to 60 I can see what is happening in your code the top row of invaders move along to the right of the screen stop going right then they just fall down off the screen.

As for the small bit of code its should have done this
return a one or true if bulet has hit and object then the second bit works out which object has been hit.
opps had another look at code left a bit off ">0" .
#

Now no need for the "for next" loop.
ps running without any sprits I can see just have small dot where sprite would have been

In Space No One can Hear You Scream! (When your comm Line is cut?)

Login to post a reply

Server time is: 2024-11-26 07:39:19
Your offset time is: 2024-11-26 07:39:19