Progress Update 8-June-19

These last couple days I’ve started work on the star map. The idea is that a random number of stars, their planets, and the planets moons are generated. The numbers of star systems is somewhere between 15 and 20, maybe more or less, I’ll tweak it later. These are then arranged into “steps” according to how many minimum jumps I want the player to take to get from the current system to the destination system.

So if there were 15 stars generated, and I wanted 5 steps, the process would go as follows:

  1. Take the first star and put it on it’s own “step”, it’s the start
  2. Take the last star, and put it on it’s own “step”, it’s the destination the player is trying to reach
  3. Divide the remainder, in this case 13, by the number of steps I want, 3 stars per step.
  4. These means the second “step”, after the first, has 3 stars. So initially the player has three choices to move to
  5. The next step has 3, then another 3, then another 3
  6. The final step before the end step has 1 star, so the player must pass through it
  7. Then the stars are randomly “connected” so that the player can always reach every star from the step above, but every star may not lead to the next step, so you have to move horizontally to a neighbouring star.

In-game the reasoning is that the computer has calculated what it thinks are the most likely jumps to get home after the player has been blasted off into space. Then the player can make their moves to get home, each time coming across random events. Each system may give the player something beneficial, or something bad.

It may not look like much, but here’s the work in progress:

I’m really very happy with the pixel-perfect lines and circles.

The names of the stars is randomly generated. I based the name list off how I understand stars are named. Firstly, they can be named after a constellation or a catalog designator, these are just stored in a big list. I put the list together from wikipedia. Then it’s just a dash and a randomly generated number. I like the results, it seems really spacey.

Progress Update – 2018-10-22

Lately I’ve been working on the events for the demo-build. Not much to say about it really. I’ve written I think maybe 2/3 of the events themselves, but will still need to create a bit of artwork to go with it. In addition there’s some additional audio to create, and I think I need to revisit some past audio as well.

Finally, I think there’s some new graphical effects that I can easily do for the demo-build that will go really well in one of the events.

I’m pretty proud of the story progress. There’s not really a lot in the demo-build, but what’s there I think shows off what the full game can do well. The events are interconnected to a degree and some can’t happen unless others happen first.

I’ve yet to come up with an event that can occur multiple times, but I think that’s where the eventual battle events will come in. I’m alluding to how this would work in the game world in one of the events for the demo-build.

Here’s a screenshot of all the story so far in the Space Adventure Writer app.


Progress Update

I’ve now implemented the sound a lot better, events can play sound effects. There’s also a couple of different background music tracks depending on the status of the ship.

I’ve added a main menu and title screen.

Here’s a gif of a problem I’ve come across. In between events, there’s no transition, it’s just “BAM” you’re in the next one. Without having a map or anything for you to decide where to go, there’s no natural break that I can put in. I’ll need to think about this some.

When the player clicked on “End” above, a new Event started immediately.

Meanwhile, here’s a video showing off sound and music and menus etc.

Sound + Progress

I’ve made a lot of progress these past few days. I’ve added sound effects and music. I’ve also created a more interesting event for testing purposes, with it’s own sound effects:

Next I need to:

  • Add a main menu
  • Add a menu to see the crew details
  • Add saving and loading of games
  • Create more events
  • Get some interesting graphics on the screen

Blinking lights!

These last couple of days I’ve spent positioning and timing the blurts a little better, there’s still some work that needs to be done though. I’ve completed all of the dynamic text except for the officer names, which I’ll do once they have names, for now they don’t even exist.

I’ve added the blinking lights that change based on the alert state of the ship as well. These makes things look a lot more interesting and dynamic.

There’s still a lot to do. Next up:

  1. Add some graphics to the main viewer
  2. Position the blurts when there are multiple at once
  3. Add the officers names to the blurts
  4. Add a button that will show a “chat history” with all the previous blurts and probably previous in-game text
  5. Add some music
  6. Add some sounds effects, like a klaxon for the red alert state and a sonar ping for the green state

Nearly playable

I’ve got an extremely short episode written that contains what I think is most of the elements to the game. Right now I’ve got a sort of playable thing happening except for variable text. There are variable options and blurts said by your bridge crew as well as random ones, but the text displayed to the player isn’t variable yet.

A gif to demonstrate.

Authoring tool 90% complete and GUI animation

This past week I’ve worked some more on the authoring tool. I think it’s now in a state where it’s fairly usable. It probably needs a lot of work if it was ever to be a product, but right now I’m just considering it like a modding tool. The modding tools I’m used to were all buggy (like the Battlefield 2 map editor), so I don’t see it as a big deal for now.

I’ve also implemented an Animation system in the UI.

Authoring Tool

I worked some more on the Authoring Tool. Hopefully the interface is easy to use and doesn’t get in the way too much. Once I really start using it, I might find some annoyances in it that I’ll want to fix.

The interface for creating Episodes and Events

Space Adventure

Now that I finished Pong, over a year ago, it’s time to work on the next project. Space Adventure.

I’m calling it Space Adventure because I’ve not worked out a better name for it yet. Maybe I’ll call it “The Last Boundary: A Space Adventure” or something like that.

It is a game idea that I had while watching Star Trek: The Next Generation. Wouldn’t it be cool to play a game that’s like Star Trek? I’m not the only person who’s ever thought this because there’s a heap of Star Trek games. I’ve played a bunch. But it was never really like Star Trek, you know? It was always you conducting missions and getting into space battles, or it was leading an away team or something.

There was never a game where you played as the Captain, or the bridge crew, and you found a strange new phenomena and it turned out to be a relic from an ancient civilisation and it spawned a computer virus that infected the ship and you have to use diplomacy on a derelict AI satellite to convince it to disable the virus and return control of the ship back to you.

That’s what my game is about.

Continue reading “Space Adventure”

Architectural Problems so Pong

I’ve found that I’ve programmed myself into a bit of a corner.

The issue is that my game engine, despite my best efforts, is architecturally bad. I think this is probably a regular occurrence for a first-time effort of a project this large. This poor design came about despite having read Design PatternsGame Engine Architecture and Game Programming Patterns.

I think this was inevitable. Reading books such as the above, and I highly recommend them all, isn’t the same as applying the patterns in practice. There are many patterns throughout the code, don’t get me wrong, but I think the logical separation of state isn’t as logical as it should be.

So; having stepped back from the code and given it a very thorough critical review… it needs to be re-coded in large portions.

It’s not only the architecture that’s a problem, I think my build chain is poorly designed. Having known no better, I started as one large project; whereas each component likely could’ve been it’s own project, each outputting .dll files.

Further to this; I’ve just been programming and testing as I went along. Unit Testing, something I’ve never done before, is probably something I should look into. It makes complete sense, by enforcing unit tests on myself, I’d naturally enforce the decoupling of systems. I’m concerned about the amount of time and effort that needs to go into test driven development, but having never undertaken it, I’ll look into it.

Another problem I’ve found is that I didn’t architect the engine for networking. Something that I’ve learned the hard way, needs to be designed into the code up-front.

So; in order to begin applying patterns, networking, and possibly unit testing into my code; I’ve decided to make a 2D network-multiplayer Pong clone. Should be simply enough to code the actual game; but where it should get interesting is in applying network into the core of the engine.

I’ve designed it already.

Pong Architecture

Pong is probably too simple to really apply Design Patterns; however there’s the few usual patterns that you’d expect in a game, really just Update and a Game Loop. However, what I’ve done here is focused on the separation of game data from the rendering and looked heavily into Networking.

For the rendering, I’ve decided to use SFML rather than my own engine code. SFML is great, it’s quick and easy and does 2D brilliantly. The reason I’m making Pong isn’t for the graphics, so I had no desire to go that deep.

SFML also has a great networking abstraction layer which I’m using for Pong. I’m not too worried about ensuring packets are delivered correctly, so abstracting that out works well for me.

I’ll probably go back and replace SFML with my own code later.

I’ve read over the Multiplayer-Neworking information on the Valve Developer Wiki a few times to learn about how to implement my Pong game. The reason I’m looking so much into Valves information is that their networking is for fast-paced action games. My Pong game is going to use the mouse to control the paddles, therefore it is fast-paced.

This has led me to determine that a Server-Client model won’t work for Pong. I really wanted it to, as that’s the sort of common way big games do it; but I can’t see how that would work for me. One player, the Listen-Server player, would always have an advantage. In a one-on-one game, I don’t think that’s fair, sure it works for 16v16 or something, but not 1v1.

So instead, my Pong game will be a bit… funny. Whoever is currently in “possession” of the ball will be the “server”, and whoever is waiting on the ball will be the “client”. So, as soon as I hit the ball and return it, my opponent will now be deciding the game state.

This allows each player to locally control the very time sensitive hit-detection etc. For a real game, it would be disastrous. Cheating would be rampant. But no one is going to cheat at my Pong game, I’m sure.