Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Quick Animations (GIF Walkaround)

Quick Animations
Version: 1

Introduction

The Idea here, is to replace GIF's with a chain of png or whatever files. You create the image just as you would a sprite (acutally, its just a complex sprite) and the script takes care of the rest. This is more of a tool for scripters.

Screenshots
http://img207.imageshack.us/img207/1448/screen6bh.th.png[/IMG]
You can't see the animation, but you get the idea.

Demo
Once Again, this is just an example.

Script

Instructions

Place the Script Below the SDK, and above Main. Check the Script heading for more details. If you don't understand something, just ask.

Compatibility

Will work without the SDK, for those of you who don't use it.

Author's Notes

Enjoy!
 
If you put the gif map in the Graphics map, this script won't work in encrypted games, as Dir.entries can't be used within these RGSS archives.
 
Trickster you took my idea again :P

instead of using Dir.entries and encountering the problem Me suggested why not add another argument frames for the number of frames the animatied sprite has and then you wouldn't have to use Dir.entries, or just switch to using the file_name and frames and then have the script load them from the pictures folder, or how about just using one picture and then use src_rect... so many different possibilites, but this is a great alternative than using your Displaying Animations script since you have to rewrite it to work in other Scenes.
 
@Seph, I thought about it, but many people wanted to just use an unpacked, converted gif image (this was a request over msn). I guess I could add a little something something for that as well, since that's what I would prefer.
 
SephirothSpawn said:
@Seph, I thought about it, but many people wanted to just use an unpacked, converted gif image (this was a request over msn). I guess I could add a little something something for that as well, since that's what I would prefer.

The second method I stated would be much more effective than using Dir.entries, but I like the third method the best since you would only have to load 1 Bitmap

Heh Trickster I have a few Custom Sprite classes as well
BackGround_Sprite (Automatically stretched sprite to fit the viewport that is sent to it)
Zoomed_Sprite (A Zoomed in Sprite includes sprite width and height methods)
Selector_Sprite (A sprite class that acts like a cursor)
 
Well @Trickster and Seph.

My idea is just using

begin
bitmap = load_data(file)
rescue
p "failed to load file"
end

right?
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top