News:

Building a 3D Ray Tracer  By stevmjon

Main Menu

Clowns 'n' Balloons final released !!!

Started by micky4fun, April 24, 2009, 02:51:10 PM

Previous topic - Next topic

micky4fun

#30
Hi BlinkOk

yes clown animation looks great , nice see-saw to , no rush here , take your time going to take me a while to do it all anyway ,

Yes great work from u9 hes demo code looks very good , wonder if he fancys having a "pop" at it as well , u9 ?
see what you meen about matching animations with take off and landings
yep got the drift with forward and reverse animations , clown can just sumersault from side of cannon , into cannon from ground when he misses see-saw

mick ;D


ps  not to sure if a simple rotatesprite will do clown roll aimantions anyway , try both to see what difference there is

BlinkOk

cool. i'm workin on it. the background/curtain assets;

Download assets

note: i made the curtain image 300 pixels high so you'll have to shrink it a bit on the gameplay screen to fit up the top and then when you stretch it it won't pixelate so much.

u9

I actually don't know playbasic very well. But just to add, i love the clown walk animation, but as a programmer i can see it might be easier to use the "bouncing over to cannon." Kill your darlings, right? ;)

BlinkOk

QuoteKill your darlings, right?
haha! to true.
i just think getting it done as quickly as possible simulates the real world a little more accurately. i also lose interest in these things if they drag on so going for the simplest solution i think is the best. we can always come back later and maybe have him run and jump into the cannon at the start.

u9

#34
hehe i totally agree.

Anyways, i made a UDT of the clown, loaded the images and made some functions so the main loop of my bounce-demo is pretty much empty now.

Use left and right mouse button still.

Micky, if you would like to use this, you just need to put your clown code into the ClownUpdate() function after the little bit of animation code that is there. I put the bounce code from the main menu in there and it seems to work nicely. I have no idea how your original game code looked or whether this will fit in any way. If not it is ok... who knows, maybe there is something you could use. You can always ask if you don't understand some part. As you may have noticed i use images in stead of sprites... it can probably be changed to use sprites, but i haven't used sprites before myself.

I also made a ClownDrawShadow function which draws an ellipse at ground level. The size is controlled by how far up the clown is. This can be adjusted with the CLOWN_SHADOW_RANGE constant. I am sure kevin has a better way of doing this though.

Ah, and i fixed a bug in the CurtainDraw() function when the image is smaller then how far the awning is down, i.e. when the image has to be stretched. Now it should work at least until the image becomes less then half size. So if you are using my solution, then update that function.

Ok, I think i should step down now and leave you to it. Don't want to "step on your turf" ;) I got carried away with the pretty graphics.

EDIT: A quick question Micky, have you ever used state machines? That might be useful for knowing whether the clown should bounce to the cannon, shoot out of the cannon, or stand on swing-thingy, or normal bounce. Just a thought.

micky4fun

#35
Hi u9

QuoteDon't want to "step on your turf"
yep ive only just mowed the grass , get off , haha  ;D

anyone and eveyones weclome to do anything with any of my stuff ,
i copy most code on here anyway , i just do it for the fun of it as i said before , what a great buzz , just getting something simple up and running.

ile download your code when i get home , as im at work now and cant download.
hope i can understand it , as i have my special way of programming , its called basic basic , lol

im happy with that , i know its not the right way , but its proberly the best i can understand and do
which is a shame really , as i know on a level par im only on level 1 on what PlayBasic can do '



mick ;D

BlinkOk

QuoteA quick question Micky, have you ever used state machines?
ditto! defiantly the way to go here

micky4fun

#37
QuoteA quick question Micky, have you ever used state machines

no not got a clue ,, remember  basic basic ,
though saying that , any example code ? , ile have a look to see if i can comprehend it

mick  :)

edit ,, well ive looked that state machines wording up on internet and as i see it , it meens like doing a program a flow chart kinda way , is this correct?

