Pages: 1
Author Topic: Static Sprites  (29,617 Views)
Offline (Unknown gender) Josh @ Dreamland

Prince of all Goldfish
Developer
Joined: Feb 2008
Posts: 2,950
View profile
Posted on: September 13, 2012, 07:22:40 PM
An idea you'll find in non-GM game development suites is static sprites. Mechanistically, they're sprites that you place at a fixed (static) position in the room. Essentially, they are animated tiles. This is 90% UI related, or I'd probably just throw it in without ever writing up a proposal. LGM's tile editor is sad as it stands, and so is ENIGMA's tile implementation (no offense to TGMG, who just wanted something in that worked).

Ideally, they'll be placed at a certain depth using the tile editor. We'd want a way to set their coordinates, animation speed, and maybe scale/rotation.
Offline (Unknown gender) TheExDeus

Developer
Joined: Apr 2008
Posts: 1,860
View profile
Reply #1 Posted on: September 13, 2012, 08:53:53 PM
These would sadly still use something like draw_sprite_ext, as you can't have a gl list or something with animated stuff. I also wanted to change the current system to use gl lists or vertex arrays or something like that, but I couldn't figure out if there should be some "pages" or something. Because there would be no automatic culling and if you have a bazilion tiles in a compiled gl list they will all be rendered at the same time even if you can see 1% of the them on the screen at that time. I though there was GL automatic culling (so it renders only what is in view), but I guess you have to do all of that manually. Right now tiles are checked to see if they are in view.
Offline (Unknown gender) Josh @ Dreamland

Prince of all Goldfish
Developer
Joined: Feb 2008
Posts: 2,950
View profile
Reply #2 Posted on: September 13, 2012, 09:33:04 PM
Right. For that reason, the tile system and static sprite system would remain separate; I was just suggesting we lump them together in the UI for simplicity's sake.

I would calculate the max view dimensions, W and H, and divide the tiles into W×H blocks as GL lists/VBOs (VBOs in the new GL system). This way, you draw at most four at a time.
Pages: 1