Posts Tagged ‘chipmunk’

Step through the physics world | LD72 no.25

Posted by (twitter: @haxpor)
Sunday, December 16th, 2012 8:08 am

So quite some time before the information you’re reading get posted on this site, my blog :_)

The following is the updates

-> I got a name for 3-leg-Alien that we will be controlling it in the game. The name is Trideroche. To be honest, while I were searching for information over the Internet, I found something about vocabulary namely “Tribe – De – RoChe”, not sure whether it’s French or not, can’t remember the meaning neither. Anyway that the cool name.

-> Made physics world works! Fine-tune and finally managed to implement the initial walking feature, the core one, successfully.

The concept is that it has 3 legs. You will control it individually in the way that maintains the stability of the character itself. If you step up wrongly, you may result in explosion or get hurt in some ways.

Apparently the current state is not totally what I want it to be just yet. The pain problem relates to the initial design which is “3-leg”, yes, … literally. I don’t want to change it to other things else as that is the pretty first and solid design and I would love to stick to it. What’s wrong is when you create such a character in the world of physics, you need to make it be able to maintain its own stability at the first go you put it into the game.

image
Design and stuff

Usually, most of the time you will pop the physics object by click anywhere in the screen and it will be born there, thus falls down to the ground according to normal gravity. Whenever it touches the land, there you will see a problem. In my case, a character cannot stand on its own at the first go. Due to 3 thin legs, and at this time I have not much time to figure out which solution or primitive shape or constraint to form such a spider-like object at the end. Chipmunk is new to me.

image
It cannot stand on its own. This is the very first implementation according to my design.

It may be because the upper part of the character is visually heavier than the bottom, that’s just a guess to make it looks like in front of the screen although mass can be set. Please note that what you see in the image, it has no 3 legs yet just 2. But that’s enough for me to rethink for better solution.

Thus I re-implement the forming of character code, what I got is below.

image
Re-implement it to another design.

That’s better but it needs to be better and walkable.

So I reduced the radius of the head and decreased its mass, also shorten the body part, and put another leg with also feet. 

image
With reasonable touching area of three feet, the character has more chance to stand ground!

Anyway that’s not the optimal solution. After I poped it into the game and fell to the ground it has more chance to stand up on its own. Besides that, its clumsy structure causes it to fall down and its head knock with the ground most of the time. Ha ha, that’s funny, but it needs to be better.

My initial solution at this stage is to periodically apply y-axis velocity to its head to pull it up. But I need to call it 2 times per second (according to your set up, but it needs less frequently than frame rate, of course) to maintain its stability and realistic.

image
Much better!

In addition, I managed to remove out the big feet and make it looks like it has just that long legs. I still need the foot but just reduce its width to 1 to hide it completely. Other things still work properly.

I captured some movement of Trideroche below.

or directly at http://www.youtube.com/watch?v=_Rq427T2f9A.

I’m back to code now, I have another day and 10 hours left to finish this for the jam event of Ludum dare#25.

[I originally posted this on http://haxpor.org/post/38064023763/step-through-the-physics-world-ld72-no-25]

Physics. Objects. Joy.

Posted by
Saturday, April 18th, 2009 4:55 am

Physics objects working, courtesy of the awesome Chipmunk library. You can’t see it in the screenshot, but the level spawns about halfway up the screen, each piece just in time before you reach it, and falls down to the bottom.

Gameplay? I said I had physics — you want gameplay, too? Jeesh.

Bleh, but yet yay.

Posted by of Platymuus (twitter: @SpaceManiacX)
Monday, September 8th, 2008 1:48 pm

Bleh, homework, yet yay, other things coming up to compensate for my lack of a finished Mini-LD #3 entry. Look forward to…

  • A Flash movie thing,
  • A Half-finished Flash game,
  • Maybe my modifications to the Chipmunk demos,
  • and something I’m not publicly announcing yet, but those who have been on #ludumdare recently may have experienced…

And also, going back through things, Towlr is awesome. I emailed it to my friends. Buahahaha!

ChipmunkLand died

Posted by of Platymuus (twitter: @SpaceManiacX)
Sunday, September 7th, 2008 12:54 pm

I gave up on making it load files, and in the first place it was never much of a tool. So, yeah. I gave up. Maybe I’ll release my modifications to the Chipmunk Demos, or something.

On an unrelated note, I self-congratulaified myself.

ChipmunkLand Compiles & Runs!

Posted by of Platymuus (twitter: @SpaceManiacX)
Saturday, September 6th, 2008 2:05 pm

I’ve named my “tool” ChipmunkLand!

ChipmunkLand runs!

It can’t load files yet, but it does say “Usage: … filename” if you don’t give it a command line argument. I’m sticking to command line arguments because I’ve never made a usable GUI before. I’m using OpenGL and Glut so I can just use the drawing code from the Chipmunk Demos.

Cannon Hates Tower

Posted by
Sunday, August 10th, 2008 6:44 pm

Hello! This is a competition entry. It is a simple game where you shoot cannonballs at a tower. Eventually, the tower will succumb. You get more points for letting blocks hit the ground before the top of the tower does.

Hold SPACE to power up the cannon, release to fire. Up and down changes the angle. That’s it!

Requires pyglet/pymunk. Doesn’t run too fast. All those quads to draw, and all.

Windows Binary.

Source code.

Too minimal for a name…

Posted by
Sunday, April 20th, 2008 7:41 am

Well, I think I’m done… it’s rather a lot more minimal than I’d hoped, not been feeling too well this weekend, so decided to stop early. I’d hoped to make better use of Chipmunk and put in ropes/chains and other fun stuff, and some hazards – but kept getting too distracted playing it / building levels (it’s got a built-in level editor, if you press E in-game, but it’s a bit arkward to use, and I didn’t get round to writing any instructions…)

Final(ish) version is here…

http://www.bluescrn.net/LD48/LD48-11-bluescrn.zip

screen5.png

Snowroller Final

Posted by
Sunday, December 16th, 2007 3:30 pm

Wow, “finished” the game with more than an hour left. Very simple gameplay, but at least playable in a couple of minutes (I hope!). Note: This version require that you have python and pyglet installed. Read the readme.txt! I will hopefully be able to make a py2ex’d version tomorrow.
The game can be downloaded here: Snowroller download (2nd try)

edit: Papper found a last minute bug that Ive fixed (within the time.) Now it is the final version (really!).

Snowroller Final

[cache: storing page]