🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Best foundations for a simple 3D construction game?

Started by
14 comments, last by Programmer71 1 year, 8 months ago

Phosphenes said:
It appears that C++ is the winning language here, as Newton and Unity both support that.

Unity is written in C++, but does not support it to create games. It uses C# for that.

The Unity topic came up for off topic reasons, but ofc. you could use an engine like Unity, Unreal, CryEngine, Godot, etc. They all have built in physics simulation. But i guess they do not really expose robotics. PhysX has it, but i assume U engines do not expose related interfaces.
If so, Unreal might be the better choice than Unity, because you get full C++ engine source code, so you could (in theory) do some changes if needed.
But i'm just guessing here. Likely you could try multiple engines to see what suits your needs best.

A need for high accuracy comes up with multi body problems. I made a self balancing walking ragdoll, which is such problem. Because there are many bodies and joints, typical game physics accumulate too much inaccuracy. E.g. if the robot has to stand on it's feet but also grab an object from a table, it becomes hard to control the hand with precision of millimeters, because small errors accumulate from ankle → knee → hip → maybe 3 spine bodies → shoulder → upper and lower arms → wrist → fingers.
The error is not just about missing a precise position, but also about oscillations. So your hand may not only end up too low down due to gravity, but it may also wobble and jitter due to accumulated oscillations.
If you expect problems like this, the recommendation of Newton holds. If you use much simpler robots made only from 2 or 3 joints, game engines default physics should be good enough.

Phosphenes said:
To get a feel for it, here are some primitive 2D mouse exercises to see if you can predict where the bricks will go (These are JS demos I hacked with the queue delay Programmer71 suggested):

Hmm, i tried it. Maybe it could work similar to games like ‘The Incredible Machine’. This was a puzzle game. First you have a planning phase (positioning objects), then you start the simulation and only watch it running, observing if the actions happen as planned out, trying again if not.

Phosphenes said:
Yes I agree input latency may not be fun in a video game, but it might be fun if you are practicing to operate an actual robot building things on the actual Moon. Hundreds of robots can be put into space for the cost of one human astronaut, so if the industry ever gets serious about Artemis they will depend heavily on remote-control whether they plan to or not.

It sounds you're not sure if you want to make a industrial simulator or a game. Or you might not be aware about the difference between them.

Ofc. it does not matter if you only make this for yourself, for fun and learning. But if you want to make a commercial game, you may need to refine your game design.

Though, experimentation is a good method to come up with a good design. Just expect you'll eventually have to change your plans if a first prototype is no fun indeed. ; )

Phosphenes said:
I'd like to see how far human learning can take this with 3D and 2 hands, without sci-fi level AI.

Big problem is input devices, which are all 2D, except VR controllers. So we never found a general good way to rotate objects in 3D space. We can make it work, but the result is never intuitive for all cases. (This truly sucks.)
Haptic feedback also is missing. So we can't feel contact or collisions. Some visual cues and some sound effects is all we can do.

So some AI assistance might be no bad idea, or eventually make it a VR game.

Advertisement

@JoeJ This is more of a 'citizen science' type of project. No money is to be made, and if even 100 people use it in its entire lifetime, I will count that a resounding success. It is to gather information in an entertaining way, discover problems that might crop up in real life and solve them.

That said, the current goal is to reach version 0.00000001, and I'm willing to make laughably unrealistic compromises in the short term just to see something work.

Robot: No inverse kinematics. User gets the POV of the robot, with 2 claws simply levitating in space in front of him. Everything in the environment has physics though, complete with oscillation issues. The robot would be of 'centaur' design, head, arms and torso mounted on a wheeled rover, which is locked to the ground during operation. Its head would be a ball of cameras, so there would be no time lag for panning the POV.

No haptics. Claws will be textured with heatmaps to visually show where they feel pressure.

