News:

Function Finder  Find all the functions within source code files

Main Menu

Clowns 'n' Balloons final released !!!

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

Previous topic - Next topic

Kman1011

I had something similar with the awning you're looking at with my game 'Mecha' (which is way too massive to share on the forum)

I think I used a very large sprite and moved it down the screen. mind U it didn't take up the whole screen.
That's just one idea. I'm sure Kevin has better one ;)

Quotei walked passed a shop that had an intellivison in the window ,

Yep... i remember those. i even remember the Actor who was in the commercials but can't remember his name. I upgraded to a C64. That computer was built for Basic!
Ahh... Another visitor. Stay awhile....STAY FOREVER!!!...MWA-HA-HA-HA

micky4fun

u9 , just got home from work and downloaded code , very nice demo , as BlinkOk said great idea for walking back to cannon , good continuity , if i get stuck may need your help later , !!

ok BlinkOk , no rush when ever they are ready ile give it a bash , see how we go again

did not get anymore spare time at work today , so ile have a muck around tomorrow again

mick ;D

BlinkOk

hey mike,
just so you don't think i'm bludging on this one i have attached my progress. still a couple of things to do. can you review it and let me know if everything is doable. there are two pieces of functionality you need to do; flipping an image (the dude) and rotating an image around an arbitrary point (the cannon).

Download Flash Animation


micky4fun

Hi BlinkOk

ohh my gord , why aint you doing loads of games yourself , your demo is amazing such cool gfx , you are very talentent with these animations ,
looks a bit more involved than my last game , but yes ile give it ago thats for sure , the transsition looks the hardist at the moment , but may turn out to be easy and i may getstuck elseware , but plenty of good programmers on here to help , including yourself , you make it oh so simple with the falsh demo ,
Quotejust so you don't think i'm bludging on this one i have attached my progress.
take your time , its proberly going to take me a while to do it anyway , ile start from scratch on this i think , will make it easier , got the general layout in my first attempt just goto add bits to it

thanks BlinkOk

mick ;D

micky4fun

Hi Kman1011

thanks for the tip , ile much around later today with that idea ,

just add a look at your A short 3d demo thred , progress and code look very good indeed , i wont start to think i understand how the code works , but some very clever programming and understanding of maths going on in there i know..

mick

micky4fun

#20
ok a quick couple of goes with awning , 2 versions , 1st will need a bigger awning image as im using scalespritex
the 2nd just using normal scalesprite so image is ok

what do you think ? any good ? , other ideas ?

code and images not pixal perfect as just a quick demo

2nd code below just use images in zip

mick :)


screenvsync on
loadfximage "awning1.png",10
loadfximage "mock.jpg",11
rgbmaskimage 10,$00ffffff
createsprite 10
spriteimage 10,10
spritedrawmode 10,2
centerspritehandle 10



do
   
   for a=480 to 930 step 10
      b#=b#+0.002
      drawimage 11,0,0,0
      positionsprite 10,400,-600+a
      scalesprite 10,1+b#
      drawallsprites
      sync
next a
  wait 1000
  for a=930 to 480 step -10
     b#=b#-0.002
      drawimage 11,0,0,0
      positionsprite 10,400,-600+a
      scalesprite 10,1+b#
      drawallsprites
      sync
next a
   wait 1000
loop      

micky4fun

just posted update , awning1 zip , think this maybe more like it , i have just quickly re-done awning image , as you can tell , lol

mick

u9

I have an idea how the curtain can be made... i'll upload an example when i've got it to work.

kevin


Mick,

  Not sure what you're going for but you should looking in the GouraudQuad & TextureQaud

 



screenvsync on
loadfximage "awning1.png",10
loadimage "mock.jpg",11
;rgbmaskimage 10,$00ffffff


rendertoimage 10
getimage 1,0,530,800,600
rendertoscreen

Type tVertex
x#,y#
Colour
EndType

constant VertsWide=6
Dim verts(VertsWide,3) as tvertex

Dim Colours(1)
Colours(0)=Rgb(255,255,0)
Colours(1)=Rgb(255,0,0)

