Beaster’s Dungeon Revisited: Part II

Continued from Part I...

With Eric gone, I eventually re-coded everything, but never could work out how to implement the trap mechanic, so I shelved it and there it sat…until now…

###

I was talking with a friend who was admiring some CGA-16 color palette pixel art, which lead me to showing him the artwork I’d done for Beaster’s Dungeon. He asked if I had any intention of picking the project back up, to which I replied that I might, albeit with a reduced scope. I explained the difficulties I encountered with the trap mechanic, specifically, getting the cursor to snap to a grid.

This lead to a discussion of where I got stuck, and in order to illustrate this, I fired up GMS and started creating a prototype to illustrate the problem. I reached out to my friend Jason (who did the programming for ‘Milk Smugglers’) for suggestions, and he linked a forum post containing the floor/ceiling functions.

In that post was another mysterious function called, move_snap. Here’s what I did for the prototype:

o_cursor Object

///step event

//set coordinates of the cursor to the mouse's x,y position:
x = mouse_x;
y = mouse_y;

//snap the object to nearest grid coordinate 
move_snap (16,16);

Why is this important? Because it allows for precise placement of objects in a map comprised of 16×16 pixel tiles (or any predefined ‘snap’). Around this, additional rules and checks could be incorporated to ensure traps could only be placed where they were meant to be!

At long last, I was finally able to implement the trap mechanic! The only thing left to complete the prototype was enemy path finding… This turned out to be far more complicated than any of the other mechanics combined.

Stay tuned for Part III!

I’m Still Here!

It’s the last day of 2018, and I thought I ought to do a quick retrospective to evaluate where I’ve been and where I’d like to go next year.

In late 2017, I’d decided to get back into game development. I’d returned to work and established myself in my new role. Once I’d caught my breath, I was hit with the itch to create again and took stock of my situation:

  1. There was just one of me, and that’s the way it would likely be (unless money was involved).
  2. If I had to go it alone, I was going to have to re-learn GML – I’d forgotten most of what I’d previously studied

I got back into the swing of things easily enough, but once again, game development took a backseat to other responsibilities.

Around June or so, I started on a spiritual successor to Porker – a Legend of Zelda-style action RPG. I’ve been working on it on and off as time permits, the majority of which has been spent building tiles and character animations.

In early August, I approached a friend and co-worker of mine to see if he had any interest in working together in game development. Being a professional developer, I figured he’d take to GML quickly seeing as how he already had a grandfathered copy of GMS.

We decided it was best to start with a simple game just to see how well we’d work together and aimed for a project that would take no more than 2 weeks.

We settled on a remake of Rhett Anderson’s Arcade Volleyball:

Arcade Volleyball for DOS gameplay animation

Weeks turned to months (about 4 so far) and what we ended up with was…well…very different :)…

It’s called Milk Smugglers – it’s about a pair of inter-dimensional travelers trying not to get caught with a contraband gallon of Grade A Goat’s Milk!

All of the assets are created – there’s a bit of programming that still needs to be done, but all of the game assets are finished (music, sound effects, artwork etc.).

So What Happened to Beaster?

The short answer is that my imagination exceeded my capabilities. I have a lot more growing to do before I’ll be able to tackle that project, and will return to it after completing Porker II and Milk Smugglers.

That said – I wish you all happy new year, and hope that 2019 brings with it some new releases!

Keeping the Lights On

A couple of weeks ago, I found a new job through a good friend of mine. It’s a technical role, pretty much what I was looking for…The pay could be better, but it’s good enough for now.

They have a lot of challenges, but none are particularly difficult to resolve. It’s just going to take time and money, and the business has to decide to move forward.

Needless to say, I’ve got about 2-3 months worth of 60+ hour weeks ahead of my friend and me to right the course. Once things are stable enough to be able to work only 40 hours a week, I can return to game development. Until then, I’ll just have to pick at it when time and energy permit…

Staying the Course[work]

In my last post, I began working my way through the free video lessons on www.gameprogrammingcourse.com and it’s associated YouTube channel.

It’s important to note that the YouTube channel is supplementary to the website, not the other way around; as such, if you arrive at the YouTube channel first (as I did) you might find yourself scratching your head when you get to the playlists, particularly where to start

If you’re looking for Level 01, that’s on his website here. There isn’t a video for this as you’re just downloading and installing GMS, the videos begin at Level 02.

###

