Simple Physics Based Game

WIP<<<

Web Player Demo → http://www.creativecodingstudios.com/Unity/74.98.94.199/Break.html

Feel free to give comments/suggestions. I know this has been done before. Just a learning project that I happen to be proud of! :slight_smile:

P.S. I just hit ctrl+s before pressing the “Preview” button… yawn bed time.

only one level?

this reminds me of that flash game where you place dynamite to blow up a building.

You should make a small game out of this, but with more restrictions (destroy the building with only 10 shots or something) and tools to use.

my best score was 280. tried to do better but couldnt.

Nice to see you are proud of it, you should be, its a nice start.

It has been done many times before, which you acknowledged in your post, but that aside, I do always enjoy anything physics based.

My only point would be the camera’s FOV… is this the standard camera settings or did you tweak them to make the structure look higher? It made me feel a bit dizzy…

… that said, it may just have been the extremely cheap (empty) bottle of red wine sitting on my desk!

Good stuff,
Matt.

@ allen
Thanks for the feedback allen. Yeah it’s only one level right now. More of a test than anything I’d call a level. And it is my intention to add many more restrictions as well. Such as blocks that disappear when shot, limited number of shots, dynamite and maybe some other things (any ideas?).

@ fallingbrickwork
Haha yes I changed the FOV to try to make it look taller. I can agree that it might be a bit overboard :stuck_out_tongue:

it’s a nice start,
i’ve also been making a demolition game:
if you want to check it out and get some ideas, here’s the link: http://forum.unity3d.com/viewtopic.php?t=52261

now i stopped this project and started a new one with my team(a sandbox type game(like GTA))

if you want help with something, maybe i can help

if you want to make buildings fast, i would advise making a script that connect all the pieces of the building(it’s what i did)

every connection to every piece of the buildings in my game was only done with one script

after you make the script, its very fast and easy to make buildings

well good luck!

@Eskovas Would you mind sharing that script? Sounds interesting.

i’m considering posting my code on the foruns, but not right now… i still have to discuss with my team and change the script so everyone can understand. hope you understand if i dont share my code.

I can give you some pointers:

What i did was, i started by increasing the size of the collider of the object.
When i changed the collider, i would see if it was touching any other piece and then i would create a joint.
Then you have to play around with the properties of the Joints to see what is the best for your buildings

Sorry if i can’t help more than this…
i will consider posting my code

Well here I am a few hours later with a script that detects collision between isTrigger colliders with the tag name “piece”, then makes a FixedJoint between them.

function OnTriggerEnter(collision: Collider) {
if (collision.gameObject.tag == "piece") {
   var fixedJoint: FixedJoint = gameObject.AddComponent(FixedJoint); 
   fixedJoint.connectedBody = collision.rigidbody;
   fixedJoint.breakForce = 10;
   fixedJoint.breakTorque = 10;
   collider.isTrigger = false;
   }
   }

Using it:

Create a prefab that you want to become connected.

Make sure to set your Snap Settings (Edit → Snap Settings…) to the same xyz SCALE as the object you are using. This is to help line things up right next to each other.

Adjust the collider of your prefab by a tiny amount (eg 1.01) and check isTrigger.

Create a tag called piece (piece can be anything but if you use a different tag name be sure to mirror the chane in the script) and set your prefab’s tag to it.

Apply the script to your prefab (if you haven’t already).

Sorry if I messed a step up trying to lay it out for you guys. I’m tired and will test it to make sure this process works from scratch tomorrow.

Result → http://www.youtube.com/watch?v=Zh0gfyUTbrU
Updated Structure → http://www.youtube.com/watch?v=OZ9C19-jY98

nice game!are you still making it the updated structure looks awesome to Break!

404 Not Found

Not Found

The requested URL /Unity/74.98.94.199/Break.html was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

I cant play it :frowning:

it worked for me :frowning:
but now i think the url is down

IMO we need more games like this made with unity where you have to break the structure and it falls down physically.