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 Discussion / 2D Polygons

Author
Message
Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 11th Feb 2013 17:14 Edited at: 11th Feb 2013 23:08


Features:

* Opacity
* Transformations
* Collisions
* Anti-Aliasing
* Texturing

^ That's what she said.
Fluffy Rabbit
User Banned
Posted: 11th Feb 2013 18:18
It would be really cool if they would be anti-aliased polygons like in flash.
Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 11th Feb 2013 20:06
That could be done using a memblock bitmap.

^ That's what she said.
Fluffy Rabbit
User Banned
Posted: 11th Feb 2013 20:16
Yeah, that's the only way to do it. DarkBASIC may be slow, but directly accessing a memblock instead of using the higher level commands might make up for it somewhat. Basically, anti-aliasing is done one of two ways:

1) Fullscreen post-processing effect (Crysis)
2) With each polygon (Flash)

I don't know whether 1 or 2 is faster. Then again, what do I care? You're the one programming it. I'll just wait and see. It might be cool to use this technology to add some cool special effects to games. Obviously, it would be too slow to completely replace DarkBASIC's built-in 3D commands for large complex scenes, but as some sort of effect, it might be interesting. It would complement the regular 3D graphics.
Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 11th Feb 2013 23:37 Edited at: 12th Feb 2013 00:06
I'm working on the rotations and scaling which is taking a bit of redesigning of the memblock structure. But I just wanted to post this

Look at the FPS: I can't believe drawing a wireframe polygon is so slow! It's two-thirds the speed of my opaque polygons. The built-in line command really eats resources!

[edit]

I'm trying to write some functions that just read values from the memblock and return them to make it easier to use, like this:

The last one is the only one that works. Is there really no way to avoid assigning another variable?

^ That's what she said.
Fluffy Rabbit
User Banned
Posted: 13th Feb 2013 12:49
Good work so far. Keep it up.
Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 13th Feb 2013 22:34
Thanks. I will try to.

^ That's what she said.

Login to post a reply

Server time is: 2024-03-28 20:13:50
Your offset time is: 2024-03-28 20:13:50