Ship Building Games?

Sorry for somewhat spamming the forum with my questions. I’m in one of those ideas aplenty moods.

We all know those games. The games where you build a ship and then float it. Those games where you build a plane and then fly it. Those type of fun and creative games. How would you make one of those. I’m not asking for some advanced code just some theory that would enlighten me on the process. Yes, I have googled this. I didn’t find anything useful, so as my usual last resort, I came here.

So, how do you make one of those games? I’m pretty sure the theory is plenty simple and I’m just not thinking straight, but still.

EDIT: I’m more focused on the movement of the individual parts of the said object. Such as the thruster moving the rest of the ships parts like walls and even people within the vessel.

To be honest, you really are spamming the forum here, and not exactly with quality posts either. This question is pretty vague - build a plane and fly it? Physics engine that factors in the physics of something in the air. What are you asking for?

Basically the movement of each individual part. Say you added a thruster to a rocket ship, how would I simulate that thruster moving every individual part of the space ship such as a cargo hold and a loading bay.

I’m sorry for spamming. I’ve been pondering these questions all day and never got around to posting them to the forum. Now that I have the chance, I’m just letting them flow out.

Do you mean like Space Engineers?

EXACTLY!!! I’ve been watching a lot of gameplay of that game today and it has inspired me. Now, obviously a more 2D style of it would be more fitting. Kind of like that game on here called Airships. I’m pretty sure you’ve saw it somewhere on here.

For the ship building, I would make some kindof system that allows the user to build off of specific nodes or faces in a 2D array in the master class: “Craft”. As for the thrust, I’m sure Box2D has a way to add force to an object.

[Disclaimer]
Never actually used Box2D!

Thats genius! I would have a base block that you could create. And if you click on it, any other block you place would be added to an array. That array would be the ship. Then, when you hit the arrow keys to move the ship it would cycle through the array and move each individual part of the ship. IDK if this is what you had in mind but your post helped a bunch. :stuck_out_tongue:

Yep pretty much :wink:

Yo, Jacob.
Why so many topics per day?

Not saying its a bad thing, its interesting to read them and their reactions.
Your almost at 7 posts a day haha (You can check in your profile)

If you are using any physics library, this shouldn’t be necessary - each block is connected, so moving one moves the others.

I really like the community and the forum in general. I feel like I might be slightly abusing it’s powers though. :stuck_out_tongue:

[quote]If you are using any physics library, this shouldn’t be necessary - each block is connected, so moving one moves the others.
[/quote]
I’ve never really used a physics engine before. Never really had any use for them. What would best fit this type of game? I’ve already heard of Box2D are there any others?

Box2D is perfect for modular building systems like this, if it’s 3d then you can use jbullet or something. Something like space engineers or kerbal space program would be nearly impossible without a physics engine.

Watching a few beginner things on Box2D, Why did I ever think I didnt need any of this!? Honestly, any programmer can just roll along basking in the greatness of libraries and not have to do a tiny bit of work. I’ve been overworking myself for absolutely no reason. I feel pretty dumb right now. :stuck_out_tongue:

you have a base object, which contains all the other ‘parts’ objects in an array.

the base object has x,y position in the world.
the parts have x,y position relative to the center of their base object.

when you want to draw a part, or work out where a particular part is in the world, you simply add the position of the base to the position of the part, this gives you the parts true location…

now when you want to move the whole ship all you have to do is adjust the position of the base object.

This article is really interesting:

:slight_smile:

Well. I guess my question is appropriate for this topic NOT TRYING TO HIJACK

But what can be done about Thrusters ? I mean rendering… its possible to use particles and increase the particle effect as the speed goes up?

ya that’d be quite easy.

How so

If the particles coordinate are relative to the world coordinates (not the ships) and the emission force is mapped to the rotation of the ship, you shouldn’t have to increase anything with the particles because the trail will get bigger as the ship moves faster and should make a nice trail behind it.

But in the event you wanted a more consistent trail, you could just increase the rate at which you create particles dependent on the speed of the ship. But yeah, generally speaking, the particles would just make a nice trail regardless. (assuming you give them some sort of time to live in frames and they stay in a spot/travel opposite the ship, in which case they will indeed just make a nice trail behind you that gets thinner the faster you go)

Of course, if you wanted to simulate power rather than speed, increasing the rate of particles is the way to go, and this would of course increases speed as well, and if you turned the thrusters down, they would have less exhaust. This is probably what you’re going for.