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.

2D All the way! / Hoping to make a GALAGA style game, It's my first time with DB

Author
Message
Sup Rore
20
Years of Service
User Offline
Joined: 8th Oct 2003
Location:
Posted: 9th Oct 2003 01:06
I figure I'll need to inport BMP sprites for objects, and I think I'll have to use sprite collisions for destruction, but I'm not really sure how to get it all working right.
Can anyone help?
Richard Davey
Retired Moderator
22
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 9th Oct 2003 02:21
Wow, this must be one of the first realistic "help me make a game" posts I have ever read. Most people want to start out trying to re-create Vice City or something equally as ridiculous. But Galaga is easily possible.

How far have you actually got? Have you got the images already prepared ready for use as sprites?

Cheers,

Rich

The sky above the port was the colour of television, tuned to a dead channel.
Your brain's just like any other appliance: it works better if you plug it in...
heartbone
21
Years of Service
User Offline
Joined: 9th Nov 2002
Location:
Posted: 9th Oct 2003 08:03 Edited at: 9th Oct 2003 08:05
Like Rich said. Good idea.
I can help if you get stuck.

If you're using DBC enhanced or DBPro my first suggestion is to use the .png format to store your images and textures.

My second suggestion is to decide on 2D (sprites) or 3D (objects). There are pros and cons to each but either version will be good starting projects.

My third suggestion is to finish a 2D version, then convert it to 3D.

If you do 2D use sprite collisions to detect when to destroy your sprites. For 3D use object collisions for the detection.

Sup Rore welcome to the forums and Happy DB Coding.

The more you see, the more you know.
The more you know, the more you see.
indi
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 9th Oct 2003 09:11
I answered your similar question in this post and started to make a mini example of how it could be achieved in 3d.

In that post you also referred to r type and thats what i started to address which can be customised for galaga as its the same principle just vertical instead of horizontal.

I also made u a mini snippet to fool around with in the 3d version like heartbone suggests before i found this duplicate post


http://www.thegamecreators.com/?m=forum_view&t=18068&b=7

Sup Rore
20
Years of Service
User Offline
Joined: 8th Oct 2003
Location:
Posted: 9th Oct 2003 18:52
Thanks a lot for the support so far guys, I'm going to try 2d first. I have sprites ready, but am not sure how to get Galaga style attacks working, with a laser/bullet.
Sup Rore
20
Years of Service
User Offline
Joined: 8th Oct 2003
Location:
Posted: 9th Oct 2003 19:01
Okay, I've started with the very basic stuff, inporting my sprite, and getting control and... I'm already having problems. I've been taking some things from examples, and trying to figure out what they do, and how to edit them to suit my needs. I have absolutely no idea how to get the play control working.

See anything wrong with my code?
heartbone
21
Years of Service
User Offline
Joined: 9th Nov 2002
Location:
Posted: 9th Oct 2003 23:09
Sup Rore assuming that you have a 72x63 pixel bitmap named ship.bmp in the folder,
run and play with this program.

It should start to answer your questions. You must refer to the command documentation in your User Manual to get an idea how and why a command is used.

The more you see, the more you know.
The more you know, the more you see.
Sup Rore
20
Years of Service
User Offline
Joined: 8th Oct 2003
Location:
Posted: 10th Oct 2003 01:06 Edited at: 10th Oct 2003 01:15
Thanks a lot, Now all I need are enemies and shooting... I think I'll start with enemies that need to be dodged.
I Can't quite figure out how to get more than one sprite working properly... none of the commands you gave have any obvious ways to affect specific sprites..
Sup Rore
20
Years of Service
User Offline
Joined: 8th Oct 2003
Location:
Posted: 10th Oct 2003 01:20
Got It!
Sup Rore
20
Years of Service
User Offline
Joined: 8th Oct 2003
Location:
Posted: 10th Oct 2003 01:32 Edited at: 10th Oct 2003 03:01
Okay, I'm using a tank theme as a placeholder, and now have sprite for the tank, (which is controlled, thanks to heartbone's code) And a Landmine, which I plan to have come down the screen in a loop, and cause a game over on collision. My problem of the hour, is how to get it (the mine) moving. I looked at the walking sprite tutorial, but couldn't figure out how to implement it. here's my latest code, can anyone help fix my problem?
heartbone
21
Years of Service
User Offline
Joined: 9th Nov 2002
Location:
Posted: 10th Oct 2003 03:11 Edited at: 10th Oct 2003 03:11
To get the mine moving insert these lines into your loop in between the two Sprite statements.

Inc Z : If Z > RGTLIM Then Z= 0
Inc M : If M > 400 Then M= 0


