Create Animation Program?
BlitzPlus Forums/BlitzPlus Beginners Area/Create Animation Program?
| ||
I just wanted to know if it was possible to create an animation program, I don't have enough money to buy one right now, and I just wanted to know the following things. 1. Is it possible? 2. If so, is it possible to save your animations as working animated images? (not just normal images) 3. Would my idea work? |
| ||
My idea is to have a user draw in a frame, then an identical frame would be created, labled frame 2. The user would then modify each frame as they went on to their heart's desire, then the program would draw the images extremely fast over and over again, hence creating animation. Also I am willing to put ALOT of time into this project |
| ||
You could convert all frames of the animation into one big image, and then load it using LoadAnimImage. Normally Blitz saves as .bmp, but there should be some libraries available that can save .png of .gif (freeimage maybe?) For information about .png and .gif, Wikipedia offers a good read. Another idea would be saving to a movie format, such as avi/wmv/mov/mpeg. There are several types of animation, from webanimations to blockbuster disney animations. I can imagine your program specializes to a certain type of animation. (Game graphics?) For example ImageReady (Photoshop) is made for web graphics. On the other hand, a program like Flash is really flexible. You can make webgraphics with it, but as I understood 'Happy tree friends' was made with Flash, too. I suppose affordability is not the main issue here and you are also doing this because you like it. Otherwise, I'm sure with extensive searches on google, there might be freeware animation software somewhere. It could be well worth checking other programs out, to see how others solved certain issues or what options they decided to include. Most graphical programs have a 'Save' function, that saves lossless, and an 'Export' function, that saves to a compressed format. From a project-based kind of view, I would first try out every concept in a small, separate, program and later on combine the ideas into a bigger project. As for the time schedule: I expect this program on my desk by next friday, so you better get to it at once. Good luck :) |
| ||
I'm not really that good but I'll try to get a proto-type in by next friday, my main problem now is just to see what I should save the animations as. |
| ||
That was a joke, about friday, monday is fine too offcourse ;) For my own project, I expected it to last three months. Now I am working on it for over a year and it is still not finished. The other day I read something about that programmers should not set any release dates, and I think there is some thruth in that. Main thing is staying enthousiastic, I guess. As for saving, have a look at the code archives: http://www.blitzbasic.com/codearcs/codearcs.php?code=1288 http://www.blitzbasic.com/codearcs/codearcs.php?code=619 http://www.blitzbasic.com/codearcs/codearcs.php?code=561 and think about what kind of animations you want to make. |
| ||
Oh oops, sorry I thought you were being serious. Anyway, I could give you a proto-type when its ready; if you want. Give me some time though I want to get things done right. |
| ||
Ok, I have blitz3d, but I installed the b+ demo. |
| ||
I started the prototype, not even a page of code and its going slower than a snail. I'm having it draw one relativly small image and it still can't catch up. What's the deal? Any suggestions? P.S If I'm not being to nosy, Why If you do Blitz 3D programming then why are you in a Blitz Plus forum? Just wondering, Siopses |
| ||
Aw, their not too different. As long as there is no CreateWindow() or Desktop() stuff in the code, I can help. A suggestion might be posting the code. This is a long shot, but if you are using "Flip", you might be missing a "SetBuffer BackBuffer()"? |
| ||
I'm not using Flip but I'll try to use buffering and see how it works and get back to you, ok. |
| ||
I used flip and buffering and my problem is solved, now if I'm not blowing away your precious time (this phrase was not meant to be offensive, ok) I have one more question. If I was to create a type for a certain image and put a rectangle (Rect) around it and lets say I put my mouse in the rectangle make it 'highlight' or something and then click on it to make it take me to a different part of the program. |
| ||
Ah, I'm glad it worked. Let's see, to check if the mouse overlaps an image, you could use: RectsOverlap(MouseX(), MouseY(), 1, 1, ImageX, ImageY, ImageWidth, ImageHeight) It returns a one if the mouse is overlapping the image. Then, you could use "MouseHit(1)", that returns a one if the mouse is clicked. So that would be something like If RectsOverlap(blahblah) And MouseHit(1) Then ... To highlight an image, you could have a look at LoadAnimImage. If you line the non-highlighted and the highlighted image up in one bigger image (they should have the same size), you can load them in one go using this command. Then you could use: DrawImage image, 0, 0, RectsOverlap(etc) If RectsOverlap is zero, then it draws the first image. If RectsOverlap is one, it draws the second one. |
| ||
I won't be done with the proto-type by monday, and* remember that I'm making a animation program because I don't have one. |
| ||
Hmm, okay, and have you searched for one ? I tried a google image search for 'freeware animation program' and I found this one: http://www.thebest3d.com/dogwaffle/free/ I tried it an it is pretty straight-forward. |
| ||
No I want to make one for myself I think that I'll be fine If I give it my all, with some help from this site. |
| ||
About the highlighting, I'm having trouble making a function for it. It says the following error "End Function without Function" any solutions? |
| ||
About the highlighting, I'm having trouble making a function for it. It says the following error "End Function without Function" any solutions? To quote John McEnroe, you cannot be serious. You've made a basic mistake, but how are we supposed to spot it without seeing the code? You've got an open section of code you haven't closed. An If without an EndIf or a Repeat without an Until or a For without a Next. But you can't possibly get a specific "solution" without showing anyone a single line of your code. |
| ||
Here is the code gabriel, Function Highlight(MouseX,MouseY) Return If MouseX() = createx And MouseY() = createy Then DrawImage createmouse,createx,createy End Function |
| ||
There should be an "End If" command before "End Function". And Return shouldn't be in front of the If. I think for this function to work, the Return should be removed. |
| ||
I changed the function to this > Function Highlight(MouseX,MouseY) If MouseX() = createx And MouseY() = createy Then Rect createx,createy,200,200 End If End Function , and the programs running but the function won't work. |
| ||
It is better to use brackets when using And: If (MouseX() = createx) and (MouseY() = createy) then ..etc Are createx and createy Global ? You pass MouseX and MouseY to the function, and then you are reading them. MouseX/Y shouldn't be used as names for variables. In general, maybe it is better to use RectsOverlap for highlighting, because now MouseX and Y have to be exacly at (createx, createy) for the rectangle to show up. If you have a problem like this, try commenting out everything at first, then enabling step-by-step each command to make sure everything works as intended. |
| ||
I think I'll give up the 'highlighting' and just do it an easier way thanks for the help though. |
| ||
I think i'll give up on this project, not worth all the work. |