itch.io is community of indie game creators and players

Devlogs

Devlog 5 - Game Loop

DON'T DO IT
A browser game made in HTML5

Hello everyone and welcome to this weeks devlog!

Today we have:

  • Gameplay (for real this time I swear)
  • A fully functional conversation system (I'm proud of this one :3)
  • An almost complete gameplay loop (this will be finished very soon though)
  • A timer
  • A few other small extras

--- GAMEPLAY ---

Woo! We finally got there! Today I can safely say that (after a super buggy first release) the game is properly playable. The player starts in a tutorial room where they are confronted by the mysterious scientist and Kyle the robot. The scientist asks the player to press the blue button before Kyle interjects and questions why they would follow commands of the people that evidently put them in this situation. The scientist introduces Kyle as a problematic AI and Kyle once again questions the players decision to follow the scientist. If the player sides with Kyle and presses the red button, they explode. Otherwise they are taken to a new experiment with a similar conversation that they need to piece together to find the true objective. This now fully works! 

The game manager setup I've been using as the backbone of my gameplay loop allows me to fully customise the list of random objectives the player can find themselves in along with the tile set and the new conversation manager to easily and efficiently create new levels for the player to experience. The game manager is also persistent to save information about the state of the game such as score and whether the player is dead or not which will make further development much faster. New objectives are randomly selected from the array of scene names which will determine the next scene to be loaded as well as how long the game will pause before swapping over.

--- NEW LEVELS ---

Since I've been focusing on creating... The actual game, players have only been able to play the basic (and annoying) test level I made but fear not, I have created  a few new levels to shake content up and test the new game manager scene swapping random selection system. I also went back and edited the annoying bits of the test level. More levels are coming now that they're 1000 times easier to make so stay tuned!

--- CONVERSATION SYSTEM ---

The conversation system is something I've been frequently working on to make sure it is functional before the final due date for this project but has now reached a state where I can say it is functional enough to use right now. Currently the manager can only handle a back and forth conversation between the two, where each takes their turn printing their dialogue before the next one takes a turn, but I think it looks pretty good and works a treat even if it might only turn out to be a placeholder. The scrolling text really adds to the readability of the text as a whole and looks like an actual dialogue system.

--- TIMER ---

And as you can probably see from the above image, I've gone ahead and implemented time pressure! This is a smaller change but now each level has a timer with its own duration that will eventually be affected by the current duration of the run (so it gets progressively faster but only by a fraction which is the 'TimeModifier' in the Game Manager above). The timer slowly ticks down (hopefully with a cool edge-of-screen effect as it gets closer to 0) and only stops if the objective is completed or it hits 0. Guess what happens when it hits 0? Yeah, you explode.

--- NEW OBJECTIVES ---

There are no new objectives so far but I am currently brain storming new objectives to implement and they shouldn't be too hard at this point but here are a few ideas:

  • Run: out run some approaching hazard (laser wall?)
  • Collect: collect a certain amount of or don't collect 1 of certain collectibles scattered around the area
  • Climb: platform your way to the top to reach a flag before time is up

--- SMALLER THINGS --- 

The player now stays the same customisation until you die! While swapping between different objectives, the player would randomise their appearance again which obviously looked weird but now the player object is persistent along with the game manager so 1. the game manager always has a reference to it and 2. to randomise appearance, all I have to do is destroy and recreate the player each new run (which hopefully shouldn't cause many errors or break the current system in place).

The button objective can now have 3 selections, a blue green and red button although not every one has to be used, I just keep them outside the arena. This allows for more variety when it comes to conversations at the beginning of levels.

A score counter has been added that displays the players current score! Rooms now give score upon completion.

Thinking of changing the buttons to giant coloured shapes so that:  

        A. both the shape and colour can be a factor to look out for when making a decision

        B. They are easier to see (buttons kind of blend in)

--- THINGS I WANT TO WORK ON ---

  • New levels now that I have an easy system to create them
  • Finish the game loop with a game over screen so players can restart
  • High score so that players can aim for the top spot
  • Polish the start screen so it doesn't look terrible
  • Background for levels (looks empty right now)
  • The explosion (not extravagant enough)
  • Settings menu? (would be last if ever implemented)


Thanks for reading and see you next week!

Files

  • DDI.zip 12 MB
    May 18, 2023