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 Professional Discussion / Making an interface. Sprites or paste image(s)?

Author
Message
xtom
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Ireland
Posted: 9th Oct 2002 23:10
Just wondering which would be best/least demanding? I've done my interface with sprites at the moment and it looks great at 1024x768 but at 640x480 small sprites really lose their quality, so I'm wondering if I should instead go with pasting images. I think it will be more demanding than going with the sprites option but I might be wrong. Is there anyway of sharpening the quality of the sprites? Basically I've got text on a sprite that I want to fit onto the screen at about 48x42 at 640x480res and it looks a bit messy, hard to read.
DrakeX
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location:
Posted: 9th Oct 2002 23:34
i'd go with images for now for the simple fact that sprites are rather umm "unique" at the moment. once they're fixed tho i'd use sprites besides PASTE IMAGE is wonderfully fast, as it should be, so you won't notice any slowdown unless you have a painfully slow computer.

i'm looking at yooooou!
xtom
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Ireland
Posted: 10th Oct 2002 00:14
Ok I think I'll bite the bullet and recode (again) using image pasting. I'm curious what sort of difference in performance there will be if any. One thing about sprites though you don't have to keep using the sprite command to keep them displayed just once when they change which was kinda ideal for interface buttons. With paste image you gotta do it every loop I think. But at least it should be 100% clear.
EgoAnt
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Canada
Posted: 10th Oct 2002 02:47
Of course, there is always the third option of doing the menu system with textured 3 objects.... A little bit harder, but you van get some cool effects. (I quite liked the one that was made for Lightcycles...)
Richard Davey
Retired Moderator
21
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 10th Oct 2002 03:46
There is no (speed) difference between pasting an image or using a sprite at all. Technically it's actually doing the exact same thing anyway (so long as you don't have transparency or ghosting or any of the sprite effects turned on).

Cheers,

Rich

"Gentlemen, we are about to short-circuit the Universe!"
DB Team / Atari ST / DarkForge / Retro Gaming
AsylumHunter
21
Years of Service
User Offline
Joined: 3rd Oct 2002
Location: United States
Posted: 10th Oct 2002 04:43
Would it be possible to turn off bi-linear filtering on the sprites?

AsylumHunter

still falling out of my binary tree most evenings (hicup!)
DrakeX
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location:
Posted: 10th Oct 2002 06:17
would be nice but they keep saying "make it windowed and the problem will go away", but it doesn't

sprites still look blurry when windowed, rich. oh, and the fact that not deleting a sprite between calls to the SPRITE command on the same sprite causes the texture to be screwed doesn't help either.

i'm looking at yooooou!
Richard Davey
Retired Moderator
21
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 10th Oct 2002 19:12
"Would it be possible to turn off bi-linear filtering on the sprites?"

and

"sprites still look blurry when windowed"

This is not DBPro making them "blurred" by default - it's a combination of your video card settings and directx settings (for that card). I have mine turned off, but it's not always an option and sometimes when in Window mode the card will default them on anyway. There could be no "unblur sprites" command, but rather access to directx aliasing.

Unsurprisingly using a memblock and direct pixel writing equals no aliasing at all, but this is useless for games really.

Cheers,

Rich

"Gentlemen, we are about to short-circuit the Universe!"
DB Team / Atari ST / DarkForge / Retro Gaming
David T
Retired Moderator
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 10th Oct 2002 20:24
With sprites you can place a sprite at the mouse cursor (1x1) and detect collision between this and the button sprites for a menu!

I love Star Trek.
Especially the Episodes with Starships in.
Milamber
21
Years of Service
User Offline
Joined: 27th Sep 2002
Location: Australia
Posted: 11th Oct 2002 18:53
And with textured 3d objects, you can do the same sort of thing, though I admit it gets more complex

System Specs: AMD Athlon 1700+ XP, GA-7VRX motherboard, 128MB DDR RAM, GeForce2 MX400 64MB VRAM
xtom
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Ireland
Posted: 11th Oct 2002 22:06
My interface was initially locked 3d plains but they were a bit messy to position accurately on the screen. And when they didn't display correctly in DBPro after porting from DB I decided to recode it using sprites which are really easy to size and position on the screen.

I've decided to persist with sprites in this case as I need to resize the interface for 3 different screen resolutions and the sprite commands for sizing and stretching are too handy to pass up. Also I need the alpha command to easily fade them if they're not pressable butttons. The reason my sprites looked low quality is because they were small and I was scaling them down again for lower res so they looked crap. Anyway I think I have it sorted or half sorted for now anyway.

Login to post a reply

Server time is: 2024-03-29 08:12:44
Your offset time is: 2024-03-29 08:12:44