Page 1 of 1
Ninja Ball!!
Posted: Sun Mar 15, 2009 2:10 am
by whitebear
Hehe. Well this is my first post and first thing I actually got into playable condition. Mostly just trying to get into the physics of the whole love engine.
Simply put, the following is first tech demo where you controll ball in two dimensional map.
Controls are:
Up key = Jump/wall jump and sticking on celling
Right and Left keys = tap (you'll be doing that alot) to add torgue (right is clock wise)
You can also add blocks by dragging them with mouse.
- ninball.love
- Ninja Ball Tech Demo 1
- (9.85 KiB) Downloaded 358 times
If anyone knows if there is showcase for doing buttons (for mouse click) then link please.
Re: Ninja Ball!!
Posted: Sun Mar 15, 2009 3:52 pm
by Kaze
The tapping is kind of annoying, but it's cool.
Re: Ninja Ball!!
Posted: Sun Mar 15, 2009 5:48 pm
by Xcmd
I like it. You seem to have solved my difficulty in getting it to STOP jumping after the the up arrow key was pressed. Good stuff. I shall now look into your source code for the magic answers...
Re: Ninja Ball!!
Posted: Sun Mar 15, 2009 9:25 pm
by whitebear
Kaze wrote:The tapping is kind of annoying, but it's cool.
Kinda reminds my self of those old arcade runing games.
The stopping after jumping was foolishly done and could have been done better. basicly it just makes the table of mine go 1 when ever collision happens then make it zero when ever up is pressed. If it is 1 then the program will progress with the jumping.
Re: Ninja Ball!!
Posted: Mon Mar 16, 2009 1:26 am
by Xcmd
I saw that, yeah. Hmm... I'll have to think on that for awhile longer.
Re: Ninja Ball!!
Posted: Wed Mar 18, 2009 5:51 pm
by hdon
Xcmd wrote:I like it. You seem to have solved my difficulty in getting it to STOP jumping after the the up arrow key was pressed. Good stuff. I shall now look into your source code for the magic answers...
The answers aren't that magic. Try getting the ball underneath a platform and jumping up into it. Now keep hitting the jump button. You can fly! Obviously the code considers "landing" to have occurred if it collides with any static body, but this isn't really accurate!
Also worth noting is an error Box2D throws whenever I click anywhere on the screen:
LOVE wrote:love: box2d/Source/Collision/Shapes/b2PolygonShape.cpp:161: b2PolygonShape::b2PolygonShape(const b2ShapeDef*): Assertion `edge.LengthSquared() > 1.19209290e-7F * 1.19209290e-7F' failed.
This LOVE 0.5 binary built with g++-3.3 (GCC) 3.3.6 (Debian 1:3.3.6-15)