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! / Sprites

Author
Message
glyvin101
20
Years of Service
User Offline
Joined: 27th Jan 2005
Location:
Posted: 13th Nov 2006 00:18
ok, I'm not really to sure what a "sprite" is. I have been looking around and I'm not to sure. I noticed that there was a sprite pack for FPS creator and it appeared to me that they were things like Fire and water and smoke. I would like a little better explanation of sprites are, how they are made, and how to implement them into FPSC, I tried to use the search button but it did not help me that much. Anything you have to say would be greatly appreciated.

Glyvin101
sadsack
21
Years of Service
User Offline
Joined: 27th Nov 2003
Location: here
Posted: 13th Nov 2006 02:42 Edited at: 13th Nov 2006 02:44
A sprite is just art work that you have control over, like move it,rotate it,hide it and many other things. See download this is one of the sprites I used in my space game.


EDIT:

Attachments

Login to view attachments
Digital Awakening
AGK Developer
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 13th Nov 2006 08:23
A sprite is a 2D object that displays an image. They can be used to as sadsack says to move and rotate an image. You can also create animated sprites, change the draw order of your sprites and you can set them to not mess up the background. You can also create animated sprites with frames and they are hardware accelerated so they are much faster then pasting images directly to the screen.

indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 13th Nov 2006 14:28
sprites in Classic darkbasic are more like a 2d bitmap image cluster, which is grouped as an object.

sprites in Pro are 3d panels always facing the screen, but not always.

ThinkDigital
19
Years of Service
User Offline
Joined: 18th Aug 2005
Location: A galaxy far, far away...
Posted: 24th Nov 2006 20:30
Quote: "rites in Pro are 3d panels always facing the screen, but not always."
What?

Anyhow, sprites are like images and bitmaps except for the fact that (as Indi and them pointed out) they are displayed differently, and are manipulated far more easily. You can't rotate images or bitmaps, for instance, but sprites you can. Sprites can also be transparent, etc.

The theoretical difference is that while an image and a sprite are both graphics, images are used more for things like backgrounds, buttons, and textures. Sprites are treated more like objects that can move or rotate and are generally used as icons, gauges, and in-game characters.
NA170425
User Deleted
Posted: 25th Nov 2006 02:22
Sprites are two-dimensional entities that have can have an image so you can see them, and a position on the screen. Sprites are like instances of an image, you need an image, then you can make as many sprites you want that use that image.

Quote: "sprites in Pro are 3d panels always facing the screen, but not always."


I know that isn't making much sense, but I think he means the panels are locked to the screen, but sometimes they're not panels; they're drawn pixel by pixel on top of the 2d rendering of the 3d environment. One thing about DBP that I never understood is how the 3d panels are positioned so perfectly that every pixel of the image on it appears exactly in the right spot; you would think it was being drawn in 2d.

indi
22
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 25th Nov 2006 11:20
Somoene posted this a while ago.

if you position your 3d 2polygon panel using this 0.83 factor it looks pretty near perfect.

Width = Screen Width()/2
Height = Screen Height()/2
Z# = Screen Height()*0.83
Position Object OBJNUM,Width,Height,Z#

offest the width and height variables in the position command to move it where desired.



Sprites in DBPRO are in fact 3d but composed of 2 polygon panels, hence why the blue 3d background appears when you cast one.

Login to post a reply

Server time is: 2025-05-15 07:43:22
Your offset time is: 2025-05-15 07:43:22