Saturday, April 07, 2007

Half-A-Yard Stare


Something I do not recommend:


Becoming so obsessed with your imagined game that you spend all your time trying to find some way to make the core functionality of the game actually work.

Especially after the original solution seemed so promising but turned out to be incompatible.

Then downloading some kind of Tokamak .dll and fiddling with that until you realize that you can't just call the Scripts, you have to call functions and pass the correct parameters, which you will only figure out through excessive trial and error. And for some reason every time you change the slightest thing the simulation stops working.

So you look for another solution and come upon ODE.

For god's sake, do not spend hours coding in movement and gravity and pondering how to properly use external_calls and even more nebulous parameters. It just isn't worth it. You will never figure out how to stop your player from bouncing and spinning (maybe something to do with torque or angular velocity but there's no way your code will be correct).

And why is it so damn hard to include a simple way to make static bodies?

What you should do is basically lament that 1)The new version of GMPhysics isn't ready, 2)Gamemaker doesn't have a built-in physics simulation, 3)You have to use Gamemaker, 4)There don't seem to be any other physics add-ins that do not require the same amount of knowledge to use as creating one from scratch, and 5)You ever thought that getting a little ghost to push a bunch of blocks around would be an easy thing.

---

I'm not yet ready to scrap my game idea.

But I'm getting there.

3 comments:

Anonymous said...

Hmm. If your idea is about a little ghost pushing around blocks, how much physics do you really need?

Maybe you can sit down and work out an equivalent in game-logic.

Anonymous said...

Yeah, I've been trying. That's why I went to physics in the first place.

The solution seems to be somewhere in the collision code. I've tried setting up collision_lines on my object and when a collision is detected it fills a variable. Then I can use that variable to determine the hit location and move my pieces. But I can't get them to move (tired motion_set, even using drag and drop fixed motion, free motion).

Like I said, the problem is that using a physics solution requires only a few lines of very simple code. Doing it in GML requires me to know enough about rigid body physics AND GML to basically code in the same thing (which I obviously don't know how). Or at least enough about the intricacies of gamemaker's collision code to craft a simulation.

Even in the example I found a block can be pushed but doesn't push other blocks it encounters. And that code was uncommented and so convoluted that I couldn't figure out how to even begin.

Ah well.

Anonymous said...

Well, when you're trying out other engines in the future, you've got a test project to judge how much the engine is worth. :)