thanks u9 downloaded code and triedit out , it seems a bit involved at a first glance to me , but i will look through it and see how i get on ,
but straight away seen how you have done the shadow of clown , great

as for the clown sprite animation , i think the rotatesprite does a much smoother job than the 12 frame animation , with rotatesprite we have a 360 frame animation , but using clown_ypos as the frame counter
will lower frame count as clown_ypos will step up about 20 in places and down to 1 in others , but this still meens more than 12 frames of animation

ok ile wait for all images to be done before starting as that way i can plan it out better , hopefully

mick ;D

u9

It is so long i learned about finite state machines that i don't even remember how it was taught. I will see if i can explain it to you tomorrow'ish. In the mean time, check out the attached clowny business.

micky4fun

Hey u9

looks the bizzo , very nice indeed , you nearly completed the game here , very nice work , looks like you dont need sprites for this , could do whole game with images

code is well how can i put it , hard for me to understand at the moment , but there is bits in there that i do understand and will come in handy, but think ile try it my way if you all dont mind , but would be great to see you have a bash u9 your half way there , would not take you to long the speed you go at , lol

ile wait for all the images before starting as then i can see what im playing with , take it you did the extra gfx u9 clown standing, cannon etc

but once again u9 a very very impressive example ,,

thanks
mick

BlinkOk

ok dudes. these are all the assets so far (i think).

Download assets (assets1)

you go have some fun now micky. and let me know if you need anything else (i reckon there are some words like "you loose" and "you win" also)

ps: bugga! i forgot the hud. i'll post it up tomorrow.

u9

I just took a screenshot from the flash demos BlinkOk uploaded and cut out some frames hehe... the code from my last upload has gotten so messy now i almost don't understand it myself, so don't worry about it. I just uploaded it for fun, because i liked watching the clown pick himself up again and walking to the cannon and getting shot.

I will try and explain how state machines work, and make an example, because it would work perfectly. That is what i used in that last demo. But you should go ahead and get started. Of course we all work in very different ways.

micky4fun

Hi BlinkOk

ok ive downloaded images , ile start later tonight and tomorrow on getting clown in out of cannon and moving about screen and see-saw stuff , see how i go on that , no rush on hud and balloons , ile let you know how im getting on asap

u9 , ok , yep clown movements look good and make a somple game into a good one i think
i think i know what you meen by state machines looking through your last code
anyway thanks again for example , lots of good and hard work from you on that

mick ;D

micky4fun

Hi BlinkOk

ok ive had a quick go tonight using my old code as just a try out , just a questions here.
1. is the clown going to be standing upright on see-saw or in a ball on see-saw , ie so hes in a spinning ball on way down does he then lands upright and then take off upright untill he reaches the balloons then spins on way down , or does he stand upright on see-saw and when released start in a ball straight away or is the clown in a ball all the time even on see-saw?

i think hes best being upright on see-saw , shoot up upright as he does when fired from cannon and on the way down spins in a ball then lands on see-saw upright again , whot do you think?

there is one big problem with my way is that if the clown is say on the left side of see-saw facing inwards to see-saw face in middle he then takes off going right direction spinning right he will then land on other side of see-saw he will be of right hand of see-saw facing outwards with back to face in middle of see-saw , and vice versa

mick :)

BlinkOk

ok here's what i think;
the jump anim is four frames so it goes like this; when he jumps you play the first four frames and then you start the spin. when he comes down he falls spinning until he gets pretty close to the see-saw and then you play the jump anim backwards to simulate landing. have a look at the animation in the last flash animation example (mockup1.swf).
i don't think that the direction he is facing on the see-saw will matter. i would experiment with both options because i don't think it will look to odd if you flip the images when he transitions into a landing (so that he's always facing toward the center of the see-saw)

ok here's the hud and of course the balloons (i can't believe i forgot the balloons!!)
Download stuff (hud & balloons)