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! / 2D acceleration from Direct X?

Author
Message
Northern Fist
20
Years of Service
User Offline
Joined: 23rd Sep 2003
Location:
Posted: 16th Dec 2003 02:01
Do the 2D primitives in DB (dot, to sprites) get any acceleration from Direct 2D? I apologize if this question has been asked before.

I got another question: is it viable to make your own sprite function? In essence, your bitmaps will be reconstructed using arrays of dots. I came up with the idea when I was thinking about a clipping algorythm, and then got hit by a rock.

"Power, precision, and don't forget about speed. If you practice everyday with these things in mind... you begin to develope A FIGHTING MODE." - Fist of Legend (Jet Li)
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 16th Dec 2003 10:47
The drawing routines are very slow. I think that someone made some faster ones on RGT last year.

Pincho.
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 16th Dec 2003 19:33 Edited at: 16th Dec 2003 19:35
In dbpro sprites are 3d. You can use paste image instead of sprites but have to do your own collision.

I am currently writeing a space invadors clone that uses an array for the shields. The info in the array is then used to make a sprite image via a memblock. The info in the array is also used for bullet collision.

screenshot
http://winch.dbpcommunity.com/temp/s_inv.png

Is that the type of thing you are thinking about?

dbpro : p166mmx @ 233 : 256mb : sb 128pci : sis onboard
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 16th Dec 2003 20:29
Dot, line, point and circle are unaccelerated. The rest are accelerated

For free Plug-ins, source and the DBPro Interface library for Visual C++ 6 and .NET
http://www.matrix1.demon.co.uk
Northern Fist
20
Years of Service
User Offline
Joined: 23rd Sep 2003
Location:
Posted: 16th Dec 2003 22:40
Rats... There goes my idea of constructing my own 2D-engine.

"Power, precision, and don't forget about speed. If you practice everyday with these things in mind... you begin to develope A FIGHTING MODE." - Fist of Legend (Jet Li)
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 20th Dec 2003 01:05 Edited at: 20th Dec 2003 01:06
if you use the 2D Drawing commands, always make sure to lock your pixels first.
want an example to why?



thats why, and you can gain even more speed by accessing the data pointer of the screen yourself...
just remember each data length is actually

(PXWIDTH+PXPITCH)*(BPP/8) = DATA LENGTH

so something like,




Detonating a nuclear device within the city limits results in a $500 fine!
900mhz|256mb|FX5200Ti 52.16|Dx9|WXP-Pro
Northern Fist
20
Years of Service
User Offline
Joined: 23rd Sep 2003
Location:
Posted: 21st Dec 2003 21:49
Hmmm... Interesting, thanks for the posts guys!

"Power, precision, and don't forget about speed. If you practice everyday with these things in mind... you begin to develope A FIGHTING MODE." - Fist of Legend (Jet Li)
flibX0r
21
Years of Service
User Offline
Joined: 14th Feb 2003
Location: Western Australia
Posted: 26th Dec 2003 17:16
Sprites are 3D? I don't think so. I think they are just a wrapper system for images. Why would Lee code it as 3D? Thats just more calculations, which is silly.

@DBoy780: I though the 286 was still a hot machine...

My game course has interupted my Alienware compo. No more sweet ass comp for me. Plus I have no more webspace.
Sonic
21
Years of Service
User Offline
Joined: 10th Sep 2002
Location: UK
Posted: 29th Dec 2003 14:41
Sprites are 3D = I believe that is the way 2d images are drawn in dx9 - this means you can do stuff like rotating a sprite which is not usually possible to do with a 2d raster with most video card hardware.

"My ignorance amuses me..."
http://www.victory-road.co.uk
heartbone
21
Years of Service
User Offline
Joined: 9th Nov 2002
Location:
Posted: 30th Dec 2003 20:19 Edited at: 30th Dec 2003 20:22
Mr_Flibble what is silly is that they are now calling 3D objects sprites, which is totally false and confusing.

This is just more M$ trashing the commons I guess. And TGC is toally complicit.

Who ever heard of a personal computer BASIC without sprites? Welcome to DBPro. True sprites were actually removed from DarkBASIC in DBP and replaced with imposter objects.

The more you see, the more you know.
The more you know, the more you see.
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 2nd Jan 2004 01:01
Quote: "Sprites are 3D? I don't think so. I think they are just a wrapper system for images. Why would Lee code it as 3D? Thats just more calculations, which is silly"


perhaps because Lee didn't do it.
DirectX 8.1 introduce the full 3D system as it was found that card could render and handle 2D much faster and better if it was given a 3D plane to work on.

hell you render EVERYTHING to a 2D Rectangle area now as well, so 3D isn't really 3D it's just psuedo 3D

now there something to rattle around in your heads...
you have a 3D object for displaying 3D objects to display 2D objects and also for displaying 3D object on that.

^_^ it's a mess, but it's brought DirectX's speed up level with OpenGL so who the hell cares.


Detonating a nuclear device within the city limits results in a $500 fine!
900mhz|256mb|FX5200Ti 52.16|Dx9|WXP-Pro

Login to post a reply

Server time is: 2024-05-11 17:57:59
Your offset time is: 2024-05-11 17:57:59