3rd person exploration

Dummyplug, I read your log as I’m also interested in proper platformer dynamics i.e. how to make the character stick to the ground (unless you specify him to jump). Another problem related to this is that the girl jumps at the top of the slope as well. (see attachment).

I’ve read about an idea how to fix this on the gamedev.net forum. Conceptually it makes sense, but I have no idea how to program this in BGE (being a non-programmer that is). See the second post in this thread: http://www.gamedev.net/community/forums/topic.asp?topic_id=509143

I’ve found it much better to explicitly have two different character states - on ground and in air. In the air you do physics-based movement in 2d with forces and gravity, and on the ground you snap to a particular surface and move left/right along it (basically physics along a 1d axis, which may or may not be actually horizontal in the game world).

Attachments


The best I could come up with is, if the character was on the ground in the previous frame but is not any more, cast a ray down a short distance- if it doesn’t hit anything the character probably walked off a ledge, and you can continue falling as normal. If it hits a surface, snap the character to this surface (and maybe remove vertical velocity?)
I haven’t gotten around to experimenting with this however, so I can’t say how well or badly it works.

I’m also working on a 3rd person setup for a game at the moment, and I’m working on solving the same problems of bouncing down the ramp and skipping into the air at the top of the ramp.

The solutions I’ve come up with in theory are identical to those in the gamedev discussion that Lamroot linked to. That is, snap the character to the surface when the character is on the ground, but when you know that the character is or should be in the air, use physics. I tried using the Constraint: Distance actuator, but it only works properly when the “N” button is ticked, which is not the functionality I’m looking for (and “N” overrides all other orientation changes, such as the Track To actuator). It seems at this point that a Python solution is the way to go.

BTW, Dummyplug, I really like your character setup. The jumping and climbing look great (both the animations and the way you implemented them). I also like the way the character lands on the ground differently depending on the height jumped from. I’m eager to see more :smiley:

very very nice. It’s a little clunky, but with a bit of work, it could be smoothed out. I think Jazz made a thread on reactive movement like ‘The Shadow of the Colossus’. If I could find it, I think you would find it useful.

peace,
-nick

Hi,

this is what I’ve done for some of my projects :
http://www.aandria.com/wp-content/images/diary/cray_no_natsu_yasumi.jpg

  1. Align the collision box on the ground’s normal if for ex. “ground” property is detected within a certain distance.
    Always, or if the ground object has a “stairs” property only for ex. -> lower cpu usage. Depends on the game type.)

  2. Align the Armature on the +Z world axis.

But I’m not sure that I understood the issue well :slight_smile: (english, english…)
I’m not even sure that my solution was not already suggested.

Anyway, I hope it helps a little.

Thanks for the suggestions, everyone. Awesome drawing, Cray! I think the idea of snapping or aligning the collision box to the ground should work perfectly, but I don’t know how to do it. Cray, I’ve seen what you explained with your drawing in Turok (an old N64 game). The enemies weren’t aligned to the world’s z-axis, so whenever they ran down steep slopes, they’d sort of stand straight out from the ground along with the collision box.

Right now I’m trying to make small maps on separate .blend files and have them connected to each other. I’ll get into details and upload a zipped package of test blends once I’ve tried out what I have in mind.

Raider made a good 3rd person template over at gameblender.org, he had a post about it here as well but I couldn’t find it.

Here it is on gameblender - http://www.gameblender.org/viewtopic.php?f=17&t=847&st=0&sk=t&sd=a

It basically gives the player magnetic boots, which align you to any surface, even when ur upside down and walking on walls etc, it then allows you to jump whenever as well, and fall back down to whatever surface you were on at the time. All other objects react to downwards gravity the way they should. Its really smart stuff!!

Goodluck working out how to reproduce it though :no:

I’ve been playing around with the “new game” actuator to allow the player to move between three blend files.

http://mejiatryti.com/Ivar2/blenderstuff/chibistylestuff/maptest.png

Here is the zip file if you want to try it out.

When you leave an area, a script writes which area you just left to the “entered_from.txt” file. Each exit has an empty in front of them. They’re used when the blend file you enter reads which area you came from, then places the girl on that empty. That way, if I enter the yellow area from the green one, I’ll be placed in front of the green exit.

I’m not sure if this is the best way to do it, but it works. I’m hoping to make small but detailed maps, so that when I put together 4 or 5 small and detailed maps, it’ll feel like one larger area. For example, one area has a huge tower in it. If you’re one or two areas away, you can see the same tower in the distance, but a lot less detailed. I also don’t have to make the areas between the maps, so I can focus more on the “hot spots” of the whole place.

I get an error when I try to open the file, could you try re-uploading it?

That’s weird, I can download it just fine. Try downloading it again, I sometimes have that problem with my music: people sometimes only get 4 seconds when they download a song that is 2 minutes long. If it still doesn’t work, I uploaded it to sendspace:

http://www.sendspace.com/file/7qsgdb

I believe you can use GameLogic.globalDict to store information instead of a text file- I vaguely remember hearing that globalDict stays even if the game is changed via actuator.

I still get an error saying
" p, li { white-space: pre-wrap; }Reading the archive ‘/home/daniel/Desktop/loading_maps.rar’ failed with the error ‘’ "

Here’s a small update. Right now I’m working on a ruins/swamp map. I wrote a list of things this map could contain, and so far I’ve made mushrooms (brown and blue ones, single and in clusters) and pillars, along with ‘brush’ around or beneath them.

why does she look pregnant? looks good keep it up. And the game looks good to.

ahhaahahahhah

nice work yet :wink:

I was also wondering about proper platform dynamics, i know this is late, but has anybody worked out a solution to the “platform sliding under the character’s feet”? I thought I had done it, but when I opened it onto another blend, it doesn’t work. I’ll post a blend when I’ve got it.(I don’t have my own pc)