Controls: Ouch. VR would definitely be ideal, but is limited by price. Each claw needs 6-7 degrees of freedom though, so just a pair of joysticks wouldn't cut it. You could probably get away with 2 wii-type controllers and a big flat screen though. (Maybe version 0.0 of the game could have only one claw operated by 2 joysticks and pedals similar to a real life backhoe. This could stack bricks or do pick-and-place.)

An industrial simulator would be ideal, but also not within my time and skills budget. If I do enough to prove to myself 'yes this will work', then I will keep going. Failure is an option.

Though, experimentation is a good method to come up with a good design. Just expect you'll eventually have to change your plans if a first prototype is no fun indeed. ; )

Absolutely! After the first demo, I would be wise to throw all the code in the trash and start over the right way, ha.

As for the fun factor, I think there's a Rule 34 for games too. Remember the guy who built a whole working Turing machine out of Minecraft cubes? And then another guy did the same thing with a different design? Sane people don't call this fun, but fortunately we have a large supply of non-sane people.

Been a long time since I saw The Incredible Machine, nice 2D creative game...

Anyway, thanks to you guys now I have a short list of game foundation software to focus on.

Phosphenes said:
No haptics. Claws will be textured with heatmaps to visually show where they feel pressure.

Nice idea! : )
Reminds me ther is a way to deal with 3D rotations: Gizmos, as used in 3D modeling tools. Gizmos are fine to use and quite intuitive, but for typical games the extra visualization plus the mouse cursor controls they need are usually not acceptable. But maybe it works for you if needed.

Phosphenes said:
Robot: No inverse kinematics. User gets the POV of the robot, with 2 claws simply levitating in space in front of him.

I see. For this you likely end up to control the claws with external force.
It's not easily possible to do this with joint motors. I've tried it. For a low detail version of my ragdolls, i wanted to make them like in the Rayman game. So they have feet, hands, and a torso. But no extra bodies for arms and legs to connect the hand or feet to the torso. So i tried to make a 'super joint', which can drive to an arbitrary relative offset for both position and rotation between two bodies. But it was not robust enough, so i had to scratch the idea. I've concluded: To model human alike agility, we need to replicate the human skeleton quite accurately. So no way around having an upper and lower arm if we want to have hands.

Doing it with external force however should work without a need for arm bodies. That's like having levitating claws, independent from the robots body, driven by something like the ‘thrusters’ a spaceship has. (No need to model multiple thrusters, you need just force and tourque for a claw.)
But because the claws are now are independent, you have to address some problems a real robot would not have:
You must take care the claws remain nearby the robot.
You must ensure the force you apply is not too large, so they could lift too heavy objects, or push through walls, and other such undesired things.

But that's still much easier than working on ‘real’ robotics, so no bad idea i think.

Phosphenes said:
The robot would be of 'centaur' design, head, arms and torso mounted on a wheeled rover, which is locked to the ground during operation.

If the claws are independent bodies as assumed above, the objects they lift will put no pressure on the robot torso and rover, which makes the simulation easier.

Phosphenes said:
An industrial simulator would be ideal, but also not within my time and skills budget.

Physics engines often have this functionality built in, and learning how to use it is not that hard. So i'd say it's still an option to use ‘real’ robotics. Newton has such industrial robot in its demos, and i've seen PhysX and Bullet have this too.

Phosphenes said:
As for the fun factor, I think there's a Rule 34 for games too. Remember the guy who built a whole working Turing machine out of Minecraft cubes? And then another guy did the same thing with a different design? Sane people don't call this fun, but fortunately we have a large supply of non-sane people.

Haha, sure. : ) I did not intend to demotivate you with my concerns about fun. I only felt i should mention it, because you said you're new to games, so maybe you did not really think about such things in the first place.

But i am very convinced robotics is the most promising field to give as new games, and physics simulation is still a sleeping princess not yet fully discovered by game designers.
So the first step is to do experiments, and maybe we find some fun mechanics useful for games on our way. If not, it's at least interesting to try such things out.

It that sense - good luck! ; )

Try computer physics.

This topic is closed to new replies.

Advertisement