GIF and QT animations on old processors

Creating Games? Developing something for fun?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
hrevusr
Posts: 4
Joined: Thu Apr 27, 2006 11:25 am

GIF and QT animations on old processors

Post by hrevusr » Fri Jun 23, 2006 7:36 pm

I used Revolution to develop some funny free games.
Because I don't own the Arcade Engine currently,I used animated
GIFs or imported QT clips to generate animation.
The point is that my games work properly only on computers having an updated hardware and processor,but under older Windows versions or processors animations are slow,synchronization is difficult and the user is unable to play.How can I fix this problem?

BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1236
Joined: Sat Apr 08, 2006 1:10 pm
Location: Zurich
Contact:

Post by BvG » Fri Jun 23, 2006 11:03 pm

An easy fix for animated gifs is to roll your own. Animated gifs are very resource hungry.

What you do is having all the animation frames as non animated images. Then you have a button of which you set the icon to the next image for example like this (code goes into a second checkmark button):

Code: Select all

local counterVar

on mouseUp
  if the hilite of me then
    put 0 into counterVar
    send "animationRun" to me
  end if
end mouseUp

on animationRun
  add one to counterVar
  if counterVar >= 5 then
    put 1 into counterVar
  end if
  set the icon of button "animated button" to ("animation" & counterVar)
  if the hilite of me then
    send "animationRun" to me in 0.03 seconds
  end if
end animationRun
Oh, and Quicktime is a resource hog!
I would advise to not use it in animations if you want lower end comps to run your game.
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode

Post Reply

Return to “Games”