Friday, November 30, 2018

GPS still not dead, though I nearly was.

TLDR: still here, still working on it, just been too sick to do any work.

Longer version:

Been a rough couple of months.
First I started a new job, which is still kind of kicking my ass.
Then I got sick.
Then I got better.
Then I got sick again.
Then I got better...sort of.
Still coughing more than I like.

OMG.

I finally had the energy and time to crack open GPS earlier this week.

I love it, but daaammmnnn, it's a mess.

Over the course of a couple of hours wrote up two pages of notes outlining (outlining, mind you, not detailing) a list of stuff that needs to be fixed and/or implemented.

It's got three fully playable Dimensions at the moment, with a bunch that are waiting on boss fight design.

So, still here, still working on it.

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.

Sunday, August 26, 2018

Changelog for August 26, 2018

It's been a heck of a week, family health issues have kept my busy pretty much up until the weekend.

The weekend has, however, been productive:
  • Complex enemy pathing has been implemented
    • This took the bulk of the time, deserves its own blog post
    • Enemies will now go around complex obstacles and room shapes to get at the player
  • Irregularly shaped rooms are now an option and have been implemented
    • More work than it sounds like :-)
  • Completely rewrote player movement code 
    • no more "bouncing" off walls
    • if moving at an angle the player will slide across the wall in the non-blocking direction
  • Player and enemy bullets now asplode when hitting walls
  • Enemies no longer fire if they're not facing in your general direction
    • will still fire at walls though. 
    • They are stupid
  • New hidden wall type to keep the player from cheesing bosses (by sneaking behind them)
    • Can fire through these
  • Added "Robbietron" tileset and enemies
    • Uncolored boss is drawn:

  •  Added four (so far) irregularly shaped rooms, including what is probably the most annoying one ever, the "five minute hallway". 
    • takes about 400 health ticks to traverse the entire width of the room. 
  • Added configurable backgrounds based on dimension (space, desert, tanktankzombie, etc)

Wednesday, August 15, 2018

Changelog for August 15, 2018

  • Still stuck on Polygon of Horror fight design, so doing other things...
  • Got started on the "tanktankzombie" boss fight - "TANK TANK....SUPERTANK"

    • I may add a "?" to the end of the title. First I have to draw it (and all the other punctuation, which is on the todo list)
    • brought super tank artwork into GMS2
    • created title screen
    • tank shoots giant bullets at you. whoopdedoo. 
      • it's a start

  • Generalized boss room startup code
    • setting common variables
    • drawing the boss health bar
  • Made minor changes to health management script so that bullets values aren't static
  • Minor adjustments to the boss_dead screen - still not happy with it
    • Now it just says "NICE" gps-style with all the dead monsters splatted on top of "NICE";
  • Minor adjustments to the Mr. Cortmander boss fight - you can't cheese him by climbing under his desk anymore.
  • Colorized all of the text with screens using GPS-style text
  • interstitial rooms no longer tick off your health or show the score UI
  • Completed the Options screen:
    • music volume
    • sfx volume
    • full-screen mode (yes/no)
  • Decided on a new Dimension: 
    • THE OUTSIDE
    • filled with crap you find outside (you know: bitey critters)
    • Boss: THE SUN.
      • It should never be 102 degrees in Helena MT.
      • I wanna kill the sun.
  • Not playing World of Warcraft (everyone else in the house is) 

Monday, August 13, 2018

From paper to living enemy

I am not a very good artist. My line control is unstable. My circles are rarely round. And while I can use graph paper to make geometric shapes that are based on moving from square to square, I have difficulty making free-form drawings that are in any way symmetrical.

So, I fudge it. For something like the spider queen, I drew one half of the queen until I was happy with it, and mirrored it.
First I drew her on lined paper, then scanned it in.
Next step is to use paint.net to turn her into a monster.
The four images above are:
  • The original scan
  • the original scan minus the paper lines
  • Then I mirrored the original image 
  • Then I colored it
Then I "animated" the "test", by making a bunch of frames where they were in different positions, and the result is thus:
  
For the "Polygon of Horror", the boss is protected by shield generators that look like this:
They spin. And you might notice that it's more or less perfectly symmetrical. 

  • Drew just the one arm as two separate pieces
  • Scanned it in
  • pulled the paper lines and artifacts out of the image
  • Then I assembled the two pieces as separate layers
  • Then copy/pasted the arm 3 times adding 90-degree rotation each time (for a total of 8 layers)
  • Then I started coloring it in.
  • The smaller center piece is just a scaled down copy of the the outer piece
  • The center circles are little bit of cheating,
  • I didn't actually draw those by hand, but rather decided once it was in the game that it needed a little "ejector" from which nastiness (for the player) will spawn.

Saturday, August 11, 2018

Collisions

So, I'm working on the boss fight for the "Polygon of Horror" where the boss and the shield generators have shields up part of the time. The player ship needs to bounce off of them. Since this is a twin stick shooter and not a platformer, collision detection and behavior need not be complex. In fact, it needs to be simple.
And it has been up to now. Simple, but tedious. On wall collisions, the player object was literally checking to see which wall object it was hitting and then acting accordingly. This involved putting "left" walls on the left of the room, "bottom" wall on the bottom of the room and so on.

It was not, how you say in America, a general solution.

Well, for a round object like a shield, this is obviously not going to work, so I had to come up with something else. And I did:
//get the center of the object I just collided with
px =other.x
py =other.y

//get the difference in position between my center and that of the object
tx = x - px;
ty = y - py;
//get the sign of that difference
sx = sign(tx);
sy = sign(ty);
//get the X to Y ratio of the line between the two points
//in absolute terms
ar = abs(tx/ty);
at = abs(ty/tx);

//assign a new location "15" ish pixels from the collision in the opposite direction
x += sx * (min(15, 15 * ar))
y += sy * (min(15, 15 * at));
//YAY, no trigenometry

When the player collides with an object now, I run the above and it bounces 15 or so (will tweak it later) pixels in the opposite direction. I could probably get it down to like 4 lines of code, but this is actually readable.


 Next, I created a single collidable wall object (instead of four) and surrounded the room with it:
 Those grey blocks (which are invisible at run time) are all identical, and the code to deal which each is exactly the same. Th exact same code is used on the shields in the boss level:
This also means that I can finally get around to having the player ship actually collide with the enemy spawners (to their detriment)