Skip to the content.

RPG Ideation

Ideation and plans for our RPG game!

Image

The first class is GameControl. Within that, there are two attributes: gameLevels[], which contains options for which level of the game to play, and currentLevelIndex, which tracks the currently active level. There are three methods within that, start(), transitionToLevel(), which can help you switch levels, and gameLoop(), which makes the game’s main loop run.

After it goes through that class, it goes to GameLevel. This contains the objects in the level and the level’s environment. The methods it contains create the environment for the game, load the level, and also load its objects.

From there it goes to GameEnv and GameObject. GameEnv sets the background for the game, such as the size of the canvas. There are methods in there to size, resize, and clear the canvas.

GameObject references GameLevel and holds multiple instances of it. The method state{} manages the character’s current state in the game (what it’s doing). Hitbox{} tells how large the area is that other characters can interact with. The other methods draw the objects in the game, check for collisions, resize the object, update, and destroy the objects.

Background inherits methods from GameObject and contains the image and image source.

Character is the parent class of both NPC and Player and inherits from GameObject. It draws the character and places it in the right place, along with animating it and putting it in its direction.

NPC inherits from Character and has a method, bindInterectKeyListeners, that checks for interactions that are broadcasted and also handles key interactions

Player inherits from Player and uses bindMovementKeyListeners() to let the player move around and interact.

Image

This is our flowchart for our game level. We want to make a sort of space escape room game where the player (Adventurer) adventures through space while meeting other NPCs to get hints to move on to the next level.

Image Image