tag:blogger.com,1999:blog-65216781008185032872024-03-13T16:13:57.214-07:00Careless LabsCarelessLabshttp://www.blogger.com/profile/08990422077197281394noreply@blogger.comBlogger14125tag:blogger.com,1999:blog-6521678100818503287.post-73656110358175231982014-07-15T19:44:00.002-07:002014-07-15T19:44:30.835-07:00New websiteCareless Labs has moved to <a href="http://carelesslabs.co.uk/" target="_blank">http://Carelesslabs.co.uk</a><br />
<br />
A link to the new blog can also be found here.<br />
<br />
Thanks for following!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYi_VJBZczX7gPBgUgrQ7yBzZl_hcbkUMbwiCFxKPvnG6EFRuyFs7ieGWrowBF_Rym4cpzU9WmDfUnyLP_rMgUX49uc40QHg3VWXgt9aI9ICFX4RzQVpyfn8fnknX16Br8iSS9_4rWuxla/s1600/ker50DOv.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiYi_VJBZczX7gPBgUgrQ7yBzZl_hcbkUMbwiCFxKPvnG6EFRuyFs7ieGWrowBF_Rym4cpzU9WmDfUnyLP_rMgUX49uc40QHg3VWXgt9aI9ICFX4RzQVpyfn8fnknX16Br8iSS9_4rWuxla/s1600/ker50DOv.png" /></a></div>
<br />CarelessLabshttp://www.blogger.com/profile/08990422077197281394noreply@blogger.com0tag:blogger.com,1999:blog-6521678100818503287.post-14127461601298050872014-04-22T11:40:00.001-07:002014-04-22T11:40:23.590-07:00Pixel Art and new projectI have been busy lately with all sorts of things, time off work, ran a marathon but I did start learning pixel art recently so thought I would blog about it.<br />
<br />
<br />
There many types of artists, sadly I fall into the category of a coder with a zero game budget who has to make all his own art or will have no game. After making the two Jam games I felt it was time to return to my main game "Endure" but while wasting some time on FaceBook I saw a message on a group I follow saying they were celebrating their 10 Year anniversary:<br />
<br />
<a href="https://www.facebook.com/groups/68681178734/" target="_blank">Wing Wing Shoot Bag Facebook group</a><br />
<br />
Anyway, I offered to make the group a game based on a feature length movie they made some 6 years ago about a transgender cop called "Susan Balaka", they also make short comedy sketches but this had a full story which would be awesome to make into a game.<br />
<br />
Oh yes Pixel Art,the game would require lots of animated scenes and pixel style art, so I started having a go: <br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://scontent-b-lhr.xx.fbcdn.net/hphotos-frc1/t1.0-9/10013336_10152351827507068_783674276_n.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="207" src="https://scontent-b-lhr.xx.fbcdn.net/hphotos-frc1/t1.0-9/10013336_10152351827507068_783674276_n.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">First Attempt at Balaka</td></tr>
</tbody></table>
This was a bit shoddy and the guns look like socks! Next I found some forums and asked for help, you may find these useful:<br />
<b><br /></b>
<b>Forums</b><br /><span id="goog_598991442"></span><span id="goog_598991443"></span><a href="http://finalbossblues.com/forum/forums-1/" target="_blank">Final Boss Blues</a><br />
<a href="http://wayofthepixel.net/index.php?board=2.0" target="_blank">Way of the Pixel</a><br />
<a href="http://www.pixeljoint.com/forum/forum_topics.asp?FID=8" target="_blank">Pixel Joint</a><br />
<a href="http://www.reddit.com/r/pixelart" target="_blank">Reddit - pixelart</a><br />
<br />
With some help and reading tutorials I broke a whole new set of pixel art rules and came up with these:<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgufXDngG6wo3uhyBMMD8oBF30xMloQgR3RR76bihLhQa3r4s3mFslX8SNY2LgeTzSoWlxPXO96g1KOi-0nXmbg98Pg3R9xAwS630Stmn0phT09VQ-v7k-1KU791tWxtssUYRA1ooR85VXz/s1600/smarter_than_you.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgufXDngG6wo3uhyBMMD8oBF30xMloQgR3RR76bihLhQa3r4s3mFslX8SNY2LgeTzSoWlxPXO96g1KOi-0nXmbg98Pg3R9xAwS630Stmn0phT09VQ-v7k-1KU791tWxtssUYRA1ooR85VXz/s1600/smarter_than_you.png" height="255" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Two main characters (Line from the movie)</td></tr>
</tbody></table>
One rule I broke early on was using far to many colours, the advise I received most often referred to colour palette and contrast between colours. A useful site for checking how many colours your using:<br />
<a href="http://wouterpleizier.nl/pj/index.php?input=http://snag.gy/FngMY.jpg" target="_blank">http://wouterpleizier.nl/pj/index.php?input=http://snag.gy/FngMY.jpg</a><br />
<br />
After some help from Final Boss Blues I started adding some shading to the characters faces, as you progress you look back at your earlier work and realise you will need to redo them over. <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://i.snag.gy/zL2Sf.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="http://i.snag.gy/zL2Sf.jpg" height="200" width="110" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Trying to add detail</td></tr>
</tbody></table>
<br />
There will be all sorts of assets in the Balaka game, I had a go at making an arcade machine to test the use of isometric angles with pixel art, I am far from good at this but you can see what it is and its not too ugly?<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://pbs.twimg.com/media/BkqesWhCcAAOIrd.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://pbs.twimg.com/media/BkqesWhCcAAOIrd.png" /></a></div>
<br />
<br />
<br />
<br />
After making several static images that I tried my hand at animation, I have made simple animations for other games but I always seem to make some sort of mistake, here the flash from the screen is not really pixel art as such and the feet/body position is all wrong. <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://s29.postimg.org/vvw97kvyf/Balaka_animation_3.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://s29.postimg.org/vvw97kvyf/Balaka_animation_3.gif" /></a></div>
<br />
So there you have it, I am now learning pixel art while making a game. I would suggest finding some good pixel artists and following their work, realise that you will make mistakes, when asking for help do not take criticisms to heart and say thanks when people take the time out to give help.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjN3JVPdWEhaxq_s0WNZ5X-1ud6i2RYvDc8lb5DatDQLvYqOUVnAyzR_f15-tO41bzyYuOLp_q4CsQAasPL3HKciVGGTRNf4tGOKU_pfQYu6-hhOscxv9Zc_ERCZIsOa4pyTtHF6bC6Zbed/s1600/russian.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjN3JVPdWEhaxq_s0WNZ5X-1ud6i2RYvDc8lb5DatDQLvYqOUVnAyzR_f15-tO41bzyYuOLp_q4CsQAasPL3HKciVGGTRNf4tGOKU_pfQYu6-hhOscxv9Zc_ERCZIsOa4pyTtHF6bC6Zbed/s1600/russian.png" /></a></div>
"His head looks like a potato" - I could have tried to defend this comment but its true and made me laugh.<br />
<br />
Happy Pixeling!<br />
<br />
<br />
CarelessLabshttp://www.blogger.com/profile/08990422077197281394noreply@blogger.com1tag:blogger.com,1999:blog-6521678100818503287.post-29924058792033467752014-03-24T14:55:00.002-07:002014-03-24T15:05:13.895-07:00Humble indie dev's game jam adventureSo I decided to take part in a few game jams to see what they were all about, I have mixed feelings about them and will take you through my highs and lows during two recent jams.<br />
<br />
<b>What is a Jam?</b><br />
Within a set period of time you have to produce a game to some theme or basic specification.<b> </b>The rules are usually basic.<br />
<br />
<b>Why Jam</b><br />
Having clear goals and a deadline really gets you working! I was making pixel art and thinking of how it would work in the game, basically multitasking like a beast. You learn new things rapidly and learn to actually finish tasks so there are lots of pro's to taking part in a jam. For many this will be the first project this see through to publishing.<br />
<br />
<b>My Journey</b><br />
After seeing the <span style="color: #6aa84f;">Flappy Bird</span> game do so well I though why not make something simple like this to see project from start to finish in a few days, then I found <span style="color: #274e13;"><b>Flappy Jam</b></span>!<br />
<br />
<a href="http://itch.io/jam/flappyjam">http://itch.io/jam/flappyjam</a><br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8EymCfy19REf3Afs6Gjfzt9oBJeMWwoOYfpG_o8ztDhM6ssOoFDyfdTCgY58rSs4yX6tOiWUwfNmGS9GIbh5Ee3jH84ELBenNJpof7Zq4oxiU4HjRNc6LZhpYNqReoSmf71JZ-u90HcOh/s1600/Screen+Shot+2014-03-24+at+20.14.54.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8EymCfy19REf3Afs6Gjfzt9oBJeMWwoOYfpG_o8ztDhM6ssOoFDyfdTCgY58rSs4yX6tOiWUwfNmGS9GIbh5Ee3jH84ELBenNJpof7Zq4oxiU4HjRNc6LZhpYNqReoSmf71JZ-u90HcOh/s1600/Screen+Shot+2014-03-24+at+20.14.54.png" height="245" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Flappy Jam main image</td></tr>
</tbody></table>
<br />
<b>Clicky Pixel</b><br />
I got to work right away on the basic game and had a square dodging blocks before long and it ran well on all mobiles! WIN! Then I made my first big mistake, instead of adding graphics and submitting I decided to add levels, HP and character unlocks.<br />
<br />
As a solo hobby developer I have little time and no resources and a wife who likes to see me every now and again, I basically locked myself in my study night after night polishing the game and trying to do far too much.<br />
<br />
<span style="color: #741b47;"><i>note: Samsung mobile with battery save mode enabled = poor fps! </i></span><br />
<br />
<a href="http://carelesslabs.itch.io/clicky-pixel" target="_blank">My Entry</a><br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgk4YArOPtIVaZ-cxZK9YZFxQHTbKKLTZ12UsiNubMtSMg_Brb5WXsZlJergHWekEQuRME4eN8Ans5gQcqWWvX7gHDQWLRoYdLSZnE_1BAiRG8pZEfp9vfKNhdy-PMEpNrZqZmSUHQExS8M/s1600/Screen+Shot+2014-03-24+at+20.19.55.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgk4YArOPtIVaZ-cxZK9YZFxQHTbKKLTZ12UsiNubMtSMg_Brb5WXsZlJergHWekEQuRME4eN8Ans5gQcqWWvX7gHDQWLRoYdLSZnE_1BAiRG8pZEfp9vfKNhdy-PMEpNrZqZmSUHQExS8M/s1600/Screen+Shot+2014-03-24+at+20.19.55.png" height="333" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">My First Itch.io game</td></tr>
</tbody></table>
<br />
Only 4 votes! I submitted at some stupid time in the morning then posted a bit about the game and slept the next evening at 7pm, I was tired and still have a busy day job to do! oh and I am training for a marathon and have 30+ miles to run a week.<br />
<br />
Once the game was in the list I lost all interest and had to get my sleep pattern back to normal and try to make it up to the wife.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4O6QOkRDaEFoBv3wz4O0TRPrXVsQrn-2hMY5uaKMBodcLJgI42ncKDWzdB_bbAua6sFX0EMcy8DzuUbB-oW3h0rsH6pXcmzYzb48fn3FfV8qwYoWc6Hk4wHYhqFYXTkZzs1BJYwYPsmPS/s1600/Screen+Shot+2014-03-24+at+20.27.34.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg4O6QOkRDaEFoBv3wz4O0TRPrXVsQrn-2hMY5uaKMBodcLJgI42ncKDWzdB_bbAua6sFX0EMcy8DzuUbB-oW3h0rsH6pXcmzYzb48fn3FfV8qwYoWc6Hk4wHYhqFYXTkZzs1BJYwYPsmPS/s1600/Screen+Shot+2014-03-24+at+20.27.34.png" height="197" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Feedback</td></tr>
</tbody></table>
<div class="separator" style="clear: both; text-align: left;">
<b>Feedback </b></div>
I did get a little bit of feedback, Okeedoke Studios comment is priceless, imagine that a Flappy Game being a bit grindy! This really made my day and also 556 views and 199 downloads was great.<br />
<br />
I promised the wife I would wait a while before the next jam and get back to my main game Endure and take it easy, so I waited a few days then saw <b>CyberPunkJam</b> and thought I am doing that!<br />
<b><br /></b>
<span style="color: magenta;"><b>Cyber Punk Jam</b></span><br />
With Clicky Pixel finished and shelved I was no longer a jam virgin and ready for more, this time I would be even more focused and learn from my mistakes, so I decided on an even more complicated game that would require much more art, more code and this time Id go for mobile, Windows, Mac and HTML!<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhK-B2Uc-z4eEc2TQFRj462TBZO2KJhSvDfjKXKVRgURoY4g981CvZj35BZ-FJPWiv9IVJaZI_C9EtU_aeZ3qPHo-mtJnJwKIsXX3_S5QAyov90gqQjAKi8u3uH7_ZtierkAkXOsBj78O2D/s1600/UeISjG4.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhK-B2Uc-z4eEc2TQFRj462TBZO2KJhSvDfjKXKVRgURoY4g981CvZj35BZ-FJPWiv9IVJaZI_C9EtU_aeZ3qPHo-mtJnJwKIsXX3_S5QAyov90gqQjAKi8u3uH7_ZtierkAkXOsBj78O2D/s1600/UeISjG4.png" height="186" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">CYPERPUNK Jam main image</td></tr>
</tbody></table>
<br />
So make a game based on the image of some punks jumping off a building, first thought was base jumping, too simple I thought, before I could even research it someone had posted their game and yes it was a sky diving game.<br />
<br />
I decided I would do something a little different and after some time decided to remake an old Amiga classic "Walker".<br />
<br />
Using LibGDX and some ripped sprites of the origin game I quickly mocked up a walking bot:<a href="http://walen.se/sprites/images/sprites/walker__ripper_gifgit___mavado_/walker_main_sprite.png" target="_blank"> View the Sprites here</a><br />
<br />
I was not intending to keep these sprites in the demo I submitted, but I had little time to work on the game. I produced some punks to use as enemies and played about with pixels for a few evenings:<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsR5g6JPxMTRdiUm9stRkBDuLlteD4ouNY9B6mr809tzzyPbtGtlvWHA9uFTVZX6mgbXV7Ci3P_jb-o4-UI_ZWkMGXwrb7OAxDHgLtp9BRKjFGl4bj96Za-wKU2Em3T0F0dz0lYdvTLw96/s1600/Screen+Shot+2014-03-24+at+20.42.50.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjsR5g6JPxMTRdiUm9stRkBDuLlteD4ouNY9B6mr809tzzyPbtGtlvWHA9uFTVZX6mgbXV7Ci3P_jb-o4-UI_ZWkMGXwrb7OAxDHgLtp9BRKjFGl4bj96Za-wKU2Em3T0F0dz0lYdvTLw96/s1600/Screen+Shot+2014-03-24+at+20.42.50.png" height="640" width="416" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Some sprites for the game</td></tr>
</tbody></table>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
I also changed my screen saver and bought a new t-shirt! Making animated sprites is a slow process for a coder, I had to keep Googling for examples to help me get ideas, the game could have done with many more enemies but there was no game yet and I was running out of time. I made two types of punks, a helicopter and an Akira style biker, I am really happy with them overall.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
<b>Final Day</b></div>
I only actually submitted this game as the jam had a 48 hour extension, I came home from work late, sat at my computer with very little complete; a robot that moved and shot bullets, a few enemies that had no AI and just ran across the screen, at this point there were no sounds and no background.<br />
<br />
I made a background and 3 shops that would give the impression you were moving forward between waves, this took about an hour. Next I had to produce an algorithm to produce wave attacks, I got this so wrong, the first waves were fine but if you got to around round 6 you were completed overwhelmed, but I had run out of time. I think it was around 4am when I uploaded the .jar and HTML versions of the game, <b>"Mech Stroller"</b>. <a href="http://carelesslabs.itch.io/mech-stroller" target="_blank">PLAY HERE</a><br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://carelesslabs.itch.io/mech-stroller" imageanchor="1" style="margin-left: auto; margin-right: auto;" target="_blank"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJ9iBHFYEeNK6vxgbUtTXXlwtqK5-UQ_76kWSaVUyUlwcnTW2_YRaCzW4yV95zs_dHZeA6GrZZYHVfio8us3gfILY3IJ2Vdc7XwprKx1EsJgtXw-GfLPpwZJ0JJazCAfhc4W6GZtfKz6q5/s1600/Screen+Shot+2014-03-24+at+20.49.11.png" height="296" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;"><a href="http://carelesslabs.itch.io/mech-stroller" target="_blank">Mech Stroller Wave 0</a></td></tr>
</tbody></table>
<br />
The game was full of bugs and lacked:<br />
<ul>
<li>Power Ups</li>
<li>Decent AI</li>
<li>Up / Down movement</li>
<li>Balanced Waves </li>
<li>Parachutes! </li>
</ul>
I spent an hour over my lunch break and put better waves into place and made the enemies a little more random with their movement, once this was published I saw a tweet saying I may have broken some rules in updating the game after the cut off point! If the game had been pulled I would have been annoyed but seems I got away with this.<br />
<br />
<b>Twitter, Forums & Reddit</b><br />
So this time I understood it was important to get people playing the game and getting more feedback than with Clicky P. I posted to twitter every so often, posted in some of the Java forums I use and also hit Reddit for the first time.<br />
<br />
Those people at Reddit must deal with a lot of spam and general time wasters, if you delete a post they make you wait forever to repost, I almost gave up on it, had to make a second account just to post, it is just not a nice interface to use:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCbIefKo8s2qkRWGSF1V88ufweWUX4qLFjJAxybeYNexyEhwizQSPo9ktmuyReYxly0w5BX7r9dwEvXbEMY5BpOIhC9UDScd7ecCKj-p2oGATSR64JANQgMbKvWdSffOYMQ5NR0ZSZICdB/s1600/Screen+Shot+2014-03-24+at+21.20.47.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjCbIefKo8s2qkRWGSF1V88ufweWUX4qLFjJAxybeYNexyEhwizQSPo9ktmuyReYxly0w5BX7r9dwEvXbEMY5BpOIhC9UDScd7ecCKj-p2oGATSR64JANQgMbKvWdSffOYMQ5NR0ZSZICdB/s1600/Screen+Shot+2014-03-24+at+21.20.47.png" height="400" width="640" /></a></div>
<br />
It was worth using Reddit though as it brought some traffic to the game page, overall the game had around 500 views and maybe 70 downloads of the .Jar file. This just shows if you are producing a real game you need a solid <br />
<b><br /></b>
<b>Voting</b><br />
If you want to place in the Jam you are going to have to spend time convincing others who submitted games to play and vote on your game, some 268 people contributed to the jam in total, you are going to want a decent number of votes or a least a few that score you highly.<br />
<b> </b><br />
I played other games for hours and hours adding comments and trying to vote fairly, I must have voted on about 150 of the games, each time if possible tweeting to the dev asking them to check out my game in return.<br />
<br />
I had 34 votes from other devs:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCf_HBEopPwtv472Qm4jm9_Mv0S5HaCz1n-Mcfp63VASp3zKptIZy8ToOSWYSNM-hKwey410UY800sB8zgUULDqodlI_BHQFufWzRMZ6i0TuSpjA6cG5643Q21RyNRYndQ8fQ_klI5a9KC/s1600/Screen+Shot+2014-03-24+at+21.27.42.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgCf_HBEopPwtv472Qm4jm9_Mv0S5HaCz1n-Mcfp63VASp3zKptIZy8ToOSWYSNM-hKwey410UY800sB8zgUULDqodlI_BHQFufWzRMZ6i0TuSpjA6cG5643Q21RyNRYndQ8fQ_klI5a9KC/s1600/Screen+Shot+2014-03-24+at+21.27.42.png" /></a></div>
I am pretty happy with this score, considering I probably only spent half the available time on the game and put more effort into learning pixel art its a miracle there was any game at all. I find it strange how people will comment on whats missing from the game, the jam was around 10/12 days long and I am one person with a full time job, collaborating might be a better idea for more adventurous ideas.<br />
<br />
<b>Conclusions</b><br />
<br />
I have learned a lot about myself, game making and a small faction of the Indie Game Scene during the last month or so. There are a lot of kind people out there on Twitter willing to help, give feedback and motivate you, this is great and really helped me stick at it.<br />
<br />
Before you dive into coding or drawing try to come up with a simple idea that is possible in complete in the given time. Make a list of the assets you need for the game, if the list is getting to big you are aiming too high, try to truncate the list as much as possible. If you know others who might like to team up then work this out before the jam, I would have loved to team up with an artist for this so I could concentrate on the code.<br />
<br />
I did enjoy talking to other developers after the jam ended but I did feel a bit of an anti-climax, the fun for me was making the game even though I didn't have enough time to really get it to a point I was happy with.<br />
<br />
Use the Jams to make you fast prototype an idea and get some feedback but I would not suggest taking the comments on your game too personally, not everyone will like what you have done and this was made in no time at all. <br />
<i><br /></i>
<i>Most of all try to have fun and interact with the Indie community as much as possible! I hope you enjoyed reading, please check out my games and throw any questions to me on Twitter <a href="https://twitter.com/CarelessLabs" target="_blank">@carelesslabs</a></i><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibTh1a7TF_RFXJMOjQpWBmCaefONfSm-gTEjBXadfB7j1xBlgnlkITU3H3jq1WAniRdiuv7CZqx9VU9GdBmhKDgiyfSErnkmZwBlmlgKfmIbrn5zjT8GattzD6WEQzX_2OGNUYx9xYGoIq/s1600/Screen+Shot+2014-03-24+at+21.54.47.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEibTh1a7TF_RFXJMOjQpWBmCaefONfSm-gTEjBXadfB7j1xBlgnlkITU3H3jq1WAniRdiuv7CZqx9VU9GdBmhKDgiyfSErnkmZwBlmlgKfmIbrn5zjT8GattzD6WEQzX_2OGNUYx9xYGoIq/s1600/Screen+Shot+2014-03-24+at+21.54.47.png" height="174" width="320" /></a></div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />CarelessLabshttp://www.blogger.com/profile/08990422077197281394noreply@blogger.com0tag:blogger.com,1999:blog-6521678100818503287.post-5063000297813565082014-02-22T18:37:00.001-08:002014-02-22T18:37:17.071-08:00Released an Android game Download the game here: <a href="http://itch.io/jam/flappyjam/rate/2989" target="_blank">http://itch.io/jam/flappyjam/rate/2989</a> <br />
<br />
After seeing all the Flappy Clones being published on the Play store I thought it would be fun to attempt a similar game, a few days after I started the #FlappyJam started so I had a deadline!<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWj3eaMqlBjQFMjJGVg1N8Ywytm2trxXxBL0S_HCziWs7xEIk95ZSrjjaqcmsiJVCvhJuPGu-oCafi3emfwlvyZLbemX_lU6PcMfBmIeJiglDATVGcyup0BVWjl3u8xpj6hmUoojU4-HIB/s1600/2014-02-17+02.50.08.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhWj3eaMqlBjQFMjJGVg1N8Ywytm2trxXxBL0S_HCziWs7xEIk95ZSrjjaqcmsiJVCvhJuPGu-oCafi3emfwlvyZLbemX_lU6PcMfBmIeJiglDATVGcyup0BVWjl3u8xpj6hmUoojU4-HIB/s1600/2014-02-17+02.50.08.png" height="240" width="400" /></a></div>
<br />I quickly got the basic mechanics up and running, a score, randomly placed blockers and a character that moved up and down. Not totally convinced with the movement I put a trail in place which I thought looked neat and it made it into the final game.<br />
<br />
To make this game stand apart from Flappy Bird I decided to add levels, each time you play your score adds to a total percentage and upon reaching that the next level is unlocked. <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisTgAc2o0hKIGD8JhvXvwbJ6vBUo1xdsQgIbIpDTaa_tVlMDiwN9fXtezWq1og1fgbKV0BnZAuA8Cup4YQVz0oqUHoInrKr9iuCWSV3j3JtjZ98I1qHS4l4gEeqprzlDvx7wVXQ7E432_e/s1600/2014-02-23+01.28.25.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisTgAc2o0hKIGD8JhvXvwbJ6vBUo1xdsQgIbIpDTaa_tVlMDiwN9fXtezWq1og1fgbKV0BnZAuA8Cup4YQVz0oqUHoInrKr9iuCWSV3j3JtjZ98I1qHS4l4gEeqprzlDvx7wVXQ7E432_e/s1600/2014-02-23+01.28.25.png" height="240" width="400" /> </a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
Then just to add another dimension to the game I added a bank, character selection and hearts (HP). All of your points go into your bank total, hearts allow you to get hit in game and the new characters get smaller so its easier to avoid the blockers.</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/AVvXsEjaQQ3l-cw0mmuEkhGN7NG5j4XkTV2tOIfnDGYfxGSSu3uFK_MdmnF84tW2Ie-JXlEpTNQTWm_KXiydAYg65IJbu4x1vimJ95zGrvT7N3B6Uk77S6BpNgGi8jYkOgC-Zv0oA89PQ-aHOru5/s1600/2014-02-23+01.28.31.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjaQQ3l-cw0mmuEkhGN7NG5j4XkTV2tOIfnDGYfxGSSu3uFK_MdmnF84tW2Ie-JXlEpTNQTWm_KXiydAYg65IJbu4x1vimJ95zGrvT7N3B6Uk77S6BpNgGi8jYkOgC-Zv0oA89PQ-aHOru5/s1600/2014-02-23+01.28.31.png" height="240" width="400" /> </a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
Working on a smaller game has been a lot of fun, the level design was quite rewarding, the way in which its coded means you can just drop in a new folder with the correct graphics; change one variable number_of_levels and its instantly in game.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
I will try to add a more detailed write up on actual code soon, please check out the game at:</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://itch.io/jam/flappyjam/rate/2989" target="_blank">Flappy Jam</a></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/AVvXsEhLq5yPlvDAatUiYtP7hKABxfLWB-eyt7a3XnGt361XoQ3R_dehYJzQl9zrCPi-wPIcncxGsNsXFzPa_P1E_2Sz5DWY9nBCA1eJugm3au2pxzZAxNC0wAA8Ft6Q9FY8VDLxbP9nBivT0fZS/s1600/2014-02-21+02.52.56.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLq5yPlvDAatUiYtP7hKABxfLWB-eyt7a3XnGt361XoQ3R_dehYJzQl9zrCPi-wPIcncxGsNsXFzPa_P1E_2Sz5DWY9nBCA1eJugm3au2pxzZAxNC0wAA8Ft6Q9FY8VDLxbP9nBivT0fZS/s1600/2014-02-21+02.52.56.png" height="240" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />CarelessLabshttp://www.blogger.com/profile/08990422077197281394noreply@blogger.com0tag:blogger.com,1999:blog-6521678100818503287.post-77991265590506912202014-01-19T18:56:00.001-08:002014-01-19T18:56:54.188-08:00New menu systemHave been working on a menu for the game, created a new button class and a generator so that adding lists of buttons is simple.<br />
<br />
Will need to work on the settings (sounds, music, key bindings) screen and also have a continue/load feature.<br />
<br />
Here is what has been done so far:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlb77dcUDErVzAZu8UcrIl958kmbXEpjPljtpvyk-QfWbzsOuiBti8wIrnoJbWutaZ1KKR8VmfjuRsYalgIZNZ2kK8CBMdsrfKbXBMsJwCAXNB9XYQKLlQeuHmrbusBOzo5oubMtUzNxyk/s1600/Screen+Shot+2014-01-20+at+02.35.25.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjlb77dcUDErVzAZu8UcrIl958kmbXEpjPljtpvyk-QfWbzsOuiBti8wIrnoJbWutaZ1KKR8VmfjuRsYalgIZNZ2kK8CBMdsrfKbXBMsJwCAXNB9XYQKLlQeuHmrbusBOzo5oubMtUzNxyk/s1600/Screen+Shot+2014-01-20+at+02.35.25.png" height="476" width="640" /></a></div>
<br />CarelessLabshttp://www.blogger.com/profile/08990422077197281394noreply@blogger.com0tag:blogger.com,1999:blog-6521678100818503287.post-41596521410049690602014-01-09T17:10:00.001-08:002014-01-09T17:11:19.035-08:00LibGDX and Parse.comTo have a break from fish this evening decided to set up a highscore board as a test case for JSON and online storage for Endure.<br />
<br />
<a href="http://pastie.org/private/mfb3keufurzp5thfszndcq" target="_blank">Full Source Code</a><br />
<br />
Signed up for <a href="http://www.parse.com/" target="_blank">Parse.com</a> a very neat data-store for mobiles and web applications, they provide example projects for JavaScript, Unity, Android and other platforms.<br />
<br />
The best thing is the price... free!<br />
<br />
<b>Features </b><br />
<div class="volumes">
<div class="volume requests">
<ul>
<li>Requests: 1 million/month
</li>
<li>Pushes: 1 million/month
</li>
<li>Burst Limit: 20/second</li>
</ul>
<b>Scores Table</b><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<b><a href="http://snag.gy/xnuCa.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://snag.gy/xnuCa.jpg" height="218" width="640" /></a></b></div>
</div>
<div class="volume files">
</div>
</div>
<br />
I did try out the Android sample project but without your app being Andriod as expected there was no way to use the .Jar libraries that Parse provide, but they do offer a great Restful method to POST and GET your data.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://snag.gy/P3uQP.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://snag.gy/P3uQP.jpg" height="231" width="400" /></a></div>
<br />
<br />
<b>Custom Parse Class</b><br />
<br />
I wrote a very simple Java class and imported Java's own Net and IO libraries did not take long to get some scores in and out of the service.<br />
<br />
LibGDX has its own Net library so I also gave this a go as my code looked messy, have some speed tests to run yet but happy to be able to push and pull data for free and with no real hassle.<br />
<br />
I will not go through my code put post the class for you to see, the important lines here are:<br />
<br />
<span style="font-size: x-small;">httpPost.setHeader("X-Parse-Application-Id", app_id);<br />httpPost.setHeader("X-Parse-REST-API-Key", app_key);<br /><br />conn.setRequestProperty("X-Parse-Application-Id", app_id);<br />conn.setRequestProperty("X-Parse-REST-API-Key", app_key);</span><br />
<br />
While looking how others use Parse with Java I saw a lot of complaints about unauthorized errors, Parse provides many different keys and you have to set and use the right ones. <br />
<br />
<a href="http://pastie.org/private/mfb3keufurzp5thfszndcq" target="_blank">Full Source Code</a><br />
<br />
Code adding hard coded score and retrieving all scores <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://snag.gy/Keh9C.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://snag.gy/Keh9C.jpg" height="379" width="640" /></a></div>
<br />
Lots of testing left to do with this and of course will need to ask the user their name (@twitter_tag) when they start the game, will use this for the upcoming fishing competition and keep a track of all the fish caught.<br />
<br />
Also will need to use a JSON library to properly generate the string that is post and also parse the results into objects.<br />
<br />
Thanks for reading.<br />
<br />CarelessLabshttp://www.blogger.com/profile/08990422077197281394noreply@blogger.com2tag:blogger.com,1999:blog-6521678100818503287.post-83479673073168290342013-12-23T15:40:00.000-08:002013-12-23T15:40:01.910-08:00Simple Screen ShakeLots of games add excitement by using screen shake, when your character gets hit or on certain events a little rumble really lets the player know something has occurred. While prototyping some features of Endure I revisited some old code to add a small rumble when the fishing line breaks:
<br />
<br />
<b>Small Screen Shake</b>
<br />
<iframe allowfullscreen="" frameborder="0" height="315" src="//www.youtube.com/embed/NfdtcA_5o4A" width="420"></iframe>
<b><br /><br />Large Screen Shake (Over the top)</b>
<br />
<iframe allowfullscreen="" frameborder="0" height="315" src="//www.youtube.com/embed/ud2vXFiGFK0" width="420"></iframe>
<b><br /><br />Code (Simple Rumble Class)</b>
<a href="http://pastie.org/private/kuyqjhvmp1s3nmvdhs5g"><br />Pastie Source Code</a><br />
<br />
<pre class="prettyprint prettyprinted">public class Rumble {
public float time;
Random random;
float x, y;
float current_time;
float power;
float current_power;
public Rumble(){
time = 0;
current_time = 0;
power = 0;
current_power = 0;
}
// Call this function with the force of the shake
// and how long it should last
public void rumble(float power, float time) {
random = new Random();
this.power = power;
this.time = time;
this.current_time = 0;
}
public void tick(float delta, GameController gc, Hero hero){
// GameController contains the camera
// Hero is the character centre screen
if(current_time <= time) {
current_power = power * ((time - current_time) / time);
// generate random new x and y values taking into account
// how much force was passed in
x = (random.nextFloat() - 0.5f) * 2 * current_power;
y = (random.nextFloat() - 0.5f) * 2 * current_power;
// Set the camera to this new x/y position
gc.camera.translate(-x, -y);
current_time += delta;
} else {
// When the shaking is over move the camera back to the hero position
gc.camera.position.x = hero.x;
gc.camera.position.y = hero.y;
}
}
}
</pre>
<br />
This is all the code to achieve a basic <b>screen shake</b>. The timer for the affect works its way down to zero then stops. For <b>large shakes</b> once the rumble is over it will snap back to the character and look very jumpy but this is just a <i>prototype</i>.<br />
<br />
To use the class create a new instance of it then conditionally produce a new <b>RUMBLE</b>! Below you see on the line snapping a small shake takes place by changing the power and time parameters, then the main render loop just needs to call the tick function:<br />
<br />
<br />
<pre class="prettyprint prettyprinted">public Rumble rumble;
this.rumble = new Rumble();
if (line.tension > line.max_tension){ // LINE SNAP
gc.rumble.rumble(.2f, .1f);
state = STATE.IDLE;
}
if (gameController.rumble.time > 0){
gameController.rumble.tick(delta, gameController, hero);
}
</pre>
So there you go a nice feature to add to any game that could do with some atmosphere or excitement, could be progressed much further and also be used in loads of ways, great for explosions, thunder storms etc.
Thanks for reading !_!
CarelessLabshttp://www.blogger.com/profile/08990422077197281394noreply@blogger.com0tag:blogger.com,1999:blog-6521678100818503287.post-8778401569664365962013-12-13T20:04:00.003-08:002013-12-13T20:04:34.931-08:00Endure gets a new Tile Set The old tile set had over 20 tiles and updating it was a nightmare. It was time to change the tiles to a much neater and simpler design.<br />
<br />
If we are ever going to hire a designer/artist to change the assets for this project then the fewer key elements the better.<br />
<br />
So here is a quick look at the new look map: <br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://pbs.twimg.com/media/BbaquUKCIAEnH36.png:large" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="297" src="https://pbs.twimg.com/media/BbaquUKCIAEnH36.png:large" width="400" /> </a></div>
<div class="separator" style="clear: both; text-align: center;">
The number of shadows required is much less than the tiles needed for the old top down view. This new simple design will allow the addition of varied height of blocks for building and jumping etc.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
Example of old tile set.</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/AVvXsEjWzLMoGjbzVIWQKllRRPuLvT7Qpz6sQCDfvbBOHkBfTx6yLPR1slFJk1zMNto3acra8AnCzxl04UsJ5VFhoiFEG-OF6QdXK2dhhBPQRuTQKbTaxJIyNIh3IdcCR0rj4QjdGHc0kYcVUT_u/s1600/boating.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="298" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWzLMoGjbzVIWQKllRRPuLvT7Qpz6sQCDfvbBOHkBfTx6yLPR1slFJk1zMNto3acra8AnCzxl04UsJ5VFhoiFEG-OF6QdXK2dhhBPQRuTQKbTaxJIyNIh3IdcCR0rj4QjdGHc0kYcVUT_u/s400/boating.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />CarelessLabshttp://www.blogger.com/profile/08990422077197281394noreply@blogger.com0tag:blogger.com,1999:blog-6521678100818503287.post-90757407387374301302013-12-08T07:35:00.000-08:002013-12-08T07:35:52.089-08:00Newest Feature Boats<div class="separator" style="clear: both; text-align: center;">
Newest feature added into the game is boats, used to travel quicker in water. Still need some visual affects added but the basics work ok.</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br />
<div style="text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/Rm631pJu-V4?feature=player_embedded' frameborder='0'></iframe></div>
<br />CarelessLabshttp://www.blogger.com/profile/08990422077197281394noreply@blogger.com0tag:blogger.com,1999:blog-6521678100818503287.post-26941395114026382432013-11-26T06:52:00.001-08:002013-11-26T06:52:58.328-08:00Pixel Brushes for PhotoShop<a href="http://www.noskill1343.com/2011/04/10-best-free-pixel-art-photoshop-brush.html#.UpSoC41sjHM">10 Top Free Pixel Brush Sets (View All)</a><br />
<br />
Want to do some pixel drawing? Fed up of painting on pixel at a time and getting the angles wrong as you are a newbie like myself then check out these neat brush sets to help you along:
<br />
<br />
Here are 3 that I added to PhotoShop, click click ...<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://narvils.deviantart.com/art/Pixel-Art-Brush-Set-28474602?q=boost%3Apopular%20pixel%20art%20brush&qo=4" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="200" src="http://fc04.deviantart.net/fs9/i/2006/032/f/c/Pixel_Art_Brush_Set_by_narvils.png" width="166" /></a>
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://www.nasc.fr/brush/photoshop-pixel-art-brushs-v4/" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="200" src="http://www.nasc.fr/wp-content/brushv4/brush-set-v004-preview.png" width="136" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://noskill1343.deviantart.com/art/Pixel-Art-Basic-Brush-174064892?q=boost%3Apopular%20pixel%20art%20brush&qo=5" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="200" src="http://fc09.deviantart.net/fs70/i/2011/072/8/c/pixel_art_basic_brush_by_noskill1343-d2vmtbw.jpg" width="200" /></a></div>
<br />CarelessLabshttp://www.blogger.com/profile/08990422077197281394noreply@blogger.com0tag:blogger.com,1999:blog-6521678100818503287.post-9947124321274905612013-11-20T17:26:00.004-08:002013-11-20T17:28:28.148-08:00Game Update: Forests, day / night cycle, fash lightUpdate on working features within the game:<br />
<br />
◘ Inventory<br />
◘ Crafting<br />
◘ Weapon<br />
◘ Tool<br />
◘ Zoom<br />
◘ Day / Night cycle<br />
◘ Day Count<br />
◘ Flash Light<br />
◘ Random Map Generation<br />
◘ Random Forest Area<br />
<br />
<iframe allowfullscreen="" frameborder="0" height="344" src="//www.youtube.com/embed/pJPBDkB-d9k" width="459"></iframe>
<b><br /><br />Whats next</b><br />
<br />
Not all trees should be fully grown<br />
Trees to break down into wood and leaves <br />
Swimming - hero should sink and slow down in water<br />
Sun should move across map (Currently Static position)<br />
Add other living entities<br />
Add more tools<br />
Hero HP / Hunger<br />
Add enemy spawn points with basic enemy <br />
<br />CarelessLabshttp://www.blogger.com/profile/08990422077197281394noreply@blogger.com0tag:blogger.com,1999:blog-6521678100818503287.post-80128464697390871852013-11-19T20:49:00.000-08:002013-11-19T20:53:36.641-08:00LibGDX Lighting - Day / Night cycleRecently researched the use of a Shader in libGDX to create a simple day/night cycle. Found some basic tutorials to create a fire at night affect including: <a href="http://www.alcove-games.com/opengl-es-2-tutorials/lightmap-shader-fire-effect-glsl/" target="_blank">Lightmap Shader</a> This basically adds a tint to the background and overlays an image to create a spotlight.<br />
<br />
<b>Initiating vars etc: </b><br />
<pre class="prettyprint prettyprinted">Vector3 bright = new Vector3(6.3f, 6.3f, 6.7f);
// Load shaders from text files
vertexShader = Gdx.files.internal("data/shaders/vertexShader.glsl").readString();
defaultPixelShader = Gdx.files.internal("data/shaders/defaultPixelShader.glsl").readString();
finalPixelShader = Gdx.files.internal("data/shaders/pixelShader.glsl").readString();
ShaderProgram.pedantic = false;
defaultShader = new ShaderProgram(Art.vertexShader, Art.defaultPixelShader);
finalShader = new ShaderProgram(Art.vertexShader, Art.finalPixelShader);currentShader = finalShader;
ambientColor = bright;
finalShader.begin();
finalShader.setUniformi("u_lightmap", 1);
finalShader.setUniformf("ambientColor", ambientColor.x, ambientColor.y, ambientColor.z, ambientIntensity);
finalShader.end();
// Image for spot light
light = new Texture(Gdx.files.internal("data/shaders/light.png"));
fbo = new FrameBuffer(Format.RGBA8888, 1024, 788, false);
finalShader.begin();
finalShader.setUniformf("resolution", 1024, 788);
finalShader.end();
</pre>
<br />
<b>Render Loop</b><br />
After setting up the variables and shader files in the render loop I adjusted the ambientColor over time to give affect of night day.<br />
<br />
<pre class="prettyprint prettyprinted">// Adjust ambientColor to give appearance of night/day
finalShader.begin();
finalShader.setUniformi("u_lightmap", 1);
finalShader.setUniformf("ambientColor", ambientColor.x, ambientColor.y, ambientColor.z, ambientIntensity);
finalShader.end();
// I added logic to only show spotlight during night
if(show_light){
fbo.begin();
fbo.getColorBufferTexture().bind(1);
light_batch.setShader(defaultShader);
light_batch.begin();
light.bind(0);
light_batch.draw(light, hero.x-l_off+.4f,hero.y-l_off+.2f, light_size,light_size);
light_batch.end();
fbo.end();
}
// Draw your map here
light_batch.setShader(currentShader);
light_batch.begin();
MapGenerator.draw(gameController.camera, light_batch);
light_batch.end();
</pre>
<br />
<b>Night</b><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigOeGUeOR3p90kOjWQ9EzQXY26YT2u-f73TcrRTuoU37ceWZ4aO3OAVFbfNH6nyPNUxZ8tGXfEpLv7nE2kIH5s2hry7TcSDrX9bb8J4nwz7m36riUY9W6WYFV5NTIuUG7mhSv4kHAjlkWy/s1600/Screen+Shot+2013-11-20+at+03.45.45.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="298" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigOeGUeOR3p90kOjWQ9EzQXY26YT2u-f73TcrRTuoU37ceWZ4aO3OAVFbfNH6nyPNUxZ8tGXfEpLv7nE2kIH5s2hry7TcSDrX9bb8J4nwz7m36riUY9W6WYFV5NTIuUG7mhSv4kHAjlkWy/s400/Screen+Shot+2013-11-20+at+03.45.45.png" width="400" /> </a></div>
<div class="separator" style="clear: both; text-align: left;">
<b>Evening</b></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijdIbS4w24iHYbk5L29VjDAj8UbTfGzHuPnl-5mIR5knta5HQEoTDvvVj07oSfhLf8S_A9MfIs_9vwlAMUJjpvMFcAOQu3oo4kEAPfOxV-c-Uon-o7r9lfz9eTF1JEI76bJbHDaeTtECp_/s1600/Screen+Shot+2013-11-20+at+04.02.09.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="298" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijdIbS4w24iHYbk5L29VjDAj8UbTfGzHuPnl-5mIR5knta5HQEoTDvvVj07oSfhLf8S_A9MfIs_9vwlAMUJjpvMFcAOQu3oo4kEAPfOxV-c-Uon-o7r9lfz9eTF1JEI76bJbHDaeTtECp_/s400/Screen+Shot+2013-11-20+at+04.02.09.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;">
This solution limited me to using one spot light, also my knowledge of OpenGL Shader language is zero. At this point I went back to the LibGDX documentation and came across Box2dLights, a library that uses collision data from Box2D to create lights/shadows.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<pre class="prettyprint prettyprinted">// BOX2DLIGHTS
private PointLight spriteLight;
private RayHandler rayHandler;
// Create a new Box2D World, this is required.
World world = new World(new Vector2(), true);
RayHandler.useDiffuseLight(true);
// Setup the new RayHandler, it will use the same camera as the main game
rayHandler = new RayHandler(world);
rayHandler.setCulling(true);
rayHandler.setCombinedMatrix(gameController.camera.combined);
rayHandler.setAmbientLight(1);
// Light to follow the hero
spriteLight = new PointLight(rayHandler, 50);
spriteLight.setPosition(hero.x,hero.y);
spriteLight.setDistance(5);
spriteLight.setColor(3, 12, 33, 0.3f);
// Keep the unique ID of the light
hero_light = spriteLight.hashCode();
// this lights the map (Sun)
spriteLight = new PointLight(rayHandler, 50);
spriteLight.setPosition(hero.x-20,hero.y-20);
spriteLight.setDistance(250);
spriteLight.setColor(3, 12, 33, 0.5f);
// Test shadow being cast by solid object
PolygonShape tileShape = new PolygonShape();
tileShape.setAsBox(.5f, .5f);
FixtureDef fixtureDef = new FixtureDef();
fixtureDef.shape = tileShape;
fixtureDef.filter.groupIndex = 0;
BodyDef tileBodyDef = new BodyDef();
float bodyX = hero.x-3;
float bodyY = hero.y-4f;
tileBodyDef.position.set(bodyX, bodyY);
tileBodyDef.type = BodyType.StaticBody;
Body tileBody = world.createBody(tileBodyDef);
tileBody.createFixture(fixtureDef);
// RENDER LOOP CODE
rayHandler.setCombinedMatrix(gameController.camera.combined, gameController.camera.position.x, gameController.camera.position.y,gameController.camera.viewportWidth, gameController.camera.viewportHeight);
rayHandler.updateAndRender();
</pre>
<br />
Here I set up some basic lights, a small one for the hero and a large light to act as the sun, I added one solid object to show a shadow being cast. Would need to add bodies for each object in the game and update there positions. Here the alpha is set to low on the sun light to give impression of night:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgM24YcBSfQVzVKtpK7lT30YUHBhIte77QZLrCMWHqmw1cHEZbKSRJyOJb5j-RmzzU7rncd5z8knuCPibvU4UZYstkSF1Qyv0VWyELB3lUlLqwlfxyYWhJcEvxET4rs8EL1-9kAyJDyi5MY/s1600/Screen+Shot+2013-11-20+at+04.18.57.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgM24YcBSfQVzVKtpK7lT30YUHBhIte77QZLrCMWHqmw1cHEZbKSRJyOJb5j-RmzzU7rncd5z8knuCPibvU4UZYstkSF1Qyv0VWyELB3lUlLqwlfxyYWhJcEvxET4rs8EL1-9kAyJDyi5MY/s400/Screen+Shot+2013-11-20+at+04.18.57.png" width="400" /> </a></div>
<div class="separator" style="clear: both; text-align: center;">
Zoomed out, earlier in the day: </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/AVvXsEhM33-htoHlzDYPFoefKwylBbRfPGU0q9r8i1hkDGx46BgL6Seo6YSkZ596b3qaKxvOU-W3mSorXYCgShdIWvNNrocCHzKRwkBesQ5w35cn9A53g-T-NNjQYPMEg482MT0k9qg0JU7z9bhT/s1600/Screen+Shot+2013-11-20+at+04.21.03.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="298" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhM33-htoHlzDYPFoefKwylBbRfPGU0q9r8i1hkDGx46BgL6Seo6YSkZ596b3qaKxvOU-W3mSorXYCgShdIWvNNrocCHzKRwkBesQ5w35cn9A53g-T-NNjQYPMEg482MT0k9qg0JU7z9bhT/s400/Screen+Shot+2013-11-20+at+04.21.03.png" width="400" /> </a></div>
<div class="separator" style="clear: both; text-align: center;">
Multiple Lights </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/AVvXsEhryNwY1ff36Jp0qk_juYNIL_3kVDsxKlbXvmcVHJRJmmMwty7oJX0SBGz7UYvzBaQXpCYJCD7dmBcEwMP5YIHudXYa-_ZFqNVdEy2kLl6KO1CvYhGPA49ZkviTeY5Zar1nl_zMftGPCFB3/s1600/Screen+Shot+2013-11-20+at+04.36.06.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="296" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhryNwY1ff36Jp0qk_juYNIL_3kVDsxKlbXvmcVHJRJmmMwty7oJX0SBGz7UYvzBaQXpCYJCD7dmBcEwMP5YIHudXYa-_ZFqNVdEy2kLl6KO1CvYhGPA49ZkviTeY5Zar1nl_zMftGPCFB3/s400/Screen+Shot+2013-11-20+at+04.36.06.png" width="400" /> </a></div>
<br />
Accessing and looping through all lights is simple, we stored the hashcode of the hero light so on each render loop update its position, else change the alpha value; increase/decrease this value to simulate night to day and vice versa. <br />
<br />
<pre class="prettyprint prettyprinted">for (Light light : rayHandler.lightList) {
if (light.hashCode() == hero_light){
light.setPosition(hero.x,hero.y);
}else{
light.setColor(1, 1, 1, ambientIntensity);
}
}
</pre>
CarelessLabshttp://www.blogger.com/profile/08990422077197281394noreply@blogger.com4tag:blogger.com,1999:blog-6521678100818503287.post-12164267645414972732013-10-26T14:48:00.000-07:002013-10-26T14:50:26.972-07:002D Projectile MotionRecently added trees to the game, when one of these objects is broken it should break down into wood and leaf blocks. I would like these the tree to fall apart and fall to the ground and maybe even bounce. So I need a function where I can apply some force in a direction to any block and make it move/fly/<br />
<br />
After some research found a wiki page on projectile motion:<br />
<br />
<a href="http://en.wikipedia.org/wiki/Projectile_motion">Wiki: Projectile Motion</a><br />
<br />
Here is a simple function that takes a velocity (speed) and an angle and generates all the points through the flight of the object.<br />
<br />
<u><b>Test Function</b></u> <br />
<pre class="prettyprint">void projectile(double velocity, double angle, float delta) {
double vx, vy, ux, uy, tt, terminal_v;
double gravity = 9.8;
ux = velocity * Math.cos(angle * Math.PI / 180);
uy = velocity * Math.sin(angle * Math.PI / 180);
terminal_v = uy/gravity;
tt = time_x*time_x;
vy = uy * time_x - 0.5 * - -gravity * tt;
if (time_x < terminal_v*2){
Vector2 t = new Vector2((float) vx + hero.x ,(float) vy + hero.y);
DotArray.add(t);
}
time_x += delta;
}
</pre>
ux - the initial velocity accross<br />
uy the initial velocity upwards<br />
<br />
terminal_v is the time it takes for the object to stop moving upwards, if you double this you get the total flight time (Given the object takes off from and lands at zero Y).<br />
<br />
For each time render is called (usually 60fps) calculate the position of the object at the current flight time and add it to an array.<br />
<br />
In the draw part of the code I just draw each co-ordinate held in the array of vectors. This needs work as it only works for positive x (Left to right) and is hard coded to run from the hero current position but this is just a test.<br />
<br />
Was unsure how to square a double so just multiples time.<br />
<pre class="prettyprint">tt = time_x*time_x;</pre>
<b>Screen Shot </b>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjPmvlwt5X3LKwUbgLdy6snb-JGl4JbGvkBBVMYCFvIMWMiRSKKZDghXQ5VthSzJqk9_5E09ttVlJgRXpP3OaeTVh2KPepTIR8xq-SDAzUeVKeOaHJSMtI73eYF4BoLIkigu9RMx5DU5iV/s1600/Projectile.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="480" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjPmvlwt5X3LKwUbgLdy6snb-JGl4JbGvkBBVMYCFvIMWMiRSKKZDghXQ5VthSzJqk9_5E09ttVlJgRXpP3OaeTVh2KPepTIR8xq-SDAzUeVKeOaHJSMtI73eYF4BoLIkigu9RMx5DU5iV/s640/Projectile.png" width="640" /></a></div>
<br />CarelessLabshttp://www.blogger.com/profile/08990422077197281394noreply@blogger.com1tag:blogger.com,1999:blog-6521678100818503287.post-44085653456783551492013-10-19T20:36:00.001-07:002013-10-19T20:39:00.749-07:00<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<b>Random Island Generator</b></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
After making a few maps with Tiled I realized it was slow and tedious, I thought a procedural island would be doable, I read a few articles on different methods and decided to go with one which was simple enough for me to code.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<b>Step 1</b></div>
<div class="separator" style="clear: both; text-align: center;">
Create a 18x18 array of Tiles, this is a simple class with variables, name, x, y, number, texture, code. The texture for each tile is set to water:</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div style="text-align: left;">
<blockquote class="tr_bq">
<div class="separator" style="clear: both;">
</div>
<pre class="prettyprint"> private void create_water_map(){
int id = 0;
SQUARE = 18;
for (int i = 0; i < LAYERS; i++) {
for (int y = 0; y < SQUARE; y++) {
for (int x = 0; x < SQUARE; x++) {
Tile tile = new Tile(x << 5, y << 5, x, y, "WATER", Art.water, id);
id += 1;
tileArray_1.add(tile);
}
}
}
}
</pre>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLSzMWepY_tQYUSQ2TIIAnPjmoRVPZyfD_8brQF0DMvpqGQTSDictsD4BIFmx84ZtnoSvwJt24MpZm2seNOn6OGlpYS3sRp8l0xLFYj_zJ8-0GcNz_wNFpHM8hWaC1uxg8CA3d14geATTK/s320/Map_01.png" width="320" /></div>
</blockquote>
<div style="text-align: center;">
<b>Step 2 </b></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
Take the centre tile and spiral out, for the first 3 or 4 passes set the Tile to grass, then set the tile to grass if random number < value, the chance gets less as the number of the cycle goes up.</div>
<pre class="prettyprint">private void create_mini_island(){
int number_of_cycles = 7;
int move_amount = 0;
int random_cycle_no = 3;
int tile_count = SQUARE * SQUARE;
int tile_no = tile_count/2 + (SQUARE/2);
int prev_tile_no = tile_no;
Tile current_tile = tileArray_1.get(tile_no);
current_tile.texture = Art.grass;
current_tile.name = "GRASS";
for(int cycle = 1; cycle <= number_of_cycles;cycle++){
int rnd = 100 - (cycle*12);
for(int d = 0; d < 4; d++){
if(d == 0 || d == 2){
move_amount += 1;
}
for (int m = 1; m <= move_amount; m ++ ){
if (d == DOWN){
tile_no -= SQUARE;
}else if (d == LEFT){
tile_no -= 1;
}else if (d == UP){
tile_no += SQUARE;
}else if (d == RIGHT){
tile_no += 1;
}
process_direction(tile_no,prev_tile_no, tile_count, "GRASS", current_tile, Art.grass, rnd, cycle, random_cycle_no);
prev_tile_no = tile_no;
}
}
}
}
</pre>
<blockquote class="tr_bq">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMxExUtZv_VO5K5zF2Cjicqm9WbPjQrjPlDC6Lg9_9KefWd1VEUxhbqfd-J4p2nseDthSTdRHLT-qSCOrujC8LDOHTIC2DMWx4FSxKMMFSnSeJdNypBRNAmO9zU4hh7chpPhEdi1goWPLu/s1600/Map_02.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgMxExUtZv_VO5K5zF2Cjicqm9WbPjQrjPlDC6Lg9_9KefWd1VEUxhbqfd-J4p2nseDthSTdRHLT-qSCOrujC8LDOHTIC2DMWx4FSxKMMFSnSeJdNypBRNAmO9zU4hh7chpPhEdi1goWPLu/s320/Map_02.png" width="320" /></a></div>
<div style="text-align: center;">
<br /></div>
</blockquote>
<div style="text-align: center;">
<b>Step 3 </b></div>
<div style="text-align: center;">
The map resembles a basic island but is way too small, now loop through the array and split each tile up into many more and set the border to water, this will help make the island less block like later on.</div>
<br />
<blockquote class="tr_bq">
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT2hd0t0BJhfEXLCORkKH8VlUBSE3E6H4bURj3gd2DdxnpyIhyrPbgpcxdtUnAf5uqrRXoSFyB7r-_xpKv3tY-gmsbXnbMYIacqRKQ7v1v8Mwq-HqfcNAONZpwU2lapO5KAULGnlo5TLOa/s1600/Map_03.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgT2hd0t0BJhfEXLCORkKH8VlUBSE3E6H4bURj3gd2DdxnpyIhyrPbgpcxdtUnAf5uqrRXoSFyB7r-_xpKv3tY-gmsbXnbMYIacqRKQ7v1v8Mwq-HqfcNAONZpwU2lapO5KAULGnlo5TLOa/s320/Map_03.png" width="320" /></a></div>
<pre class="prettyprint"></pre>
</blockquote>
<blockquote class="tr_bq">
<pre class="prettyprint">private void enlarge_mini_island(){
int x,y,start_x,start_y;
int count = -1;
int t = -1;
int split_by = 8;
land_keep_percent = (int) (split_by * 0.8);
for (Tile tile : tileArray_1) {
count ++;
for (int h = 0; h < split_by; h++){
if (count == t){
for (int w = 0; w < split_by; w++){
int row = tile.number / SQUARE;
int column = tile.number % SQUARE;
// replace hard coded new width and height 144 and 1008
int id = w + ((tile.number)*split_by) + (h*144) + (row * 1008);
if (count == t){System.out.println(id + " tile: " + count + " w:" + w + " h:" + h + " row: " + row );}
start_x = (column*split_by) + w;
x = (start_x << 5);
start_y = (row * split_by) + h;
y = (start_y << 5);
Tile new_tile;
// make centre tiles water
if (w < 1 || w > land_keep_percent || h < 1 || h > land_keep_percent){
new_tile = new Tile(x, y, row, column, "WATER", Art.water, id);
} else {
new_tile = new Tile(x, y, row, column, tile.name, tile.texture, id);
}
tileArray_2.add(new_tile);
if (w == 1 && h == 1 && new_tile.name.equals("GRASS")){
new_tile.marker = true;
tile_connector.add(new_tile);
}
}
}
}
Collections.sort(tileArray_2);
}
</pre>
<div style="text-align: center;">
<b>Step 4</b></div>
</blockquote>
<div style="text-align: center;">
For each tile added to the connector array check down to see if there is land, if yes then turn the tiles below into grass, repeat this for left also which now gives us this:</div>
<br />
<blockquote class="tr_bq">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWu4VXzoxK0kN8qyJyLWYzllHUGWkc2qACFt5VF87oGnik7trY6rlfpJlC7YeWAA6S0NTHWJKt8dsHZDP1HEqPSNmYZ7YezBa7U_9Lcy7M8DWqjCtBthQ7YiFkGG2MAUM7E7Y0gJjtkHPP/s1600/Map_04.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgWu4VXzoxK0kN8qyJyLWYzllHUGWkc2qACFt5VF87oGnik7trY6rlfpJlC7YeWAA6S0NTHWJKt8dsHZDP1HEqPSNmYZ7YezBa7U_9Lcy7M8DWqjCtBthQ7YiFkGG2MAUM7E7Y0gJjtkHPP/s320/Map_04.png" width="320" /></a></div>
<br /></blockquote>
<div style="text-align: center;">
<b>Step 5 </b></div>
<div style="text-align: center;">
Smoothing out the land to make the grass areas less box like, loop through all the tiles, if the tile is water and touching at least x number of grass tiles then turn it into grass.</div>
<blockquote class="tr_bq">
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhW_l17nOkkjwOfx4UTKXKGmTbb0ql1nH33bcGJI5eYcm_pOz9ygzhfmTLubHDsSIF-WjPBUIopta2G1Fk9rMWVDvy62lAabac7sE-CfuG43IEOe-y4PKK7Px8SW0u-CorCqU6r46FKEXDM/s1600/Map_05.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhW_l17nOkkjwOfx4UTKXKGmTbb0ql1nH33bcGJI5eYcm_pOz9ygzhfmTLubHDsSIF-WjPBUIopta2G1Fk9rMWVDvy62lAabac7sE-CfuG43IEOe-y4PKK7Px8SW0u-CorCqU6r46FKEXDM/s320/Map_05.png" width="320" /></a></div>
</blockquote>
<div style="text-align: center;">
<b>Repeat </b></div>
<blockquote class="tr_bq">
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFnMd2jFuKXPVGq2asyJXNcdsLt_J_ZXjQkyxCLmwncgQM9IdDMpUCKqNE_UnlkhQlyR6a-euSVliEGfyjPLsww2-rX19Fs5GLdDcCFXZEfwaksoVXqTqG_i27ZQSSdOaufYwGfOfx724b/s1600/Map_06.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFnMd2jFuKXPVGq2asyJXNcdsLt_J_ZXjQkyxCLmwncgQM9IdDMpUCKqNE_UnlkhQlyR6a-euSVliEGfyjPLsww2-rX19Fs5GLdDcCFXZEfwaksoVXqTqG_i27ZQSSdOaufYwGfOfx724b/s320/Map_06.png" width="320" /></a></div>
</blockquote>
<div style="text-align: center;">
<b>Step 6</b></div>
<div style="text-align: center;">
Loop through the array of tiles again making water tiles touching grass randomly into grass.</div>
<blockquote class="tr_bq">
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIVLQTrUZ6GZjc02tvBAzM7C9Pl7LQy3TmLNb88PMwTYbjmyjv9KQvsIu1_aLkYhh-0hVN2LHWla0ogi7rjbaBn1uY87D7ioAa_zwLcpjOIswWeCxh_xeW3WKNct9325afKohfVyBzC_c8/s1600/Map_07.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIVLQTrUZ6GZjc02tvBAzM7C9Pl7LQy3TmLNb88PMwTYbjmyjv9KQvsIu1_aLkYhh-0hVN2LHWla0ogi7rjbaBn1uY87D7ioAa_zwLcpjOIswWeCxh_xeW3WKNct9325afKohfVyBzC_c8/s320/Map_07.png" width="320" /></a></div>
</blockquote>
<div style="text-align: center;">
<b>Step 7 </b></div>
<div style="text-align: center;">
Now that the island is finished loop through the array once more, every tile that is water and touching grass becomes sand. Run through this again randomly this time so some shores are thicker.</div>
<blockquote class="tr_bq">
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIFJMp450jwqCQ9Z0wkwJRwE2fr5sYt7dEgsBgdYKJW7v7nJo0pVOTgA4lU5TAnfWW2ZEiM50vJRi2Ulpx9ajLbFb8AoTTWrxlvy5eTFhfJdu8nVbTMgxy508y-25nheGmUFGi4hfazF1k/s1600/Map_08.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgIFJMp450jwqCQ9Z0wkwJRwE2fr5sYt7dEgsBgdYKJW7v7nJo0pVOTgA4lU5TAnfWW2ZEiM50vJRi2Ulpx9ajLbFb8AoTTWrxlvy5eTFhfJdu8nVbTMgxy508y-25nheGmUFGi4hfazF1k/s320/Map_08.png" width="320" /></a></div>
<div style="text-align: center;">
<b>Step 8</b></div>
</blockquote>
<div style="text-align: center;">
Next for each tile that is sand and touching grass calculate which sand to grass tile it should be. </div>
<div style="text-align: center;">
Check the 3 tiles above, to the left and right and the 3 tiles below use this to create a code. If the water tile code is 001 01 001 then it has 3 sand tiles to the right so show the correct tile.</div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: center;">
</div>
<div style="text-align: center;">
</div>
<blockquote class="tr_bq">
<div style="text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_NAl-XjNzYiSVlixZh7jjt5dAmJ6sOEhrzOR9E7LxmQAshq5YnBIUxdSGtI8TwhJxZObGDZqitqXVmeRZh1JUXXTmfEoaAq3v94vPgPCfeFD2CKYHF9HXtU8OeoJa-BWj43q0JQky70Wl/s1600/Map_09.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi_NAl-XjNzYiSVlixZh7jjt5dAmJ6sOEhrzOR9E7LxmQAshq5YnBIUxdSGtI8TwhJxZObGDZqitqXVmeRZh1JUXXTmfEoaAq3v94vPgPCfeFD2CKYHF9HXtU8OeoJa-BWj43q0JQky70Wl/s320/Map_09.png" width="320" /></a></div>
<div style="text-align: center;">
The sand to grass tiles:</div>
</blockquote>
<blockquote class="tr_bq">
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivf7EWAQFTjGsovIcrdpP4TWgut3_8rCWfiNIJWhKeVu5WqRAddlO9pf-WTLqp3Z8T_tN4wky3QbfBLK3w1uDnExi6JTgPmx1-8whvTZw3ORuNr0I2dEqIbxwYpxanOtMdaXGFG2ko8mXE/s1600/Map_10.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEivf7EWAQFTjGsovIcrdpP4TWgut3_8rCWfiNIJWhKeVu5WqRAddlO9pf-WTLqp3Z8T_tN4wky3QbfBLK3w1uDnExi6JTgPmx1-8whvTZw3ORuNr0I2dEqIbxwYpxanOtMdaXGFG2ko8mXE/s320/Map_10.png" width="320" /></a></div>
</blockquote>
<div style="text-align: center;">
Repeat this process for water touching sand.</div>
<blockquote class="tr_bq">
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkZ0-K5ME7X0d81CtHvsbDQH2Om5UO3KL-jLzFt6_S4nVTPAU28xqAFVDc2Bub9fsJnSJZxrRqkTuiexdWSSbM3QnybL5w66lfvs2i25T3rdi4-wSUrnwRO0ueIC9lW_nw_8HOxauOOVki/s1600/Map_11.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkZ0-K5ME7X0d81CtHvsbDQH2Om5UO3KL-jLzFt6_S4nVTPAU28xqAFVDc2Bub9fsJnSJZxrRqkTuiexdWSSbM3QnybL5w66lfvs2i25T3rdi4-wSUrnwRO0ueIC9lW_nw_8HOxauOOVki/s320/Map_11.png" width="320" /></a></div>
<br /></blockquote>
<div style="text-align: center;">
The next stages include creating rivers, placing rocks etc and identifying areas to place trees and so on. I have included some code snippets just to give an idea how how parts of this work, its quite simple and takes only a moment to run through. </div>
</div>
CarelessLabshttp://www.blogger.com/profile/08990422077197281394noreply@blogger.com1