Jump to content
  • Advertisement
Sign in to follow this  
  • entries
  • comments
  • views

BooGame and Tile Studio

Sign in to follow this  
Rob Loach


After hacking at it for about three hours, I finally got Tile Studio working quite nicely with BooGame. I used its code output feature to output script files which are then interpreted by BooGame during runtime. Here's a shot of BooGame's new ScrollDemo example:

Download Latest Build

If you download the latest build, you'll see that you use the arrow keys to move the screen around. The moving background gives a neat effect. Unfortunately I'm extremely puzzled with the animated water tiles at the bottom right of the map, I'll take a look at those later. Big thanks go to Scet on this one.

Although it might be only on my system, OpenGL misses a few pixels with the tiles. I'm not entirely sure how to fix that, but I'm sure I'll find something.

SourceForge seems like the best place to host BooGame, so I submitted a project submission form. I would host it on my own site, but SourceForge gives you a load of project management resources which are very nice for open source solutions. I should have everything moved over by next week. Until then, enjoy!

Random Interest

The Iceberg
Sign in to follow this  


Recommended Comments

What problem(s) are you having with the animated tiles?

Share this comment

Link to comment
I just don't understand how Tile Studio sets up the sequence data. Right now I think I have the sequences outputed to an animation, but I'm really not quite sure how it works to say how it displays in the tile data.

Share this comment

Link to comment
Each sequence is just two arrays of the same length, the length being the number of frames. One is for the tile indices and the other for the frame rates. The tile indices work the same wall as the ones used for the map data, 0 is nothing and the others reference a tile in the sprite sheet. The "frame rate" array represetns how many frames each frame of the animation should be on screen, however frame based timing sucks so you might want to think up another method.

Here's some pseudo code(might explain things a little better)

int Length = 10; // animation is 10 frames long
int Indices[10];
int Rate[10];

int Count = 0;
int CurrentFrame = 0;

Render() // called once per frame
if( Indices[CurrentFrame] != 0 )
DrawTile( Indices[CurrentFrame] - 1 );
if( Count >= Rate[CurrentFrame] )
Count = 0;
if( CurrentFrame >= Length )
CurrentFrame = 0;

Oh yeah, for sequences in maps like the water there. If you come across a tile number that's negative that means it a sequence. The sequence to draw is the positive version of that number. So something like this:

DrawSequence( Abs( MapData[y][x] ) - 1 );

Be sure that you're reading them into whatever array you have in the right order. The numbers Tile Studio uses reference the order it was output. So a map tile with the value of -1 represents the first sequence in the file.

Share this comment

Link to comment
Abs( MapData[y][x] ) - 1
AHAH!! That's what I was missing!!! Thanks a lot!

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!