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

BooGame and Tile Studio

Sign in to follow this  
Rob Loach

462 views

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  


4 Comments


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 );
}
Count++;
if( Count >= Rate[CurrentFrame] )
{
Count = 0;
CurrentFrame++;
if( CurrentFrame >= Length )
{
CurrentFrame = 0;
}
}
return;
}


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
Quote:
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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!