I asked this on the Clickteam forums but nobody had an answer for me.
I have created a top down driving movement engine from scratch. I would like to use my engine for the car movement and the Box2d extension to handle the collisions? eg. pushing other cars around, smashing into and bouncing off buildings, etc. Is this possible?
Or must I build my car's movement with the Box2d extension if I want to use the Box2d physics on my car.
I was just thinking of making a game like this sometime
I suppose you could do it either way but making the movement and collisions with the same engine (i.e. build both with Box2d) would be less work in the long run.
There is a remarkable driving engine built in Box2D, and it's in the examples. I second Nim's suggestion that you go with that engine and keep everything native in Box2D to make things easier on you.
Sorry, I am very inexperienced with Box2d... why would it be less work in the long run to do it all in Box2d?
I've seen various examples of driving games made the Box2d physics. They're nice, but not what I am going for. Plus, I've already finished my movement engine. All I need is to add collisions.
I see your "very inexperienced with Box2D" and raise it to "I'm not experienced at all with it."
I just opened up the Box2D examples one day, marveled at them and thought of how cool it would be to make a driving game with it (the driving engine in particular, which I thought was super cool and well-done), and promptly forgot about trying to learn how to make it work for my own games. But in the examples I saw, there was a top-down driving engine that I figured you might want to work with; hence my suggestion. By not mixing-and-matching tools and extensions within MMF2, my assumption is that differences in coding behaviours wouldn't be so difficult to fix (or work around). In other words, trying to have a Box2D object interact with a non-Box2D object would not be a problem if simply everything was made to work with Box2D.
Obviously if it's not what you're looking for then yeah, skip it. But beyond reinventing the wheel and building something from scratch (which is probably why you've not heard any responses to your questions on the CT forums), I reckon you'll be hammering at this one on your own. The good news is that once it's done, you'll have an excellent example to share with others about the whole process.
Sorry to bump my own old thread. If anybody is curious, I did manage to combine my own custom car movement engine with the box2d object for handling collisions. I'm still working on it though, so no open source yet I'm sorry.
I miss the days when no matter what my problem, there was always somebody who could help me, and usually very quickly too. Nowadays, I have to figure it out for myself. Hopefully, that means I am becoming a better programmer and setting more difficult challenges for myself. Or, you guys hate me....
[quote]I miss the days when no matter what my problem, there was always somebody who could help me, and usually very quickly too. Nowadays, I have to figure it out for myself. Hopefully, that means I am becoming a better programmer and setting more difficult challenges for myself. Or, you guys hate me....[/quote]
Chris. I don't hate you. Since the "good ole days", the software has increased in complexity 20 fold. If people would stop asking questions about things over my head I would feel better. Crap, I have been using this software since 1999.
Haha I don't think anybody hates me. Well, nobody on these forums at least... I was just having a laugh.
I too started using in 1999. Got addicted hard. Mainlining Klik n Play right into my eyeballs.
I love the increased complexity, it really keeps my brain working. I try to check out every new example and understand exactly what is happening, especially in Sketchy's haha. I have a little snoop around his SkyDrive every couple of days, itching for something new. I'm not to fond of all the exporters though, obviously they are a good thing, just don't really apply to me that's all.
Sorry I've no info on Box2D can't help, I think you're becoming the person who is giving the answers to the questions you used to ask. And that of course is a good thing.
I would probably have been stuck with a custom car movement engine if I had made one. But I think the advice here on having everything work as a Box2D object is a good one.
And as for your example, I like it, especially those lanterns. Wish I could code that in javascript, canvas & html5.