6. Fixing Physics

With One-Hole Golf successfully released to the adoring masses, I set about working on my next game which would feature more holes, more features, and more polish.

I started very quickly, copying over most of the important bits from the original game but changing some of the layout and making the color scheme something a bit more pleasant.

Most importantly, I also added the first brand new feature: an arrow that would expand and contract along with a mouse/finger pull to show shot strength. I figured this out on my own which I’m quite pleased with, and also added a touch to cap it out at a certain length (and putting a cap on max shot strength) so that you couldn’t just absolutely demolish the ball. I remain very happy that I figured this one out relatively quickly.

But I ran into a funny issue that resurfaced from when I was creating that first hole: sometimes, the ball behaved in a way that it wasn’t supposed to.

…and also…

I was stumped.

I tried searching the internet for it, and found a bit of information about how framerate can affect physics, but nothing led me to any valuable sources.

So, I posted about the issue on the Construct forums. You can also play the single-hole build containing the issue here.

Unfortunately, after a week I had nothing going for me, so I had to do my best to figure things out on my own. And, well, the results were mixed.

After a few hours of tinkering, I found that I could tweak the Ball physics in a few ways:

  • Decrease the density, friction, and angular dampening
  • Increase elasticity
  • Decrease impulse proportional to new density

What this accomplished was a snappier bounce off the putt, and fewer overall physics issues. I definitely didn’t entirely remove the problem, as it still happens at slight angles. But it’s a start.

I was really hoping I’d be able to end this blog post on a more positive note, that I had solved the problem. It feel a bit like two steps forward, one step back, but the rest of the project calls. So I’ll shelve this one for now and move on to fleshing out more of the game.

5. One Hole Golf (v1.0)

I’ve got to say, the tutorial really inspired me to get to work.

I had put it off for a week because I wanted enough time to really sit down and give myself some quality time to learn Construct, but now that I’ve done that I find myself coming back and putting in bits of time all over the place.

And, sure enough, I’ve no got a game out of it. My first game: One Hole Golf. You can play it now.

What I’m already finding is that building games in this visual editor is like solving a fun and immediately rewarding puzzle. For instance:

  • I put in the boundary sprites and the ball sprite, and turn physics on. I preview it, and the ball immediately drops. I forgot to set gravity to 0.
  • I set up the hole sprite and the ball passes right…under it. I forgot to set the appropriate Z value.
  • I add a title screen, but nothing works on it. I forgot to link it to the events sheet.

And a million more little indignities that I learned from. Still, there were plenty of things that I figured out quickly on my own:

  • Making the arrow appear and disappear along with the ball
  • Making a clean “HOLE!” result, both in terms of the text and the actual events
  • An overall solid aesthetic, completely made from scratch
  • If your mouse is over the RESET button, the golf ball won’t be hit
  • Making certain events happen only when the ball velocity is “0”

Certainly, there were some major hurdles. I had to watch a really lovely YouTube video series to figure out how to make the ball spin along with my mouse cursor. The expression angle(Ball.x,Ball.y,Mouse.X,Mouse.Y) is not one I would have come up with on my own; again, a strength of Construct to have so many tutorials out there.

Similarly, the physics are…still a bit wonky. I need to figure out the nuances of this program and retune some of the friction/elasticity and linear/angular damping numbers to clean it up. It took a lot of fiddling just to get where it is now.

All told, though, I’m really glad that I started with such a simple game. The Event Sheet in Construct has a mere 27 unique events, and there are only 15 total objects in the game. It still took me a good four hours to make it like I wanted, but I’m happy with the beginner result because I learned a lot about the language of Construct along the way.

But this is very much a starting point on which to build a larger, more functional golf game.

