Monday, September 24, 2018

GPS is not dead. Long live GPS!

GPS is going to have to take a few weeks off. I just started a new job and it's....hard.

Once I get into the groove at work, I'll get back into GPS a least a couple of days a week.

Some news though:

  • So far, GPS has three different levels:
    • All caps because the in game font doesn't have lower case :-)
    • SKOOL with boss MR. CORTMANDER
      • still needs some enemy tweaking, but the level can be completed
      • Also, MR CORTMANDER has been colorized.
    • TANKTANKZOMBIE with boss TANKTANKSUPERTANK?
    • POLYGON WARS with boss POLYGON OF HORROR
  • Difficulty Select at beginning of game:
    • MOM MODE - even my mom can play it. True, I made her.
    • EASY - Pretty hard to die, pretty hard to get high scores
    • NORMAL - RNG can occasionally be ruthless, but should be a balanced play
    • BULLETHECK - it hates you. Starts of normal, things escalate quickly
  • Irregularly shaped rooms
    • Initial rooms were all rectangles. 
    • Took some doing, but now they're not. 
    • Some of them are easier, some of them are actually kind of annoying depending on RNG
  • Some tileset rework has been done. More needs to be done, but it's getting there.
  • Still no mouse support
  • Fully playable with keyboard or controller
    • need to refactor input code to account for controllers other than mine and mouse.


Tuesday, September 11, 2018

Gamemaker paths "orient" (rotate) around ZERO not their first point.

So, I was making some paths for my enemies to follow, specifically, a path that sort of looks like a bouncing ball. I said soft of. It's Graph Paper Shooter, not a ball bouncing simulation.



Since it was so simple, I just started drawing on the path editor.
I was not careful to make sure my first point was zero. That led to some unexpected behavior.

The idea was that these particular enemies would leave the spawner and orient their path such that it pointed in the general direction of the player. For this to work, I needed to set the variable "path_orientation" after I told the object to start following the path.

Here's the thing: when setting path_orientation in GMS2, the path will rotate around the 0,0 point (x=0, y=0) as defined when the path is created in the editor. It does not rotate or orient around the first point of the path, as you might expect. The documentation for path_orientation does not mention this. The docs for path_rotate (an actual function) mention this, but path_rotate rotates the original path object, not the path you're using.

So, just a heads up. When you use path_orientation and your paths are going completely the wrong direction, check that your path starts at the origin.