Dim Widths(3)
Widths(0)=800
Widths(1)=910
Widths(2)=1350

Ypos=0

Ystep#=(GetScreenHeight()-50)/2.0
For Row=0 to 3
Width#= Widths(row)
Xpos#=GetScreenWidth()/2-(Width#/2)
Xstep#=Width#/VertsWide
For lp=0 to VertsWide
verts(lp,Row).x=xpos#
verts(lp,Row).y=ypos#
verts(lp,Row).Colour=Colours(lp & 1)
Xpos#=Xpos#+xStep#
next
Ypos#=Ypos#+Ystep#
next

setfps 80

Do

Drawimage 11,0,0,false

ScalerY#=MouseY()/float(GetScreenHeight())

For lp=0 to VertsWide-1
For Row=0 to 1
x1# =verts(lp,Row).x
y1# =verts(lp,Row).y*ScalerY#
Rgb1 =verts(lp,Row).Colour

lp2=lp+1
x2#=verts(lp2,Row).x
y2#=verts(lp2,Row).y*ScalerY#
Row2=row+1

lp2=lp+1
x3#=verts(lp2,Row2).x
y3#=verts(lp2,Row2).y*ScalerY#

x4#=verts(lp,Row2).x
y4#=verts(lp,Row2).y*ScalerY#

Level=45+((Row)*25)
Toprgb=rgbfade(rgb1,Level)

Level=45+((Row+1)*25)
Botrgb=rgbfade(rgb1,Level)
GouraudQuad x1#,y1#,Toprgb, x2#,y2#,Toprgb,x3#,y3#,Botrgb,x4#,y4#,Botrgb
next
next

// draw the extra bit
drawimage 1,0,Y4#,true


sync
loop




  PS.  This requires the media form micks post above

micky4fun

#24
Hi Kevin

QuoteNot sure what you're going for
well to be honest i dont either , lol
but saying that yes this code looks good , not that ive got a clue whats happening within the code
ive changed line 31: to Widths(1)=1100 this makes it as near pefect i think
the front banner will need changing as it dont match veritcal lines , or vertical lines need re-spacing one of the two
so i think thats that sorted

thanks
mick :)

p.s and also thanks to u9 , will be interesting to see how your version went ?


u9

#25
Well, i made a few functions for you so you can just call CurtainUpdate() every frame and CurtainDraw(). Then when you want it to go up you call CurtainUp() and so on and so on :) There is even a function to tell you when it has reached all the way up CurtainIsUp() and one for down as well.

I just added the thing to the bouncing clown code. There is also a little description inside the file to help you use it.

Hope it helps.

P.s. I didn't know what an awning was before, hence i used curtain :)

EDIT: Btw, the image looks a little uneven, but that is because i used the scaled down picture posted earlier by blinkOk. It will look better with the right graphics. I just tried Kevin's solution. It certainly is smart :)

micky4fun

Hi u9

why are there people so much more clever than me , err , yes u9 this looks the business to , not got a clue how it works , buts i think as you have made it easy for me i sould be o.k
famous last words ,
many thanks for this snippet ,
think this looks good BlinkOk , what u think ?

mick ;D

BlinkOk

awning, bouncing clown all awesome. in the final product the clown rolls up in a ball and spins so you play the animation forward when the clown is going to the right and you play the animation backward when the clown is going to the left but that should be pretty straight forward.
i think the tricky bit (but not too tricky) will be coordinating the landing/take/spin off animations so they look natural.

BlinkOk

trying not to hold you guys up so i'll post the roll animation. the idea is he rolls forward when his xspeed is positive and he rolls backward when his xspeed is negative.



Download images

BlinkOk

#29
ok i think these are all the animations that are required. i'm not sure if we need the walking one though. i thought we could just let  the little guy bounce over to the cannon is that ok? i don't mind either way.
one thing is that the clown can face either way on the see-saw. i think this makes it a tad easier but you will have to super impose the landing/takeoff/crouch animations on top of it.
Download Flash Animation (mockup1.swf)