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.

Author
Message
Regnuar
15
Years of Service
User Offline
Joined: 25th Dec 2008
Location:
Posted: 26th Jan 2009 11:31
Hello i was just wondering(again) how to make a toolbar, i mean how i get it 2d when the game itself is 3d? this is what i have done this far but i'ts not much
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 26th Jan 2009 12:13
You can use sprites for your toolbar, or if you need it to be 3D, then LOCK OBJECT ON once it is positioned.

Regnuar
15
Years of Service
User Offline
Joined: 25th Dec 2008
Location:
Posted: 26th Jan 2009 12:16
roger that! thanks for your help, this was all i needed to hear this time
Quadrazar
15
Years of Service
User Offline
Joined: 7th Jan 2009
Location: onboard the Kobayashi Maru
Posted: 26th Jan 2009 12:21 Edited at: 26th Jan 2009 13:02
There is a whole set of 2D commands availible. These are combinable with the 3D commands. The 2D commandset contains 3 sorts of "resources", once you know how to use them. 2d is less of a mistery.

Sprites:
sprites are a kind of instance that is drawn to the screen, on top of the backdrop (3D). Using sprites is the fastest way to generate 2D on the screen, However sprites don't come from nowere. They are generated form images. Sprites support transparency (or alpha channel). Sprites are creates by the sprite command. To remove a sprite the delete sprite command is used.

images:
Images can be directly loaded from a file (.jpg, .png, ...) or they can be (copied) form the current bitmap (see bitmaps). Images are less demanding to the system compared to bitmaps. Images are the sourcedata for a sprite. different sprites can use the same image.

Bitmaps:
Bitmaps are the thirdth an last type of 3D structures, A program can have up to 32 bitmaps, but it's recomandable to limit their amount to the bare minimum. Before we can manipulate a bitmap it has to be set as the current bitmap. The default current bitmap is the screen (id = 0). After manipulating the bitmap you'll have to set the current bitmap back to 0, otherwise you're screen will be lost. Asside form the screenBitmap, bitmaps are generaly not used directly, the are copied (as a whole or partial) to images. Once the images are created you can delete the bitmap without effecting the images.

I hope this information is helpfull to understand the basics of 2D drawing.
Regnuar
15
Years of Service
User Offline
Joined: 25th Dec 2008
Location:
Posted: 26th Jan 2009 12:47
thanks Quadrazar!

hmmm... one more thing




this makes 2 images to the screen, how i can hide the nonsprite?
Quadrazar
15
Years of Service
User Offline
Joined: 7th Jan 2009
Location: onboard the Kobayashi Maru
Posted: 26th Jan 2009 13:01
They are both sprites I believe. The paste sprite command makes a copy I think. If you want to hide one of them you could just use hide sprite (id). An image doesn't show on the screen when created, It's positioned in the memory.
Regnuar
15
Years of Service
User Offline
Joined: 25th Dec 2008
Location:
Posted: 26th Jan 2009 13:05
oh... my pad! thanks again for your help.

Login to post a reply

Server time is: 2024-09-28 00:24:20
Your offset time is: 2024-09-28 00:24:20