August 2015

S M T W T F S
      1
2345678
9101112131415
16171819202122
23242526272829
3031     

Style Credit

Expand Cut Tags

No cut tags
Sunday, August 23rd, 2015 05:45 pm
[livejournal.com profile] davidn recently re-released his game Crystal Towers 2 on Steam, but as the game had been quite a few years in the making before release initially, and then a few more years before it was Greenlit on Steam, he decided to go through the game and give it an overhaul, making it Crystal Towers 2 XL, including improvements to the controls, graphics, and even the UI. (Pretty much, he wanted to add widescreen support and then he realized that the graphics needed to be updated because of the increased viewing window, and while he's at it, might as well use a new font, and etc, etc, etc...)

I had played the game a few years back, enjoying it massively, but now that I've been thinking a lot recently about game design and working in Game Maker, I have been thinking a little more critically about how games are made and I ended up making a little analysis of the first few stages, primarily in how each Challenge is designed and what needed to be set up in preparation for the level.

I know that David had, at one point, used a spreadsheet to ensure that the game was solvable, as he had added so many different items and pickups during the creation process that it must have been very difficult to keep track in his head, and I'm seeing that having a design document is critical to knowing when to stop adding new features ;) The amount of different ideas in this game are staggering, ranging from simple spell collection, to a combo system for bouncing off of enemies, to gathering materials for synthesis, to collecting enough gems to unlock new stages. (David, when you first thought of this game, how many stages were planned and how many ideas ended up being inserted later?)

When comparing his game to my own experiences, Game Maker has a drag-and-drop system to help make game creation easier, but it also has a detailed coding system underneath the drag-and-drop environment, In playing through some levels, I found myself looking at it from the view of a programmer and wondered how I would create it in Game Maker, as Crystal Towers 2 was created in a different app, Multimedia Fusion, which probably has similar coding techniques. David suggested that I write some out so we could compare how it was actually handled/created.

For those who don't know the game, it plays like a mixture of Sonic (brightly-coloured environments with the ability to move really fast throughout the Stages) and Mario64 (multiple Challenges in each Stage that further unlock other Stages), with a Metroid mix as well (gathering items to help get to other areas). For example, the first Stage is Walnut Creek A, which has 8 different Challenges. Here is a sampling of the challenges that comes to mind:

- Get the Crystal Orb: This is a simple "get from Point A to Point B" which introduces you to each stage before the other Challenges are presented. From a programmer's viewpoint, I can envision the entire stage is loaded and running (and that includes the enemies and their movement patterns), but only the view/camera surrounding your character is visible.
- Get a combo worth x amount of points or more: A simple "If [combo integer variable]>=x then [Win Condition]", but the combo program itself is complex, registering when you bounce off one enemy onto another without touching the ground. Thinking about this, I know that some enemies can't be jumped on and others can (this would typically be made with Parent enemies) but I get this feeling every type of enemy is programmed separately, and there may be some sharing of code depending on its behaviours (Tower Crawlers and Ladyblargs, for example, have a unique attack when you approach them).
- Grab x shards in 30 seconds: Keeping track of the amount of shards picked up in the stage with a countdown timer. This leads me to believe a number of variables are turned on/off in each Stage to define each Challenge - in this one, the Timer is enabled along with a Shard Counter as the Win Condition.
- Don't touch the bees!: I've noticed that the stage has little flies buzzing about (he has many graphical touches, such as destroying dandelion heads as you walk by them), but now the bugs are a little bigger, bee-shaped, and move haphazardly (but keep themselves restrained to a certain area). This would theoretically be "replace [this asset: tiny flies, no damage to your character] with [this asset: buzzing bees, which instantly kill your character]"
- Find the Rainbow Gem: This one simply has a Gem hidden somewhere in the level (not at the normal End point) and you have to locate it. See my thoughts on "Point A, B, and C" below. This also displayed a note at the start of the stage for the player that mentions you might not be able to find it until you find a new spell in another stage. Once you realize this once, you don't have to be reminded ever again - a nice touch. :)
- Don't kill any enemies: You just can't kill anything. This one doesn't kill you outright if you fail, but it does result in an "X" shown above the character's head, and the Gem is faded-out, so you can continue to go about the stage if you're so inclined and try to map out a successful path for the next try. For this one, I assume the condition is "If [Enemies Destroyed]>0, then [Lose Condition]".
- Don't collect any shards: This one is even more difficult than not killing enemies (just tell a person who's collected everything in every videogame NOT to collect the basic collectibles), but from a programming standpoint, it's almost identical - just substitute [enemies Destroyed] with [Shards Collected].
- Your pocket has a hole and you lose gems constantly - don't let it drop to zero!: After the first few seconds to let the player collect a few Shards reduce [Shard Count] by 1 every second. The little visual of a gem falling out of his pocket with every warning "beep" is a nice touch/reminder.
- Destroy all Thunderflies: From Game Maker's standpoint, all the instances of the same enemy are easily tracked, so it has a simple "check if [all] instances of [this particular enemy] are [destroyed]. If they are, [Win Condition]." Your character also has a compass pointing you towards the closest Thunderfly - this can be done by calculating "Find the nearest instance of Thunderfly, calculate angle from Player to the Thunderfly, then draw an arrow a short distance away from the player, directing them towards the Thunderfly". (This compass is also used in the Music Castle hub to point towards open Stages, very useful.)
- Get to the beginning of the level: This one starts you at Point B and you have to get to Point A, but from a programming standpoint I have to wonder if the programming is any different than simply writing "Point B is the Start, and Point A is the End". As the stage is exactly the same otherwise, this means that the Start and End Points are variable and cannot be a constant point in the Stage. I realize that this could be programmed in two ways: Every challenge in a stage has a defined Start and End point and this one simply has them redefined, or alternately, there is a Point A, B, and C (i.e. the Rainbow Gem) preset in the Stage and every Stage assigns Start to Point A and End to Point B (or Point C if the Rainbow Gem challenge is running).
- Collect all the shards on the way down: This one was a hell of a challenge, just saying. I'm assuming this set of shards that were collected are simply counted as a set, and once the player touches the ground, it reports the amount of shards missed. But that means that these shards are counted both as regular shards in all the other Challenges, but as a special set in this particular Challenge, so I would hazard a guess that these shards were initially labelled as all the other shards, but then had a second reference programmed in for this particular Challenge.
- Don't touch the ground for more than 12 seconds: Whaaat, you have a way to detect if the character is touching the ground? I'm gonna have to learn how that one works in Game Maker. It must be collision detection with the ground, but managing to keep a timer running for that one is tricky (though now that I think about it, every step/frame is 1/30 of a second, so the timer might just be relying on counting frames...)

