Emilie Vlková

Indie GameDev

A quick look on how the menu looks for now.

So far it only has a "Play" button, "Inputs" button that shows which input does what (will get extended and a Player will be able to customize them however they like it to be) and a "Quit" button for leaving the game. Such as "Options" and other features will be added eventually.

SourceTree program for committing and pushing my work.

I personally find SourceTree better for committing my progress than a regular GitHub. Detailed descriptions of what the commit is all about and trying to have it organized.

Player Script.

Small look on how the Player script that is attached to the Player works, we define all the States that the Player has. 

Player State Machine.

A Player State Machine script has a job of changing the states whenever the condition is met. For example, if we are touching ground and not moving the conditions are met for an "Idle State" so we switch to idle state and play idle animation. This works for every state.

Player State.

Is a script that all the States are inheriting from. Such as Enter function, whenever we enter specific state this function is executed, Exit function, whenever we exit a specific function, LogicUpdate function is being called every Update, PhysicsUpdate is called every FixedUpdate and lastly "DoChecks" function is being called in a LogicUpdate function and in an Enter function. Player State has triggers such as "AnimationFinishTrigger" etc. for executing specific events that are needed to be executed in a specific animation.

Entity State.

Is exactly the same as Player State explained above, the logic for entities and a player is the same.

Core system.

Is a script that is attached to a Player or any Entity as a child object. Core itself is a parent for all the core components that the Player or an Entity is using. It's checking whether the Entity and Player want to use some of the core components, if such component is not attached to such GameObject it will give us an Error that such GameObject is trying to access that core component that is not on the GameObject. We can use any core components but it is not required by the Core to use all the components. For example, Player and Entities might share Movement component, Collision component or a Stats component, but Entities might have a component that specifically needed only for Entities and not a Player so Player does not need to have that component attached to them. It's a nice way of re-using the scripts as much as possible without writing the same code for all the Entities.

Movement Core component.

Just a showcase on how one Core component might look. For this example, it's a Movement Core component. The logic behind this is that it has all functions for setting velocity depending on which state the Entity or a Player is in. For example, for just a moving on X axis we need to only call SetVelocityX, for jumping we only need to call SetVelocityY, and all Entities have their own data for walking speed etc.

Weapon.

Is a script that has it's own logic. As shown in the picture, on the left side we have all the weapon components that are being taken automatically depending on what weapon is being used. We declare the components in a specific weapon data that we can create. A showcase is being shown in a pictures below. It has it's own Animator and different sprites. The way how that works is. By using a Base GameObject, there we declare the base animations of a player and the sprites for a weapon are just being show depending on what frame the animation is in, in a different game object called "Weapon sprites". This means that we can changed the weapons and the weapon will grab the needed animation controller and will automatically change to needed sprites upon using the weapon. This is still work in progress as i do not have more animations done for different weapons. I plan on adding a bow, magic and a shield for now.

Weapon part 2.

The same script as in a picture above just the second half as it did not fit in a single picture.

Weapon's data logic.

Here we can see how it all works when we are creating the weapon data for specific weapon. We can add any weapon component that the weapon will need and give it values. Upon using this data on a weapon it will take all the component scripts that we added to the weapon data automatically. Generating weapon is still a work in progress if we will want to switch weapon in run time and will expand on this as more weapons will be added in the future.