SuprSeed is a light weight 2D Android game development framework. SuprSeed offers flexibility and modularity, allowing it to become the foundation for mobile games, custom game engines, as well as UI driven applications.
The frameworks architecture is built following SOLID principles and Design Patterns. As a result, any component of the Core
package can be swapped out to a custom implementation using the EngineConfigurator
(which handles the engines dependency injection). The framework also comes with a library Lib
package that offers default classes to help provide a starting point for creating games. This allows the framework to be used 'as is' or to be customized as needed.
For creating games, the engine uses scenes which can contain sub-scenes or sprites. Each sprite can then be configured using components and shared data. This creates a separation of concerns which reduces code complexity, and increases code reusability.
Some of the engines Core
features are:
- Hardware accelerated drawing of bitmaps
- Bitmap resolution scaling across different screen sizes
- Coordinate scaling
- Logic tick rate / Screen refresh rate scaling
- Input handler
The engines Lib
features are:
- Sound effect player
- Image loader
- Collision handling
- Font wrapper
Current Status:
- first public release is available, more changes are being worked on
Expected major changes coming in version v1.0.0
- package clean up
- image/animation api cleanup
- fix inconsistent exception handling
- rename classes/interfaces to use proper naming conventions
- improve the EngineConfigurator
- other stuff
Future
- various improvements (refresh rate handling, fps counter, effects emitter, etc.)
- better docs (javadocs, wiki, guidelines, architecture etc.)
Initializing the project
- Import the SuprSeed dependency via gradle
- follow the steps at https://jitpack.io/#red-dragon65/SuprSeed
- or, use the steps down below if you are using kotlin
- Create a new "Empty views activity" project in Android Studio.
- Remove the
<Textview ... />
from theactivity_main.xml
layout - Remove the
onCreate()
function from theMainActivity
class - Update the
MainActivity
class to extend theEngineActivity
- implement the methods as needed
- Add the
assets
folder- Right click the
app
folder ->New
->Folder
->Assets Folder
- Right click the
- The project is now ready to use the framework
- use the repo's demo as a guide better docs will be available someday
Dependency install for gradle + kotlin (.gradle.kts) files
- Add
maven { url = uri("https://jitpack.io") }
to yoursettings.gradle.kts
file
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
// Include this repo
maven { url = uri("https://jitpack.io") }
}
}
- Add
implementation("com.github.red-dragon65:SuprSeed:v0.1.0")
to yourbuild.gradle.kts
file
(note: this is the Module:app level one)
dependencies {
implementation(libs.androidx.core.ktx)
...
androidTestImplementation(libs.androidx.espresso.core)
// Add this dependency
implementation("com.github.red-dragon65:SuprSeed:v0.1.0")
}
All assets used in the game demo came from Itch.io
Background
- Name: Grassy Mountains Parrallax Background
- Author: Vnitti
- Usage: Grassy Mountains (preview-fullcolor)
Hero
- Name: Pixel Adventure
- Author: Pixel Frog
- Usage: Ninja frog
Enemies
- Name: Pixel Adventure 2
- Author: Pixel Frog
- Usage: Bat, bee, bird, duck, ghost
Font
- Name: Peaberry Pixel Font
- Author: Emily Huo
- Usage: peaberry_base.tff
Sounds
- Name: 300+ Futuristic SFX
- Author: GameSupplyGuy
- Usage: Get Extra Energy Level, Mini Hit
Music
- Name: Royalty Free Sounds
- Author: Tim Beek
- Usage: 8Bit DNA Loop
Assets are stored under the default project folders:
- Images:
app/src/main/assets/Images
- Font:
app/src/main/res/font
- Sound:
app/src/main/res/raw