ENIGMA Forums

Contributing to ENIGMA => Proposals => Topic started by: Josh @ Dreamland on September 13, 2012, 02:22:40 pm

Title: Static Sprites
Post by: Josh @ Dreamland on September 13, 2012, 02: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.
Title: Re: Static Sprites
Post by: TheExDeus on September 13, 2012, 03: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.
Title: Re: Static Sprites
Post by: Josh @ Dreamland on September 13, 2012, 04: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.