Game Development Community

Chipmunk Physics in iTGB

by Benjamin Cole · in iTorque 2D · 09/07/2010 (2:33 pm) · 87 replies

Hi There,

I am working on replacing iTGB's physics with something lighter and friendlier and running into some difficulties. I am just learning how XCode structures projects, so it's been like pulling teeth so far.

I'm not delving into the actual T2D source, and I'm a little puzzled as to what actually needs to be stripped and replaced. Ideally, I'd like to keep the tourqueScript callbacks, and have chipmunk or Box2D silently replace the physics, even if I lose some of the additional functionality that these platforms offer (really, I'm only doing circle on circle and circle on tilemap collisions anyway).

I'm trying to figure out where the physics scene in TGB is setup, where objects are added, and where the physics steps are actually called. I'm assuming each object is created as a t2dSceneObject, and the physics setup and step should be in the t2dSceneGraph... but I'm having trouble finding out where this actually occurs. I'm not a C++ expert, but I know my way around OOP and the source is pretty readable.

Can anyone who has done this point me in the right direction?
#61
10/29/2010 (5:16 pm)
New update. Solid 30 on 2g Hardware. Solid 60 on 3GS hardware. Fixed LOTS of stupid bugs in iTGB at the expense of some minor features... but I traded mounting for automatic parallax scrolling, and mouse hovers for WORKING mouse leave functionality (I can't believe how badly that was broken!)

... I'd call it a good couple weeks.

Unfortunately, I still have some gameplay problems I need to solve, but as a proof of concept it's looking pretty slick! I just wish I hadn't been doing so many bug fixes for an engine I kind of paid a lot of cash for. I'm thinking I should start billing GG ;).
#62
10/29/2010 (5:39 pm)
Good one.

When an engine update comes out I have a huge list of bug Fixes I have to re-apply to get it working.
#63
10/29/2010 (5:49 pm)
Eh, that kind of worries me. I definitely can't update now... I've made too many changes to the engine to be comfortable even applying a small update (on this project at least).
#64
01/07/2011 (11:33 pm)
Hi all. Quick update here. I can't believe that it's been so long since I've posted progress. Physics rock. Game is getting content. No videos yet (need to get it working in the simulator again). Here's some shots:
www.inflamegames.com/flier/bolt1.pngwww.inflamegames.com/flier/bolt2.pngwww.inflamegames.com/flier/bolt3.pngwww.inflamegames.com/flier/bolt4.pngwww.inflamegames.com/flier/bolt5.pngwww.inflamegames.com/flier/bolt6.pngwww.inflamegames.com/flier/bolt7.png
#65
01/07/2011 (11:37 pm)
Wow the game looks great!

Can you post a video of the game in action would love to see that. *updated nm saw your comment above*
#66
01/08/2011 (1:53 am)
Thanks!

I'll get a video up shortly. I just need to fix my libraries.

For the life of me, I can't figure out why all the pictures aren't loading though...
#67
01/08/2011 (3:17 am)
the images don't load cause the place you put them on does not provide them (if you follow it you get to a rather funny looking page ;)
#68
01/08/2011 (7:07 am)
Marc, that's my page and my host. I uploaded them myself...

Ahha... figured it out. It was just a permissions problem. Whoops.
#69
01/08/2011 (8:02 am)
Interesting that your host redirects it like this, normally a 403 error page should happen or alike if the permissions don't grant access
#70
01/08/2011 (11:21 am)
Hey HEY! A video! Well, kind of a sizzle reel actually...

www.youtube.com/watch?v=oXrPme0Eoh8

Let me know what you think so far. It's still missing a fair amount of effects and features, but it's coming along - and much better in my opinion than my original physics tests.
#71
01/08/2011 (6:13 pm)
Benjamin

Thanks for posting the video, looks great.

Any chance you can share your iTGB chipmunk updates.
#72
01/08/2011 (6:25 pm)
I'd like to put together a resource or implementation guide. The chipmunk support is a little hacked, and I made a load of changes to the tgbSceneObject (basically commenting out more than half the existing code). However, dare I say getting chipmunk working was pretty straightforward overall - it was more figuring out where to make the hooks and where to update that was the difficult part.

In any case, I'm backtracking my steps so I can figure out exactly what I did - but if anyone needs any help in the meantime let me know, and I'll help as much as I can.
#73
02/22/2011 (3:06 pm)
Hey all!

I just started a blog for Star Saver - www.pxlplz.com

It's got new screenshots, but is otherwise a little bare. However, if you want to add it to your blog roll, I'll return the favor :).

I'm working on a new video and getting a playable ready for GDC. If anyone wants to meet up and try it out let me know!

EDIT: the website is www.pxlplz.com - typo.
#74
04/30/2011 (8:39 pm)
Hi Everyone! Just wanted to give an update on this! Development is going very well, and we've made some pretty drastic changes.

We launched a video detailing some of the changes (and I've actually got a new gameplay video in the works as well).

We launched a Kickstarter too, to get some backing so we can add things like music, get some additional development and art support, and eat too.

Love to get feedback! bit.ly/jSMgQB
#75
05/01/2011 (9:55 am)
Great progress guys, I love the idea that you've based the game on and I think you're doing an amazing job at pulling it off.
#76
05/05/2011 (9:16 pm)
Thanks Alistair! I have a new video up at www.youtube.com/watch?v=GRgpxaMHlGE. This is the version we're taking to Too Many Games in Philly this weekend! If you're around, come play the game!
#77
07/22/2011 (12:07 am)
Yikes! I've been working on this game too long... Here's a new video: www.youtube.com/watch?v=HJBPNHISydk

Also, I set up a Twitter account. If you're a Twitter...er, you can follow me @pxlplz

Would love feedback on the new stuff!
#78
08/13/2011 (8:02 pm)
Whewh, lots more changes. I feel like I've been working on this stupid thing short of forever:

www.youtube.com/watch?v=qGkdCQdCZso

Would appreciate any feedback anyone has!
#79
08/14/2011 (5:23 am)
Looking good Benjamin! Games do take a long time to polish and finish ... when's your planned release date?
#80
08/14/2011 (1:34 pm)
I assume you haven't started on designing the levels? Looks really good. Will this have retina graphics?