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! / Are sprites now useless?

Author
Message
tayete
21
Years of Service
User Offline
Joined: 20th Nov 2002
Location:
Posted: 23rd Feb 2004 18:01
I mean. Now with the famous "blue screen" that appears when you want to use a sprite, the sense in which most of us used them has no use. We wanted sprites to make our hero cycle his positions over the background we chose that could scroll, or something like that. That background is usually made of tiles that are put in the background via "paste image", on every tile.
Now, if you create the sprite the images dissapear. If you use the techniques shown at the "Developer Network", you have to control yourself the appearence and dissapearence of the background when your sprite steps on it.
I know all this is produced by the use of DirectX, but...isn't this a step backwards? Are sprites becoming useless? Any experiences on how to optimize the use of sprites with "paste image" techniques?

Thanks all, gals and guys.

__________________________
http://www.tayete.com
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 23rd Feb 2004 19:28
Indi posted something that fixed this, maybe you can find the thread, or ask him.

Cros Jovil
20
Years of Service
User Offline
Joined: 27th Jan 2004
Location:
Posted: 24th Feb 2004 03:21
I'm a noob so I'm probably not much help but you can get rid of the blue backgound simply with a cls or maybe even a sync would do it
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 24th Feb 2004 06:30
In dbpro there isn't really any particular reason to use sprites over paste image.

If a computer is capable of running a dbpro program then it is capable of pasteing enough images to the screen every frame to make most games.

If you are pasteing a lot of background images and only have a couple of sprites and arn't using any of the sprite commands like rotate sprite there isn't really much point using sprites at all.

Useing images also gives you a lot of control, you can paste the images in the order you want them to paste and have no problems with text disapearing under sprites.

The best way to find out what is best for what you are going to do is just to mess about with the commands and make some test programs to see how the different methods perform in an similar situation to the game you want to make.

Our civilization faces three great dangers. The first is destruction by a nuclear war, the second is being crippled with overpopulation and the third is the Age of Leisure.
tayete
21
Years of Service
User Offline
Joined: 20th Nov 2002
Location:
Posted: 24th Feb 2004 10:29
Cros Jovil: The CLS method is useless, as it clears the whole background making you redraw it again. That is, less speed performance. Sync (as its name suggests) syncronizes with the monitor redrawing frame (I don't know how to say this in English).

The_winch: That's what I meant, you explained it perfectly. Now sprites are useless. You have to take care of cycling images, saving backgrounds and such using the "paste image" because "sprite" isn't worthy any more.

__________________________
http://www.tayete.com
Code Stealer
20
Years of Service
User Offline
Joined: 12th Feb 2004
Location:
Posted: 24th Feb 2004 11:09
Alphaoes pasting an image get turn the black on your .bmp to the alpha channel?

GIve me more power!
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 24th Feb 2004 11:22
Pardon?

Code Stealer
20
Years of Service
User Offline
Joined: 12th Feb 2004
Location:
Posted: 24th Feb 2004 11:35
I mean, if you just paste an image does it draw the black bit or does it aplha it out?Like when you use a sprite.

GIve me more power!
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 24th Feb 2004 11:43 Edited at: 24th Feb 2004 11:45
You can do either. Transparent, or solid. You still have to solve the collision problem though.

tayete
21
Years of Service
User Offline
Joined: 20th Nov 2002
Location:
Posted: 24th Feb 2004 13:32
Mmmm... I cannot find Indi's indication about the problem. Anyone knows what thread it was?

__________________________
http://www.tayete.com
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 24th Feb 2004 14:45 Edited at: 24th Feb 2004 14:47
Ahh I have just remembered how to fix this problem. You have to texture plains with your tiles.

tayete
21
Years of Service
User Offline
Joined: 20th Nov 2002
Location:
Posted: 24th Feb 2004 17:07
One 3d plain for each tile? Doesn't it slow too much the computer? Mmmm...sounds interesting, though.

__________________________
http://www.tayete.com
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 24th Feb 2004 17:24
One texture per plain, unless you know how to directly access the UV coord using memblocks. The tiles should not slow the game down much actually. Even in DB Classic you could use a lot of plains onscreen. I can easily run 300 plains in DBC without any slowdown, and DBPro is much faster than DBC. All of this 3D work though is a shame for a 2D game. Maybe it actually is better to paste images if you want a traditional 2D game. Maybe it's better to have DBClassic for traditional 2D games?

tayete
21
Years of Service
User Offline
Joined: 20th Nov 2002
Location:
Posted: 24th Feb 2004 17:59
Thanks a lot Pincho : now you have made me reconsider my whole project now I was really advancing

No, seriously thanks a lot for your info. And yes, maybe I should install again my dear old Dark Basic Classic. Unfortunately I had developed some menu and windows stuff that won't work in it. Furthermore, Blue GUI doesn't work in DBC

Do you know of any tutorial or code sample of this plains thingy?

__________________________
http://www.tayete.com
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 24th Feb 2004 20:15
It's not too difficult. You make a plain the same size as a tile..32*32, or whatever you are using. Then you just texture the plain with the image that you would have pasted to the screen. You then position the plain on the screen, but you now have a x/y/z position. The Z is easy because it is always 500 for the background in 2D. You point the camera in the direction of the plains using Set camera to Object Orientation #PlainNumber. Sprites will appear in front of the plains. Your array collision is exactly the same as 2D array collision. Actually there are not many differences to 2D, but now you can have transparency! Which is great!

Pincho.

CloseToPerfect
21
Years of Service
User Offline
Joined: 20th Dec 2002
Location: United States
Posted: 25th Feb 2004 04:43
use SET SPRITE to turn off the blue screen, I think you can also use SET BACKDROP OFF as well, then no blue screen and all is well in the sprite world again.

RGT may be gone but the best DBP forum is still alive and kicking, check it out.
http://www.dannywartnaby.co.uk/rgt/

Login to post a reply

Server time is: 2024-05-18 01:59:03
Your offset time is: 2024-05-18 01:59:03