A roaming-ralph like but much better


#1

Hello everyone ! So i post my game that i made with two friends for the exam (I’m French and 17).
I started modifying the ralph example, and we arrive to this :


The character named Freddy can move in the 4 directions and diagonals, jump (not very realistic) and operate levers. The objective is to cross the map by activating the levers and arrive to the end.
The collision on the objects linked to the levers doesn’t work (so you can pass through them sadly).
Finally all the objects have been made on Blender by one of my friend.
So it will be cool if you say what you think about what we made, and the improvements to make.
Thank you the community for helping me !
GitHub link : https://github.com/mignonfripe/Panda3D-project-Escape-The-Forest


#2

Do you have a link to the project?


#3

I edit my post sorry


#4

Looks cool. I downloaded it from github. I could walk around but it crashed when I tried to jump with space.


#5

Looks nice, reminds me of some mobile games. I needed to fix the windows only audio stuff (do you know you can play audio with Panda3D?) and the jump function even though it doesn’t seem to be used in the game at all. So my recommendation would be to integrate something to actually make use of the jump functionality.


#6

Thanks for all of your comments ! I edit the jump and simplify it in fact.

You are right and i will do it with an island higher than the others for example.
Sadly, i don’t know how to fix the collision with the actors(1st bridge, stone, lever…) so do you have ideas to solve the problem ?


#7

The problem with the collision might have something to do with the lever being animated. I remember having trouble with animated objects and collisions in the past. The easiest and probably best way would be to add a separate for collisions specialized and not animated mesh around your visible lever mesh. This could for example simply be a box slightly larger than the actual visible model.


#8

The collisions work !! I just use the PusherHandler and deactivate the collision box around the object when the lever is used.


#9

I see that we can play the animations of the levers several times. So i tried to fix it by adding a variable which will increase when we touch the “a” (and get out of a loop with while), but it didn’t work. I also tried to use self.acceptOnce but we will not be able to activate the others levers.
Any other ideas ?


#10

you can add a variable containing a boolean to determine if a specific lever has been activated. Something like

if delta < 3 and self.keyMap["action"] and not self.bridgeOpen :
    self.bridgeOpen = True
    self.lever.play("OnOff")
    ...

and simply init self.bridgeOpen with False somewhere in your constructor and repeat the same for all your other levers. You could also do this in a list or dictionary which would probably be better if you have many levers sometime.


#11

Fixed ! I almost apply what you said, you can check the new version on Github.