Compare commits
16 Commits
01da51665e
...
witch-quee
| Author | SHA256 | Date | |
|---|---|---|---|
| 858971d1db | |||
| 5aba0fc70a | |||
| afe82dbd2a | |||
| 1cc46a94fe | |||
| 4de5a8f88b | |||
| 89ff480c2e | |||
| c009746bc4 | |||
| 99719f5b79 | |||
| fe79c271fa | |||
| ddab82ec7f | |||
| 7974cbd0af | |||
| bdcbfece3b | |||
| 1960fa51a7 | |||
| 75d7e3e101 | |||
| f915f7bbba | |||
| 1136fd018d |
1422
Excalidraw/Drawing 2026-03-03 16.04.17.excalidraw.md
Normal file
7932
Excalidraw/class-structure.excalidraw.md
Normal file
2
Excalidraw/class-structure.excalidraw.svg
Normal file
|
After Width: | Height: | Size: 4.6 MiB |
BIN
Raw Assets/player-frame-pressed.aseprite
Normal file
BIN
Raw Assets/player-frame.aseprite
Normal file
BIN
Raw Assets/prepared-item-frame.aseprite
Normal file
@@ -2,6 +2,7 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools">
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
<uses-feature android:glEsVersion="0x00020000" android:required="true"/>
|
<uses-feature android:glEsVersion="0x00020000" android:required="true"/>
|
||||||
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<application
|
<application
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
android:fullBackupContent="true"
|
android:fullBackupContent="true"
|
||||||
@@ -14,7 +15,7 @@
|
|||||||
<activity
|
<activity
|
||||||
android:name="com.iofferyoutea.WitchQueen.android.AndroidLauncher"
|
android:name="com.iofferyoutea.WitchQueen.android.AndroidLauncher"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:screenOrientation="landscape"
|
android:screenOrientation="portrait"
|
||||||
android:configChanges="keyboard|keyboardHidden|navigation|orientation|screenSize|screenLayout"
|
android:configChanges="keyboard|keyboardHidden|navigation|orientation|screenSize|screenLayout"
|
||||||
android:exported="true">
|
android:exported="true">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
|
|||||||
BIN
WitchQueen/assets/default_flipped.png
Normal file
|
After Width: | Height: | Size: 94 B |
BIN
WitchQueen/assets/grey-plus.png
Normal file
|
After Width: | Height: | Size: 108 B |
BIN
WitchQueen/assets/player-frame-down.png
Normal file
|
After Width: | Height: | Size: 197 B |
BIN
WitchQueen/assets/player-frame-up.png
Normal file
|
After Width: | Height: | Size: 216 B |
BIN
WitchQueen/assets/player-frame.png
Normal file
|
After Width: | Height: | Size: 211 B |
BIN
WitchQueen/assets/prepared-item-frame.png
Normal file
|
After Width: | Height: | Size: 154 B |
BIN
WitchQueen/assets/red-x.png
Normal file
|
After Width: | Height: | Size: 129 B |
BIN
WitchQueen/assets/transparent.png
Normal file
|
After Width: | Height: | Size: 81 B |
@@ -0,0 +1,6 @@
|
|||||||
|
package com.iofferyoutea.WitchQueen
|
||||||
|
|
||||||
|
class Client(val hostAddress: String, val hostPort: Int, val playerProfile: PlayerProfile) {
|
||||||
|
val preparedItems: MutableList<Int> = mutableListOf(0, 0, 0, 0) // Item ID. 0 for no item
|
||||||
|
lateinit var map: Map
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
package com.iofferyoutea.WitchQueen
|
||||||
|
|
||||||
|
class Game(val clients: Array<Client>) {
|
||||||
|
}
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
package com.iofferyoutea.WitchQueen
|
package com.iofferyoutea.WitchQueen
|
||||||
|
|
||||||
|
import com.badlogic.gdx.Game
|
||||||
import com.badlogic.gdx.graphics.Texture
|
import com.badlogic.gdx.graphics.Texture
|
||||||
import com.badlogic.gdx.graphics.Texture.TextureFilter.Linear
|
import com.badlogic.gdx.graphics.Texture.TextureFilter.Linear
|
||||||
import com.badlogic.gdx.graphics.g2d.SpriteBatch
|
import com.badlogic.gdx.graphics.g2d.SpriteBatch
|
||||||
@@ -10,13 +11,12 @@ import ktx.assets.disposeSafely
|
|||||||
import ktx.assets.toInternalFile
|
import ktx.assets.toInternalFile
|
||||||
import ktx.async.KtxAsync
|
import ktx.async.KtxAsync
|
||||||
import ktx.graphics.use
|
import ktx.graphics.use
|
||||||
|
import java.lang.ref.WeakReference
|
||||||
|
|
||||||
class Main : KtxGame<KtxScreen>() {
|
class Main : KtxGame<KtxScreen>() {
|
||||||
override fun create() {
|
override fun create() {
|
||||||
KtxAsync.initiate()
|
KtxAsync.initiate()
|
||||||
|
|
||||||
// addScreen(FirstScreen())
|
|
||||||
// setScreen<FirstScreen>()
|
|
||||||
addScreen(MainMenu())
|
addScreen(MainMenu())
|
||||||
setScreen<MainMenu>()
|
setScreen<MainMenu>()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,42 +3,50 @@ package com.iofferyoutea.WitchQueen
|
|||||||
import com.badlogic.gdx.Gdx
|
import com.badlogic.gdx.Gdx
|
||||||
import com.badlogic.gdx.graphics.Texture
|
import com.badlogic.gdx.graphics.Texture
|
||||||
import com.badlogic.gdx.graphics.g2d.BitmapFont
|
import com.badlogic.gdx.graphics.g2d.BitmapFont
|
||||||
import com.badlogic.gdx.graphics.g2d.TextureRegion
|
|
||||||
import com.badlogic.gdx.scenes.scene2d.Stage
|
import com.badlogic.gdx.scenes.scene2d.Stage
|
||||||
import com.badlogic.gdx.scenes.scene2d.ui.Table
|
import com.badlogic.gdx.scenes.scene2d.ui.Table
|
||||||
import com.badlogic.gdx.scenes.scene2d.ui.TextButton
|
import com.badlogic.gdx.scenes.scene2d.ui.TextButton
|
||||||
|
import com.badlogic.gdx.scenes.scene2d.ui.Value
|
||||||
import com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable
|
import com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable
|
||||||
import ktx.app.KtxScreen
|
import ktx.app.KtxScreen
|
||||||
import ktx.app.clearScreen
|
import ktx.app.clearScreen
|
||||||
import ktx.assets.toInternalFile
|
|
||||||
import com.badlogic.gdx.graphics.Texture.TextureFilter.Nearest
|
|
||||||
import com.badlogic.gdx.scenes.scene2d.ui.Skin
|
|
||||||
|
|
||||||
class MainMenu : KtxScreen {
|
class MainMenu : KtxScreen {
|
||||||
val table = Table().apply {
|
val stage = Stage()
|
||||||
setFillParent(true)
|
|
||||||
debug = true
|
val table = Table()
|
||||||
|
var tableWidthPadAmount = 0.8f
|
||||||
|
var tableHeightPadAmount = 0.8f
|
||||||
|
|
||||||
|
//region Buttons
|
||||||
|
val defaultButtonTrd = TextureRegionDrawable(Texture("default.png"))
|
||||||
|
val flippedDefaultButtonTrd = TextureRegionDrawable(Texture("default_flipped.png"))
|
||||||
|
val defaultTextButtonStyle = TextButton.TextButtonStyle (
|
||||||
|
defaultButtonTrd,
|
||||||
|
flippedDefaultButtonTrd,
|
||||||
|
defaultButtonTrd,
|
||||||
|
BitmapFont()
|
||||||
|
)
|
||||||
|
val defaultButton = TextButton("Default Button", defaultTextButtonStyle)
|
||||||
|
//endregion
|
||||||
|
|
||||||
|
override fun show() {
|
||||||
|
// Stage Setup
|
||||||
|
Gdx.input.inputProcessor = stage
|
||||||
|
stage.addActor(table)
|
||||||
|
|
||||||
|
// Table Setup
|
||||||
|
table.debug = true
|
||||||
|
table.setPosition(
|
||||||
|
stage.width * ((1 - tableWidthPadAmount) / 2),
|
||||||
|
stage.height * ((1 - tableHeightPadAmount) / 2)
|
||||||
|
) // This centres the table
|
||||||
|
table.setSize(stage.width * tableWidthPadAmount, stage.height * tableHeightPadAmount)
|
||||||
|
|
||||||
|
table.add(defaultButton).growX().height(Value.percentWidth(9f / 32f, table)) // We use a FreeTypeFontGenerator to do font sizing maybe?
|
||||||
}
|
}
|
||||||
val stage = Stage().apply {
|
|
||||||
Gdx.input.inputProcessor = this
|
|
||||||
addActor(table)
|
|
||||||
}
|
|
||||||
|
|
||||||
val mySkin = Skin("uiskin.json".toInternalFile())
|
|
||||||
|
|
||||||
val textureRegion = TextureRegion(Texture("default.png").apply { setFilter(Nearest,
|
|
||||||
Nearest
|
|
||||||
)} )
|
|
||||||
val buttonFont = BitmapFont("default.fnt".toInternalFile())
|
|
||||||
val style = TextButton.TextButtonStyle().apply { up = TextureRegionDrawable(textureRegion); font = buttonFont }
|
|
||||||
|
|
||||||
val button = TextButton("Button", style).apply {
|
|
||||||
table.add(this).size(512f, 512f)
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun render(delta: Float) {
|
override fun render(delta: Float) {
|
||||||
super.render(delta)
|
clearScreen(0f, 0f, 0f)
|
||||||
clearScreen(0f, 255f, 0f)
|
|
||||||
|
|
||||||
stage.act(delta)
|
stage.act(delta)
|
||||||
stage.draw()
|
stage.draw()
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
package com.iofferyoutea.WitchQueen
|
||||||
|
|
||||||
|
class Map(val mapType: MapType) {
|
||||||
|
val rooms = Array(2) { Array<Room>(2) { Room(mapType) } } // We use an array instead of list i think
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
package com.iofferyoutea.WitchQueen
|
||||||
|
|
||||||
|
enum class MapType {
|
||||||
|
DUNGEON, STREETS
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package com.iofferyoutea.WitchQueen
|
||||||
|
|
||||||
|
enum class PlayerState {
|
||||||
|
IDLE, LOOTING, FIGHTING
|
||||||
|
}
|
||||||
|
|
||||||
|
class Player(val map: Map) {
|
||||||
|
var currentState = PlayerState.IDLE
|
||||||
|
val currentRoom = arrayOf(0, 0) // Make this a spawn room or something
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package com.iofferyoutea.WitchQueen
|
||||||
|
|
||||||
|
class PlayerProfile {
|
||||||
|
var iconPath = "default.png"
|
||||||
|
var username = "Default"
|
||||||
|
val availableItems: MutableList<Int> = mutableListOf() // Use Item IDs?
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package com.iofferyoutea.WitchQueen
|
||||||
|
|
||||||
|
enum class RoomActivity {
|
||||||
|
EMPTY, LOOT, FIGHT
|
||||||
|
}
|
||||||
|
|
||||||
|
class Room(val mapType: MapType) {
|
||||||
|
var availableActivities: MutableList<RoomActivity> = mutableListOf()
|
||||||
|
init {
|
||||||
|
// Generate Room in this init block!
|
||||||
|
}
|
||||||
|
}
|
||||||