As an aside, I noticed that the enemies all follow specific instructions, but I also noticed that each enemy's placement requires different movement ranges depending on where it's placed in the stage (i.e. some enemies have a short path to follow where others have a longer path), so I have to wonder if the enemies have knowledge of the ledges and work automatically upon placement, or if they are all hand-tailored for each instance.

So after this analysis, I have a feeling that most of Crystal Towers 2 is not generated through AI scripting or tricks, but rather, hand-coded using good old-fashioned paper for notetaking, every enemy meticulously placed with their specific instructions, and essentially is a labour of love. How close was I, David? ;)

When you look at it from not the viewer of a gamer, but the view of a programmer, you have to appreciate it even more. :)

While I'm on the subject of newly released programs, [livejournal.com profile] ravenworks also recently released his first app, Squishtoon! I've had a chance to see it in action and it's extremely powerful yet easy to work with!

Reply

From:
Anonymous( )Anonymous This account has disabled anonymous posting.
OpenID( )OpenID You can comment on this post while signed in with an account from many other sites, once you have confirmed your email address. Sign in using OpenID.
User
Account name:
Password:
If you don't have an account you can create one now.
Subject:
HTML doesn't work in the subject.

Message:

 
Notice: This account is set to log the IP addresses of everyone who comments.
Links will be displayed as unclickable URLs to help prevent spam.