Inspired from some people in the Unity IRC channel, for fun on my “day off” from “professional” game programming I decided to prototype some basic gameplay more than similar to a certain game. I feel it is more than appropriate for my country’s Thanksgiving holiday in which many people gorge themselves on food.
I’m not going to work on it any more, so this is just for enjoyment not critique. What is interesting to me is that the performance is very good on my machine (Mac mini Core Duo) considering I am not doing any optimizations at all. Also the game is basically 100 lines of code including white space and comments. There was also one line added to MouseLook.js, a small editor script to automatically make obstacles, and a short script to move around the blob shadow.
Use the mouse to look around and the arrow keys or WASD to move, and space bar to hop. I have no idea how fast of a computer it requres. The Mac Universal Binary build is attached.
Cheers,
-Jon
p.s. Happy Thanksgiving/Thursday
edit: I should say there is probably nothing to do after you make it past about 10 meters diameter.
edit2: small performance optimization for fun and I made the little sphere translucent so you can see your victims better.
Cool. I’m glad someone ran with that idea. I don’t have a lot of time, and I realized very quickly that 99% of the work that went into Katamari Damacy must have been level design.
As you have discovered, there is a lot of subtle tweaking going on in KD that keeps your sphere relatively round no matter what you pack onto it. I eventually managed a pretty good approximation by doing these three things:
• packing all the material in the sphere towards its centre every time a new object was added
• increasing the size of the sphere at the same time, so that the sphere itself didn’t get lost in a jumble with who-knows-what shape
• making the objects you pick up have a spring coefficient, to give the feel of resistance from odd shapes on your ball, but allowing you to eventually overcome them just by pushing
When you first open it and keep hitting the space bar it’ll reach the ceiling. Once you let it fall, it falls right through the terrain. I’ve had the same issue with objects that have too much momentum.
I never implemented good jump in the couple hours I spent on this.
Things fall through mesh colliders if the time step is large enough so that a collider moves completely through the collider in one time step. What you should do in your case is either limit the maximum velocity of your objects using drag or decrease your time step in the time project settings.
Indeed, I agree there is a heck of a lot of gameplay tweaking going on in KD. Those seem like good things to try.
If anyone wants to play around with this more, feel free to contact me off-board and I’ll send you the current project. Most of the scripts are C# I should forewarn.
little note: looks like friction doesn’t increase as the ball size increases… at about 9 meters size, it becomes very hard to move the sphere reliably (too slippery).
What is happening is that your ball’s size is increasing but the gravity is staying the same, and the way the ball rotates/accelerates stays the same. The movement comes from collisions in the physics engine, so you end up being in the air more and thus don’t run into anything to push off of. Here’s the movement code: