Is there a way to create animated GUI?
If yes,How?
Re: Creating Animated GUI?
#2First you need to install a professional animating program like Fragmotion. I suggest getting Fragmotion if you want to add new npc's because that's the probram that extraxts b3d files witch are needed for entities in the game. Fragmotion says that it isnt free but you have the full version even if you get the trial version. You have to take this thing where you type out the fathers prayer and you get the program for 7 days. Once it expires, it will let you do it again and use the full version for another 7 days.
Learn how to use the program, start out with a simple cylinder then you want to give it bones, pivot points that allows the character to move or bend in certain directions. Then you animate it.
I will tell you this it is not easy, and it is time consuming and complicated, but its cool once you get to know how to do it.
Learn how to use the program, start out with a simple cylinder then you want to give it bones, pivot points that allows the character to move or bend in certain directions. Then you animate it.
I will tell you this it is not easy, and it is time consuming and complicated, but its cool once you get to know how to do it.
Re: Creating Animated GUI?
#4You could've simply deleted your post (I believe) instead of making a second one just to say that you did a mistake.bladestorm wrote:oh wait you said animated GUI my mistake
Do you think NASA invented thunderstorms to cover up the sound of space battles?
Re: Creating Animated GUI?
#5Find an image or make one that is like this, where each frame is in the same image and is the same distance apart each time:
Let's say you want to use this to replace the blink icon. You'd go into the code and find where it loads the blink icon, and change the line of code from "LoadImage" to "LoadAnimImage", changing the variables to match the new image. In this case, you would also need to blend the image to remove the pink. I can't remember if the function is EntityBlend or BlendImage or ImageBlend or whatever. I'm sure a quick CTRL+F of Main.bb will yield something.
Then you'd have to make a loop to animate it in the function where the blink icon is drawn.
Essentially you would adapt this; you declare tmr/frmSparks to be local to the DrawGUI function, then at the DrawImage for the blink icon, you'd add an extra variable to the end: "frmSparks" which would animate it.

Then you'd have to make a loop to animate it in the function where the blink icon is drawn.
Code: Select all
If MilliSecs() > tmrSparks + 100 Then
tmrSparks=MilliSecs() ; 'reset' the timer
frmSparks=( frmSparks + 1 ) Mod 3 ; increment the frame, flip to 0 if we are out
End If
DrawImage gfxSparks,MouseX(),MouseY(),frmSparks ; draw the image
(taken from http://www.blitzbasic.com/b3ddocs/command.php?name=LoadAnimImage)
Re: Creating Animated GUI?
#6It's MaskImage.InnocentSam wrote:... In this case, you would also need to blend the image to remove the pink. I can't remember if the function is EntityBlend or BlendImage or ImageBlend or whatever. ...
Also, Blitz3D images aren't very good for this. They're easy to use, but they can be slow and look ugly. Using a camera with orthographic projection and a sprite with an animated texture allows antialiasing, alpha channels and many other effects.
Re: Creating Animated GUI?
#7you see i know almost othing about codingInnocentSam wrote:Find an image or make one that is like this, where each frame is in the same image and is the same distance apart each time:Let's say you want to use this to replace the blink icon. You'd go into the code and find where it loads the blink icon, and change the line of code from "LoadImage" to "LoadAnimImage", changing the variables to match the new image. In this case, you would also need to blend the image to remove the pink. I can't remember if the function is EntityBlend or BlendImage or ImageBlend or whatever. I'm sure a quick CTRL+F of Main.bb will yield something.
Then you'd have to make a loop to animate it in the function where the blink icon is drawn.Essentially you would adapt this; you declare tmr/frmSparks to be local to the DrawGUI function, then at the DrawImage for the blink icon, you'd add an extra variable to the end: "frmSparks" which would animate it.Code: Select all
If MilliSecs() > tmrSparks + 100 Then tmrSparks=MilliSecs() ; 'reset' the timer frmSparks=( frmSparks + 1 ) Mod 3 ; increment the frame, flip to 0 if we are out End If DrawImage gfxSparks,MouseX(),MouseY(),frmSparks ; draw the image (taken from http://www.blitzbasic.com/b3ddocs/command.php?name=LoadAnimImage)
Re: Creating Animated GUI?
#8Can't you just create a gif image? Since they are the images that animate.
Re: Creating Animated GUI?
#9You would still need to edit the source code for it to animate.bladestorm wrote:Can't you just create a gif image? Since they are the images that animate.
Re: Creating Animated GUI?
#10No, while gifs usually have multiple 'frames' within the file itself, they cannot animate themselves. The reason why lots of people believe what you believe is that they only view gifs in a browser or specialized image viewer that handles the animation. That being said, for the love of god, don't use gifs for something like this. It'd be much easier to make a sprite sheet and blit rectangles from it. Frankly, I can't remember how efficient B3D's sprites are, but provided you implement it properly you should be fine.bladestorm wrote:Can't you just create a gif image? Since they are the images that animate.
Last edited by MonocleBios on Sat May 31, 2014 6:44 pm, edited 1 time in total.
M-x dingus-mode