How tkuim-111-is/mymujicamusicgame works
Project type and purpose
• This is a standalone Android mobile rhythm/music game written in Kotlin, built with Gradle.
• The user launches the app, selects a song, the game engine renders notes in sync with audio, judges input, and shows results.
File structure
• Top‐level “app” module: typical Android Studio layout.
• src/main/java/com/example/mygoxavemujica_music_game/ – Activities, renderers, game logic classes, adapters, database helpers, models.
• src/main/res/ – layouts, drawables, raw audio, values, XML rules.
• src/main/Assets/ – JSON files describing note patterns.
• Database folder: MyDatabaseHelper + musicjsonDB wrap SQLite for persisting song and score data.
• Adapter folder: songlistadapter for RecyclerView in song selection screen.
• No network or external services; all assets and data are local.
README
• The README only contains a link to a Canva presentation. No additional architectural notes.
Main components & their relationships
a. UI Layer (Presentation)
• Activities:
• MainActivity – hosts SongListView for song selection.
• FinalViewActivity – displays score, stats.
• Views / Adapters:
• SongListView + songlistadapter – shows available songs.
• NoteView – visual representation of an individual note.
• WhiteDividerItemDecoration – list separator.
b. Game Engine / Domain Layer
• GameFieldRenderer – draws the gameplay field and background.
• NoteRenderer – renders falling notes.
• NoteJudge – judges user taps vs. note timing.
• – data class representing timing, position, type.
• GameResult – aggregates scoring data.
c. Data Layer
• MyDatabaseHelper + musicjsonDB – SQLite access for song metadata & high scores.
• Assets JSON files – pre‐packaged note patterns per song.
• Raw audio files – .mp3 files for each track.
d. Android Framework & System Services
• Canvas / SurfaceView – low‐level drawing APIs used by renderers.
• MediaPlayer / AudioTrack – playback of raw audio.
• Lifecycle & Input Manager – touch events fed to NoteJudge.
Architectural patterns & design principles
• Layered architecture (Presentation → Domain → Data).
• Single‐Activity per screen pattern (Activities act as controllers).
• Separation of concerns: Renderers handle drawing, NoteJudge handles logic, Activities handle user navigation & wiring.
• Repository‐style data access (database helper + JSON parser).