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 / Bullets firing problem

Author
Message
Vinnie
20
Years of Service
User Offline
Joined: 1st Jun 2004
Location: Chicago, ILL
Posted: 9th Sep 2005 18:02
I have a shell of a game and the bullets are firing from the middle when it starts but, when I move the ship the bullets change position on the ship. How can I keep the bullets firing from the middle of the ship.

Sincerely,

Vince Lorenca
Chicago, IL
Silent Knight
19
Years of Service
User Offline
Joined: 25th Jan 2005
Location: In Your Mind
Posted: 9th Sep 2005 22:10
try looking at the swarm demo source code in the myproj folder. very helpful for firing.

Version--DB Classic
900 mhz AMD Athlon, 128 MB RAM,
16 MB NVidia Vanta gfx card, Windows ME System software
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 10th Sep 2005 04:56
is this a 3d or 2d game?
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 10th Sep 2005 04:58
oh ....lol 2d
i guess i could look at your snippet first

ill comment shortly after trying it
SoftMotion3D
AGK Developer
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: Calgary,Alberta
Posted: 10th Sep 2005 05:10
oh i see whats going on here.... it seems that when using the sprite rotation it doesnt rotate around the center of the object....instead it rotates around the top left corner.

this makes for some nasty math equations to figure out where to place your bullets start position.

Unfortunetly me not being well enough skilled with that this is what i suggest...

use 3d

you can still make a 2d game using 3d plain's...infact you can make your game look alot better adding ghosting to a plain making it look like fog in your 2d looking game...
to get away from glitching your 2d artwork....if you have some object that needs to overlap others increase the y axeses by 5 or 10 to make it look like its on top.

when you use a 3d plain object it will rotate from the center of the object....hense eliminating your problem.

you can even mix 2d with 3d too....be creative....with dbpro...there is plenty of ways around a small stump like this one.

good luck
Robot
20
Years of Service
User Offline
Joined: 27th May 2004
Location:
Posted: 10th Sep 2005 10:09
Could you not use offset sprite spritenum,sprite width(spritenum)/2,sprite height(spritenum)/2

The happenings of tommorow are behind us now

Login to post a reply

Server time is: 2024-11-27 18:33:37
Your offset time is: 2024-11-27 18:33:37