I am happy to inform you that iUridium v2.1 has been released and is available on App Store!
This version includes:
– Collision detection improvement
– Minor enhancements and bug fixes
Enjoy!
by iUridium • on 29. Apr, 2012 • in Articles
I am happy to inform you that iUridium v2.1 has been released and is available on App Store!
This version includes:
– Collision detection improvement
– Minor enhancements and bug fixes
Enjoy!
by iUridium • on 26. Apr, 2012 • in Articles
I am happy to inform you that version 2.1 of iUridium source has been released and can be found on Source Code page. This update corresponds to app version update as is submitted to App Store.
Major changes introduced in this version:
* Re-implemented collision detection between Manta and Dreadnaught’s obstacles using Box2D. You will learn how to use Box2D for collision detection between main game player and Tiled Map objects.
* Minor enhancements and bug fixing
For all buyers of previous versions: update links will be sent to your email in next few days!.
by iUridium • on 26. Apr, 2012 • in Articles
Guys from app-or-not.com reviewed iUridium. Find it at http://app-or-not.com/?page=view_app&id=79.
I would agree that landing is not very intuitive, but remember that discovering it when playing original back in 80’s was one of the charms of this game.. Feel free to comment…
.
by iUridium • on 15. Apr, 2012 • in Articles
Initially I just implemented plain bounding box collision detection between my main game player and Tiled Map objects (obstacles on the map), but realized it is not perfect solution since obstacles are not always tailored by tile size. So, I decided to do it using Box2D. When I started working on it and searching for similar implementations or tutorials, I realized that there hard to find any explaining this very common requirement which motivated me to write this tutorial. Note that in my case collision means main game player hits the obstacles on the Map and explodes, not collision in sense of moving on some kind of platform. Also, Tiled Map is placed on top of Parallax, but should not be much of difference in case your Tiled Map is child of main scene layer whatsoever.
This tutorial builds upon basics of using Box2D for collision detection covered in great Ray Wenderlich tutorial, so I suggest reading it first. I will not talk here again about Box2D bodies and ContactListeners.
First, you need to define your collision objects on Tiled Map using Object Layer (I am calling it CollisionOL).
On Tiled Map initialization, we need to create Box2D bodies for collision objects on Tiled Map we have just created on our Object Layer. Note that in my case Tiled Map is not sized over complete scene, and I have more then 1 Tiled Map on it, so needed to do some more calculations (getWorldPosition). If you are not using it on such way, your _point should be defined with x, y as got from Object Layer.
That’s it. Now, the tricky part. You need to assure that your collision objects (obstacles) are moving with your scene layer, or in my case Parallax Node. So in your tick method, together with scene movement, we should move Box2D objects accordingly.
Here I am distinguishing my main Game player (Manta) from obstacles. For obstacles, I am updating its world position according to scene movement and then updating the position of all Box2D objects based on the position of the Cocos2D sprites as is nicely explained in Ray tutorial. Note that my world has only X movement. You will need to take care about Y axe as well.
I am sure there are other, maybe better, ways of doing it, so if you have any suggestion of improvement, or this tutorial is not clear enough for you, just write the comment.
I will not include sample project including this code since you could get complete iUridium source from here 😉
.
by iUridium • on 01. Apr, 2012 • in Articles
I am happy to inform you that iUridium v2.0 has been released! It includes several exciting new features:
– Possibility to use any of UNLOCKED levels as game start point
Enjoy!
Stay tuned, more improvements and new features coming in following weeks!
iUridium is proudly powered by WordPress