It’s hard to believe that it’s only been 2 days since I started these courses, and I just finished Level 04, which wasn’t a lesson series, but rather a series of challenges designed to utilize all the skills I’d acquired in Levels 02 and 03.

Random Solutions

One of the problems we’d be wrestling with is game speed and it’s effect on action timing. Suppose you plant a brick wall in front a horde of advancing peasants.

Event > Collision > Obj_Peasant > Obj_BrickWall

//subtracts 1 hitpoint from the brick wall upon collision
with other {
hp=hp-1
}

Assuming you’ve given the Obj_BrickWall an instance variable called “hp” (i.e. hitpoints) and assigned a numeric value to it (e.g. 100), it would take one peasant about 3.2 seconds or so to break it down as he’s colliding with it 30 times a second, dealing 1 damage each time.

My solution to this was simple, but lacking – give the wall more hitpoints, say 1000 for instance. This isn’t a very elegant way to handle this, but it worked, and it took a peasant about 32 seconds or so to break down the wall, which is what I was looking for.

Then I completed Level 03, and in the process of doing so, learned about irandom_range (#,#). What this does is allow you to replace any integer with randomized range of numbers. For example, you could have the peasant do a savings throw (much like a tabletop RPG) to determine whether or not he landed a successful blow. That would look something like this:

//Utilizes a random number to determine whether or not a hit is scored,
//subtracts 1 hitpoint from the brick wall upon successful roll.


savingsthrow=irandom_range(0,100)

If savingsthrow=1 {
with other {

hp=hp-1
}
}

As such, the peasant has ~30 chances a second to hit the wall, dealing 1 point of damage on every successful hit. Towards the end of Level 03, and a few times in Level 04, this method was used as a makeshift timer of sorts to throttle the speed of an event by adjusting the range (i.e. bigger range = more time, smaller range = less time).

Looking ahead toward Level 05, I suspect that this will be replaced with a far more precise way of handling timing.

TANSTAFS: There Ain’t No Such Thing as a Free Salad!

Update – August 11, 2015: I received an email from GameSalad asking if I’d consider the Basic version for a $4 discount ($15/month). While I don’t take issue with  paying for a tool, I don’t think a subscription model is a good fit for the Basic version. I would rather pay a flat, one-time fee, and pay again for upgrades, if I wanted them.

I could even advocate paying a subscription for service (online publishing) and support, but if all I can do is publish to the GameSalad arcade, it’s just not worth it :(…

When I began using GameSalad, I had three major aversions to buying the ‘Pro’ version for Windows ($300/year):

  1. Stability
  2. Features (on the Windows version)
  3. Learning Curve

The Windows version was the bastard step-child of the Mac one, always several versions behind, plagued with bugs, lacking the same features as it’s Mac counterpart. While there is a robust community of developers, the vast majority are Mac users, and so due to the great disparity between the Mac and Windows versions of the application, many of the tutorials were using the Mac version, which simply wouldn’t work the same way (if at all) on the Windows one.

So what did GameSalad do?

Well, in my last post, Windows had finally caught up to the Mac edition with the implication that they’d stay synced. Even so, the Windows version was prone to crashes on startup, but a couple of updates later and that seems to have been tackled.

As to the learning curve, the new startup screen features a link to official tutorial videos!

Unfortunately, There Ain’t No Such Thing as a Free Salad…well, not anymore…

###

When I booted up GameSalad for the first time since patching, I was greeted with a 15 days remaining on my new ‘trial’ edition. No in-app explanation. Nothing in the ‘Help > About’. Zip. Zilch. Null…

Did I get a free trial of the ‘Pro’ version? What gives? Well, come to find out, their old CEO stepped down and the new one decided to start charging for the ‘Basic’ version ($19/mo).

So what did I do?

I uninstalled GameSalad. I know it’ll take me a hell of a lot longer than 15 days to learn how to use GameSalad. It’s initial appeal was that I could take my time and learn the tool at my own pace, and when I was ready, and had proven to myself that I was able to make (what I felt) was a product worth selling, I wouldn’t mind paying for the privilege of publishing it.

This is a good opportunity to change gears and maybe delve into Unity or Unreal…

GameSalad, Pyxels and New Beginnings

GameSalad Tosses It’s Salad

One of my biggest complaints about GameSalad in the past is that the Windows version seemed to be the bastard stepchild of MacOS one, and lacked much of the functionality, and the features it did share with it’s Mac counterpart sometimes behaved differently, making online guides hard to follow. Their latest update, announced a couple of weeks ago,  jumped from 10.5 to 13.14, which [I believe] finally brings the Windows version up to par with the MacOS one! This was exciting news for me, so I decided to download and install it over the weekend. As soon as i fired it up, a window popped up prompting me to login, followed immediately by a crash.

I couldn’t even log in because the application had already halted. Nothing in the event log to give me any clues as to what happened, no specific error message to chase down, it just had a heart attack and collapsed on my desktop… So, after uninstalling/reinstalling, and several reboots later, I decided to check the application to see if there was some kind of log, but alas, the only other thing of use in there was the updater, so I decided to give that a try.

Amazingly, after checking for updates and finding none (I was already on the latest release), it worked! Unfortunately, by then I’d lost interest in the messing with it and decided to move on to something else… Lessons learned? Break down and buy a used Mac? :|… nah. The only Apple devices (an iPad and AppleTV) I’ve ever owned were gifts, one of which I ended up giving away (the AppleTV), and other I use to play a time-killer games, watch videos and occasionally surf the web… Before I was ready to tackle GameSalad again, I decided to turn my attention to asset creation, which is something I needed practice with anyhow. So what’s next?

###

Pixel Art

There’s something beautiful about well-done pixel art that many people can’t appreciate. It’s more than just a retro look and feel, there’s a real elegance to cramming  lots of detail into a tiny 16×16 or 32×32 pixel space. Most people don’t realize just how small that is! But what I didn’t expect to find was that there were highly specialized tools for creating pixel art repeatable tiles you could use to create game assets. One such program I found while watching video tutorials was Pyxel Edit. It was a paid program, but $9 USD isn’t much to me, so I decided to fork over the cash (good deal for free lifetime updates). It seemed fairly easy to learn, and had a built-in animation tool.

There’s a learning curve, that’s sure, as the application itself doesn’t come with a lot of documentation. The help file is a list of keyboard shortcuts, and the buttons all have right-click tooltips, but that’s about it.  Nevertheless, there are great videos on YouTube (e.g. Achebit) which discuss a great many ideas such as color palettes, shading, design and so forth. As such, I figure it would be good practice to make a few tiles sets, experiment a little and see what I can come up with rather than trying painstakingly hand draw platforms. There are several advantages to this:

  1. Tiles can serve as [reusable] building blocks, which can be used to rapidly create levels
  2. I can create characters, enemies and objects using the same tool
  3. I can save time by adding variety via palette shifts and minor modification

Well, I’ve got some things to work on, but still need to go back to square one (no pun intended) and think about fun and simplicity…

The Skill Gap

I received a survey from GameSalad recently, which prompted me to give some thought to why I hadn’t touched it in a while, probably a month and a half or so. While it’s true that I’ve been busy with other things, I feel that I’d hit a roadblock. In my last GameSalad-related post, I discussed creating a simple turn-based strategy, so I started thinking about the mechanics of it, and what sequence of behaviors would need to occur to make that possible:

  1. Select the character you wish to move (on touch)
  2. Spawn ‘movement’ tiles which display where a character can move to
  3. Upon touching a movement tile, moving the character to that tile and destroying the other tiles

Sounds simple, right? Well, there are issues:

  • Controlling what happens when you click the character more than once (keep spawning movement tiles?)
  • What if you only want to be able to move each character once per ‘turn’?
  • How do you keep track of ‘turns’? Global attributes you toggle on and off?

As you can see, it can get very complicated very quickly, and without any kind of guidance or best practices (e.g. templates), I often find myself getting stuck.

Try something simpler? A platformer maybe?

Well even that gets quite tricky and requires a lot of advanced behavior manipulation. There are hours of video tutorials that cover this, but essentially what I’d end up with is a monkey copy of someone else’s platform game with my own front-end, and by then, I may as well just buy a template and reskin it. So I decided to set that all aside for a moment and focus on what I could do, asset creation (artwork, sound effects, music). As I pointed out a couple of months ago, aimless make-it-up-as-you-go-along level design isn’t going to get me a cohesive  world. Perspective is also an issue, being that I was designing top-down perspective maps using 2D image manipulation tools, faking it by skewing and distorting 2D rectangular ‘wall’ vectors and and manual shading to create the illusion of ‘depth’. This seemed like a sloppy way to go about it, and that there were already lots of 3D engines available which could do a much better job. So what is all this leading to?

Simply put: I’m not a triple threat. Many years ago, I became familiar with this term through drama classes I took, and for those unfamiliar, it means the ability to Act, Sing and Dance. An actor who could do all three of these things well was considered to be highly desirable,  and a threat to other actors competing for the same part. Game development can be illustrated in the same way, being comprised essentially of:

  • Programming (scripting, coding, regular expressions, the ‘mechanics’ of the game)
  • Design (2D/3D artwork, animation, texturing etc.)
  • Sound (music, sound effects)

These three components are integral, and in a well-made game, they all fit together. So which of these things can I do?

  • Design
  • Writing and Story
  • 2D Artwork (texturing in particular)
  • Sound effects
  • Music

What do I not do well (or at all)?

  • Any kind of programming/scripting
  • 3D artwork (save for basic level design, but experience limited to 3D Game Studio)
  • Animation

It’s clear that GameSalad won’t bridge that gap, nor would I expect it to. I’m just going to have to accept that I won’t be a one-man development studio, and recruit help.

Nothing is Trivial

When I take a walk through the internet, I never know where I’ll end up. What started as a search for book reviews of a particular novel I was reading ended with a memorial dedicated to the gone, but not forgotten Cronan Thompson. I’d never heard of him nor would I have been likely to, given that our interests didn’t align. To paraphrase Freddy Mercury,MiST was never my scene and I don’t like Star Trek.”

Despite having little in common, I couldn’t help but find myself chuckling over some of his writings. He was whimsical, even brilliant beyond his years. I began to envy those who had the opportunity to match wits with him, and pity those who couldn’t appreciate his sense of humor. The more I read, the more I began to feel a deep sense of regret. The same crushing twinge I recall feeling the first time I heard Ferris Bueller’s  casual observation, “Life moves pretty fast, if you don’t stop and look around once in a while, you could miss it!”

Well, I had missed it. I will only ever know this person vicariously through what remains of his writings and the second-hand experiences of others. All I have left is the heartbreaking realization that you can never go back – the world will never be what it was, then and there. For better or worse, all we have is now. If there’s one lesson Cronan has taught me, it would be this: Indulge your passions, no matter how trivial they may be to others – for nothing is trivial.

Side-Scrolling Nightmare!

So I decided to start work on assets for a somewhat realistic looking side-scroller. I’ve been chipping away at it for close to 5 days now. Here’s a peak:

woods_preview
This preview is only a small part zoomed out to 6.25% of the original size. The real image is about 20480 x 3072, or about 20×3 standard screens at 1024×768 resolution (iPad). I wanted there to be plenty of room to jump (or fall).

I’m not even halfway through one level. The problem isn’t the artwork – good art takes time, and what I have so far looks promising. The problem is spending almost a week building a level, by hand, without a design document or anything beyond a vague idea of where I want to go.

One suggestion many game designers have made was to make a game I’d enjoy playing. One game I recall playing with a friend on a snowy day, maybe 14 or 15 years ago was Gemfire. This was an old NES title, and a hell of a turn-based strategy game split between managing your lands and fighting on the battlefield. My friend and I would take turns as he was good at managing at the lands and I was his war chief. I came up with an unbeatable strategy that would allow us to take on enemies with superior firepower using hit and run tactics and taking advantage of the flank and rear attack mechanics (which did more damage).

Another great one, if only because it was so unique was Castilian (or Tower Toppler or Nebulus depending on which one you played). What made it so amazing was that it was the first game I’d ever played which gave you the illusion that you were move around a 3-dimensional object (the tower) as it the view rotated as you climbed. This was pretty amazing to see on the NES (the first system I recall playing it on, though I may have seen it in an arcade prior to that).

So back the drawing board. I’m going to need to work on putting some ideas down on paper and use that as a starting point.

Getting Closer!

I downloaded several of the GameSalad example projects to try to glean some insight into best practices, and how those could be applied to my project to resolve outstanding bugs. Here’s a recap of the issues I was struggling with, and how I resolved them.

The solution was simple enough; instead of trying to include the collision animation, the correct way to do it was to destroy the actor in play, then spawn a new actor whose behavior was to perform the destruction animation. Add a timer set to the duration of the animation, then add another destroy and….IT WORKS!

Here’s a sample of what I’ve got so far – keep in mind that this was just an exercise to learn what was possible and not a complete game, so don’t judge too harshly 🙂 :

Next steps?

1. I need to make the player take damage and capture this in a health bar
2. I need to tweak enemy behavior and physics (they should turn to face the player instead of moving in the same direction) and shouldn’t bounce off the walls wildly when they hit them.
3. Game over screen (only applicable once I have a working game)