tag:blogger.com,1999:blog-41189902275450355282024-03-10T03:46:51.480+01:00ShuffaballAnonymoushttp://www.blogger.com/profile/01294161473252366494noreply@blogger.comBlogger28125tag:blogger.com,1999:blog-4118990227545035528.post-15524305202583551272016-11-15T13:58:00.003+01:002016-11-15T14:00:36.359+01:00#asylumjam2016 So can we go on the bus now?<div class="MsoNormal">
<span lang="EN-GB">So I tried my hand at the #asylumjam2016 game jam over the
weekend, I say tried because I didn’t finish with a playable game.<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-GB"><br /></span></div>
<div class="MsoNormal">
<span lang="EN-GB">The theme was escape the room, which made
me think of a short story my wife publish a couple of years ago. It tells the
story of Gary, stuck in his primary class room with people from the class that
have died. It becomes evident that he
too has died. The idea is that the Non playing characters (NPC) help Gary
understand the truth of why he is there.<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-GB">The game “So Can We Go On The Bus Now?” is
a point and click Adventure game, doing all the Graphics, music and coding in a
weekend proved too much though. I did go to the Pub Saturday night and also
slept 8 hours per night, so about 20hours lost there, so if the challenge was to
create a game using 48hour, I maybe could of finished. </span></div>
<div class="MsoNormal">
<span lang="EN-GB"><br /></span></div>
<div class="MsoNormal">
<span lang="EN-GB">Anyway now for the blah blah on why it failed
and what I should have done differently.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-GB">To create the game I created two scenes,
one is the car crash that kills Gary and the other is the Classroom. The crash
scene is non intractable and used as a flashback. It is also an unreliable
narrator scene, not what actually happened. <o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-GB">In Inkscape I quickly knocked up the layout
of the classroom, I decided on a 2.5d approach, this made creating the graphics
that bit trickier.</span></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqhR4OdyhhqqcJLhijpJLk0F3Fs3qoMhky26bWvSYQMG7aL8g2f7YVf6hFp6CAbMeZafBjlJ_XUhC1WXQKc6bLpMQZ2agLirEmMcsyujY3bLU6gbUTl08FnRWe7-6mlcYfxnOjxwMNLig/s1600/Classroom.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="162" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhqhR4OdyhhqqcJLhijpJLk0F3Fs3qoMhky26bWvSYQMG7aL8g2f7YVf6hFp6CAbMeZafBjlJ_XUhC1WXQKc6bLpMQZ2agLirEmMcsyujY3bLU6gbUTl08FnRWe7-6mlcYfxnOjxwMNLig/s320/Classroom.png" width="320" /></a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-GB">I created an ItemBase class as a
ScriptableObject.<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-GB"><br /></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span lang="EN-GB" style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">public</span><span lang="EN-GB" style="background: white; font-family: "consolas"; font-size: 9.5pt;"> </span><span lang="EN-GB" style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">abstract</span><span lang="EN-GB" style="background: white; font-family: "consolas"; font-size: 9.5pt;"> </span><span lang="EN-GB" style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">class</span><span lang="EN-GB" style="background: white; font-family: "consolas"; font-size: 9.5pt;"> </span><span lang="EN-GB" style="background: white; color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">ItemBase</span><span lang="EN-GB" style="background: white; font-family: "consolas"; font-size: 9.5pt;"> : </span><span lang="EN-GB" style="background: white; color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">ScriptableObject</span><span lang="EN-GB" style="background: white; font-family: "consolas"; font-size: 9.5pt;"><o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span lang="EN-GB" style="background: white; font-family: "consolas"; font-size: 9.5pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span lang="EN-GB" style="background: white; font-family: "consolas"; font-size: 9.5pt;"> </span><span lang="EN-GB" style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">public</span><span lang="EN-GB" style="background: white; font-family: "consolas"; font-size: 9.5pt;"> </span><span lang="EN-GB" style="background: white; color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">Sprite</span><span lang="EN-GB" style="background: white; font-family: "consolas"; font-size: 9.5pt;">[] sprites;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span lang="EN-GB" style="background: white; font-family: "consolas"; font-size: 9.5pt;"> </span><span lang="EN-GB" style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">public</span><span lang="EN-GB" style="background: white; font-family: "consolas"; font-size: 9.5pt;"> </span><span lang="EN-GB" style="background: white; color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">AudioClip</span><span lang="EN-GB" style="background: white; font-family: "consolas"; font-size: 9.5pt;"> click;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span lang="EN-GB" style="background: white; font-family: "consolas"; font-size: 9.5pt;"> </span><span lang="EN-GB" style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">public</span><span lang="EN-GB" style="background: white; font-family: "consolas"; font-size: 9.5pt;"> </span><span lang="EN-GB" style="background: white; color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">AudioClip</span><span lang="EN-GB" style="background: white; font-family: "consolas"; font-size: 9.5pt;"> music;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span lang="EN-GB" style="background: white; font-family: "consolas"; font-size: 9.5pt;"> </span><span lang="EN-GB" style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">public</span><span lang="EN-GB" style="background: white; font-family: "consolas"; font-size: 9.5pt;"> </span><span lang="EN-GB" style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">string</span><span lang="EN-GB" style="background: white; font-family: "consolas"; font-size: 9.5pt;"> Title;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span lang="EN-GB" style="background: white; font-family: "consolas"; font-size: 9.5pt;"> </span><span lang="EN-GB" style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">public</span><span lang="EN-GB" style="background: white; font-family: "consolas"; font-size: 9.5pt;"> </span><span lang="EN-GB" style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">string</span><span lang="EN-GB" style="background: white; font-family: "consolas"; font-size: 9.5pt;">
Description;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span lang="EN-GB" style="background: white; font-family: "consolas"; font-size: 9.5pt;"> </span><span lang="EN-GB" style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">public</span><span lang="EN-GB" style="background: white; font-family: "consolas"; font-size: 9.5pt;"> </span><span lang="EN-GB" style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">float</span><span lang="EN-GB" style="background: white; font-family: "consolas"; font-size: 9.5pt;">
ZoomSize = 0f;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span lang="EN-GB" style="background: white; font-family: "consolas"; font-size: 9.5pt;"> </span><span lang="EN-GB" style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">public</span><span lang="EN-GB" style="background: white; font-family: "consolas"; font-size: 9.5pt;"> </span><span lang="EN-GB" style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">float</span><span lang="EN-GB" style="background: white; font-family: "consolas"; font-size: 9.5pt;"> ZoomY =
0f;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span lang="EN-GB" style="background: white; font-family: "consolas"; font-size: 9.5pt;"> </span><span lang="EN-GB" style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">public</span><span lang="EN-GB" style="background: white; font-family: "consolas"; font-size: 9.5pt;"> </span><span lang="EN-GB" style="background: white; color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">SpriteRenderer</span><span lang="EN-GB" style="background: white; font-family: "consolas"; font-size: 9.5pt;"> spriteRender;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span lang="EN-GB" style="background: white; font-family: "consolas"; font-size: 9.5pt;"> </span><span lang="EN-GB" style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">public</span><span lang="EN-GB" style="background: white; font-family: "consolas"; font-size: 9.5pt;"> </span><span lang="EN-GB" style="background: white; color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">GameObject</span><span lang="EN-GB" style="background: white; font-family: "consolas"; font-size: 9.5pt;"> go;<o:p></o:p></span></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<br /></div>
<div class="MsoNormal" style="line-height: normal; margin-bottom: .0001pt; margin-bottom: 0cm; mso-layout-grid-align: none; text-autospace: none;">
<span lang="EN-GB" style="background: white; font-family: "consolas"; font-size: 9.5pt;"> </span><span lang="EN-GB" style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">public</span><span lang="EN-GB" style="background: white; font-family: "consolas"; font-size: 9.5pt;"> </span><span lang="EN-GB" style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">abstract</span><span lang="EN-GB" style="background: white; font-family: "consolas"; font-size: 9.5pt;"> </span><span lang="EN-GB" style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">void</span><span lang="EN-GB" style="background: white; font-family: "consolas"; font-size: 9.5pt;">
Examine();<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-GB" style="background: white; font-family: "consolas"; font-size: 9.5pt; line-height: 115%;">}</span><span lang="EN-GB" style="font-family: "consolas"; font-size: 9.5pt; line-height: 115%;"><o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-GB" style="background: white; font-family: "consolas"; font-size: 9.5pt; line-height: 115%;"><br /></span></div>
<div class="MsoNormal">
<span lang="EN-GB">Then
inherited it for Inventory item, NPC or non-moveable that way coding will be
easier by avoiding nested if statements. </span></div>
<div class="MsoNormal">
<span lang="EN-GB">Each class has code that it only needs
to know about. <o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-GB">Then I created .asset files for each of the objects so I could edit them easily in the IDE.</span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrSihffxb0H04g3nav7HvGz02DrSjFg3dotkxWzbNrrHXZ422t9QNobW0dQZe75OOYV4k3Q2OVWOz4Tp2Ae6y_esvoqVzbDgRDcCMDlu1JocFIS54Sw8y_yOEYKTkBlAnb2n_Nk2taylY/s1600/Mrs+Baxter+in+the+Inspector.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="252" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrSihffxb0H04g3nav7HvGz02DrSjFg3dotkxWzbNrrHXZ422t9QNobW0dQZe75OOYV4k3Q2OVWOz4Tp2Ae6y_esvoqVzbDgRDcCMDlu1JocFIS54Sw8y_yOEYKTkBlAnb2n_Nk2taylY/s320/Mrs+Baxter+in+the+Inspector.png" width="320" /></a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Still to do:</div>
<div class="MsoNormal">
<span lang="EN-GB">Conversation system<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-GB">Inventory<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-GB">Giving items to NPC<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-GB"><br /></span></div>
<br />
<div class="MsoNormal">
<span lang="EN-GB">I am going to continue this and get it
finished. Making it my 6<sup>th</sup> game but totally different from previous
games, I probably wouldn’t have chosen this type of game but the game jam makes
you work outside your comfort zone.</span></div>
<div class="MsoNormal">
<span lang="EN-GB"><br /></span></div>
<div class="MsoNormal">
<span lang="EN-GB">I put it up on the <a href="http://gamejolt.com/games/can-we-go-on-the-bus-now/208422" target="_blank">GameJolt</a> site anyway, but I don't expect any votes as it isn't playable.</span></div>
<div class="MsoNormal">
It was really good fun creating it though :)</div>
<div class="MsoNormal">
<span lang="EN-GB"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQUKptYg0dqRD3pPI9eGkII3MU7dxylyX5EWffbl5gydnMGR4k5N60cH2MBI7NNgCbtIQ7g3H4r4x2GpkSjbjnmGrXuQ2_cwARPwMuQcm02bJulmPiW-fCEQY8YCzCa-d0vPKJ33T64OQ/s1600/GamePlay.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="179" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQUKptYg0dqRD3pPI9eGkII3MU7dxylyX5EWffbl5gydnMGR4k5N60cH2MBI7NNgCbtIQ7g3H4r4x2GpkSjbjnmGrXuQ2_cwARPwMuQcm02bJulmPiW-fCEQY8YCzCa-d0vPKJ33T64OQ/s320/GamePlay.png" width="320" /></a></div>
<div class="MsoNormal">
<span lang="EN-GB"><br /></span></div>
Anonymoushttp://www.blogger.com/profile/01294161473252366494noreply@blogger.com0tag:blogger.com,1999:blog-4118990227545035528.post-8778948593613763092016-10-04T14:37:00.001+02:002016-10-04T14:37:45.256+02:00Wool is the fuel available on GooglePlay<div class="separator" style="clear: both; text-align: left;">
My latest game is a bit retro, it's like the classic old Defender game. </div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
It uses <a href="http://shuffaball.blogspot.fr/2015/07/creating-scrollable-background-tiles.html" target="_blank">my system for Parallax scrolling the backgrounds</a>, you get a HUD to see what alien is going for your sheep.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrIgza06pUy9ErjVBGaYaVnljtcat6lGW-ZdPauRqxdO73_kM0AuVqUEwilF0kX-9RPOVPD8Pt1XeWJBGfeiQMEEjbe-UilHNEYHNMX8e3U27fqKGPocV8x6hOScUzTyWS4gfF9gIlBAU/s1600/HUD.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="31" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrIgza06pUy9ErjVBGaYaVnljtcat6lGW-ZdPauRqxdO73_kM0AuVqUEwilF0kX-9RPOVPD8Pt1XeWJBGfeiQMEEjbe-UilHNEYHNMX8e3U27fqKGPocV8x6hOScUzTyWS4gfF9gIlBAU/s400/HUD.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
It has been written in <a href="https://unity3d.com/" target="_blank">Unity 3D</a>,</div>
<div class="separator" style="clear: both; text-align: left;">
I've written all the music myself in <a href="https://www.ableton.com/en/products/live-lite/" target="_blank">Ableton Live 9 lite</a>.</div>
<div class="separator" style="clear: both; text-align: left;">
For the sound effects I've used SONiVOX's <a href="http://sonivoxmi.com/products/details/twist-spectral-morphing-synthesizer" target="_blank">Twist </a>& <a href="http://sonivoxmi.com/products/details/wobble-dubstep-grime-generator" target="_blank">Wobble</a>.</div>
<div class="separator" style="clear: both; text-align: left;">
The <a href="http://shuffaball.blogspot.fr/2016/09/wool-is-fuel-mecanim.html" target="_blank">animations </a>were made in <a href="https://brashmonkey.com/" target="_blank">Spriter </a>by <a href="https://brashmonkey.com/" target="_blank">BrashMonkey</a> the backgrounds and explosions were from their art packs.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://play.google.com/store/apps/details?id=com.adzl.Defence" target="_blank"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgt2_5DbvJjOMLf1RG-8mAChwGLFWEPhqsYf4DwcHsANnkh9VuggCxVSX01dK63t4cpu2mYfojKUkyliW60wMP8h2Kk2xDqbf0by_YSWTNDi5WQzl-CRJb0aflA-gOepe7ERMWUynl-7u0/s320/icon.png" width="320" /></a></div>
<br />
Here is the video<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/5h1RknuhnqE/0.jpg" src="https://www.youtube.com/embed/5h1RknuhnqE?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br />Anonymoushttp://www.blogger.com/profile/01294161473252366494noreply@blogger.com0tag:blogger.com,1999:blog-4118990227545035528.post-82239375562961640562016-09-29T16:17:00.000+02:002016-09-29T16:17:57.758+02:00Saving 2 sheep with AZI was playing my game wool is the fuel and wanted to record a video of the game play. So I downloaded <a href="https://play.google.com/store/apps/details?id=com.hecorat.screenrecorder.free&hl=en" target="_blank">AZ screen recorder</a>.<br />
<br />
After a few seconds I had recorded this <a href="https://www.facebook.com/1676885205872513/videos/1916895478538150/" target="_blank">snippet</a>.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4vSrht435w6aqsPxy53qkmY5hXMjp53pf_LiYkZpAxLtL7OFl82jLq3jbGRL6Jd0nKvnVPm7tn_zki9rlMYDnufwvpydoxwAWKkXhwOxEQ4lfq4LRY9HggnesIQPyXDodaqcQOm52-eA/s1600/Saving2Sheep.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="227" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4vSrht435w6aqsPxy53qkmY5hXMjp53pf_LiYkZpAxLtL7OFl82jLq3jbGRL6Jd0nKvnVPm7tn_zki9rlMYDnufwvpydoxwAWKkXhwOxEQ4lfq4LRY9HggnesIQPyXDodaqcQOm52-eA/s400/Saving2Sheep.png" width="400" /></a></div>
<br />
I liked it because it also records the audio all be it from the speakers though. My previous phone had great speakers but after my cat <a href="https://www.youtube.com/watch?v=8IfD6H_2-YY" target="_blank">Clicquot </a>decided to bite through the screen, I had to get a new one (phone that is not cat).<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://www.youtube.com/watch?v=54Hgu6-8pjI" target="_blank"><img alt=" Clicquot catching munchies" border="0" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhAIJlxR4U9oZ3LlDG1-YU7frt-6g1lUlyFX7i_qZfaXaeJvwGF0Sv7xEjVw_u_mvx_umABX04nDRj5DQ8vD6bgTGmmAXBnEZUXfEO6wo_3OmWbqE9z5S6_WB2SAQPA9NcLFHeWTobOZDo/s400/Clicquot.jpg" width="400" /></a></div>
<br />Anonymoushttp://www.blogger.com/profile/01294161473252366494noreply@blogger.com0tag:blogger.com,1999:blog-4118990227545035528.post-24824332991112971522016-09-11T13:16:00.002+02:002016-09-11T13:16:40.449+02:00Wool is the fuel mecanimI've just uploaded a video showing some of the game play and animations in my <a href="https://play.google.com/apps/testing/com.adzl.Defence" target="_blank">Wool is the fuel</a> defender style game.<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe width="320" height="266" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/5h1RknuhnqE/0.jpg" src="https://www.youtube.com/embed/5h1RknuhnqE?feature=player_embedded" frameborder="0" allowfullscreen></iframe></div>
<br />
When developing I used single frame animations to test the mecanim to see that all the states worked. For the Landers, I used different colours to represent each of the states. Then when I was sure it all hung together nicely I created the animations.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQP4-FOX-5B39pMmZo_JKu12lyQycfiJQtnfQ8M3uCuw1d3GQlsUmMIoEu0kZpUOIGAD6ptk0Js0GCAO1qRxhMaCD6xW-umB1_w3mkSI1Bzd6GWVeBc6d0gNBNmSpnXoMDFm_S_otmy_o/s1600/mecanim.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="310" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQP4-FOX-5B39pMmZo_JKu12lyQycfiJQtnfQ8M3uCuw1d3GQlsUmMIoEu0kZpUOIGAD6ptk0Js0GCAO1qRxhMaCD6xW-umB1_w3mkSI1Bzd6GWVeBc6d0gNBNmSpnXoMDFm_S_otmy_o/s400/mecanim.png" width="400" /></a></div>
<div style="text-align: center;">
<i>Lander mecanim</i></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnrufLvMVh60pdGfxHpZTBJJzBzLJF42T5m1YSSunmRK_MifokZbL7kngwuCp6mOj8PmVi49OARKFQ2hLTcFqu0nwlzp1zJrjq-v8xlOTXZZxc1ESzH1-8_BSaNTuF86FECTzQXmpSsj4/s1600/ANimation.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="198" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnrufLvMVh60pdGfxHpZTBJJzBzLJF42T5m1YSSunmRK_MifokZbL7kngwuCp6mOj8PmVi49OARKFQ2hLTcFqu0nwlzp1zJrjq-v8xlOTXZZxc1ESzH1-8_BSaNTuF86FECTzQXmpSsj4/s400/ANimation.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<i>Drag an image onto the Hierarchy then click Window->Animation</i></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgr7QFRgm_3bH7_Uj9ze37d90mlUrjs1dKuUHvp5T0QYFVzFxeA69cuVyjisfGb7Wx4sRAfI59YHDBBjTNz00GTui0vUT2f1sDSBQ6FejusNl0oaFT7WdAzMJbS_XpgYJ44YaxYe67thHs/s1600/Add+Single+Frame+Animation.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="238" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgr7QFRgm_3bH7_Uj9ze37d90mlUrjs1dKuUHvp5T0QYFVzFxeA69cuVyjisfGb7Wx4sRAfI59YHDBBjTNz00GTui0vUT2f1sDSBQ6FejusNl0oaFT7WdAzMJbS_XpgYJ44YaxYe67thHs/s400/Add+Single+Frame+Animation.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<i>Click add property then click the plus on the right</i></div>
<div class="separator" style="clear: both; text-align: center;">
<i><br /></i></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC21ETBza1Feu5zojlseYTcLJJw_3PVhzvd4nfnbs1XNWK0MAUOpnG4c5_jFuCgfWU5khp0lshOvEB8Tjfz8vIjo1OFBqfXCeAkjK8UX0VWadK8qOOhpahkgg_H0zOEfV8e-TGWTPKnHI/s1600/Single+Frame+Added.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="168" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgC21ETBza1Feu5zojlseYTcLJJw_3PVhzvd4nfnbs1XNWK0MAUOpnG4c5_jFuCgfWU5khp0lshOvEB8Tjfz8vIjo1OFBqfXCeAkjK8UX0VWadK8qOOhpahkgg_H0zOEfV8e-TGWTPKnHI/s400/Single+Frame+Added.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<i><br /></i></div>
<br />
I use Spriter by Brashmonkey to do the animations, I know I can create the animations directly in Unity and it has advantages with regard the colliders, but for simple animations I still use Spriter.<br />
Also I love all of the effects they have already created for us, look at the video to check them out.<br />
<br />
<br />Anonymoushttp://www.blogger.com/profile/01294161473252366494noreply@blogger.com0tag:blogger.com,1999:blog-4118990227545035528.post-27819730077635400492016-08-25T14:06:00.000+02:002016-08-25T14:06:06.299+02:00Unity's Event trigger component<div class="MsoNormal">
<span lang="EN-GB">So I was adding my buttons to the game
using UI event sytem in Unity.<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-GB">The Fire and Flip where easy but when it
came to the Thrust button I hit a snag. The button click is not enough I need
it to respond when the button stays pressed.<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-GB">To do this I needed to add Event Trigger
component to the button.<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-GB"><v:shapetype coordsize="21600,21600" filled="f" id="_x0000_t75" o:preferrelative="t" o:spt="75" path="m@4@5l@4@11@9@11@9@5xe" stroked="f">
<v:stroke joinstyle="miter">
<v:formulas>
<v:f eqn="if lineDrawn pixelLineWidth 0">
<v:f eqn="sum @0 1 0">
<v:f eqn="sum 0 0 @1">
<v:f eqn="prod @2 1 2">
<v:f eqn="prod @3 21600 pixelWidth">
<v:f eqn="prod @3 21600 pixelHeight">
<v:f eqn="sum @0 0 1">
<v:f eqn="prod @6 1 2">
<v:f eqn="prod @7 21600 pixelWidth">
<v:f eqn="sum @8 21600 0">
<v:f eqn="prod @7 21600 pixelHeight">
<v:f eqn="sum @10 21600 0">
</v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:formulas>
<v:path gradientshapeok="t" o:connecttype="rect" o:extrusionok="f">
<o:lock aspectratio="t" v:ext="edit">
</o:lock></v:path></v:stroke></v:shapetype><v:shape id="_x0000_i1025" style="height: 258.75pt; width: 231.75pt;" type="#_x0000_t75">
<v:imagedata o:title="Add event Trigger component" src="file:///C:\Users\ALOCKW~1.SYM\AppData\Local\Temp\msohtmlclip1\01\clip_image001.png">
</v:imagedata></v:shape> <o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-GB">Then in the component click add new event
type for Pointer Down and Pointer Up. </span></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOBFbL8jMeZPZaQQhbd6UqIvQLW73Q5P0D0s9b2pyKC9Q19MrDL6ZwSJrRbehDFCcXU_XCE6DN7cL4HvIjuF4xPHj4ZoqTP6_YuVr59eetao3FtK-JChmfS-0SNKYuNQfLrVn9gsB-Igw/s1600/event+trigger+component.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOBFbL8jMeZPZaQQhbd6UqIvQLW73Q5P0D0s9b2pyKC9Q19MrDL6ZwSJrRbehDFCcXU_XCE6DN7cL4HvIjuF4xPHj4ZoqTP6_YuVr59eetao3FtK-JChmfS-0SNKYuNQfLrVn9gsB-Igw/s320/event+trigger+component.png" width="286" /></a></div>
<div class="MsoNormal">
<span lang="EN-GB"><br /></span></div>
<div class="MsoNormal">
<span lang="EN-GB">Here is the code for the 2 functions:<o:p></o:p></span></div>
<div class="MsoNormal">
<span lang="EN-GB"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span lang="EN-GB" style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span lang="EN-GB" style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">public</span><span lang="EN-GB" style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span lang="EN-GB" style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">void</span><span lang="EN-GB" style="background: white; font-family: Consolas; font-size: 9.5pt;">
ThrustDown()<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span lang="EN-GB" style="background: white; font-family: Consolas; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span lang="EN-GB" style="background: white; font-family: Consolas; font-size: 9.5pt;"> IsThrust = </span><span lang="EN-GB" style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">true</span><span lang="EN-GB" style="background: white; font-family: Consolas; font-size: 9.5pt;">;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span lang="EN-GB" style="background: white; font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span lang="EN-GB" style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span lang="EN-GB" style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">public</span><span lang="EN-GB" style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span lang="EN-GB" style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">void</span><span lang="EN-GB" style="background: white; font-family: Consolas; font-size: 9.5pt;">
ThrustUp()<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span lang="EN-GB" style="background: white; font-family: Consolas; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span lang="EN-GB" style="background: white; font-family: Consolas; font-size: 9.5pt;"> IsThrust = </span><span lang="EN-GB" style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">false</span><span lang="EN-GB" style="background: white; font-family: Consolas; font-size: 9.5pt;">;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span lang="EN-GB" style="background: white; font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span lang="EN-GB">Then in the FixedUpdate() check if IsThrust
then increase the speed, also I’ve added the code to slow down the player over
time with the </span><span lang="EN-GB" style="background: white; font-family: Consolas; font-size: 9.5pt; line-height: 115%;">Speed *
.99f</span><span lang="EN-GB" style="font-family: Consolas; font-size: 9.5pt; line-height: 115%;">:</span><span lang="EN-GB"><o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span lang="EN-GB" style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span lang="EN-GB" style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">if</span><span lang="EN-GB" style="background: white; font-family: Consolas; font-size: 9.5pt;">
(IsThrust)<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span lang="EN-GB" style="background: white; font-family: Consolas; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span lang="EN-GB" style="background: white; font-family: Consolas; font-size: 9.5pt;"> Speed +=
thrustAmount;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span lang="EN-GB" style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span lang="EN-GB" style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-highlight: white;">if</span><span lang="EN-GB" style="background: white; font-family: Consolas; font-size: 9.5pt;"> (Speed
> MaxSpeed)<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span lang="EN-GB" style="background: white; font-family: Consolas; font-size: 9.5pt;">
Speed = MaxSpeed;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span lang="EN-GB" style="background: white; font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<br />
<div class="MsoNormal">
<span lang="EN-GB" style="background: white; font-family: Consolas; font-size: 9.5pt; line-height: 115%;"> Speed = Speed * .99f;</span><span lang="EN-GB"><o:p></o:p></span></div>
Anonymoushttp://www.blogger.com/profile/01294161473252366494noreply@blogger.com0tag:blogger.com,1999:blog-4118990227545035528.post-26403117126182044292016-08-21T15:02:00.002+02:002016-08-21T15:02:25.057+02:00Mutant aliens<div class="MsoNormal">
When an alien takes a sheep up to the top of the screen it
shears the sheep and becomes a fast moving alien mutant. </div>
<div class="MsoNormal">
What I want is for the
mutants to go after the player. To do that we subtract the 2 positions vectors,
giving us the difference between the 2 points. I wanted to use that to then set
the direction of the mutant. I discovered there is a function normalized that
does just that, so here is the code from the FixedUpdate() to do that. By
placing it in the FixedUpdate it will continually change course towards the
player.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: white;">if</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> (IsMutant)<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;">{<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;">
</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: white;">var</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> delta = player.transform.position
- transform.position;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;">
direction = delta.normalized;<o:p></o:p></span></div>
<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;">}<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.blogger.com/video.g?token=AD6v5dxHcWYEzfO90-wm6-NyBq0VU98cxCAEPFya4xQ8N0M1iVStSEyrajofn39mFxpnCCiB9CJKDKutCYRYYvDw1A' class='b-hbp-video b-uploaded' frameborder='0'></iframe></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: center;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;"><i>Aliens take sheep to top then change into Mutants</i></span></div>
Anonymoushttp://www.blogger.com/profile/01294161473252366494noreply@blogger.com0tag:blogger.com,1999:blog-4118990227545035528.post-10320386114969292692016-08-20T13:32:00.000+02:002016-08-20T13:32:45.793+02:00Attack Waves<div class="MsoNormal">
In defender all of the baddies don’t all arrive at once
there are a number of waves per level. So to do that when instatiating the baddies I'll have a delay between them.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
In a <a href="http://shuffaball.blogspot.fr/2015/09/unity-editor-scripting-how-to-create.html" target="_blank">previous blog</a> on the development of
Rhino roll I used Editor scripting to help create the levels. So I’ll do the
same here again. </div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Here is my code to create an array of objects in the editor script.<o:p></o:p></div>
<div class="MsoNormal">
<span style="font-size: xx-small;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial;"> </span><span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: blue;">static</span><span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial;"> </span><span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: blue;">void</span><span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial;"> ObjectsToArray(</span><span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: blue;">string</span><span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial;"> objType)<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background: white;"><span style="font-family: Courier New, Courier, monospace; font-size: x-small;">
{<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span style="background: white;">
</span><span style="background: white; color: blue;">var</span><span style="background: white;"> Code = </span><span style="background: white; color: #a31515;">"private Vector2[]
"</span><span style="background: white;"> + objType + </span><span style="background: white; color: #a31515;">" = new Vector2[]
{"</span><span style="background: white;">;<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span style="background: white;">
</span><span style="background: white; color: blue;">var</span><span style="background: white;"> objs = </span><span style="background: white; color: #2b91af;">Selection</span><span style="background: white;">.gameObjects.OrderBy(go =>
go.transform.position.x);<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span style="background: white;">
</span><span style="background: white; color: blue;">bool</span><span style="background: white;"> IsFirst = </span><span style="background: white; color: blue;">true</span><span style="background: white;">;<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span style="background: white;">
</span><span style="background: white; color: blue;">foreach</span><span style="background: white;"> (</span><span style="background: white; color: blue;">var</span><span style="background: white;"> item </span><span style="background: white; color: blue;">in</span><span style="background: white;"> objs)<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background: white;"><span style="font-family: Courier New, Courier, monospace; font-size: x-small;">
{<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span style="background: white;"> </span><span style="background: white; color: blue;">if</span><span style="background: white;">
(!IsFirst)<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span style="background: white;"> Code += </span><span style="background: white; color: #a31515;">", "</span><span style="background: white;">;<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span style="background: white;"> </span><span style="background: white; color: blue;">else</span><span style="background: white;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span style="background: white;"> IsFirst = </span><span style="background: white; color: blue;">false</span><span style="background: white;">;<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span style="background: white;"> </span><span lang="FR" style="background: white;">Code += </span><span lang="FR" style="background: white; color: blue;">string</span><span lang="FR" style="background: white;">.Format(</span><span lang="FR" style="background: white; color: #a31515;">"new
Vector2({0:0.000f}, {1:0.000f})"</span><span lang="FR" style="background: white;">,
item.transform.position.x, item.transform.position.y);<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span lang="FR" style="background: white;"> </span><span style="background: white;">}<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span style="background: white;">
Code += </span><span style="background: white; color: #a31515;">"};"</span><span style="background: white;">;<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background: white;"><span style="font-family: Courier New, Courier, monospace; font-size: x-small;">
print(Code);<o:p></o:p></span></span></div>
<div class="MsoNormal">
</div>
<div class="MsoNormal">
<span style="font-family: Courier New, Courier, monospace;"><span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; line-height: 115%;"><span style="font-size: x-small;"> }</span></span><span style="font-size: xx-small;"><o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="background: white; line-height: 115%;"><span style="line-height: normal;"><br /></span></span></div>
<div class="MsoNormal">
<span style="background: white; line-height: 115%;"><span style="line-height: normal;">Here is the code to add the Menu Items to the IDE of Unity and call the function </span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;"><span style="background: white;"><br /></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial;"> [</span><span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #2b91af;">MenuItem</span><span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial;">(</span><span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial; color: #a31515;">"Adz/Util/SheepToArray"</span><span style="background-attachment: initial; background-clip: initial; background-color: white; background-image: initial; background-origin: initial; background-position: initial; background-repeat: initial; background-size: initial;">)]<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span style="background: white;">
</span><span style="background: white; color: blue;">static</span><span style="background: white;"> </span><span style="background: white; color: blue;">void</span><span style="background: white;"> SheepToArray()<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background: white;"><span style="font-family: Courier New, Courier, monospace; font-size: x-small;">
{<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span style="background: white;">
ObjectsToArray(</span><span style="background: white; color: #a31515;">"Sheep"</span><span style="background: white;">);<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background: white;"><span style="font-family: Courier New, Courier, monospace; font-size: x-small;">
}<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span style="background: white;">
[</span><span style="background: white; color: #2b91af;">MenuItem</span><span style="background: white;">(</span><span style="background: white; color: #a31515;">"Adz/Util/LandersToArray"</span><span style="background: white;">)]<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span style="background: white;">
</span><span style="background: white; color: blue;">static</span><span style="background: white;"> </span><span style="background: white; color: blue;">void</span><span style="background: white;"> LandersToArray()<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background: white;"><span style="font-family: Courier New, Courier, monospace; font-size: x-small;">
{<o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span style="background: white;">
ObjectsToArray(</span><span style="background: white; color: #a31515;">"Landers"</span><span style="background: white;">);<o:p></o:p></span></span></div>
<div class="MsoNormal">
<span style="background: white; line-height: 115%;"><span style="font-family: Courier New, Courier, monospace; font-size: x-small;">
</span></span></div>
<div class="MsoNormal">
<span style="background: white; line-height: 115%;"><span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> }</span></span><o:p></o:p></div>
<div class="MsoNormal">
<span style="background: white; line-height: 115%;"><span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="background: white; line-height: 115%;"><span style="line-height: normal;">The idea is to move the landers aboout, duplicate new ones et.c. then select them all and call the LandersToArray function, like below.</span></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcyhlrN1M1teL1kTEugxJz1kesbctBvZ3LfvzA35HPBg0sFrqVU5YXUnw5-OeOzo3XyHQ-Vmp6_bJRo5yo3BxmitfP9EW4nE0LHf4G5YD9XycrFP4VpQYoA7c7eyZd_kdx5pBy6-JHPlU/s1600/Objects+To+Array.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="233" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcyhlrN1M1teL1kTEugxJz1kesbctBvZ3LfvzA35HPBg0sFrqVU5YXUnw5-OeOzo3XyHQ-Vmp6_bJRo5yo3BxmitfP9EW4nE0LHf4G5YD9XycrFP4VpQYoA7c7eyZd_kdx5pBy6-JHPlU/s400/Objects+To+Array.png" width="400" /></a></div>
<div class="MsoNormal">
<span style="background: white; line-height: 115%;"><span style="line-height: normal;"><br /></span></span></div>
<div class="MsoNormal">
<span style="background: white; line-height: 115%;"><span style="line-height: normal;">Here is the code automatically generated by the function call. Saves so much time when designing levels, in my opinion.</span></span></div>
<div class="MsoNormal">
<span style="background: white; line-height: 115%;"><span style="line-height: normal;"><br /></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: white;">void</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> Level1Wave1()<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;">
{<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;">
</span><span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: white;">Vector2</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;">[] Landers = </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: white;">new</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: white;">Vector2</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;">[] { </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: white;">new</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: white;">Vector2</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;">(-48.800f, -0.140f), </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: white;">new</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: white;">Vector2</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;">(-42.200f, 1.560f), </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: white;">new</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: white;">Vector2</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;">(-11.880f, -1.120f), </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: white;">new</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: white;">Vector2</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;">(-5.680f, -0.440f), </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: white;">new</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: white;">Vector2</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;">(-0.080f, 2.320f), </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: white;">new</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: white;">Vector2</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;">(0.020f, -1.850f), </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: white;">new</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: white;">Vector2</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;">(3.500f, 1.560f), </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: white;">new</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: white;">Vector2</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;">(24.200f, 0.960f) };<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;">
</span><span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: white;">Vector2</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;">[] LanderDirections = </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: white;">new</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: white;">Vector2</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;">[] { </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: white;">new</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: white;">Vector2</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;">(-0.240f, -0.074f), </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: white;">new</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: white;">Vector2</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;">(-0.933f, -0.997f), </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: white;">new</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: white;">Vector2</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;">(0.489f, -0.842f), </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: white;">new</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: white;">Vector2</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;">(0.702f, -0.403f), </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: white;">new</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: white;">Vector2</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;">(0.700f, 0.146f), </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: white;">new</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: white;">Vector2</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;">(-0.497f, -0.331f), </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: white;">new</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: white;">Vector2</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;">(-0.186f, 0.392f), </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: white;">new</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: #2b91af; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: white;">Vector2</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;">(-0.868f, 0.386f) };<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;">
DoLanders(Landers, LanderDirections, .02f);<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="background: white; line-height: 115%;">
</span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;">
}<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;"></span></div>
<div class="MsoNormal">
<span style="background: white; line-height: 18.4px;"><span style="line-height: normal;">Then in the fixed update add the code to invoke these functions after a given time.</span></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;">
</span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: white;">if</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> (CurrentWave <
Waves.Length)<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;">
{<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;"> Waves[CurrentWave]--;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: white;">if</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;">
(Waves[CurrentWave] == 0)<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;"> CurrentWave++;<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;"> </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: white;">var</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;"> wave = </span><span style="background: white; color: blue; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: white;">string</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;">.Format(</span><span style="background: white; color: #a31515; font-family: Consolas; font-size: 9.5pt; mso-bidi-font-family: Consolas; mso-highlight: white;">"Level{0}Wave{1}"</span><span style="background: white; font-family: Consolas; font-size: 9.5pt;">, CurrentLevel, CurrentWave);<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;"> Invoke(wave, 0f);<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background: white; font-family: Consolas; font-size: 9.5pt;"> }<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="background: white; line-height: 18.4px;">
</span></div>
<div class="MsoNormal">
<span style="background: white; font-family: Consolas; font-size: 9.5pt; line-height: 115%;"> }</span><o:p></o:p></div>
<div class="MsoNormal">
<span style="background: white; font-family: Consolas; font-size: 9.5pt; line-height: 115%;"><br /></span></div>
<div class="MsoNormal">
<span style="background: white;">As before here is a video to demonstrate. It has 2 attack waves from the aliens. I haven't done any fancy animations for the materialisation yet.</span></div>
<div class="MsoNormal">
<span style="background: white;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.blogger.com/video.g?token=AD6v5dwS2GngMCUVdtFErc7qkTnDo236UJb5SfsI6v7geJlO2dy2stcze7lwAuyHeVK9XlaDilU7HFdJxnWz40aq-g' class='b-hbp-video b-uploaded' frameborder='0'></iframe></div>
<div class="MsoNormal">
<span style="background: white;"><br /></span></div>
Anonymoushttp://www.blogger.com/profile/01294161473252366494noreply@blogger.com0tag:blogger.com,1999:blog-4118990227545035528.post-28210802765671266412016-08-19T18:46:00.001+02:002016-08-19T22:53:29.098+02:00Wool is the Fuel<div class="MsoNormal">
A couple of years ago I created my 1<sup>st</sup> game, it
was Wool is the Fuel. The idea of the
game was that Space ships are powered by wool, so the aliens come to earth and
shear the sheep. Originally I was going to have cows, as those aliens can’t
resist a bit of cow mutilation, however I thought that wasn’t very child
friendly, so as sheep shearing isn’t as murdery I’d go with that. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
It was written using XNA and took a number of months. I then
rewrote it in Unity in 2 weeks but I scrapped the game as it really was quite
rubbish. <o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Now having written a number of games I’m returning to the
idea of Wool is the Fuel. I’m going to combine Wool is the fuels with a game I
always loved <a href="https://en.wikipedia.org/wiki/Defender_(1981_video_game)" target="_blank">Defenders</a>. The idea in Defender is that you have to protect your
colony of humans from a bunch of aliens. The aliens arrive in waves and after
you have cleared all the waves you have completed a level. As the level number
goes up so does the difficulty.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
So instead of humans, you have to protect your sheep. Also
no sheep will be harmed in the playing of this game they cannot die, even after
falling from a great height.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
My <a href="https://play.google.com/store/apps/details?id=com.adzl.endlessroller" target="_blank">Rhino Roll</a> game has the code for the parallax scrolling
backgrounds, so I will reuse that but allow the changing of direction. To do this I add a Collier to the Left and right of the Main camera, when it hits a tile it moves it over to the opposite direction.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlw-w7mtTfrE5-my1I4ab11nfqAGM35-e-58LM-wctaBjgIX7B41jsz2aF3GJG81CQeYt9sI5E5jUkTzP_OznDm8I6oMXJwROEeL_H1pxh1IFC5l2xai6zSR8wrs8Mehe852Zvfpm_X0E/s1600/LeftColliderWhenTravellingToRight.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="201" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlw-w7mtTfrE5-my1I4ab11nfqAGM35-e-58LM-wctaBjgIX7B41jsz2aF3GJG81CQeYt9sI5E5jUkTzP_OznDm8I6oMXJwROEeL_H1pxh1IFC5l2xai6zSR8wrs8Mehe852Zvfpm_X0E/s400/LeftColliderWhenTravellingToRight.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<i>When moving right the left collider in green moves A tile to right</i></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2dWfW9CCloSmZbWqcv2FyBj4FiGBPI1qdHSYDNRLSeI_c2HT0YWDlJwXPYbWf4HToIh4yCCuehtOk67rQ8dEQrEWKMqV-ikZL32anKPqvoIkLUToJCgjJPl8ABal8eTLlwxDTkxQ8_1o/s1600/RightColliderWhenTravellingToLeft.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="203" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg2dWfW9CCloSmZbWqcv2FyBj4FiGBPI1qdHSYDNRLSeI_c2HT0YWDlJwXPYbWf4HToIh4yCCuehtOk67rQ8dEQrEWKMqV-ikZL32anKPqvoIkLUToJCgjJPl8ABal8eTLlwxDTkxQ8_1o/s400/RightColliderWhenTravellingToLeft.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<i>When moving left the right collider in green moves E tile to left</i></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
As with the Rhino Roll game I am going to have multiple layers of background so you can see the parrallax scrolling.</div>
<div class="separator" style="clear: both; text-align: left;">
For the backgrounds I'm using the Delta essentials pack from <a href="https://brashmonkey.com/spriter-features/" target="_blank">Spriter </a>by <a href="https://brashmonkey.com/spriter-features/" target="_blank">BrashMonkey</a>.</div>
<o:p></o:p><br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.blogger.com/video.g?token=AD6v5dwce5q38R6wcHkbOaDyyjOMYEjfdVDpoJfXyFdoxF2yV4yw_pdkXIePfcH3pntLvRiizEUu5SqFkNSMOsc5Sg' class='b-hbp-video b-uploaded' frameborder='0'></iframe></div>
<div class="MsoNormal">
<br /></div>
<br />
<div class="MsoNormal" style="text-align: center;">
<o:p><i> Videos of Scrolling in action</i></o:p></div>
Anonymoushttp://www.blogger.com/profile/01294161473252366494noreply@blogger.com0tag:blogger.com,1999:blog-4118990227545035528.post-42532489583664869672016-07-14T13:23:00.002+02:002016-07-15T10:22:23.300+02:00Game MusicMy previous <a href="https://soundcloud.com/adam-lockwood-559308869/defretmenu" target="_blank">game </a><a href="https://soundcloud.com/adam-lockwood-559308869/choruschords" target="_blank">music </a>was recorded on my bass using Sequel 3 and my ZOOM B3 effects. I liked the tracks but it was so time consuming, if you wanted to change something you would need to re-record it.<br />
<br />
So I wanted to create some new music for my new games and bought an <a href="http://www.akaipro.com/product/apc-key-25" target="_blank">AKAI APC </a>Keyboard. This came with a bunch of software and samples.<br />
<br />
<ul>
<li><b><a href="https://www.ableton.com/en/products/live-lite/" target="_blank">Ableton Live 9 Lite</a></b>: This is music editing software, it is a cut down version, that allows only 8 tracks and some features are missing. Overall it's a fantastic piece of software, with loads of drums, instruments and audio effects.</li>
<li><b><a href="http://www.airmusictech.com/product/hybrid-3" target="_blank">Hybrid 3</a></b>: This is a synthesizer with tonnes of presets to play about with, I've not tried creating new sounds from scratch, only tweaking the presets.</li>
<li><b><a href="http://sonivoxmi.com/products/details/twist-spectral-morphing-synthesizer" target="_blank">Twist 2</a></b>; This is a different synth again with many sounds included. When registering the product though it said it was already in use. An email to AKAI Support and they sorted that out. Some of the presets make excellent game sound effects.</li>
<li><b>Toolroom Artists TFP Pack: </b>this pack has over 1.5Gbs of samples and loops.</li>
</ul>
<div>
Here are a few compositions I've created with the above software. In the games the loop but on Soundcloud they play 1 time.</div>
<div>
<br /></div>
<div>
1st is a bit dancy</div>
<iframe width="100%" height="166" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/273778592&color=ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false"></iframe>
<br />
<div>
<br />
<br />
Next 2 are a bit housey<br />
<iframe frameborder="no" height="166" scrolling="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/273624925&color=ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false" width="100%"></iframe>
<iframe frameborder="no" height="166" scrolling="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/273624929&color=ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false" width="100%"></iframe>
<br />
<br />
I've<a href="https://soundcloud.com/adam-lockwood-559308869" target="_blank"> uploaded 17 </a>tracks in total, have a listen and tell me what you think.<br />
<br /></div>
Anonymoushttp://www.blogger.com/profile/01294161473252366494noreply@blogger.com1tag:blogger.com,1999:blog-4118990227545035528.post-2873826895499767522016-02-27T16:51:00.001+01:002016-02-27T16:51:38.932+01:00Shuffa Brick game released.<h4 style="text-align: center;">
I've just released <a href="https://play.google.com/store/apps/details?id=com.adzl.shuffabrick" target="_blank">Shuffa Brick</a> my new physics based Break out game on <a href="https://play.google.com/store/apps/details?id=com.adzl.shuffabrick" target="_blank">Google Play</a>.</h4>
<div style="text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://play.google.com/store/apps/details?id=com.adzl.shuffabrick" target="_blank"><img alt=" Shuffa Brick on Google Play" border="0" height="195" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdoG4C1tgxw5oNWHJ7x8s9X1H7Tt2RdEZjRgwMIuRRmF19J5YzBx0cnjYvuisJvVU1srEhJ7lgv3ml5Q3aQ-ZMpJFagmsmLQs1km0NkS7HtryQ184nyCAE_IHqygvkvxaWOttUbL6_gx0/s400/feature.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<h4 style="clear: both; text-align: center;">
Shuffa Brick is a new physics based Break-out style game, except you do not use a paddle to hit the ball. You touch the screen slide then release.</h4>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
Clear all bricks to complete the level.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
Shuffa Brick can be played with just the touch of one finger. </div>
<div class="separator" style="clear: both; text-align: center;">
You touch the screen of your phone or tablet, slide back and release. </div>
<div class="separator" style="clear: both; text-align: center;">
This will rebound the ball in the opposite direction. </div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
See how you rank on Google play leader board.</div>
<div class="separator" style="clear: both; text-align: center;">
Unlock all achievements.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
One level only included, let me know if you want me to create more.</div>
<div class="separator" style="clear: both;">
<br /></div>
<div class="separator" style="clear: both;">
<br /></div>
<div style="text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/z99-ThrwcN4/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/z99-ThrwcN4?feature=player_embedded" width="320"></iframe></div>
<br />
<div style="text-align: center;">
<i>YouTube trailer for Shuffa Brick</i></div>
<br />
<br />Anonymoushttp://www.blogger.com/profile/01294161473252366494noreply@blogger.com0tag:blogger.com,1999:blog-4118990227545035528.post-65231774327116863172016-02-22T13:01:00.000+01:002016-02-22T14:43:30.780+01:00Shuffa Brick juicy styleIn the new game I'm writing, Shuffa Brick, I had each level start with all bricks already in place, functional but a bit dull to look at. After watching another great YouTube video on Juicy game design, I decided to add a bunch of the juicy effects described in the video.<br />
<div>
<div>
<div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/Fy0aCDmgnxg/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/Fy0aCDmgnxg?feature=player_embedded" width="320"></iframe></div>
<div style="text-align: center;">
<i> Juice it or lose it</i></div>
</div>
</div>
<div style="text-align: left;">
<br /></div>
<h3 style="text-align: left;">
Animate the bricks coming onto the screen</h3>
<div style="text-align: left;">
In the video I saw they used an animation curve to provide the location that the brick should be. So given a ratio of time along the x axis, this will give you a ratio along the y axis for how far it is from the destination, the cool thing is that this can be further than the destination as in my example below, so it gives a little bounce effect.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkrPaV89PomgZ38H7o9JU08iTUJrcgZzsK-L5liF0Zbq2NrxecA6yB42boy9aq5vD3LigOEHhSqIHq3f3tlj6-GfZZdGjbSdgDoHGe5PAlOH8q5N1kwxcWXwSi_Po941Z8oVJqSPQTY9w/s1600/animation+curve.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="301" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkrPaV89PomgZ38H7o9JU08iTUJrcgZzsK-L5liF0Zbq2NrxecA6yB42boy9aq5vD3LigOEHhSqIHq3f3tlj6-GfZZdGjbSdgDoHGe5PAlOH8q5N1kwxcWXwSi_Po941Z8oVJqSPQTY9w/s320/animation+curve.png" width="320" /></a></div>
<div style="font-style: italic; text-align: center;">
<i> my brick curve</i></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
If we want the total journey time to be 1 second then after 0.25 secs in according to the curve we will have traveled 50% of the way to the final destination (calling curve.Evaluate(timeGap) would return 0.5 for the y axis value).</div>
<div style="text-align: left;">
<br /></div>
<h3 style="text-align: left;">
Fancy particle effect on the ball</h3>
<div style="text-align: left;">
Next thing I added was a particle effect on the ball, the idea is that it leaves a flame like trail behind the ball.</div>
<div style="text-align: left;">
To do this I changed the Color over lifetime going from yellowy to orangish color with a alpha fade.</div>
<div style="text-align: left;">
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCa1d3HsyXmE-aDrWY7PQYDiGhqjq0Z3cI6wN5CUqhtxpi-BQhKplc9f1eGM9weowX6707KTFfhlRgY7L4Z8meHm_eyYVhzu8GPqEZRzcfs4NcUOngLphtaO_f_BOQSP1Exq1nr5Kni0Y/s1600/color+over+lifetime.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="241" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiCa1d3HsyXmE-aDrWY7PQYDiGhqjq0Z3cI6wN5CUqhtxpi-BQhKplc9f1eGM9weowX6707KTFfhlRgY7L4Z8meHm_eyYVhzu8GPqEZRzcfs4NcUOngLphtaO_f_BOQSP1Exq1nr5Kni0Y/s320/color+over+lifetime.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
</div>
<h4 style="text-align: left;">
</h4>
<h3>
Explosion effect on the brick</h3>
<div style="text-align: left;">
Then an explosion effect when a brick gets destroyed. This is another particle effect to do this I set the same color over lifetime as the ball. I add speed and a gravity modifier to give it the effect.</div>
<div style="text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdeHlWDLJHC1cDLqzw_xvAFjK1rgnVxkBKDqFxi0E2kZjp2wrnFmfaNGC7W7wXqsJYt2XFMp6ZMLPtNlzw0aYRNMFlfF9Y97XMC8O1R3Dnvr7R3tUVlXvlI6iGqKCXweRK6n7fO0pPekM/s1600/brick+explosion.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="305" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdeHlWDLJHC1cDLqzw_xvAFjK1rgnVxkBKDqFxi0E2kZjp2wrnFmfaNGC7W7wXqsJYt2XFMp6ZMLPtNlzw0aYRNMFlfF9Y97XMC8O1R3Dnvr7R3tUVlXvlI6iGqKCXweRK6n7fO0pPekM/s320/brick+explosion.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div style="text-align: left;">
<h3>
Comparison Non Juicy vs Juicy</h3>
</div>
<div style="text-align: left;">
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.blogger.com/video.g?token=AD6v5dyUjIB0QJ7ilLJ_NvgjWaan2gTb9V_w-ruXdtOFj5jJqh3IGIqUea7u5MwHcS03kYcYHSIDObcnvxgRIjjS8Q' class='b-hbp-video b-uploaded' frameborder='0'></iframe></div>
<br /></div>
</div>
</div>
Anonymoushttp://www.blogger.com/profile/01294161473252366494noreply@blogger.com0tag:blogger.com,1999:blog-4118990227545035528.post-80404001858678838452016-01-30T13:43:00.002+01:002016-01-30T17:45:58.524+01:00Re-using Unity 2D animations by changing the Sprite at run-time.In my new game Shuffa brick, I have a number of same sized bricks that I want to animate once and re-use the animation for all colours of the bricks.<br />
<br />
I created the animation using a green brick, then in the editor I changed the sprite renderer to use a different coloured sprite.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOdOebJN5N8N2p1f8Qltp4FlJjqqWpKzKXs4eT_9whdLMhc367kP2vHSxxaLz119uprO_QuvX6FiDMxMdGdcn_XK5JDnxRvDjpyNf8BAbKSvjs1G2PbAyj3Ysps-O8RqxocdBInyLU76I/s1600/Changing+sprite+in+editor.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="217" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOdOebJN5N8N2p1f8Qltp4FlJjqqWpKzKXs4eT_9whdLMhc367kP2vHSxxaLz119uprO_QuvX6FiDMxMdGdcn_XK5JDnxRvDjpyNf8BAbKSvjs1G2PbAyj3Ysps-O8RqxocdBInyLU76I/s320/Changing+sprite+in+editor.png" width="320" /></a></div>
<br />
The change works in the editor, but when running the game it reverted back to the green brick.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMfWDvoNTW1zbelsRof0tQYTfb9VJbxtOuZfI2Vbd-bZTjvj1ZuBXJTgIqgIodMgW9Ssl20cI45EQaTYogn4iv021hX-3kBV9cYbrRwhgQ3aiS6CGRb0CsI0ca65yR8K2o8LGx46o1LOg/s1600/All+Green+Bricks.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiMfWDvoNTW1zbelsRof0tQYTfb9VJbxtOuZfI2Vbd-bZTjvj1ZuBXJTgIqgIodMgW9Ssl20cI45EQaTYogn4iv021hX-3kBV9cYbrRwhgQ3aiS6CGRb0CsI0ca65yR8K2o8LGx46o1LOg/s320/All+Green+Bricks.png" width="320" /></a></div>
<br />
<br />
In code I tried updating the sprite of the renderer in the Update() of the GameObject but that didn't work either. In the debugger I could see it getting changed but again it went back to the Green brick at run-time.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicEN6LFpP9TGIGQqDmncWPOVeLFhvTz0dMXVzD1H1Rrn8HA3YDwnXXDpWIR8bxXUEJwwwoIdaQBq9yHxDdpjkVcEBAHdRWicoaI7a1deImflo2_pj0m932vk2jaNX-CMfSleq9ZUcocXg/s1600/Update+code+does+not+work.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="188" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEicEN6LFpP9TGIGQqDmncWPOVeLFhvTz0dMXVzD1H1Rrn8HA3YDwnXXDpWIR8bxXUEJwwwoIdaQBq9yHxDdpjkVcEBAHdRWicoaI7a1deImflo2_pj0m932vk2jaNX-CMfSleq9ZUcocXg/s400/Update+code+does+not+work.png" width="400" /></a></div>
<br />
So in effect what happens is that the animator overwrites whatever sprite we set in code with the one in the animation.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/HM17mAmLd7k/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/HM17mAmLd7k?feature=player_embedded" width="320"></iframe></div>
<div class="separator" style="clear: both; text-align: center;">
<i>Unite 2014 - 2D Best Practices In Unity</i></div>
<br />
I watched a really good video on YouTube, the important part is where he talks of Sprite animation re-skinning. All I needed from the video was just one word LateUpdate (31mins in). The code in the LateUpdate() is ran after the animator has done it's work. So if we change the renderer's sprite at this moment it stays changed.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpoXEVW1-vV4aKP3t83Nt9sOF7xcjj0f7duWl87RQX_-i59uGhBA7msK-FLBmiMFPMhwqmRR9nRFjDSYqBYqjOwoLEKH1nhBIAhrzqTwD08D4JLuvQ0C02y2_lxG3LJahNzP387Dzr6JM/s1600/LateUpdate+code+does+work.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="52" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpoXEVW1-vV4aKP3t83Nt9sOF7xcjj0f7duWl87RQX_-i59uGhBA7msK-FLBmiMFPMhwqmRR9nRFjDSYqBYqjOwoLEKH1nhBIAhrzqTwD08D4JLuvQ0C02y2_lxG3LJahNzP387Dzr6JM/s400/LateUpdate+code+does+work.png" width="400" /></a></div>
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen="" class="YOUTUBE-iframe-video" data-thumbnail-src="https://i.ytimg.com/vi/vyIgZuiD_NI/0.jpg" frameborder="0" height="266" src="https://www.youtube.com/embed/vyIgZuiD_NI?feature=player_embedded" width="320"></iframe></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<i>Brick animations with LateUpdate()</i></div>
<br />
<br />Anonymoushttp://www.blogger.com/profile/01294161473252366494noreply@blogger.com0tag:blogger.com,1999:blog-4118990227545035528.post-19830380760675378452015-12-31T14:48:00.000+01:002016-01-30T17:46:30.867+01:00NoTilt pinballI released Rhino Roll my previous game on the 18th December 2015, I then set myself a target to release a new game by the end of the year.<br />
<div style="text-align: center;">
<a href="https://play.google.com/store/apps/details?id=com.adzl.endlessroller" target="_blank"><img alt="Rhino Roll on GooglePlay" border="0" height="156" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEihsThjv2dO-GK7gsvuxiy7JA9EUiZRce719Ti_S48OswiMAX1Y7s2rFbIzTRew_woRl03atBu4mP36z5VQbjsRnrbsCXqCwsrAwBk-rira4mCosLY5j4IZ_50oXd3S2Jo_cXIZAJs2mu8/s320/RhinoRollFeature.png" title="Rhino Roll on GooglePlay" width="320" /></a></div>
<div style="text-align: center;">
<i>Rhino Roll get it on GooglePlay</i></div>
<div style="text-align: left;">
<i><br /></i></div>
<div style="text-align: left;">
My new game is called <a href="https://play.google.com/store/apps/details?id=com.adzl.notilit" target="_blank">NoTilt </a>pinball and relies heavily on my 1st game<a href="https://play.google.com/store/apps/details?id=com.adzl.shuffaball" target="_blank"> Shuffa ball</a>'s mechanics. </div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: center;">
<a href="https://play.google.com/store/apps/details?id=com.adzl.notilit" target="_blank"><img alt=" NoTilt get it on GooglePlay" border="0" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj44Mj0qHQTAEcNfjpp_vgI9NODc3liycPTMJDgxP4A-oICVlQuOygOXxDNenzZX0Q6soD-J2Wdp47dfssnbNzs5Im8e_Vc1KVO7smw5zmXBad-i35Jt1e8PzflfcdHSnNw7S1ncYDc4m0/s320/NoTilt+feature.png" width="320" /></a></div>
<div style="text-align: center;">
<i>NoTilt Pinball </i><i>get it on GooglePlay</i></div>
<div style="text-align: center;">
<i><br /></i></div>
<div style="text-align: left;">
Here it is like a traditional pinball game with bumpers, triggers and slingshots. The one thing missing is the flippers. You use the table itself to control the ball. Watch the <a href="https://www.youtube.com/watch?v=IPTZ6hjbtEg" target="_blank">trailer video</a> to see it in action.</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<br /></div>
Anonymoushttp://www.blogger.com/profile/01294161473252366494noreply@blogger.com0tag:blogger.com,1999:blog-4118990227545035528.post-53712077991311415832015-12-06T15:20:00.001+01:002016-01-30T17:47:15.159+01:00Creating a video game trailer using Movie MakerTo get your game noticed a lot of people say you need a trailer video for your game. I don't know if that is true but here is how I went about making the trailer.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://www.facebook.com/1676885205872513/videos/vb.1676885205872513/1785909668303399" target="_blank"><img border="0" height="181" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgUwVVWAZNgkdI1o5nvXMhPPWfE2ffoHyiT9uMhqJyPqPOB4wIU6eo6zpBF2eUBwZAR-CcqrIE708PPFOr36xPg-OumBoyS6EnMyylP_vT1d22REVj9UlC35QG4BXFMsS6tfmemoZ6yljM/s320/Link+to+Rhino+Roller+Trailer.png" width="320" /></a></div>
<div style="text-align: center;">
<i>Rhino Roller trailer</i></div>
<br />
To do that I used Movie maker for editing, Open broadcast software (OBS) for the screen capture and Spriter and Inkscape for the logo animations.<br />
<br />
<h2>
Logo animations</h2>
To do the logo I used Inkscape to create PNGs, then in Spriter I created an animation for the logo. Then I exported the animation to multiple PNGs which I then imported into Movie Maker, changed the time to display each frame to 0.1s.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhA6uB0bxxNSsgnafcFdBP0FxajYjN8i7iJ4SWNmn6l_DJD34l6zRXP-T0Q3sApDslrlGYNQydq-OTtQxsJiMVvn2THbEj6jc-MB9tkbPrhVlCuQFsV4GJBZkVVf0e3vhYt_sq9Rin3k8M/s1600/Movie+maker+drag+images.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="145" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhA6uB0bxxNSsgnafcFdBP0FxajYjN8i7iJ4SWNmn6l_DJD34l6zRXP-T0Q3sApDslrlGYNQydq-OTtQxsJiMVvn2THbEj6jc-MB9tkbPrhVlCuQFsV4GJBZkVVf0e3vhYt_sq9Rin3k8M/s320/Movie+maker+drag+images.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<i>Dragging multiple .PNGs into Movie Maker</i></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkt2OSKIDO-HHz-_EVhXCcdITbS9fZa2rahEaWoT5kzH0zCKLzGzurJbCN_6ImtPeqQAxL1HFNAz0YcTKs2dv97OgHW3SVjp_U5YfuEyJWlTD1MXjU-aLcwarkHvC0266UBCnodHcBf1s/s1600/Change+to+0.1s.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="113" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkt2OSKIDO-HHz-_EVhXCcdITbS9fZa2rahEaWoT5kzH0zCKLzGzurJbCN_6ImtPeqQAxL1HFNAz0YcTKs2dv97OgHW3SVjp_U5YfuEyJWlTD1MXjU-aLcwarkHvC0266UBCnodHcBf1s/s320/Change+to+0.1s.png" width="320" /></a><br />
<div class="separator" style="clear: both; text-align: center;">
<i>Change dsiplay time</i></div>
<h2 style="clear: both; text-align: center;">
<div style="text-align: left;">
<span style="font-style: italic;"><br /></span></div>
<div style="text-align: left;">
Game Play</div>
</h2>
To capure the game play I used OBS to screen capture. I turned the music off as that will be added later in Movie Maker. I edited multple shots of game play together and added to the main trailer project.<br />
<br />
<h2>
Music</h2>
I then added the music from the game itself into the video.<br />
<br />
<br />
Click <a href="https://www.facebook.com/1676885205872513/videos/vb.1676885205872513/1785909668303399" target="_blank">here </a>to see the videoAnonymoushttp://www.blogger.com/profile/01294161473252366494noreply@blogger.com0tag:blogger.com,1999:blog-4118990227545035528.post-13806042239835293322015-11-30T13:59:00.001+01:002016-01-30T17:48:27.979+01:00Rhino Roll<div style="background-color: white; color: #141823; font-family: helvetica, arial, sans-serif; font-size: 14px; line-height: 19.32px; margin-bottom: 6px;">
I've changed the name of Endless roller to Rhino Roll and it is now available for testing on Google Play.<br />
It is a side scrolling platformer game.<br />
To jump deform the ground and use as a trampoline.</div>
<div style="background-color: white; color: #141823; display: inline; font-family: helvetica, arial, sans-serif; font-size: 14px; line-height: 19.32px; margin-top: 6px;">
<a href="http://play.google.com/apps/testing/com.adzl.endlessroller" rel="nofollow" style="color: #3b5998; cursor: pointer; text-decoration: none;" target="_blank">http://play.google.com/apps/testing/com.adzl.endlessroller</a></div>
<div>
<br /></div>
<div>
Here are some screenshots of the game</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcVKDKKD1BDWjZGPP1CeSVUZbIEkdcIU6br_BBKHfrdkdqnTYPC9qmHcdWEY7fVbyuUhZh3bi_pbvWquu8OOZAHntCfquXGXPTOWA1SGHflqSUTx7VUCRmNg3sAA2OnubSA5sA0qN-kVk/s1600/Desert%255B1%255D.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="174" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcVKDKKD1BDWjZGPP1CeSVUZbIEkdcIU6br_BBKHfrdkdqnTYPC9qmHcdWEY7fVbyuUhZh3bi_pbvWquu8OOZAHntCfquXGXPTOWA1SGHflqSUTx7VUCRmNg3sAA2OnubSA5sA0qN-kVk/s320/Desert%255B1%255D.png" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEja5tKkA98hLYR1SjP9xxkvlrGrGyz_hkae4seBMgGKxjq5_QLkRtTpfhM94N8p5g3df61lwFj4vKNKT6GqJ0B1Qhmvk12xRQwGG_ApncSAjrYUWzY6sjAsZ5OmeLD-thH9jkUcRAPHIXk/s1600/Jungle%255B1%255D.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="175" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEja5tKkA98hLYR1SjP9xxkvlrGrGyz_hkae4seBMgGKxjq5_QLkRtTpfhM94N8p5g3df61lwFj4vKNKT6GqJ0B1Qhmvk12xRQwGG_ApncSAjrYUWzY6sjAsZ5OmeLD-thH9jkUcRAPHIXk/s320/Jungle%255B1%255D.png" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKthwWiWj96d9rF-tu-pMEjnraOVpQwverCserebfjXxX6azuCALfxHnjq_cOnz2LlBrVZ_-RC7nu4YVm4CfYRayurqg04sm_iwTf-9ezGwooRwrGhMMcobtW62KZ_Lsfyeb7WJcWjGTs/s1600/Main_Menu%255B1%255D.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="175" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKthwWiWj96d9rF-tu-pMEjnraOVpQwverCserebfjXxX6azuCALfxHnjq_cOnz2LlBrVZ_-RC7nu4YVm4CfYRayurqg04sm_iwTf-9ezGwooRwrGhMMcobtW62KZ_Lsfyeb7WJcWjGTs/s320/Main_Menu%255B1%255D.png" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3gtFWMIm6Am1hnpk1gEO1XAb_wRKhRKWMeR5ZH2Lxh8n9uLCPcXHG06Ss9xPs4bu9hOM4IhF1WShkTO55L1AmkDa7XLuBJ7wAzZKNLiJi8uHbNHKxzIc7VYuDhh8xnOjtVkhBfOGW2gA/s1600/Winter%255B1%255D.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="175" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3gtFWMIm6Am1hnpk1gEO1XAb_wRKhRKWMeR5ZH2Lxh8n9uLCPcXHG06Ss9xPs4bu9hOM4IhF1WShkTO55L1AmkDa7XLuBJ7wAzZKNLiJi8uHbNHKxzIc7VYuDhh8xnOjtVkhBfOGW2gA/s320/Winter%255B1%255D.png" width="320" /></a></div>
<div>
<br /></div>
Anonymoushttp://www.blogger.com/profile/01294161473252366494noreply@blogger.com0tag:blogger.com,1999:blog-4118990227545035528.post-6451893948018873002015-09-26T14:24:00.000+02:002016-01-30T17:49:01.134+01:00Adding a Font in UnitySo I was getting ready to release a version of my game <a href="http://gamejolt.com/games/shuffa-ball-endless-roller/80926" target="_blank">Shuffa ball: Endless Roller</a> onto <a href="http://gamejolt.com/" target="_blank">game jolt</a> for play testing. So I decided I needed to have text for the menus, I used a font I found in Inkscape and asked myself am I allowed to release a game using this font.<br />
The font is called Showcard Gothic and it appeared it is not free to use commercially. So I needed to find a new font free to use in an application. I came across the site <a href="http://www.fontsquirrel.com/">http://www.fontsquirrel.com/</a> that contains free to use fonts.<br />
There I found this great cartoony font that fits perfectly with the cartoon style of my game. It is called <a href="http://www.fontsquirrel.com/fonts/Pusab" target="_blank">Pusab</a> and here is a picture of the level complete panel featuring the font.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0oSgXhikIyHncDEQZiKs-Uee2dY0w16kdIjXNlRyoHn0kV7kkMCiR7S_9npuVUxtan3Rpmv24Wgft6wjALYoBiV9fXyHT3U8X68OfDZrhe9rEu23wqSkHDmXXzCD0xd6kLcb3rVMH7yE/s1600/Level+Complete+with+Pusab+font.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="296" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0oSgXhikIyHncDEQZiKs-Uee2dY0w16kdIjXNlRyoHn0kV7kkMCiR7S_9npuVUxtan3Rpmv24Wgft6wjALYoBiV9fXyHT3U8X68OfDZrhe9rEu23wqSkHDmXXzCD0xd6kLcb3rVMH7yE/s400/Level+Complete+with+Pusab+font.png" width="400" /></a></div>
<div style="text-align: center;">
<i>Pusab font on level complete</i></div>
<div style="text-align: left;">
<i><br /></i></div>
<div style="text-align: left;">
In unity to use the font is really simple, just place the PUSAB___.otf file in the assets folder, then when using the text click the select font button.</div>
<div style="text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZGTL_FeVg0lHN0o9yjh2Mtc0MIJ4toVxvWIKUJrmQc9oTHCUGKzUb2p9pwOsKZp8bkSuiAbzMBfUYn8Jn5mieh7jct7SAio_gA_qEQlBFNvgTb-lTXFuROxmwiX016oBptNf3X00pEoQ/s1600/Select+font+in+Unity.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="155" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgZGTL_FeVg0lHN0o9yjh2Mtc0MIJ4toVxvWIKUJrmQc9oTHCUGKzUb2p9pwOsKZp8bkSuiAbzMBfUYn8Jn5mieh7jct7SAio_gA_qEQlBFNvgTb-lTXFuROxmwiX016oBptNf3X00pEoQ/s400/Select+font+in+Unity.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<i>Select font in Unity</i></div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Now I have a full level of the game to play, <a href="http://gamejolt.com/games/shuffa-ball-endless-roller/80926" target="_blank">please play it</a> and leave comments. It still isn't finished but it is getting there.</div>
Anonymoushttp://www.blogger.com/profile/01294161473252366494noreply@blogger.com0tag:blogger.com,1999:blog-4118990227545035528.post-67719120821028342015-09-08T22:50:00.001+02:002016-01-30T17:49:52.171+01:00Unity Editor scripting: How to create levels<div class="MsoNormal">
<span style="font-family: inherit;">So in creating the levels I came across a problem. <o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: inherit;">It was really difficult to set up a level. Moving all of the
tiles about was really difficult as they are inside a game object. Each parent
objects has 4 sprites, a ceiling a floor, a top and a middle. These can all be assigned different Y axis positions.<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: inherit;">What I really needed was a way to select multiple parent GameObjects
then somehow manipulate them all in one go. So the way I’ve achieved this is by
editor scripting.<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: inherit;">To do this I created a script it that goes into a special
folder called Editor in the Assets directory, if the folder isn’t there create
it.<o:p></o:p></span></div>
<div class="MsoNormal">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal">
<span style="font-family: inherit;">At the top of the script we need to add.</span><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt; line-height: 115%;"><o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt; line-height: 115%;">using</span><span style="background: white; font-family: "consolas"; font-size: 9.5pt; line-height: 115%;"> UnityEditor;</span><span style="font-family: "consolas"; font-size: 9.5pt; line-height: 115%;"><o:p></o:p></span></div>
<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="font-family: inherit;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background: white; font-size: 9.5pt;"><span style="font-family: inherit; font-size: small;">We need to add the attribute for the menu item;</span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background: white; font-family: "consolas"; font-size: 9.5pt;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background: white; font-family: "consolas"; font-size: 9.5pt;">[</span><span style="background: white; color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">MenuItem</span><span style="background: white; font-family: "consolas"; font-size: 9.5pt;">(</span><span style="background: white; color: #a31515; font-family: "consolas"; font-size: 9.5pt;">"Adz/Floor/UP/FloorUP"</span><span style="background: white; font-family: "consolas"; font-size: 9.5pt;">)]<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background: white; font-family: inherit; font-size: 9.5pt;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background: white; font-family: inherit; font-size: 9.5pt;"></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background: white; font-size: 9.5pt;"><span style="font-family: inherit; font-size: small;">This allows us to change the IDE of unity to have our special function available as a menu item.</span></span></div>
<div>
<span style="background: white; font-size: 9.5pt;"><span style="font-family: inherit; font-size: small;">To run the function we select multiple GameObjects then click the FloorUp function.</span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background: white; font-family: "consolas"; font-size: 9.5pt;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjckaP33FXBbdYryJNkwId15YI0LylvKcwGxr1-uyX4neBSFmztkUAFtcrmjxMsPZDeFfKhVjqF8YN1aSjJBYuQS8gYXOidhxiXEaXCzx8KuUZ0qPQ7DT-fRfcBbH4nvjh_-XNB5vhH4zQ/s1600/MyMenu.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="318" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjckaP33FXBbdYryJNkwId15YI0LylvKcwGxr1-uyX4neBSFmztkUAFtcrmjxMsPZDeFfKhVjqF8YN1aSjJBYuQS8gYXOidhxiXEaXCzx8KuUZ0qPQ7DT-fRfcBbH4nvjh_-XNB5vhH4zQ/s400/MyMenu.png" width="400" /></a></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: center;">
<span style="font-family: "consolas";"><span style="background-color: white;"><i>Multiple GameObjects selected with new Menu items in IDE </i></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: center;">
<span style="background-color: white; font-family: inherit;"><i><br /></i></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background: white;"><span style="font-family: inherit;">Here
is the code for the FloorUp function, it loops through all of the items
selected in the scene view, in order of the transform’s X position and
increases their y by .1f.</span><span style="font-family: "consolas"; font-size: 9.5pt;"><o:p></o:p></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background: white; font-family: "consolas"; font-size: 9.5pt;"> </span><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">static</span><span style="background: white; font-family: "consolas"; font-size: 9.5pt;"> </span><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">void</span><span style="background: white; font-family: "consolas"; font-size: 9.5pt;"> FloorUP()</span><span style="background-color: white; font-family: "consolas"; font-size: 9.5pt;">{ </span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background: white; font-family: "consolas"; font-size: 9.5pt;"> </span><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">var</span><span style="background: white; font-family: "consolas"; font-size: 9.5pt;"> items = </span><span style="background: white; color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">Selection</span><span style="background: white; font-family: "consolas"; font-size: 9.5pt;">.gameObjects.OrderBy(go => go.transform.position.x);</span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background: white; font-family: "consolas"; font-size: 9.5pt;"> </span><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">foreach</span><span style="background: white; font-family: "consolas"; font-size: 9.5pt;"> (</span><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">var</span><span style="background: white; font-family: "consolas"; font-size: 9.5pt;"> item </span><span style="background: white; color: blue; font-family: "consolas"; font-size: 9.5pt;">in</span><span style="background: white; font-family: "consolas"; font-size: 9.5pt;"> items)<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background: white; font-family: "consolas"; font-size: 9.5pt;"> {<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background: white; font-family: "consolas"; font-size: 9.5pt;"> </span><span style="background: white; color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">anchor</span><span style="background: white; font-family: "consolas"; font-size: 9.5pt;"> p = item.GetComponentInChildren<</span><span style="background: white; color: #2b91af; font-family: "consolas"; font-size: 9.5pt;">anchor</span><span style="background: white; font-family: "consolas"; font-size: 9.5pt;">>();<o:p></o:p></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background: white; font-family: "consolas"; font-size: 9.5pt;"> p.FloorTileY += <o:p></o:p></span><span style="background-color: white; font-family: "consolas"; font-size: 12.6667px;">.1f;</span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<span style="background-color: white; font-family: "consolas"; font-size: 9.5pt;"> </span><span style="background-color: white; font-family: "consolas"; font-size: 9.5pt;">}</span></div>
<div class="MsoNormal">
<span style="background: white; font-family: "consolas"; font-size: 9.5pt; line-height: 115%;"> }</span></div>
<div class="MsoNormal">
<span style="background: white; font-family: "consolas"; font-size: 9.5pt; line-height: 115%;"><br /></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: left;">
<span style="background-color: white;">After clicking the menu item FloorUp we see the effect on the selected GameObjects, it gives us a ramp going upwards.</span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1M7rJPZnioPjPDYsabdMx8bK7AuxvutyhjL9fyuXN-RDcbOjpRD5nMwgnAA8hqd3r0HTHZ6nalj5eRdiZvJNLM2kg8kenF-6gbmCrO4anUbRUyFbK2AKeSJ-wpJbE7_bRqlgB8j43IsE/s1600/MyMenuafter.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="290" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1M7rJPZnioPjPDYsabdMx8bK7AuxvutyhjL9fyuXN-RDcbOjpRD5nMwgnAA8hqd3r0HTHZ6nalj5eRdiZvJNLM2kg8kenF-6gbmCrO4anUbRUyFbK2AKeSJ-wpJbE7_bRqlgB8j43IsE/s400/MyMenuafter.png" width="400" /></a></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: center;">
<span style="font-family: "consolas";"><span style="background-color: white; font-size: 12.6667px;"><i>After the editor script FloorUp is run</i></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: center;">
<span style="font-family: "consolas";"><span style="background-color: white; font-size: 12.6667px;"><i><br /></i></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: left;">
<span style="font-family: inherit; line-height: 14.5667px;">So then all I did was create similar functions for the ceiling, Top, Middle sprites then I could easily create levels for the Shuffa ball: Endless roller game.</span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: left;">
<span style="font-family: "consolas";"><span style="font-size: 12.6667px; line-height: 14.5667px;"><br /></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: center;">
<i style="background-color: white; color: #666666; font-family: 'Trebuchet MS', Trebuchet, Verdana, sans-serif; font-size: 13.2px; line-height: 12.32px;"><a href="http://goo.gl/S1K467" style="color: #33aaff;" target="_blank">Try it out on Game Jolt</a></i></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: left;">
<span style="font-family: "consolas";"><span style="font-size: 12.6667px; line-height: 14.5667px;"><br /></span></span></div>
<div class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: left;">
<span style="font-family: "consolas";"><span style="font-size: 12.6667px; line-height: 14.5667px;"><br /></span></span></div>
Anonymoushttp://www.blogger.com/profile/01294161473252366494noreply@blogger.com0tag:blogger.com,1999:blog-4118990227545035528.post-39058902752318401562015-08-30T18:35:00.000+02:002016-01-30T17:50:55.871+01:00Desert Tile Set for Endless RollerHere for my game in development, Endless Roller, I've updated it to use gameart2D.com's desert tile set.<br />
It just adds the professional quality.<br />
<br />
I was sick at looking at my done in 5mins crappy artwork and saw that the site <a href="http://www.gameart2d.com/freebies.html" target="_blank">http://www.gameart2d.com/freebies.html</a> has a number of freebies to use.<br />
<br />
To use in my game I used <a href="https://inkscape.org/" target="_blank">Inkscape </a>and did as I explained in my blog <span style="background-color: #edf4ff; color: #888888; font-family: "arial" , "helvetica" , sans-serif; font-size: 13px;"><a href="http://shuffaball.blogspot.com/2015/07/creating-scrollable-background-tiles.html" target="_blank">creating scrollable background tiles</a></span>. I increased the number of tiles used by 5 as I thought it looked better in the game. I added a new layer called Desert, this means I just hide my old background layer and Inkscape will only export the desert layer. If I want to go back and use the crappy versions I can unhide the desert layer and show the original background layer.<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSPXlGqxhlP7HKYnpVzJJMoimSkjN2dj65kSMtiC1GDsJPBlegpDLoSdYdgfoLOZ2YkUVbwLzLC5xM4p4vidPafoehGzDqk3DRufgIPpIhogiAna_XNuJvhwoRmEZoAKKX1dBrppBkFoE/s1600/BackGround.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="252" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSPXlGqxhlP7HKYnpVzJJMoimSkjN2dj65kSMtiC1GDsJPBlegpDLoSdYdgfoLOZ2YkUVbwLzLC5xM4p4vidPafoehGzDqk3DRufgIPpIhogiAna_XNuJvhwoRmEZoAKKX1dBrppBkFoE/s400/BackGround.png" width="400" /></a></div>
<div style="text-align: center;">
<i>Background tiles selected ready for export.</i></div>
<div style="text-align: center;">
<i><br /></i></div>
<div style="text-align: left;">
This background is much taller than the other backgrounds. This is because I've changed the game so that the camera will follow the Rhino as he goes up in the air.</div>
<div style="text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLk5OkLRUEBLxyEp-HRRiYKwG_yAq_Tyq4tNXwvRz3RFMvja9LjQhXtkFTagXNWXpB_1kx9cN2TcU-p1CWgVNaqmtniBRnLyliali0fGNwdZy5visSww-Dh11hnCSzEqKQaLL_qqIniqo/s1600/Middle+Background.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="173" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLk5OkLRUEBLxyEp-HRRiYKwG_yAq_Tyq4tNXwvRz3RFMvja9LjQhXtkFTagXNWXpB_1kx9cN2TcU-p1CWgVNaqmtniBRnLyliali0fGNwdZy5visSww-Dh11hnCSzEqKQaLL_qqIniqo/s400/Middle+Background.png" width="400" /></a></div>
<div style="text-align: center;">
<i>Middle background layer</i></div>
<div style="text-align: center;">
<i><br /></i></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT1VTzNWtqv5viMwyP9hr3XvOOVWi4egzrMLLf2EwlWRiGMBlcMKIV7lg3p0qfkFNegXg3HryzPCasihnpUQPQtHCtRFwA0ojpeL-8flG4laXCruyQYLcVOF-WSZTk-d91aCoNabSvwk8/s1600/Front+Background.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="178" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT1VTzNWtqv5viMwyP9hr3XvOOVWi4egzrMLLf2EwlWRiGMBlcMKIV7lg3p0qfkFNegXg3HryzPCasihnpUQPQtHCtRFwA0ojpeL-8flG4laXCruyQYLcVOF-WSZTk-d91aCoNabSvwk8/s400/Front+Background.png" width="400" /></a></div>
<div style="text-align: center;">
<i>Front background layer</i></div>
<div style="text-align: left;">
<i><br /></i></div>
<div style="text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://youtu.be/KjOs0EG31-g" target="_blank"><img border="0" height="250" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi57g83E_8pVyMEZfx87FF5t3IkkB4c-uyiz4IkyELCL17wKDrt8jIRyLzdJh8vQLzS9dlgptpK7gJ55di7iscGH2rEoGTOeIOCZQOA16lySf716crXi4PHa1KCHirR8ZOdBSPKuFPV-64/s400/EndlessRollerScreenshotSaturday.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="text-align: left;"><i>video on Youtube of the new desert tile set in action.</i></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="text-align: left;"><i><br /></i></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="text-align: left;"><i><br /></i></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="text-align: left;"><i><a href="http://goo.gl/S1K467" target="_blank">Try it out on Game Jolt</a></i></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="text-align: left;"><br /></span></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="text-align: left;"><i><br /></i></span></div>
<div style="text-align: center;">
<span style="text-align: left;"><br /></span></div>
Anonymoushttp://www.blogger.com/profile/01294161473252366494noreply@blogger.com0tag:blogger.com,1999:blog-4118990227545035528.post-47269425199859658432015-08-17T13:55:00.006+02:002015-08-17T23:01:31.259+02:00New Main menu for Shuffa ball<div class="MsoNormal">
I decided to update the UI of my original game Shuffa ball.
Previously there was 21 levels in one large scroll rect and it often seemed
slow on startup.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
So the idea is to have a main menu from which we can choose
one of the 5 campaigns. It should also have the Settings and About links as
well as an Exit button.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
So in Inkscape I went about creating the assets to be used.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
First off there needs to be a background, one of the filters
I use in the design of the game graphics is Bevels->Combined Lighting. So what
I do is apply that filter to the background then cut-out the buttons which
gives a nice sunken feeling to the buttons.<o:p></o:p></div>
<br />
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
To do a cut-out, make a shape on top of the background then
Path->Difference (Ctrl+-).<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAiW6tNoDdnxiawmrQk2qf1Y506qKeSafiK118Vf5NaaKkL2CtBNfhYiyB3f4HpwUHdXCG0-mpWEm3qiDIeAlmZJh5MoK1jxyHfQ_fiLoH8RtSLs5lJlyba0qbNzZUvMQGJJeCMSoby_g/s1600/CutOut.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="255" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAiW6tNoDdnxiawmrQk2qf1Y506qKeSafiK118Vf5NaaKkL2CtBNfhYiyB3f4HpwUHdXCG0-mpWEm3qiDIeAlmZJh5MoK1jxyHfQ_fiLoH8RtSLs5lJlyba0qbNzZUvMQGJJeCMSoby_g/s400/CutOut.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div style="text-align: center;">
<i> Here is how my main menu looked after all of the cut-outs.</i></div>
<div style="text-align: center;">
<i><br /></i></div>
<div class="MsoNormal">
<o:p></o:p></div>
<div class="MsoNormal">
I then hooked up all of the buttons for the level selection,
they all call the old main menu, but I set which difficulty level is to be
used.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQtAr2QKpI5OIKB9xgcLmX4QqKmfSM0cDrdOF6mO8Gpyp4pBiSms11I8TrAe9QqzYdOhcwVbMwd29Ukn9KZV7nhojeyk3IzdhPwc6_63wRMWksesSWSV-w9DeJlJzAavcnPrQhXTiXG4g/s1600/MainMenu.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="250" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQtAr2QKpI5OIKB9xgcLmX4QqKmfSM0cDrdOF6mO8Gpyp4pBiSms11I8TrAe9QqzYdOhcwVbMwd29Ukn9KZV7nhojeyk3IzdhPwc6_63wRMWksesSWSV-w9DeJlJzAavcnPrQhXTiXG4g/s400/MainMenu.png" width="400" /></a></div>
<div class="MsoNormal" style="text-align: center;">
<i>New Main menu in action.</i></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Then in the old a subset of the levels is displayed.<o:p></o:p></div>
<div class="MsoNormal">
<o:p><br /></o:p></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRuCqZ1BVn83a7risJWv8qdL492ZtAeuaCr5gr7Cl-znEJvh2CiKkq9-tKD6rkfUuIqfp4yLerZpS11mJ3S27BlY8w6_fxWN4XCizd1cF0eOvO5K2d8mIlek3OgfxxUm_ZPhMoRMXvuLM/s1600/Easy+levels+selected.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="247" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRuCqZ1BVn83a7risJWv8qdL492ZtAeuaCr5gr7Cl-znEJvh2CiKkq9-tKD6rkfUuIqfp4yLerZpS11mJ3S27BlY8w6_fxWN4XCizd1cF0eOvO5K2d8mIlek3OgfxxUm_ZPhMoRMXvuLM/s400/Easy+levels+selected.png" width="400" /></a></div>
<div class="MsoNormal" style="text-align: center;">
<o:p><i> Easy levels selected</i></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
By splitting the menu system into 2 Screens, I believe the menu system is simple on the main menu and is less cluttered on the level selection.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://play.google.com/store/apps/details?id=com.adzl.shuffaball" target="_blank"><img border="0" height="68" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhbYO4jFX78hdOv-s5iF20gjjlUKnHtX55Sfx_704TUy0ZB_393JhhgyL4CRk_ur5291yhpo57SVfW-Vvgj0faV9Zr_Er-RHKbgpfRark1xhXmekxUU1AT4AH9ehPP-IqcaBtc_MFOyCng/s200/en_generic_rgb_wo_60.png" width="200" /></a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
Anonymoushttp://www.blogger.com/profile/01294161473252366494noreply@blogger.com0tag:blogger.com,1999:blog-4118990227545035528.post-59364804509373169082015-08-12T21:17:00.001+02:002015-08-12T21:40:37.830+02:00Self bouncing ballsTo make the game more interesting, I’ve decided to have the balls bounce along too.<br />
<br />
They also will use the floor to jump, when they are just about to come into contact with the floor it deforms beneath them, then they let go launching the ball into the air.<br />
<br />
To do that we have the balls look down and to the right, when we detect that the ball is going to come into contact with a floor tile, we send that floor tile a message to start sliding down. It will then slide down the adjacent floor tiles too.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrY_y-Kax7xHs8pNNS3NRcOkVbAQ6VWb8uTAVm0nqHE_vRf2WOkwv6qq1kQF6CUfF_sIoGboiwR0YgBoY4dO_MW1kKm_u00iF3CMPx2gyM2QFwuTBd_ZJCSSqJKtNc4-vDsgNxZ29WE00/s1600/DEFORMED+FLOOR.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgrY_y-Kax7xHs8pNNS3NRcOkVbAQ6VWb8uTAVm0nqHE_vRf2WOkwv6qq1kQF6CUfF_sIoGboiwR0YgBoY4dO_MW1kKm_u00iF3CMPx2gyM2QFwuTBd_ZJCSSqJKtNc4-vDsgNxZ29WE00/s400/DEFORMED+FLOOR.png" width="400" /></a></div>
<div style="text-align: center;">
<i>Ball being launched by the floor</i><br />
<i><br /></i></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLWZo02r7MBVAS1g2NLB8IDDMBtE2PdwNNw_qHa3yCMmLS70YS5whUobTz0gpIy5DM1z9FDmT4r-RgOqCwFVDV8NYbuyLQRX2lwYekKScBGGFBgYPc1JdiqOxKQWbRzB6dMvWUS3NlpDE/s1600/code.png" imageanchor="1" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"><img border="0" height="120" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLWZo02r7MBVAS1g2NLB8IDDMBtE2PdwNNw_qHa3yCMmLS70YS5whUobTz0gpIy5DM1z9FDmT4r-RgOqCwFVDV8NYbuyLQRX2lwYekKScBGGFBgYPc1JdiqOxKQWbRzB6dMvWUS3NlpDE/s640/code.png" width="640" /></a></div>
<div style="text-align: center;">
<i>Code sending the message to the collider to start swipe down</i></div>
<div style="text-align: center;">
<i><br /></i></div>
<div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://www.facebook.com/1676885205872513/videos/vb.1676885205872513/1749731471921219/?type=2&theater" target="_blank"><img border="0" height="374" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhq6mk08JNdKuStGjBvfw9Ht1ptmNtmJCy8W7XI4fEenavC-OgQW5HKNLQgbRF3pPf3KFHym_P0wwnOB3mRoVV8P2dnsr-s_PcTeXKBaM0LUQOssaoKLGwvhh65aT2Weu16e0PqHeh71y4/s640/Self+bouncing+balls.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<i><a href="https://www.facebook.com/1676885205872513/videos/vb.1676885205872513/1749731471921219/?type=2&theater" style="text-align: start;" target="_blank">Here</a><span style="text-align: start;"> is a video of the balls bouncing by themselves.</span></i></div>
<br /></div>
Anonymoushttp://www.blogger.com/profile/01294161473252366494noreply@blogger.com0tag:blogger.com,1999:blog-4118990227545035528.post-29493668828033364252015-08-05T20:11:00.000+02:002015-08-05T20:11:17.323+02:00Rhino animations and transitionsTo the Rhino sprite I want to add 3 things.<br />
<br />
<ul>
<li>A sprite to represent the dust as the wheel turns on the ground.</li>
<li>A Dust explosion when the ball takes off and lands.</li>
<li>The third is more difficult I want the whole Rhino sprite to be angle differently when it takes off and lands.</li>
</ul>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5cdLinZw1MLPvuaa1q5V6yZHpHtDKN0oy_h3QqZ8oLB4BL2pO59dAkOhxvIFdHSS5f3V4Fz6DfkAQ_flkn1tUnD31XbsMr9fX3hM1_iGmeaWL5t4sStZINVJji1Bipp1GFTv-imzejKA/s1600/Rhino+Rev+Take+off+and+Landing.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="265" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5cdLinZw1MLPvuaa1q5V6yZHpHtDKN0oy_h3QqZ8oLB4BL2pO59dAkOhxvIFdHSS5f3V4Fz6DfkAQ_flkn1tUnD31XbsMr9fX3hM1_iGmeaWL5t4sStZINVJji1Bipp1GFTv-imzejKA/s400/Rhino+Rev+Take+off+and+Landing.png" width="400" /></a></div>
<div style="text-align: center;">
<i>Rhino Revving, taking off and landing</i></div>
<h3>
Revving Sprite</h3>
This blog will be about adding the revving sprite to the Rhino ball.<br />
<br />
Again I’m going to use <a href="http://www.brashmonkey.com/index.htm" target="_blank">Spriter </a>by BrashMonkey, and the Dust.scml from the <a href="http://www.brashmonkey.com/artpacks.htm" target="_blank">Game effects</a> artpack.<br />
<br />
It has 2 animations the Rev sprite and the landing sprite, I’ll export them to separate PNG files like I did <a href="http://shuffaball.blogspot.fr/2015/08/bouncy-fire-starter.html" target="_blank">previously</a>. Then drag them onto the hierarchy to create the animation.<br />
<br />
If we were to attach to the wheel as a child the rev sprite would rotate with the ball. We could attach the sprite to the Rhino head as that is doesn’t move much but as with the flame sprite I’m going to use the Update function to position relative to the centre of the ball.<br />
Unlike the flame sprite we need to apply an offset as the rev needs to appear on the left of the Rhino ball. To find the offset make the Rev temporarily a child of the Rhino ball then move to the ideal position, store the transform position as this is what we’ll add in the Update function. Remembering to move the Dust_000 from the RhinoBall hierarchy.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQ0vMDoqxOSRyaB3BGTlHS2I8LPu5FBe5Iiw25dFwhSirw6PG4AY8hUztZsVjqv5YkKmkKtcy-3c9Q6XBr1WwUfvjyGtZ1HiZoRNGUibA0joEpE6CsWovZhFIcA5Mv2NsMFu1OURad4nY/s1600/Offset+of+Rev+sprite.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="249" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjQ0vMDoqxOSRyaB3BGTlHS2I8LPu5FBe5Iiw25dFwhSirw6PG4AY8hUztZsVjqv5YkKmkKtcy-3c9Q6XBr1WwUfvjyGtZ1HiZoRNGUibA0joEpE6CsWovZhFIcA5Mv2NsMFu1OURad4nY/s640/Offset+of+Rev+sprite.png" width="640" /></a></div>
<div style="text-align: center;">
<i>adjusting the transform of the Rev sprite</i></div>
<div style="text-align: center;">
<i><br /></i></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBl6F_0WEaE_TeMqQrdI0tlLRI0NBBipQo0BLb0gSbb9JMuXMvcd0EWZtSSk8N_KyHDCT9KBPn1FlnDKPPOsfewJsLT9OVnWKu89GANXralkzqjupIu7XoZkwGCOX5TgShc8-OZPi6mQI/s1600/Attach+rev+sprite+to+the+Rhino+script.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="85" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiBl6F_0WEaE_TeMqQrdI0tlLRI0NBBipQo0BLb0gSbb9JMuXMvcd0EWZtSSk8N_KyHDCT9KBPn1FlnDKPPOsfewJsLT9OVnWKu89GANXralkzqjupIu7XoZkwGCOX5TgShc8-OZPi6mQI/s400/Attach+rev+sprite+to+the+Rhino+script.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<i>adding the sprite to the Rhino script</i></div>
<div style="text-align: center;">
<i><br /></i></div>
So the Rev sprite now works and is well positioned but the problem is when the Rhino jumps and is airborne there shouldn’t be dust revving. So as with the flame in the previous blog we will RayCast down from the centre of the ball to see when we lose contact with the ground.<br />
If we lose contact we set active of the Rev GameObject to false, in the future we will transition from the Rev sprite to the take-off sprite but this will do just now.<br />
<div>
<br /></div>
Anonymoushttp://www.blogger.com/profile/01294161473252366494noreply@blogger.com0tag:blogger.com,1999:blog-4118990227545035528.post-49613204516788438652015-08-04T13:48:00.000+02:002015-08-04T14:01:25.905+02:00Rotation of the flame spriteIn my <a href="http://shuffaball.blogspot.fr/2015/08/bouncy-fire-starter.html" target="_blank">previous blog</a>, I hinted that we wanted to rotate the flame, the idea is that when falling we want the flames above the Shuffa ball, with an upwards motion the flames below and when on the ground the flames to the left of the ball.<br />
<div style="text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.blogger.com/video.g?token=AD6v5dx4ChFke1KJmKNvz16cmmzv_RYk3bjVsjcGNsBjC-F1l6RBYkFA25pCfMjF0uQ_B64e6JKEsNnFk1G37JMqew' class='b-hbp-video b-uploaded' frameborder='0'></iframe></div>
<div style="margin-left: 1em; margin-right: 1em; text-align: center;">
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEii6-iAQO-ovQyLSUus6euAzB40l7mj5J9PRTawcujlaQIuNgph1qSDTYVWVqNt3tJuQSDUzN61_CuPnKQ3T216fzPdE1eiW6Cmiq_Blxha5kd5V93SU3sWXa-wKQiHYFREwD3hT0fogtM/s1600/Flames+rotated.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="117" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEii6-iAQO-ovQyLSUus6euAzB40l7mj5J9PRTawcujlaQIuNgph1qSDTYVWVqNt3tJuQSDUzN61_CuPnKQ3T216fzPdE1eiW6Cmiq_Blxha5kd5V93SU3sWXa-wKQiHYFREwD3hT0fogtM/s400/Flames+rotated.png" width="400" /></a></div>
<div style="text-align: center;">
<i>Shuffa ball with rotated flame</i></div>
</div>
<div style="text-align: center;">
<i><br /></i></div>
To do this we need to know when the ball is in contact with the ground, and if airborne whether the trajectory is upwards or downwards.<br />
<br />
To see if the ball is in contact with the ground we will use RayCasting, we will cast an invisible line down a certain distance from the centre of the ball; if it collides with a piece of floor then we return true saying it is grounded.<br />
<br />
With RayCasting we need to use layers, these layers separate the different object types. If we didn’t then the RayCast will always return true as it casts from the centre of the ball down to outside the circle collider, thus hitting the collider and returning true.<br />
We will assign all of the floor sprites to the Floor layer, then when RayCasting we tell it to only search the Floor layer.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYBJLoMDjJwFMYzqQNVZWega_pCsQgeZtQ7lViQbXIjYnoD2A3ZWK6Tf2kAcDmmlWF2osxlXAJz3YOppUeEJHkUGIMyvou5JQdfstlo2ZXIJukLh726xjrtulLnXrne60F_Hd0TeEGqTE/s1600/LineCast.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="55" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYBJLoMDjJwFMYzqQNVZWega_pCsQgeZtQ7lViQbXIjYnoD2A3ZWK6Tf2kAcDmmlWF2osxlXAJz3YOppUeEJHkUGIMyvou5JQdfstlo2ZXIJukLh726xjrtulLnXrne60F_Hd0TeEGqTE/s640/LineCast.png" width="640" /></a></div>
<br />
<div class="MsoNormal" style="margin-bottom: 0.0001pt;">
<br /></div>
<br />
To set up the Floor layer click Layers->Edit Layers, then add the Floor layer to one of the User Layers.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrzCwZ25yTKXkXj3kCf_VZ0BrtaixsfnESPwi_WsfI_1EsRqEg23OBkW3IOhSGfa7ZqbiNzd5BhGtR3n1iLkQRzHwBAfqVrq23AhkTGaD_ha-a9As-cqpUtVy0V_IDVnpGcLA4KeunmMM/s1600/Edit+layers+with+Floor+added.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrzCwZ25yTKXkXj3kCf_VZ0BrtaixsfnESPwi_WsfI_1EsRqEg23OBkW3IOhSGfa7ZqbiNzd5BhGtR3n1iLkQRzHwBAfqVrq23AhkTGaD_ha-a9As-cqpUtVy0V_IDVnpGcLA4KeunmMM/s320/Edit+layers+with+Floor+added.png" width="285" /></a></div>
<div class="" style="clear: both; text-align: center;">
<i>adding the Floor layer</i></div>
<div class="" style="clear: both; text-align: left;">
Next assign the floor tile to the Floor Layer.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiy1OHThVNi3LKHY-W1KjaljRlqN1z_alan7uq6Ot-B0fD9OdbffdLyrBJuztcVAhbgv5vslwPxqvtBdiwE63f1tDLY4Vj5msc9ozLQCwVGHKRY7mtxkYlJKazAqopVd7yf2V2_1qqvAd0/s1600/FloorTile+assigned+to+the+Floor+layer.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="81" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiy1OHThVNi3LKHY-W1KjaljRlqN1z_alan7uq6Ot-B0fD9OdbffdLyrBJuztcVAhbgv5vslwPxqvtBdiwE63f1tDLY4Vj5msc9ozLQCwVGHKRY7mtxkYlJKazAqopVd7yf2V2_1qqvAd0/s320/FloorTile+assigned+to+the+Floor+layer.png" width="320" /></a></div>
<div class="" style="clear: both; text-align: center;">
<i>assign the floor sprite to the Floor layer</i></div>
<div class="" style="clear: both; text-align: left;">
To work out whether the ball is falling or on an upward trajectory we compare the current transform position with the previous frame. Then adjust the angle accordingly. When adjusting the angle we don't want it to change immediately but have a smooth transition, that is where the Slerp function comes in.</div>
<div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhA-lZv9hBUDIAgYxTffxXP014gduhJzdn8bu5L0kswxGTQG5IYUNCuMuDgjjSejxwPuOIopmJgnhGU0-sJsBCvu7OD7Rf1iytflkLCZuNglM1f72m-LbCiaMxbdkXLxH8bsNUz5cTnmoM/s1600/Adjust+angle+of+flame.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="198" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhA-lZv9hBUDIAgYxTffxXP014gduhJzdn8bu5L0kswxGTQG5IYUNCuMuDgjjSejxwPuOIopmJgnhGU0-sJsBCvu7OD7Rf1iytflkLCZuNglM1f72m-LbCiaMxbdkXLxH8bsNUz5cTnmoM/s640/Adjust+angle+of+flame.png" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<i>Video of the ball flame rotation in action</i></div>
<br /></div>
Anonymoushttp://www.blogger.com/profile/01294161473252366494noreply@blogger.com0tag:blogger.com,1999:blog-4118990227545035528.post-23915604625921194452015-08-01T12:13:00.000+02:002015-08-01T12:43:32.145+02:00Bouncy fire-starterAs I've chosen a Rhino and <a href="http://shuffaball.blogspot.com/2015/07/why-not-rhino.html" target="_blank">as we all know</a> they live to put out fires, I've now come up with a goal of the game.<br />
<div>
The Shuffa ball instead of being the main player becomes the fire-starter, bouncy fire-starter. The Rhino then has the task of putting these fires out.</div>
<div>
<br /></div>
<div>
For the animation of the fire I use a package I bought called <a href="http://www.brashmonkey.com/index.htm" target="_blank">Spriter </a>by BrashMonkey, when I bought it all of the artpacks were included. It is free to try and I do recommend it.</div>
<div>
The one I am going to use comes from the <a href="http://www.brashmonkey.com/artpacks.htm" target="_blank">Game effects pack</a> and is called flame.scml.</div>
<div>
Once opened; Click File->Export Animation to PNG.</div>
<div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVeT44izJA0fmKoV8NERxY-QnBOfIZoKrLswiVvmwG_gOaxjT0bw2NJOE8ADMDjv-3Fq_KlqXHLAnHbEM7rK-UBOwFO13ZwubwYJoLfZZ5NOIl8NJOPpr7ll66ff0yr33mNSUqBepJy7E/s1600/Spriter+Export+Flame+to+PNG.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="252" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgVeT44izJA0fmKoV8NERxY-QnBOfIZoKrLswiVvmwG_gOaxjT0bw2NJOE8ADMDjv-3Fq_KlqXHLAnHbEM7rK-UBOwFO13ZwubwYJoLfZZ5NOIl8NJOPpr7ll66ff0yr33mNSUqBepJy7E/s400/Spriter+Export+Flame+to+PNG.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<i>Export animation</i></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Then I set the size to 200% and the number of frames to export, in my case 9. You obviously will play about with these figures depending on the project. </div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTMP_J8AlgPkU3e1YoTPmWRKHXMcAUvXrip23RRF5xfs0hf0EO6Q4qK463LteZrorvQ8TA0JZA7CCMshlrhQ4lKwYtWeIUia76giw6yza7WFWe5etjRcTni4VP0982meYxTpe7aanPPW0/s1600/Exporting+flame+frames.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgTMP_J8AlgPkU3e1YoTPmWRKHXMcAUvXrip23RRF5xfs0hf0EO6Q4qK463LteZrorvQ8TA0JZA7CCMshlrhQ4lKwYtWeIUia76giw6yza7WFWe5etjRcTni4VP0982meYxTpe7aanPPW0/s400/Exporting+flame+frames.png" width="390" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<i>Exporting flame frames</i></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
These need to be exported into a directory inside the Assets directory of the unity project. Then to create the animation you drag all of the images onto the Hierarchy, this creates the animation. One thing I like to do is un-check the "Generate mip-maps", I'm not sure what this is for but it just seems to create a lesser quality animation.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKidVrPwMF53vLD8daFVjM71mDqPCxvB6Zzajx4BWhL2BWsvhiwL4Z49fPmCr1SB63863y-ah6SZj1HL8ntKVNH8HgvD4SGvs1h-y8KeuDAF1uBa3xJJvB1EdhgjCHlHUtQeM7min1jj0/s1600/Drag+Images+to+create+animation.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="206" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKidVrPwMF53vLD8daFVjM71mDqPCxvB6Zzajx4BWhL2BWsvhiwL4Z49fPmCr1SB63863y-ah6SZj1HL8ntKVNH8HgvD4SGvs1h-y8KeuDAF1uBa3xJJvB1EdhgjCHlHUtQeM7min1jj0/s400/Drag+Images+to+create+animation.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<i>Drag images to Hierarchy</i></div>
<div class="separator" style="clear: both; text-align: center;">
<i><br /></i></div>
<div class="separator" style="clear: both; text-align: left;">
Now to make the flame follow the ball:</div>
<div class="separator" style="clear: both; text-align: left;">
If you drag the flame onto the ball it becomes a child of that object and therefore as the ball rotates the so will the flame animation. Not the effect I'm after, so we need to create a script that as the ball moves the flame animation is also moved.</div>
<div class="separator" style="clear: both; text-align: left;">
To do that we create in the ball script we a public GameObject that in the update we change the transform position to match that of the ball.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbF_Qdd6xZDxJER6Zb7FyH_GY1kUPF8diuJ1pbER_JWbpLYoTxFhBkWawDasnmcXWvJD7FzEQuQk5hOgHfGTvyOurfP8mCugl66I_pfEbbqDaSm7-_3h9Z3msciRMPd3GXd_ykNiOZOm0/s1600/ball+script+with+fire+object.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="138" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbF_Qdd6xZDxJER6Zb7FyH_GY1kUPF8diuJ1pbER_JWbpLYoTxFhBkWawDasnmcXWvJD7FzEQuQk5hOgHfGTvyOurfP8mCugl66I_pfEbbqDaSm7-_3h9Z3msciRMPd3GXd_ykNiOZOm0/s400/ball+script+with+fire+object.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<i>Ball script with GameObject</i></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgovPbktbz-x6ZgXgbgvAdnHdYjQxltrD7sBn49zanEdcuUrWKY_EjHi9VxZpKTMztK4jq5WmS6clLwmzanfjF1FBNSVhJOiHXq1C2n4JF-YPtPQqxQn00fhWCy2n60UKD2lnGI119avdE/s1600/Adding+flame_007+to+ball+script.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="118" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgovPbktbz-x6ZgXgbgvAdnHdYjQxltrD7sBn49zanEdcuUrWKY_EjHi9VxZpKTMztK4jq5WmS6clLwmzanfjF1FBNSVhJOiHXq1C2n4JF-YPtPQqxQn00fhWCy2n60UKD2lnGI119avdE/s400/Adding+flame_007+to+ball+script.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Back in the unity editor drag the flame_007 object into the fire, make sure the flame object is no longer a child of the ball.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Now we have a flame object that follows the ball, because the flame animation is much taller the middles do not line up.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5Q8FPzbQagaGxBhOJDCViZXboq5GP599mkkUeCOWr6OCudgo74IJIMRxbg-GJa_-aIaOceDK4UO1Ig_uJp3Oc51z2eQMGfA6rAOBEf_ered9ykxpxg-RIUj3A-QWsi-b8HxvBC3sMqoY/s1600/Misaligned+flame+and+ball.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5Q8FPzbQagaGxBhOJDCViZXboq5GP599mkkUeCOWr6OCudgo74IJIMRxbg-GJa_-aIaOceDK4UO1Ig_uJp3Oc51z2eQMGfA6rAOBEf_ered9ykxpxg-RIUj3A-QWsi-b8HxvBC3sMqoY/s1600/Misaligned+flame+and+ball.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<i>Misaligned images</i></div>
<div class="separator" style="clear: both; text-align: center;">
<i><br /></i></div>
<div class="separator" style="clear: both; text-align: left;">
In the Update of the ball we could add an offset to the transform position but later on I want to change the rotation of the flame depending on whether it is airborne or rolling on the ground. So the easiest way is to change the pivot point of each frame in the animation.</div>
<div class="separator" style="clear: both; text-align: left;">
Navigate in the Project to the directory where the individual PNG files are store then click on each on and in the sprite editor change the pivot point.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKLlpXP9Oi8BlIs3lWUz40fASgVb4BQ7rT6lap34-fytFKpfApF5o4ulj-xXWHyprzBhoWQ34jfw35uHen6db9J8rL-V-BaxI99wzzzj1AKpmRTKMP8-WxWCZM8zZ17l7EeizAUeI9eFA/s1600/Change+pivot+point+of+flame.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="248" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjKLlpXP9Oi8BlIs3lWUz40fASgVb4BQ7rT6lap34-fytFKpfApF5o4ulj-xXWHyprzBhoWQ34jfw35uHen6db9J8rL-V-BaxI99wzzzj1AKpmRTKMP8-WxWCZM8zZ17l7EeizAUeI9eFA/s400/Change+pivot+point+of+flame.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<i>Changing pivot point of each sprite</i></div>
<div class="separator" style="clear: both; text-align: center;">
<i><br /></i></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1Lb0-R-tqohugQJp3TFttsHsveDYL9JUf1sRjkebEDPmr0s8pDnbwPEnFrEPs9OynQLz5ykqs3aVQv-vrvOOMGxLT3h-mfkpZaLVW5wRrfvteyXXsBsOnKH377_zpuToP4FTkg-nG-hs/s1600/Aligned+Flame+and+ball.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1Lb0-R-tqohugQJp3TFttsHsveDYL9JUf1sRjkebEDPmr0s8pDnbwPEnFrEPs9OynQLz5ykqs3aVQv-vrvOOMGxLT3h-mfkpZaLVW5wRrfvteyXXsBsOnKH377_zpuToP4FTkg-nG-hs/s1600/Aligned+Flame+and+ball.png" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<i>Aligned ball and flame.</i></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
</div>
Anonymoushttp://www.blogger.com/profile/01294161473252366494noreply@blogger.com0tag:blogger.com,1999:blog-4118990227545035528.post-4290710696902688342015-07-30T12:20:00.003+02:002015-07-30T12:21:59.966+02:00Work around for a System.IO.FileNotFoundException: Oracle.DataAccess<div class="MsoNormal">
I wrote a simple program that uses ODP.Net to copy data from
one server to another. <o:p></o:p></div>
<br />
<div class="MsoNormal">
I have the ODP.NET version 2.112.3.0 installed on my machine
with the Oracle.DataAcess Specific version set to false. The server is a
Windows 2003 32 bit so the output is x86.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGM2b9j8Zy72C6sGrCf0dt3tMoeeo5LJdFGuBFgM8JHaMWogBjAlK_2HgpeQauMq3jujk-bd6MWMXl91Ool_29YUQfai1C13LGSkYXyUcj1qoquCAyCOtr9Y5UDxY6GVNkd4X0w5CBfr4/s1600/Specific+version+false.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGM2b9j8Zy72C6sGrCf0dt3tMoeeo5LJdFGuBFgM8JHaMWogBjAlK_2HgpeQauMq3jujk-bd6MWMXl91Ool_29YUQfai1C13LGSkYXyUcj1qoquCAyCOtr9Y5UDxY6GVNkd4X0w5CBfr4/s400/Specific+version+false.png" width="348" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
The .EXE works fine on my machine, then when I tried it on the
server itself I got.<br />
<div class="MsoNormal">
<o:p></o:p></div>
<div class="MsoNormal">
<span lang="FR"><br /></span></div>
<div class="MsoNormal">
<span lang="FR"><i>Exception non
gérée : System.IO.FileNotFoundException: Impossible de charger le fichier
ou l'assembly 'Oracle.DataAccess, Version=2.112.3.0, Culture=neutral,
PublicKeyToken=89b483f429c47342' ou une de ses dépendances. Le fichier spécifié
est introuvable.</i><o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
I needed to have this .EXE work on the server so in order to
make it work; I copied the version of the ODP.Net from the server to my machine. I then changed the reference in the project to this one and set the <b>Specific Version </b>to <b>True</b>. I tried with it set to false and I still got an error.<o:p></o:p></div>
<div class="MsoNormal">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBYUTeuFFb5zdVViiPdwXWjRU_hSJlAx82mvw6bPfpIQOQFE03I33vNxRff96U4Y03DGo7OMKAA3PbbLnHBfJ8tCoARtqsRWUtWote-RC_4Thhcna8pEON5Ly1KnM_w1KNbAjNEpILqyo/s1600/Specific+version+true.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="235" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgBYUTeuFFb5zdVViiPdwXWjRU_hSJlAx82mvw6bPfpIQOQFE03I33vNxRff96U4Y03DGo7OMKAA3PbbLnHBfJ8tCoARtqsRWUtWote-RC_4Thhcna8pEON5Ly1KnM_w1KNbAjNEpILqyo/s400/Specific+version+true.png" width="400" /></a></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
The .EXE worked on the server.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
This seems like a work around, there was probably something wrong with the Oracle installation on the server but I couldn't change the server, so this did the trick. </div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
I would have thought having specific version set to false would mean it would work no matter what version of the ODP.Net was installed. </div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
If I ever find out the problem I'll post an update.</div>
<div class="MsoNormal">
<br /></div>
Anonymoushttp://www.blogger.com/profile/01294161473252366494noreply@blogger.com0tag:blogger.com,1999:blog-4118990227545035528.post-35098624953209115192015-07-26T20:45:00.000+02:002015-07-26T21:03:58.933+02:00Rhino face-off, bouncy versionIn my <a href="http://shuffaball.blogspot.com/2015/07/why-not-rhino.html" target="_blank">previous blog</a> I thought to add a rhino to the game as a baddie.<br />
So to recap, I had two versions, one as Rhino/Spacehopper hybrid the other as a proper animated version of a rhino.<br />
This blog will follow my research into how to make the Rhino/Spacehopper hybrid.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhczQfnXitlpiSagN5IXYhlVzhss0FusRZmVxe2vKkS2HQgqo9ZpL9zHgwE3ochB2ZsihCCK-MrNWLjdhNAf135jbaYP6F7KV53fkPDbGpF8on90Uv1-ZE3c8TmdznNKqq1GJzqtgEfA1o/s1600/Rhino+face+off.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="276" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhczQfnXitlpiSagN5IXYhlVzhss0FusRZmVxe2vKkS2HQgqo9ZpL9zHgwE3ochB2ZsihCCK-MrNWLjdhNAf135jbaYP6F7KV53fkPDbGpF8on90Uv1-ZE3c8TmdznNKqq1GJzqtgEfA1o/s400/Rhino+face+off.png" width="400" /></a></div>
<div style="text-align: center;">
<i>Rhino face-off</i></div>
<div style="text-align: left;">
<i><br /></i></div>
<div style="text-align: left;">
So looking around in the Unity physics 2D I thought I'd start with the ball. In <a href="https://play.google.com/store/apps/details?id=com.adzl.shuffaball" target="_blank">Shuffa ball</a> I have a script for the ball, a RigidBody2D and a circle collider 2D so I added the same.</div>
<div style="text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwhaEf_Tgzzhkd3gQxuvg5pmzSYKH6SGtNjdWEbzMuPs32TYLse7hcN0UwODd4B6g7BITHLUILPvjTpnEsHeYJBjfbigwuSa5sk2ovYJsT_7440LOzVcPVbRJAI-QBJW_jAXyO623SQf4/s1600/RhinoBall+add+Rigidbody2D+and+Circle+Collider+2D.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="262" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwhaEf_Tgzzhkd3gQxuvg5pmzSYKH6SGtNjdWEbzMuPs32TYLse7hcN0UwODd4B6g7BITHLUILPvjTpnEsHeYJBjfbigwuSa5sk2ovYJsT_7440LOzVcPVbRJAI-QBJW_jAXyO623SQf4/s400/RhinoBall+add+Rigidbody2D+and+Circle+Collider+2D.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<i>Unity editor after adding Rhino script, RigidBody2D and Circle Collider 2D</i></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Then in the script I add code to apply force to the rigidBody2D. This little snipit says if the velocity is less than 5 add I to the force, by putting it in the fixedUpdate as opposed to every frame it does it at a fixed time. If every frame, different machines have different frame rates.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMfV3Fs4Lkmw7Qrjs7CK4hRmREezvzizWlmc1y6BmgKq6lYgJGOxazg5dhDW7wuwIeRtOiemtTFHTB823EXRgeY7CYCOniDDRZWUs1UZpz5y8RtfNRgjr8YlreUa7f9ds9t-XuoYs25KA/s1600/Rhino+script+in+VS2013+community+edition.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="350" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMfV3Fs4Lkmw7Qrjs7CK4hRmREezvzizWlmc1y6BmgKq6lYgJGOxazg5dhDW7wuwIeRtOiemtTFHTB823EXRgeY7CYCOniDDRZWUs1UZpz5y8RtfNRgjr8YlreUa7f9ds9t-XuoYs25KA/s400/Rhino+script+in+VS2013+community+edition.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<i>Rhino script in VS2013 Community edition</i></div>
<div class="separator" style="clear: both; text-align: center;">
<i><br /></i></div>
<div class="separator" style="clear: both; text-align: left;">
Here I use <a href="https://www.visualstudio.com/en-us/news/vs2013-community-vs.aspx" target="_blank">VS2013 Community edition</a>, I tried MonoDevelop that comes with Unity, but found the Intellisense a bit flaky. Using Visual Studio at work everyday, I am too used to the Intellisense working and all of the keyboard shortcuts, so I changed to the VS2013 community edition.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Running the scene, everything worked as normal, then I wanted to add the Rhino head, this is where I went looking through various Physics 2D components.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
The thing that seemed most obvious to me was the Wheel Join 2D, this seemed what I wanted. I connected my wheel joint 2D from the wheel to the head of my rhino, which seemed the obvious way but it really didn't work as I expected. </div>
<div class="separator" style="clear: both; text-align: left;">
Then I found on the internet that you connect from the head to the the wheel, that was better but again didn't look right. So I added a small wheel at the front of the head. Then for movement you have a motor not the FixedUpdate function above.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
It was OK but not the vision I had for my Rhino ball, it was more like a Rhino bike than a Rhino ball.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Click <a href="https://goo.gl/h56aF0" target="_blank">here</a> to see a video of the Rhino motor bike in action.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://goo.gl/h56aF0" target="_blank"><img border="0" height="235" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBaT_4gFo8u2H0tl7jb_xyAHqUwzPpqAJXe4plFYHvVUCVod2MFCqnM3oEgSfxvZGl1qJHO_PKViO2IT3NANyyVvQFvdoh24eCqkKQbB5CGdWgOkNFUi6XB0R2ymtQfT6wuxGwC6cGFaE/s400/Rhino+bike+in+action.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<i>Rhino bike</i></div>
<div class="separator" style="clear: both; text-align: left;">
<i><br /></i></div>
<div class="separator" style="clear: both; text-align: left;">
Next I tried the Spring Join 2D, this is like car suspension. Added two to the head and then I stopped the head from rotating on the Z axis. This gave more of the effect I was after.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinp1ladRfc_97aTtCQoKevBn1bQyAInxDB3mScLcIPU4-8hjXa-yhaBgGtSb15I3VjQh6YV07doFY8baMuWRwXd4pTYnrH1mdQ-2Ksd4ZLnQJZP0a9i8XhXmnfFI9lZp0vuof_GSLTMO4/s1600/Rhino+head+with+2+Spring+join+2D.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinp1ladRfc_97aTtCQoKevBn1bQyAInxDB3mScLcIPU4-8hjXa-yhaBgGtSb15I3VjQh6YV07doFY8baMuWRwXd4pTYnrH1mdQ-2Ksd4ZLnQJZP0a9i8XhXmnfFI9lZp0vuof_GSLTMO4/s400/Rhino+head+with+2+Spring+join+2D.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<i>Rhino with 2 Sprint joint 2D</i></div>
<div class="separator" style="clear: both; text-align: center;">
<i><br /></i></div>
<div class="separator" style="clear: both; text-align: center;">
<span style="margin-left: 1em; margin-right: 1em;"><a href="https://www.facebook.com/1676885205872513/videos/vb.1676885205872513/1743833472511019/?type=2&theater" target="_blank"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5PKBjASWOSODM__I_qukyfgIm7YtiUhFGRC48WSxvj0UF62m3KZdeFW2eTvL6H7OHE9VxfhHJCFUXB7X0fnKUJF9XK1_xBcmVnuWBECOyT1ncLhshsGOlKZSsO24ezce16zPZLwodnuw/s400/Rhino+hopper+in+action.png" width="400" /></a></span></div>
<div class="separator" style="clear: both; text-align: center;">
<i><a href="https://www.facebook.com/1676885205872513/videos/vb.1676885205872513/1743833472511019/?type=2&theater" target="_blank">Click here to see a video of the Rhino Hopper</a></i></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
Anonymoushttp://www.blogger.com/profile/01294161473252366494noreply@blogger.com0