Game glitches are getting really overwhelming...

Hi everyone I’m sorry to bother but can someone please review my game I know it’s a lot to ask I just feel like I’m getting absolutely overwhelmed just by this glitch that started when I tried to add animations and adding objects. There are several glitches now, like adding the object causes framerate drop and it didn’t before (I re-did part of it due to all the glitches from animation), and earlier animations weren’t playing properly, and now I’m trying to make the sword that the player draws disappear and reappear and I had it working but now everything is just messing up I’m actually really mad, and I feel like I’m just doing absolutely everything wrong, so if someone could just look over it please I’d appreciate it so so much.

Edit: Lol all fixed… :o

I don’t understand what I’m supposed to be doing. What are the controls? What am I looking for?

Not looking at the blend:
I suspect you have the ame problem everone has after a few months of developmemt. Thigs just seem to be crowded, messy, and trying to hunt down bugs takes a long time. The solution is to start your games with good game design. This is things like:

  • split it into multiple files, with a single ‘thing’ in each (ie a character)
  • use states to divide logic into logical sections
  • learn coding to simplify complex logic stacks

Well, the physics are up at 90%.
Your arms are taking up a lot of the physic’s memory, as you have em set to “Static”. Every face is being considered as part of the collision mesh, which is slowing it down.

I was running at 5FPS, when setting the collision bounds to “Box”, or setting the physics as ‘no collision’, it went back up to 60.

That’s the only problem I’ve experienced, none of the other keys seem to do anything.

Idk I’m sorry. I just got really mad. I wanted it to work right sorry if I was too rash in making this thread. If anyone wants to check it out anyway, to clarify, controls are WASD and Space to move, Control to crouch, LShift to sprint, but those aren’t the problem. The little squares are various items. Press “E” to pick up the one closest in front. Tab -> “menu”, right arrow twice to be in the inventory section, press enter to equip the item (sword), tab out, press 1 to draw the sword, and 1 again to sheath it. You should then see the biggest problem. I am restarting this project using the above blend file as a “rough draft”. At this point, I mostly just want to know how to optimize and keep the file organized. I am and have been using scripting the whole time. I am trying to change to using modules. I don’t think I can do states too much because the player has to do several things in several states, for example draw a weapon while crouching, or regenerate stamina and health while swimming. Thanks for taking the time to look at this and really sorry to bother.

All of you thanks a bunch :slight_smile:

Ah, controls! :smiley:
Same thing with the swords, their physics is off the charts.

Everything looks pretty organized, of course I didn’t make this, so it’s a bit tougher for me to find anything, but it certainly could be a lot worse!

@RandomPickle97 you may have just changed my mind about restarting… Lol thanks a bunch again

your animations are not connected to controllers on your arms,

They are. But it’s still not working… I figured I’d figure that out later but either way:

It’s the leftArmsSkel.001 I still have to rename them I’ll do that now.

Ok, for one, I never connect across objects, it may seem like a good idea, but it’s not flexible,

it’s better to copy a property, and use the property to trigger the logic,

that way any added item can easily work based on the same values…

I would have isolated systems -

motion / physics system / health manager- player physics bound

weapons pick up / trigger puzzle logic - parented to camera

Drawing a weapon turns off the pick up/ puzzle system

Each weapon parents to the weapon manager,

this way the weapon manager can access the weapon with own.children[0]

I would use properties to handle the animations…

just have the whole arms swap with each weapon,


if “Attack” min:1 max:(end frame -1)-----------and-----------------------add 1 to attack

if “Attack” = end frame----------------and--------------------------attack = 0

so drawing a weapon then parents it’s base controller to the weapon manager
and the weapon manager sets attack to one, if it’s zero and you click attack

here is a weapon, triggered by space bar,

a sensor applies damage,

the sensor is parented to the armature bone, so it would be a good sword, axe etc.


AttackSetup.blend (466 KB)

Connecting logic bricks across objects is perfectly fine, especially if you don’t plan on removing just one of them at a time (or even if you do, as long as you account for it). Overly convoluted “solutions” to avoid doing that are a little silly, especially if it can introduce desync between objects (if object B copies the property from object A before object A’s logic has run, it will get the property value from the previous frame instead of the updated current-frame value).

Of course if you’re adding objects at different times you might not be able to connect the logic bricks, so you may be forced to use another method. One way to do it might be to have the object add itself to a list on the object that’s running the script, and that object can just activate logic bricks on all objects in the list or whatever.

Ok thanks :slight_smile: :slight_smile:

Edit: So any idea why the animation isn’t playing?

ok, subsurf has to be applied, or moved down the modifier stack under armature modifier,

edit: set gfx arms mesh to no collision

OH MAH GOSH THANK YOU SO MACH!!! WOW! UR AWESOME LOL I would have never found that out geez! Wow!

no problem,
glad to help :smiley:

but yah, set the skin to no collision,

parent a sensor to the weapon, and you should be good to go. (or set the weapon as sensor)