pool ball animation?
This has got me stumped. im making a 2d pool game. How would i get the animations of the rolling balls to accuratly match the direction and speed they are going. Also, do you know any *trick* way of doing this. Thanks in advance.
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="88" height="70" id="H2lvl" align="middle"> <param name="allowScriptAccess" value="sameDomain" /> <param name="movie" value="http://www.ironhive.com/CFCs/H2lvl.swf?gamertag=jBaddog" /> <param name="quality" value="high" /> <param name="wmode" value="transparent"> <embed src="http://www.ironhive.com/CFCs/H2lvl.swf?gamertag=jBaddog" quality="high" bgcolor="#ffffff" width="88" height="70" name="H2lvl" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> </object>
The easiest way i can think to do it would be to have only a sprite of a white ball, and then use code to simulate the stripes, and use smallersprites to go over the top of your ball sprites for those circled numbers.. like a direct draw type thing?
I dont know. thats just my guess. im really not a reliable source for this
I dont know. thats just my guess. im really not a reliable source for this
Im losing the popularity contest. $rating --;
Aha, funny you should mentioned this as I came across the same problem myself a while ago but there is a relatively easy solution. The trick is to use three layers. On the bottom you have your pattern. That is masked by a circular hole so you can only see a circle shape made up of the pattern. On top of that you blend a little bit of a shadow to give a curved effect. Now, when the ball moves, slide the pattern layer in the same direction and it will look like it is rolling.
I've tried to give you an idea of what I mean using a Photoshop document here. If you slide the 'pattern' layer around it looks like the ball is rolling.
Hope that helps.
I've tried to give you an idea of what I mean using a Photoshop document here. If you slide the 'pattern' layer around it looks like the ball is rolling.
Hope that helps.
thanks ghosted. Does anyone else know of other ways of doing this?
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="88" height="70" id="H2lvl" align="middle"> <param name="allowScriptAccess" value="sameDomain" /> <param name="movie" value="http://www.ironhive.com/CFCs/H2lvl.swf?gamertag=jBaddog" /> <param name="quality" value="high" /> <param name="wmode" value="transparent"> <embed src="http://www.ironhive.com/CFCs/H2lvl.swf?gamertag=jBaddog" quality="high" bgcolor="#ffffff" width="88" height="70" name="H2lvl" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> </object>
You could have actual 3D models that you rotate to desired position and render to a 2D texture each frame, then blit the texture, but I guess that's beyond the scope of this forum.
In any case, ghosted's solution is quite clever, simple, and looks very, very good. I recommend using that if you don't want to deal with 3D objects (which might be overkill anyway).
In any case, ghosted's solution is quite clever, simple, and looks very, very good. I recommend using that if you don't want to deal with 3D objects (which might be overkill anyway).
thanks everyone for the help. I think i will be able to do it now.
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="88" height="70" id="H2lvl" align="middle"> <param name="allowScriptAccess" value="sameDomain" /> <param name="movie" value="http://www.ironhive.com/CFCs/H2lvl.swf?gamertag=jBaddog" /> <param name="quality" value="high" /> <param name="wmode" value="transparent"> <embed src="http://www.ironhive.com/CFCs/H2lvl.swf?gamertag=jBaddog" quality="high" bgcolor="#ffffff" width="88" height="70" name="H2lvl" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> </object>
Quote:
Original post by ghosted
Aha, funny you should mentioned this as I came across the same problem myself a while ago but there is a relatively easy solution. The trick is to use three layers. On the bottom you have your pattern. That is masked by a circular hole so you can only see a circle shape made up of the pattern. On top of that you blend a little bit of a shadow to give a curved effect. Now, when the ball moves, slide the pattern layer in the same direction and it will look like it is rolling.
I've tried to give you an idea of what I mean using a Photoshop document here. If you slide the 'pattern' layer around it looks like the ball is rolling.
Hope that helps.
yeah, this is exactly what i meant, but alot clearer said.
Im losing the popularity contest. $rating --;
I am extremely limited on time, because i have to start making my game, and i hace to make a C++ console version, so can someone please do this for me, or at least point me to a site that has this. I need pool ball animations of the 8 and white ball, also, i also need a pool table that is proportional and matches up with the balls. Thanks in advance. I will be sure to aknowledge the person who helps.
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="88" height="70" id="H2lvl" align="middle"> <param name="allowScriptAccess" value="sameDomain" /> <param name="movie" value="http://www.ironhive.com/CFCs/H2lvl.swf?gamertag=jBaddog" /> <param name="quality" value="high" /> <param name="wmode" value="transparent"> <embed src="http://www.ironhive.com/CFCs/H2lvl.swf?gamertag=jBaddog" quality="high" bgcolor="#ffffff" width="88" height="70" name="H2lvl" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /> </object>
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement