-
Notifications
You must be signed in to change notification settings - Fork 7
Tractor
Allows user to efficiently harvest crops, hoe the ground and traverse the map. All designs were made by Team 1 and DJ Khaled. Below are the base sprites used when not moving. The other animations will be shown when they trigger, i.e. movement based animations will be in the keybinds.
- W - Traverse up (North)
- A - Traverse left (West)
- S - Traverse down (South)
- D - Traverse right (East)
- F - To get in / out of the tractor (To enter the tractor you need to be within 5 units of the tractor
- Spacebar - to honk
- T - Turns on the headlights on the tractor
- 1 - Normal mode (Does not interact with any tools)
- 2 - Harvesting mode (Harvest crops in a 2x1 area)
- 3 - Tilling mode (Tills the ground in a 2x1 area)
The programming decisions made in implementing the tractor entity reflect an organised and thoughtful approach. By adhering to the ECS model, the codebase gains modularity and maintainability. The tractor is an entity composed of various distinct components. This separation facilitates easier debugging and expansion of functionalities. The code base for tractor can be found in the tractorFactory.java. It also follows the same basic framework / layout of files and functions as the player does, consisting of a KeyboardInputComponent, Action based component and AnimationsControllerComponent to name some of the similarities between the entities. This allows anyone who is familiar with the base player and how that entity functions to quickly understand and begin to add to the tractor.
By integrating the tractor animations and appearance within the guidelines, the design maintains its integrity while ensuring a visually appealing experience. Additionally, the player-tractor interaction mechanisms, such as the ability to enter and control the tractor, align with intuitive gameplay and furthers the immersion of the user.