NoshBar's Dumping Ground






  • Added a car to the mix (final version will have trains, planes, and monkeys [probably])
  • Made the bridge less bouncy
  • Tested building a bridge across a gap without fixed points

Next:

  • I'm going to add a "well done, you made it" message thingy
  • Some sort of explosion for when the top and front of the car experience extreme forces.


Saw an interesting post on the Box2D forums about hanging heavy objects from light objects, and how that's probably a bad thing, so I'll have to check that the bridge doesn't end up doing that during the game.

Also came across this interesting post on the Cocos2D forums about static analysis:
http://www.cocos2d-iphone.org/forum/topic/1662
the links contained within are handy for stoopid people like me.

[ view entry ] ( 210 views ) permalink print article


When testing an exporter, you always see interesting things...
I simply liked the resulting shape.
(click the image for a larger version)

Modelled in Blender
Rendered in Indigo

[ view entry ] ( 193 views ) permalink print article

It might not seem like I did much, for this weeks update, but loads under the hood has changed.



  • I learnt that the size of the Box2D world has an enormous affect on the speed of the simulation, so I've simply divided by 10 to keep the world smaller.
  • As such, I've got to re-tweak the physics of the bridge elements, as the bridge is now waaay too elasticy.
  • I couldn't for the life of me figure out how to make the parallax zoom in on the middle focal point of the screen using Cocos2D's Parallax Node, so I simply implemented parallax scrolling myself.
  • I started just changing the Menu text to "Play Game", but got carried away and made a lame intro screen.


[ view entry ] ( 259 views ) permalink print article

Just minor tests this week:

  • test menu system, want to make it into a nice expanding sun, and highlight the ray that's selected
  • test pin moving and editing "widget"

The only sensible way to create bridge segments is for the user to put a finger down on the start joint, and drag to the desired position, then let go.

The only problem is, you can't possibly accurately position the pin underneath your finger.
So I figure: create it inaccurately, and drag it with the widget afterwards (which should hopefully give a clear view of the pin).

I'm also mighty jealous of Moto X Mayhem's graphics and parallax scrolling.



[ view entry ] ( 238 views ) permalink print article

Summary: this week I used Tiled to create a map for a parallax game level in Cocos2D, processing it with a custom written tool to calculate the Box2D collision area for the map automatically.




  • Tiled is a nice and portable tile map editor
  • There is a plugin here to export the level data to a TGA file that Cocos2D expects.
  • The plugin expects 3 layers, "tile", "bkgr" and "code"
  • I use the tile layer to store graphical tiles
  • Any tile in the code level is used to signify the tile it covers is collidable
  • The plugin exports "tile" data to the Red channel
  • The plugin exports "code" data to the Blue channel
  • Cocos2D only uses the Red channel
  • I wrote a poorly coded tool to calculate
    1) from left to right, the first tile in each column that is collidable, and stores that row value as the first Green value in the row
    2) the first collidable pixel on the left in the selected tile, which is stored in the second Green value in the row
    3) the first collidable pixel on the right in the selected tile, which is stored in the third Green value in the row
  • In the app, a static edge object is created from vertices calculated from TileYOffset + TileYOffet information
    (or at least it would add static edges, if they weren't acting funky... so instead, I create a 4 sided poly object per column for now)
  • For kicks, I added some parallax layers, the sky as the background, the level as the focal point, and the sea as the forefront layer.

Get the source here.

[ view entry ] ( 189 views ) permalink print article

<<First <Newer | Older> Last>>