I think that I’m going to use what I learned here to really expand instead of just iterating on this one hole. So, here are some things I want to add or address in the next game – maybe you picked up on a few of these as you played through:

  • Fix ball physics
  • Fix the boundary sprites
  • Add power to shot and arrow
  • Add total score & applicable end screen
  • Add multiple holes
  • Have the ball skip over the hole if it’s going too fast
  • Make it “juicier”
  • Add in more obstacle types (e.g. sand or water)
  • Increase overall size
  • Add sound/music
  • Add a fun “hole in one” animation
  • Add full mobile support
  • Add HUD
  • Add customizable ball color?

4. Baby’s First Steps

As I mentioned in the last post, one of my favorite things about Construct 3 was the wide variety of tutorials available to total beginners, so I decided the best way to start was tackle one and see how it fit.

You can find it here: Beginner’s guide to Construct 3. I went for the shooter over the platformer for no significant reason.

Ghost Shooter tutorial from construct.net

The guide itself is really robust and easy to follow, as I had hoped. Kudos to the Construct team for laying this out so simply.

What I found quickly encouraged me: even this visual language was still a language to learn, and therefore essentially just a complex puzzle to solve. Within the first few pages I was trying to guess what the guide was going to have me do next. Sometimes it worked, sometimes it didn’t.

But what I already knew is that failure is a much better teacher than success, and so I happily failed over and over and then went back to the guide to see what I needed to do differently.

One of the parts of this whole exercise that I’m most looking forward to is rewiring my brain.

It actually reminds me a lot of the hit game Baba is You.

Baba is You Switch review - "Puzzling perfection in every way" | Articles |  Pocket Gamer
Baba Is You from pocketgamer.com

The real joy of that game is in learning the complex and often unintuitive language that the game creates, and I felt very similarly about learning this visual style of programming. I had to come up to a wall, figure out how to identify it as a wall, then figure out how to climb over. But maybe another solution is simply to go around it – and how can I test that out?

There’s an iterative cycle that is immensely rewarding with immediate feedback, though, that learning actual languages can’t replicate.

So about an hour after starting, I finished the tutorial game and my head was already spinning.

Check back next time to see my first actual attempt at a game. Let’s go!

3. How Will I Make the Game?

Now that I know I want to create a series of iterative mini-golf games, I’ve got figure out how to go about doing that.

Let’s start with the basic considerations I’m bringing with me:

  1. I don’t code

I mean, I kind of do. To the extent that I learned HTML back in the day on Angelfire (and Expages…did anyone else use Expages? I need a good <marquee> now.) and know enough of that and CSS to make a reasonably functional website today. But none of that really helps me with game development

2. I want to spend as little money as possible, but don’t mind spending some

This is just a hobby after all. Times are tough.

3. I would like the end product to be HTML5 friendly

Because that’s the kind of game I’m looking to make – not a facsimile of a AAA title.

4. My goal is to learn, not to create a wildly popular gmae

I’m only planning on creating small games, nothing bigger than what you might find on Newgrounds or Kongregate. So I can already rule out some of the big 3D engines like Unity or Unreal.

So, knowing these four things I started to do my homework. Fortunately, I was pointed to the really awesome website Sorting Hat by Zoe Quinn which gives you resources that you need by asking you some questions about your game.\

Screenshot from construct.net

I choose the first option, “Something 2D” and was pointed to a program that looked promising: Construct 2 (now 3). After some research, here are the Pros and Cons that made it look like a winner for me:

  • Visual editor, no coding experience required
  • Free version
  • Export to HTML5
  • Popular (as per itch.io’s “Most Used Engines” page)
  • Lots of documentation and support
  • Great for 2D

It comes with a $99/year price tag for the full individual package and the free version is quite limited, but it seems like a great starting point.

Because on the flip side, I was pointed by a number of other websites to Godot, a free and open source gaming engine. The Godot subreddit is pretty active (compared especially to Construct’s extremely minimal presence there) with lots of community documentation and ideas.

But the primary issue here seems to be a need for coding knowledge and a steep learning curve, as one reddit commenter put it:

Honestly, Godot has a bit of a learning curve.

I’ve worked with a lot of engines, and it’s taken me a while to get proficient with it. The documentation is bare bones, and there aren’t a ton of tutorials compared to Unity.

