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.

DarkBASIC Discussion / Target Sprites

Author
Message
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 30th Jun 2004 13:28
How do you make a sprite which would outline an aircraft or tank so you could fire a missle or shoot at an enemy target on you H.U.D?
zenassem
22
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 30th Jun 2004 22:41
vampyre,

I'm not sure if you realize that your question {is too broad } for anyone to give you a realistic answer. If someone tried to answer it the way it is asked the type of response you will get is:

1-> draw the sprite in a graphics package, Mspaint, Paint Shop pro, Photo Shop, the Gimp, etc
2-> make the background color the color you would like to have transparent. (in DBC black is transparent: DBpro Black is transparent by default and cna be changed by <set image colorkey r,g,b>.
3-> save your image to your project folder. Use load <image "filename",imgnum,1> to load your image
4-> Use the <sprite spritenum,x,y,imgnum> comand to create your sprite.
5-> Now write the code that checks to see if your sprite is around an object. (This is the part that is impossible for us to answer unless we know exactly the design and layout of your game. And it's something you need to figure out. If you can't figure this part out, it's unlikely that you will be able to code most of the other parts of a game like this.)

~zen


Turoid
21
Years of Service
User Offline
Joined: 1st Nov 2003
Location: The Netherlands
Posted: 30th Jun 2004 22:55
6->

sprite spritenum,object screen x(objectnr),object screen y(objectnr),imgnr

cheers

if I = 1 then I = 1 else I = 0

Current project>> "MagEasy" simple 2D game creator..
vampyre
22
Years of Service
User Offline
Joined: 14th Nov 2002
Location:
Posted: 1st Jul 2004 04:42
OK zen I am not sure but have you ever played the Wing Commader series or Conflict Freespace series or Starlancer orUltrafighters or Stariege or Mechwarrior Series, in this space simulation games you have a target lead indicator which helps you to fire at your target more accurately and also for your missiles to lock onto it is usually either a sprite which is outlined around the target you which to shoot at or protect, green being the ones on your side , red being the ones you shoot at

I just wish to know how :

1)I can have a sprite/bitmap outline which moves as the target/friendly object moves
2) how I can have say amissile lock sprite indicator to go aove the Target indicator as well

Can you help I aleady got a good H.O.T.A.S flying space/aircraft example

Login to post a reply

Server time is: 2025-05-24 14:07:47
Your offset time is: 2025-05-24 14:07:47