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: 
    • 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 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


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)

Friday, August 10, 2018

What I'm working on right now....(8/10/2018)

Normally, I'd post a change log for today's date, but nothing that I'm working on is actually done yet.

Right now, I'm working on the boss fight design for the Polygon of Horror boss fight.
This has required learning about the realities of dealing with paths in GMS2. Maybe I'll go into that another time. Now that I've got it down, there will be lots of bullet hells :-) And...more than likely, a much needed design on the "Mr. Cortmander" boss fight.

Since I want the shield generators (in the corners) to also spawn enemies, I had to generalize the enemy spawn code  and turn it into a function. Previously, it was only run by the enemy spawner, so it's not a case of "had the code in a bunch of places", but rather a case of "I totally do not want this in two places". There's some complicated crap going on in there. So, now things other than "spawners" can spawn enemies.

Also, while I was at it, I decided that I wanted the player ship to bounce off the shields around the generators and the boss. So I spent about an hour working out a generalized solution to bouncing the ship off of stuff. Such as the walls. Right now, the ship checks to see if the ship has a hit a "left wall", and if so, moves to the right. If it hits the "right wall", it moves left.

The new code figures out where to bounce the ship to based on the difference in the location between the center of the ship and the center of the object it just hit. This gives me the information I need to figure out which direction the ship needs to bounce. On on the one hand it means I have to put more (hidden) "wall objects" on the borders of the rooms. On the other hand, it means that they can all just be the same kind of object and only one collision check, which is now generalized, needs to be run.

Have also been working on new art for powerups, new monsters, and the elements of the boss fight shown above. Showing off the new monsters will have to wait until I put together some web friendly image strips.

And finally, the inter-dimensional interstitial has been redesigned. Now it just randomly splats all the critters you've killed on that level all over the screen. Kind of like how the "Next Dimension" screen does it - but, to be clear - one picture for every single enemy killed.

Wednesday, August 8, 2018

Change Notes for August 8, 2018

  • Interstitials
    • Next Up:
      • Shows you what's going to happen on the next dimension
      • Floor and wall art change to match what's up coming
      • random enemies from the upcoming level are thrown at the screen.
      • May decide to animate them in the future. May not.
    • End of Dimension
      • Shows you a visual representation of all of the critters you've killed
      • Not sure I like it.
      • If I do, then on the sound design phase, I'll change it so they show up "one at a time" which a stomping noise. Or maybe once stomp for each type of enemy.
        • yeah, that seems more likely, otherwise, we'll be here all day.
  • Fix a few bugs:
    • The dimension picker was all messed up
      • I was trying to be too clever when I first wrote it
        • If the code you write is at the limits of your cleverness, then you are, by definition, too stupid to debug it.
        • I was.
      • Had to rewrite it from scratch
        • Actually works now
      • At game start, it shuffles the list of available dimensions.
      • You'll go through that list until you've seen them each once.
      • Then it reshuffles.
      • So, the last of one complete run and the first of the next could be the same, otherwise, you won't see duplicates.
    • Found another "script_execute" bug or three.
      • Had my functions calls formatted wrong which resulted in some odd behavior.
      • Will do a dev-blog post on this as it's an interesting GMS2 specific behavior
    • My point-defense upgrade for the missile rig was setting the score rather than adding to it (= rather than +=)

Monday, August 6, 2018

Change Notes for Auguest 6, 2018

Today was a busy one: Added the Unlocks menu, and more importantly, made it do things.

  • New Unlocks menu:
    • Unlocks now having meaning
    • Ships
      • Select from unlocked ships 
      • Put the Original Prototype back in as playable
    • Guns
      • Select from unlocked guns
        • If you've chosen a ships which doesn't have built in guns.
    • Grid Schemes
      • Select from unlocked graph paper schemes
      • Each scheme has a light and dark background 
      • Added a new grid scheme (red)
    • Drones
      • Select from various drone shapes and colors 
      • Added bunches of new drone skins
    • Added flavor text for all of the above
    • Functionally, it does exactly what it should, I may tweak the design a bit
    • Your selections are saved as your default so you only have to pick them once.
  • Found a bug in the health management system which sets off bombs? 
    • What the actual fuck? I don't even know how this is happening.
    • Will fix it tomorrow
  • Found a bug in the missile explosion code 
    •  Missiles were destroying spawners regardless of HP and no points were awarded.
    • Fixed.
  •  Added keyboard support for most functions 
    • Main Menu
    • Unlocks Menu
    • High Score Entry
    • Actually playing
      • Left Stick=WASD
      • Right Stick (Firing) = Up/Down/Left/Right
      • DPAD (Menu Nav) = U/D/L/R
      • (A) = Enter
      • RB (Bomb) = Space
      • ESC = give up (but enter initials if you got a high score)
    • Mouse is coming. Eventually.

Sunday, August 5, 2018

Change Notes for Auguest 5, 2018

  • Finally got around to saving an INI file.
  • Currently stores 
    • music and SFX volumes (which you can't actually set)
    • High Scores - this is the big one
      • Top 5 high score
      • What you were driving when your game ended
        • Both the ship type and gun upgrade level
        • Ships like the Polygon Warrior only get on pictures
        • Ship/gun combos such as UFO/Missile get a two pics
          • One for the UFO 
          • One for the gun showing the upgrade level of the gun
  •  The game over screen now shows your final score
    • If your final score is a high score, you get to enter your initials, old school arcade style
  • Added "Unlocks" and "Credits" to the main menu
  • The Unlocks screen will be where you choose:
    • Your ship and weapon (if appropriate)
    • Ship colors
    • Drone colors
    • Graph Paper color schemes
    • Possibly other things as they occur to me