Omnimaga

General Discussion => Technology and Development => Computer Projects and Ideas => Topic started by: Munchor on December 03, 2012, 04:41:13 am

Title: Tower Engineer
Post by: Munchor on December 03, 2012, 04:41:13 am
The other day I started playing with love.physics (https://love2d.org/wiki/love.physics) and I had an idea of a game where you could build towers out of blocks in a realistic world with gravity and physics.

(https://raw.github.com/davidgomes/tower-engineer/master/screenshot.png)

I called it Tower Engineer and I published the game on Github (https://github.com/davidgomes/tower-engineer).

Use your mouse to place randomly-sized blocks on top of each other and make sure the tower doesn’t fall apart. You get a preview of the next block just like on Tetris above the preview of the block you are about to place. It features a high score system and a game over screen.

It was made with Lua (http://www.lua.org) and LÖVE (http://www.love2d.org) so you need those to run the game on GNU/Linux or Mac OS X. For Windows, those are recommended, but good guy Jubjub (https://github.com/Metanoia) made me some binaries (https://github.com/davidgomes/tower-engineer/blob/master/build/tower-engineer.zip?raw=true).

So, my high score, as you can see in the picture is 68! Can you break it?

(I attached the Windows binaries, and there's a .love in the Github repository)
Title: Re: Tower Engineer
Post by: aeTIos on December 03, 2012, 04:42:51 am
:o nice :D
Title: Re: Tower Engineer
Post by: Adriweb on December 03, 2012, 06:34:51 am
Nice :)

That can be quite "simply" adapted for Nspire Lua 3.2 btw :)
Title: Re: Tower Engineer
Post by: Munchor on December 03, 2012, 09:11:12 am
Nice :)

That can be quite "simply" adapted for Nspire Lua 3.2 btw :)

love.physics is very heavy stuff, I doubt it'll work smoothly on an Nspire (but I'm ready to be surprised), has it even been ported, since it's based on Box2D?
Title: Re: Tower Engineer
Post by: Xeda112358 on December 03, 2012, 09:20:43 am
Hey, remember, Builderboy made Zedd for the 83+/84+/SE calcs and it handled physics like this very quickly and smoothly. It handled conservation of energy, energy transfer, gravity, buoyancy, and rope physics. I think I think I remember seeing that Lua had some pretty good physics support as well :D
Title: Re: Tower Engineer
Post by: leafy on December 03, 2012, 02:13:26 pm
Zedd doesn't support rotational inertia (or really, it supports objects with infinite rotational inertia!) so it would never be well-suited for this kind of a game. On the other hand, I remember seeing a native Chipmunk port on Casio calcs.
Title: Re: Tower Engineer
Post by: Hayleia on December 03, 2012, 03:02:04 pm
Zedd doesn't support rotational inertia (or really, it supports objects with infinite rotational inertia!) so it would never be well-suited for this kind of a game.
Well I think she didn't mean "for the engine on calc, use Zedd (or a Nspire derivative)" but more "if Zedd runs on a z80, your game runs on an Nspire" ;)
Title: Re: Tower Engineer
Post by: leafy on December 03, 2012, 03:06:25 pm
Zedd doesn't support rotational inertia (or really, it supports objects with infinite rotational inertia!) so it would never be well-suited for this kind of a game.
Well I think she didn't mean "for the engine on calc, use Zedd (or a Nspire derivative)" but more "if Zedd runs on a z80, your game runs on an Nspire" ;)

Ahhh, gotcha ^^ But honestly, Zedd takes far fewer resources than an accurate rigid-body collision system.
Title: Re: Tower Engineer
Post by: Hayleia on December 03, 2012, 03:14:50 pm
Zedd doesn't support rotational inertia (or really, it supports objects with infinite rotational inertia!) so it would never be well-suited for this kind of a game.
Well I think she didn't mean "for the engine on calc, use Zedd (or a Nspire derivative)" but more "if Zedd runs on a z80, your game runs on an Nspire" ;)

Ahhh, gotcha ^^ But honestly, Zedd takes far fewer resources than an accurate rigid-body collision system.
True, even TI managed to code a proper physics engine in the OS 3.2, so the Nspire definetely has enough power to handle it :D
Title: Re: Tower Engineer
Post by: lkj on December 03, 2012, 03:37:27 pm
The game is cool, but the blocks sometimes fall through each other. And I would increase friction or something if that's possible, but then again you might like it more the way it is ;)
Title: Re: Tower Engineer
Post by: Xeda112358 on December 03, 2012, 05:21:44 pm
Well I think she didn't mean "for the engine on calc, use Zedd (or a Nspire derivative)" but more "if Zedd runs on a z80, your game runs on an Nspire" ;)
Yes, that is more what I meant. I can definitely see how rotational inertia could be pretty intense, but I can think think of a way to test collision detection and energy transfer. I think actually drawing the rotated boxes would be the most cpu intensive part of it x.x