The more you see, the more you know.
The more you know, the more you see.
Sup Rore
20
Years of Service
User Offline
Joined: 8th Oct 2003
Location:
Posted: 10th Oct 2003 03:16
Okay, I'll try to wrap my brain around what that means. thanks.
Sup Rore
20
Years of Service
User Offline
Joined: 8th Oct 2003
Location:
Posted: 10th Oct 2003 03:30
I was adding the collsion, when something very odd happened. when I try to run the program, everything jumps around the screen like mad.

HELP!!!


My latest code.
heartbone
21
Years of Service
User Offline
Joined: 9th Nov 2002
Location:
Posted: 10th Oct 2003 03:49
You accidentely deleted this:

Rem Display sprite at current position
Sync

The more you see, the more you know.
The more you know, the more you see.
elVee
20
Years of Service
User Offline
Joined: 4th Oct 2003
Location:
Posted: 10th Oct 2003 03:53
I dont knwo why that would happen, allthough you can make you program shorter (not much, but shorter) by using


instead of


doesnt make a difference (that Ive noticed) in performance, but if you are loading a lot of pictures, using the load image command is much easier then using the load bitmap and get image commands.
Sup Rore
20
Years of Service
User Offline
Joined: 8th Oct 2003
Location:
Posted: 10th Oct 2003 04:36
Yeah bone, I noticed that right after I logged off.
I've now got everything working except making the game end if you collide. Here's my current code.


Any ideas on how to
A: efficiently get more than one mine on screen at once
B: get SHotting straight forward to work?
Sup Rore
20
Years of Service
User Offline
Joined: 8th Oct 2003
Location:
Posted: 10th Oct 2003 17:26 Edited at: 10th Oct 2003 17:30
Strangest thing, When I added a second mine, and collisions for the second one, the first collision stopped working, and the second started acting strangely. it's in my code.

All I need to know, besides how to fix that, is how to get GALAGA style shooting working.

Thanks for all your helps so far.
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 10th Oct 2003 17:41
Well you have Sync On instead of Sync. That's one problem.
Sup Rore
20
Years of Service
User Offline
Joined: 8th Oct 2003
Location:
Posted: 10th Oct 2003 19:53
Hmm... none of my problems have to do with sync though. I'll fix it.
Sup Rore
20
Years of Service
User Offline
Joined: 8th Oct 2003
Location:
Posted: 10th Oct 2003 19:55
Sync on runs smoother.
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 10th Oct 2003 20:09
Maybe you changed the wrong Sync On. You need to change the second one to Sync. The first one is OK as Sync On.
Sup Rore
20
Years of Service
User Offline
Joined: 8th Oct 2003
Location:
Posted: 10th Oct 2003 20:58 Edited at: 10th Oct 2003 20:59
Changing the bottom one drop my Frame rate. a lot.
Sup Rore
20
Years of Service
User Offline
Joined: 8th Oct 2003
Location:
Posted: 11th Oct 2003 19:40
When I added a second mine, and collisions for the second one, the first collision stopped working, and the second started acting strangely. It's in my code.

I'd really like to know how to fix that, And to get GALAGA style shooting working.

Thanks for all your helps so far.
heartbone
21
Years of Service
User Offline
Joined: 9th Nov 2002
Location:
Posted: 12th Oct 2003 03:26
Before you change too many things test your changes.
In other words change only one thing at a time until you are confident as to how the changes will affect the other existing code.

Besides understanding how the attached code works,
MAKE SURE THAT YOU UNDERSTAND WHY YOUR CODE DIDN'T.

The more you see, the more you know.
The more you know, the more you see.
heartbone
21
Years of Service
User Offline
Joined: 9th Nov 2002
Location:
Posted: 12th Oct 2003 03:28
After looking at the source you may understand why a programmer should never name a variable O.

The more you see, the more you know.
The more you know, the more you see.
Sup Rore
20
Years of Service
User Offline
Joined: 8th Oct 2003
Location:
Posted: 12th Oct 2003 18:56
Thanks a lot. I'll try to figure that out.
Sup Rore
20
Years of Service
User Offline
Joined: 8th Oct 2003
Location:
Posted: 12th Oct 2003 18:58
Okay, The whole CN thing is beyond me. I'll keep trying to figure it out.
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 12th Oct 2003 19:51 Edited at: 12th Oct 2003 20:26
The CN part of the program stops the colour change from being played more than once. If you were to put a Rem in front of CN = 2 and CN = 3. The colour would repeat like a machine gun. That colour change would be your collision routines, and you certainly don't want them to repeat.

Pincho.
Red general
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: United Kingdom
Posted: 13th Oct 2003 12:30
Have you looked in the code base? I belive there is now an example of an old 2D shooter like galager in it.

RED GENERAL

My computer melts regulary - perhaps it likes being fondue

Login to post a reply

Server time is: 2024-05-05 12:03:19
Your offset time is: 2024-05-05 12:03:19