Jungle action platformer (new version on pg. 6)

HI

this game is amazing..can you help me how to start with this type of physcis engine...

Thanks
This plays great and is very stable. A couple of minor bugs I noticed.

1. I'm not sure how but sometimes I manage to get the guy stuck running or jumping. For example I'll be running left + when I let go of A he continues running left. The problem is probably something simple to do with detecting key up I guess. If I started shooting all over the place and pressing A it would stop again.

2. I just managed to simultaneously fail and complete the mission by blowing myself up with the trucks at the end. When it returned to the menu it was stuck with "mission complete" on the screen + I couldn't click on anything.

Other than that it ran perfect for me + I played it whole bunch of times !

The engine's so flexible you can come up with cool new strategies like shooting a jeep until its smoking, driving it towards some enemies then jumping out and shooting it so it blows up in their face. Especially cool if you manage to blow it up while you're still in the air. Awesome!
Thanks for the heads up. Will look into those things. I have been experiencing the key-problem myself, but not quite sure how to fix it. I mean, theres the KEY_DOWN and the KEY_UP event and thats that, if the key up doesnt register theres not much i can do.

Updates done since last time (not published):

- Knife, for those out of ammo situations
- Layer handling of world and objects
- Rewrite of the "find similar tiles and build one physics block of them" part
- Pseudo water
- Crates blow up into planks

The water is no fancy physics water, just slowing things down with linearDamping and splashing particles. I did some testing with floating crates and planks during continuous contact with the water sensor but it didnt work out that well, kind of inconsistent force. Lets call them really heavy crates, loads of rocks in there...

EDIT: published the update
For what it's worth, I've decided to shamelessy rip off your character controls for my game, if that's okay with you 😳 Not so much from the physics standpoint (I'm not big on the character falling over thing, and my game doesn't have guns, so it's not a total clone), but just from the general feel of how the moving and shooting works. I had a control scheme worked out for my game, but it's rubbish compared to yours.

Source code for your character controller would be ace, if you want to share it (no biggie if not), just 'cos I'm curious. Either way, this game rocks, and I hope you take me wanting to copy bits of it as a compliment rather than an insult 😉
go for it, i dont think im the first one with these character controls. I wouldnt call that a shameless ripoff, but if it looked like this - i would call it a shameless ripoff. Im not going to share any sourcecode yet, but the controls is no big thing. Set linear velocity until you hit a limit, and basic trigonometry for the aiming. The controls are actually from an earlier version i did back in -05 when i didnt know about box2d =)
smaller update again:

- mines: blows up on small contacts from anything. Can be deployed or be initially on the level. Becomes "live" after a second and then there's a small delay between contact and detonation so you get a chance to avoid it.

- C-4: Throw then explode on demand on the second click

- Multiple grenade types handling. Switch with SHIFT + R & F (same as weapon scrolling) or shift + mousewheel but i realized that firefox uses the latter for browsing history.

- Attempt at handling water sounds, contact adding/removing is really inconsisten.

Sorry for posts not being so box2d/physics related, but i wanna keep you updated =) Next up is testing some larger destructible girder constructions, i hope it works out nice with the physics!

Test version 1.3

EDIT: Updated again, this time with a tank, a silent one. Tanks are to box2d what teapots are to 3d
zappBrannigan wrote:
Tanks are to box2d what teapots are to 3d

Lol 😀
This game is really shaping up. It's starting to lose that Metal Slug feeling it had to begin with, though, you obviously intend for the finished product to be a complicated beast of a game. Well that's good, it will show off the physics best.

BTW I think your water sound effect would be greatly improved it you cut cut down on the delay before it starts playing.
This game is very cool. I'm about to start making my own Box 2D game and have been thinking about how to go about building the map renderer. It's not practical to have the entire terrain in memory if you have a large scrolling map. The bigger the map the slower it would become. It's necessary to add and remove objects to the Box 2D engine when they are on screen or just off it and have a seperate code to manage what gets rendered.

Have you implemented such a system? Or does Box 2D have this functionality built in?

Ric
I like the game my Idea is the maning of the tanks,jeep's&buggies tell me what you think ❓ 🙂
I'd be very interested to hear how you did your main loop to keep the movement smooth.

I am having big problems with jerky motion because of the wild variances in Flash's framerate. So when my character moves, he's jerking all over the place because some frames the simulation updates more than others to keep the physics sim steady (60Hz), but that creates bigger and smaller jumps in position from render to render.

How did you keep the motion in your game so smooth? 🙂

Original thread: https://box2d.org/forum/viewtopic.php?t=936