Please login or register.

Login with username, password and session length
Advanced search  

News:

For WME related articles and tutorials visit WME Resource Center.

Author Topic: moving images in sprites  (Read 5371 times)

0 Members and 1 Guest are viewing this topic.

odnorf

  • w00t?
  • Global Moderator
  • Addicted to WME forum
  • *
  • Karma: 7
  • Offline Offline
  • Gender: Male
  • Posts: 1456
  • Lamp dog!
    • View Profile
moving images in sprites
« on: April 15, 2003, 11:53:18 AM »

Let's say I would like to create a sprite which will contain
only 1 bitmap but I want this image to move (looping) down & up all the time.

The way it seems that it can be done right now (and correct me if I am wrong) is to create a sprite which will contain many (if I want very smooth scrolling) frames
 
FRAME {
    DELAY = 0
    KEYFRAME=FALSE
    IMAGE = "scenes\example\example.bmp"
    HOTSPOT {x, y}
    3D_ONLY=TRUE
    EDITOR_SELECTED=TRUE
    APPLY_EVENT="scrolling"
  }

and every frame should have different coordinates (Hotspot).
That method is rather slow.

What I am thinking is something like:

FRAME {
    DELAY = 0
    KEYFRAME=FALSE
    IMAGE = "scenes\example\example.bmp"
    HOTSPOT_01 {x1, y1}
    HOTSPOT_02 {x2, y2}
    HOTSPOT_03 {x3, y3}
     ....etc.....
    HOTSPOT_FRAMESPERSEC = 15   (defines frames/sec for the animation)
    HOTSPOT_SCROLLING = TRUE (enables or dissables all hotspots except 01)
    HOTSPOT_01_TO_02 = 4 (from 01 to 02 takes 4 seconds)
    HOTSPOT_02_TO_03 = 5
    .....etc....
    3D_ONLY=TRUE
    EDITOR_SELECTED=TRUE
    APPLY_EVENT="scrolling"
  }

This will be very usefull for scrolling clouds (for example),  even to create complicated falling letters & numbers like in matrix!
« Last Edit: April 15, 2003, 11:57:18 AM by odnorf »
Logged
fl*p

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re:moving images in sprites
« Reply #1 on: April 15, 2003, 12:43:59 PM »

The way it seems that it can be done right now (and correct me if I am wrong) is to create a sprite which will contain many (if I want very smooth scrolling) frames
That's right.


Well, I had another request for sprite improvements some time ago. The idea was to allow some simple "programming" in the sprite definitions. Think about the BASIC language, labels, GOTO's, simple loops, random jumps, etc. IMHO that would solve this issue as well.
In other words, some sprite imporvements are planned, but I consider them to be a low priority task at the moment.

In case of some complex movements I'd probably prefer making an entity and moving it using scripts. I think it would work pretty well e.g. for the scrolling clouds.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave
 

Page created in 0.02 seconds with 22 queries.