Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Create Animated Sprite...is this possible? just started ...what's the potential....

Author
Message
WillieFred
11
Years of Service
User Offline
Joined: 4th Apr 2013
Location: Gulfport,Mississippi
Posted: 4th Apr 2013 02:33
I'm delving around with some ideas while attempting to learn the syntax etc...anyone know if its is possible to for example...I create animated sprite ...use image which contains separate images ...i.e. a,b,c,d,e,f,g,h...strip with eight squares..cut with create animated sprite...now each frame number access the individual squares..a or b or any of the eight ... i know that...but is it possible to display the separate frames as images on the screen simultaneously and in different positions at the same time(to stay on screen at same time). or possibly as different sprites
representing each frame of the animated sprite. thanks in advance
Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 4th Apr 2013 15:47 Edited at: 4th Apr 2013 15:49
Yes it is possible; you have plenty of freedom with animations, sprites and images; there is hardly anything you can't do in the image medium within DBP. These kind of things will become more obvious as you practice and read all of the documentation and browse the code snippets in the forum.

The [Create Animated Sprite] command will produce a sprite that can be animated with the Play Sprite command. Deep, deep down under the surface, what is really going on is the Create Animated Sprite is a convenience shortcut to manipulating the UV coordinates of the sprite, which is simply extracting an area from the image; a bit like copying and pasting an area from the image.

You can easily set the sprite frame to any frame you wish using the [Set Sprite Frame] command, and duplicate the sprite with the [Clone Sprite] command or paste it to the background using the [Paste Sprite] command. Caution that sprites overlap pasted images when visible by default; you must keep pasting the sprite on each loop because sprite pasting lasts until the next [Sync] call; after-which any pasted image is wiped clean; due to sprites requiring previous frames being wiped off for new frames to be drawn; which is actually handled by what's called the current camera.

Login to post a reply

Server time is: 2024-11-23 15:24:57
Your offset time is: 2024-11-23 15:24:57