Modules
The role of modules in CS146
Modules are “horizontal slices” of game code that are deemed reusable in different projects. A good module will have a use in games which are different than the game it was first created for and is likely more of a background utility versus a user-facing gameplay feature. In each week’s assignment, students are encouraged to determine if part of their game code may be a good module candidate. If students choose to create a module it may provide them with a head start on creating tools which can be used on their final project or any subsequent assignment.
Modules are meant as a way for teams to carry-forward useful work from students' prototypes into their final game. Additionally, a module may be eligible to earn a team bonus points on the assignment it was submitted for if the grader thinks that it would prove very useful for other student teams. The final game project must incorporate at least one module created for a previous project. This may be a module that the student themselves creates, or one from another student team.
Exporting modules
Modules are created by isolating the code responsible for your module and exporting it into a Unity package. This package can then be uploaded to our class's shared Google Drive for other students to download. It's also important to include a demonstration of how your module works within the contents of your Unity package.
Modules are “horizontal slices” of game code that are deemed reusable in different projects. A good module will have a use in games which are different than the game it was first created for and is likely more of a background utility versus a user-facing gameplay feature. In each week’s assignment, students are encouraged to determine if part of their game code may be a good module candidate. If students choose to create a module it may provide them with a head start on creating tools which can be used on their final project or any subsequent assignment.
Modules are meant as a way for teams to carry-forward useful work from students' prototypes into their final game. Additionally, a module may be eligible to earn a team bonus points on the assignment it was submitted for if the grader thinks that it would prove very useful for other student teams. The final game project must incorporate at least one module created for a previous project. This may be a module that the student themselves creates, or one from another student team.
Exporting modules
Modules are created by isolating the code responsible for your module and exporting it into a Unity package. This package can then be uploaded to our class's shared Google Drive for other students to download. It's also important to include a demonstration of how your module works within the contents of your Unity package.
Module suggestions
Identifying a feature within your codebase as a good module can be tricky. Often games have code written specifically for them however there is almost always one or more elements which may prove useful for other projects. If you're looking for ideas I would first suggest browsing the Unity Asset store. It is filled with modules that people have chosen to sell and share, if you make a module for this class you may even consider uploading there as well! Here are a number of examples or suggestions which may help you determine if a feature is a good module candidate.
GOOD EXAMPLES:
POOR EXAMPLES:
Identifying a feature within your codebase as a good module can be tricky. Often games have code written specifically for them however there is almost always one or more elements which may prove useful for other projects. If you're looking for ideas I would first suggest browsing the Unity Asset store. It is filled with modules that people have chosen to sell and share, if you make a module for this class you may even consider uploading there as well! Here are a number of examples or suggestions which may help you determine if a feature is a good module candidate.
GOOD EXAMPLES:
- A system for saving game data to file (eg. JSON, YAML, XML) on the device.
- A system for displaying a health bar at the top of the screen with a globally accessible controller. Provides listeners with damage info.
- A sound machine that globally receives sound requests and plays them through a common audio source. Handles cross-fading.
- A 3D terrain generator (like Minecraft).
- A simple 3D pathfinding system for enemy AI.
- A useful shader with various applications.
- A code based state machine that can be subscribed to.
POOR EXAMPLES:
- A mechanic that is too specific to the game for which it was created. Such as an specific attack (god of war axe throw).
- Style prohibitive assets such as a specific sprite sheet or sound effects file.
- Something that already is easily accessible. Unity provides a 2D pathfinding system and a animation controller, no need to have a new one unless yours is somehow unique.