That being said, guys like GDQuest and GamesFromScratch are making more and more Godot tutorials now which is great. Also in 3.0, the documentation is significantly improved.

So if it is your first engine ever and you are an absolute beginner and feeling overwhelmed, you may want to start with Construct 2 (or now Construct 3), or GameMaker, or something like that, and then return to Godot later.

And I think this is some really great advice. So here’s the plan now:

I’m going to start learning game development with Construct to take advantage of my lack of coding skills and preferred game type. I can start free, and pay up if I need to – it’s just within my price range for fun and hobby stuff.

If this project is successful and I find that I am maxing out what Construct can do, then I will have the option to invest a bit more in knowledge and learn C++ and the Godot system.

So let’s get started! Up next, we’ll tackle one of Construct’s tutorials.

2. What Kind of Game Should I Make?

There’s a lot of really solid advice out there about making your first game, and I think you can sort of distill that absolute basic advice into a small flowchart:

  1. Think about what kind of games you like
  2. Shave that idea down to the complexity of pong
  3. Do it again because you’re still probably being too ambitious

So we start with the first point – what kind of games do I like?

Right off the bat, the answer is MMOs – I am a fiend for them and always have been. Star Wars: Galaxies, WoW, Guild Wars 2 were all past obsessions and my current one is Final Fantasy XIV.

But MMOs are way too complex to even think about, so scratch that.

What about RPGS, then? I love the Final Fantasy series, and my favorite classics are all 2D and on the shorter side.

Still, any decent RPG is going to full of mechanics, writing, and graphics – too ambitious for just starting out.

And so after wracking my brain, I’m left with one thing:

Golf Story Is Just Adorable
Golf Story, from kotaku.com

For whatever reason, despite my complete inability to play the sport in real life, I’ve always loved golf games. Golf Story was one of my sleeper favorites recently, and Everybody’s Golf is one of my go-to downtime games. I still play Mario Golf on the N64 when I see my college buddies, too.

And I think we can scale this back one step as well: for a truly simple beginner game, let’s make a 2D single-hole mini-golf game. We keep it on a single plane and can use minimal graphics.

I also like this idea because I can see a clear chain of growth in terms of complexity over the course of three separate but related games:

  1. Single-hole mini-golf
  2. 18 hole mini-golf
  3. Added mechanic to create unique game

This is where I’m going to start. So how hard can it be?

1. Why Am I Doing This?

To start, I think, I want to address the “why”. Why am I doing this?

The answer goes back a number of years, when I was in my final stretch of college. I decided that for an entire year, I’d watch a documentary every single Sunday, invite friends to join me, write down my thoughts, and reflect after it was all done. I did it, and I’m super glad that I did.

Photo by Pixabay on Pexels.com

Since then, I’ve made a habit that I’m proud of – each year, I do my level best to come up with a new year’s resolution where I learn or do something. Sometimes it works (in 2015, I wrote a sci-fi story of 100 words or more every single day and posted them on tumblr) and sometimes it doesn’t (this year I was supposed to learn how to make a bunch of different types of bread).

A few years ago I also decided to write a novel, partially because I wanted to get a better sense of what it looks and feels like to write a book so that – hopefully – I would better appreciate and understand what I read thereafter. I’m happy to report that as a success.

And so here we are, in 2020 – I’ve been playing a lot of video games in my tiny Brooklyn apartment, cooped up during a global pandemic. And I’ve gotten not just more curious about what goes into making games, but also fascinated by the skill set it takes to be a solo game dev. You need:

  • Artistic skills (graphics)
  • Artistic skills (music)
  • Writing skills
  • Coding skills
  • Organizational skills

That, to me, sounds like a lovely challenge. Writing and organization I’m somewhat familiar with, but the rest are almost entirely foreign.

So the core answer to “why” is this: I want to challenge myself and build a new, broader skillset, as well as develop a better appreciation for the games I play.

Now we just have to see how long it takes me to get there.