Pages: [1]
  Print  
Author Topic: Static Sprites  (Read 1497 times)
Offline (Male) Josh @ Dreamland
Posted on: September 13, 2012, 02:22:40 PM

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2955

View Profile Email
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.
Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Offline (Unknown gender) TheExDeus
Reply #1 Posted on: September 13, 2012, 03:53:53 PM

Developer
Joined: Apr 2008
Posts: 1886

View Profile
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.
Logged
Offline (Male) Josh @ Dreamland
Reply #2 Posted on: September 13, 2012, 04:33:04 PM

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2955

View Profile Email
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.
Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Pages: [1]
  Print