diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml deleted file mode 100644 index cb2fdb3a9..000000000 --- a/.idea/inspectionProfiles/profiles_settings.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/assets/32opus_poke.ogg b/assets/32opus_poke.ogg new file mode 100644 index 000000000..9b2a7a528 --- /dev/null +++ b/assets/32opus_poke.ogg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f932e167cd1f3055a722e6ef0f9e0d7ee805ddb52c079564bc2876552f58c789 +size 796652 diff --git a/assets/graphics/fonts/futhark.tga b/assets/graphics/fonts/futhark.tga deleted file mode 100644 index f78f439cb..000000000 --- a/assets/graphics/fonts/futhark.tga +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:658ec9dbb62988ccb46e1fd2b99d4d93326d65f5f982eb48a901a379d37964dc -size 23058 diff --git a/assets/graphics/fonts/terrarum-sans-bitmap/futhark.tga b/assets/graphics/fonts/terrarum-sans-bitmap/futhark.tga new file mode 100644 index 000000000..797a28e99 --- /dev/null +++ b/assets/graphics/fonts/terrarum-sans-bitmap/futhark.tga @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0b9b03aad1a550411c508a721456fdfccf18365b1d02f6aabf104c7e948c6753 +size 69164 diff --git a/assets/graphics/fonts/terrarum-sans-bitmap/hangul_johab.tga b/assets/graphics/fonts/terrarum-sans-bitmap/hangul_johab.tga index 99df6a513..810e0d129 100644 --- a/assets/graphics/fonts/terrarum-sans-bitmap/hangul_johab.tga +++ b/assets/graphics/fonts/terrarum-sans-bitmap/hangul_johab.tga @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:56548976bad3847a0de61a12e31f12a06b3575f2a750c312074fd840ca72583a +oid sha256:b9296df2f59bd52662a71e6d5376b0c8c079bfd11a326008016e8f809b2a7ef9 size 268844 diff --git a/assets/graphics/fonts/terrarum-sans-bitmap/kana.tga b/assets/graphics/fonts/terrarum-sans-bitmap/kana.tga index fe5446fbf..48399e6f5 100644 --- a/assets/graphics/fonts/terrarum-sans-bitmap/kana.tga +++ b/assets/graphics/fonts/terrarum-sans-bitmap/kana.tga @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:fbb997a63db687c4161d20cb100d93b2f679981485c6aae8464c95d1e1bc35f2 +oid sha256:d8281abd7bfa9996e4d6059111e9e90c05f0ae64f5d4ae517ee77dbb4d58fe63 size 184364 diff --git a/external_resource_packs/28150__commanderrobot__clean-klick.wav b/external_resource_packs/28150__commanderrobot__clean-klick.wav new file mode 100644 index 000000000..5f60da0f0 Binary files /dev/null and b/external_resource_packs/28150__commanderrobot__clean-klick.wav differ diff --git a/external_resource_packs/60835__pogotron__swishes.wav b/external_resource_packs/60835__pogotron__swishes.wav new file mode 100644 index 000000000..1d4fb166c Binary files /dev/null and b/external_resource_packs/60835__pogotron__swishes.wav differ diff --git a/external_resource_packs/spieluhr.wav b/external_resource_packs/spieluhr.wav new file mode 100644 index 000000000..099d0da2a Binary files /dev/null and b/external_resource_packs/spieluhr.wav differ diff --git a/external_resource_packs/watersplash/103313__m-o-m__impact-splash-water-01_cc_by_nc.wav b/external_resource_packs/watersplash/103313__m-o-m__impact-splash-water-01_cc_by_nc.wav new file mode 100644 index 000000000..66102bd04 Binary files /dev/null and b/external_resource_packs/watersplash/103313__m-o-m__impact-splash-water-01_cc_by_nc.wav differ diff --git a/external_resource_packs/watersplash/110393__soundscalpel-com__water-splash_cc_by.wav b/external_resource_packs/watersplash/110393__soundscalpel-com__water-splash_cc_by.wav new file mode 100644 index 000000000..d42954682 Binary files /dev/null and b/external_resource_packs/watersplash/110393__soundscalpel-com__water-splash_cc_by.wav differ diff --git a/external_resource_packs/watersplash/53687__digifishmusic__ploppy-4_cc_by.wav b/external_resource_packs/watersplash/53687__digifishmusic__ploppy-4_cc_by.wav new file mode 100644 index 000000000..10b186af5 Binary files /dev/null and b/external_resource_packs/watersplash/53687__digifishmusic__ploppy-4_cc_by.wav differ diff --git a/lib/Concentus-1.0-SNAPSHOT.jar b/lib/Concentus-1.0-SNAPSHOT.jar new file mode 100644 index 000000000..30cbf5b44 Binary files /dev/null and b/lib/Concentus-1.0-SNAPSHOT.jar differ diff --git a/lib/ibxm.jar b/lib/ibxm.jar deleted file mode 100644 index 619d26e14..000000000 Binary files a/lib/ibxm.jar and /dev/null differ diff --git a/lib/jopus.jar b/lib/jopus.jar new file mode 100644 index 000000000..6769732b3 Binary files /dev/null and b/lib/jopus.jar differ diff --git a/lib/kotlin-reflect.jar b/lib/kotlin-reflect.jar index 02eed31b6..56c033b36 100755 Binary files a/lib/kotlin-reflect.jar and b/lib/kotlin-reflect.jar differ diff --git a/lib/kotlin-runtime-sources.jar b/lib/kotlin-runtime-sources.jar deleted file mode 100644 index 73cdb9177..000000000 Binary files a/lib/kotlin-runtime-sources.jar and /dev/null differ diff --git a/lib/kotlin-runtime.jar b/lib/kotlin-runtime.jar deleted file mode 100755 index c784c5931..000000000 Binary files a/lib/kotlin-runtime.jar and /dev/null differ diff --git a/lib/kotlin-stdlib-sources.jar b/lib/kotlin-stdlib-sources.jar new file mode 100644 index 000000000..acb8ff171 Binary files /dev/null and b/lib/kotlin-stdlib-sources.jar differ diff --git a/lib/kotlin-stdlib.jar b/lib/kotlin-stdlib.jar new file mode 100644 index 000000000..5e0932b2d Binary files /dev/null and b/lib/kotlin-stdlib.jar differ diff --git a/lib/libjopus.so b/lib/libjopus.so new file mode 100644 index 000000000..37b9a7990 Binary files /dev/null and b/lib/libjopus.so differ diff --git a/src/net/torvald/gdx/backends/lwjgl/audio/Opus.kt b/src/net/torvald/gdx/backends/lwjgl/audio/Opus.kt new file mode 100644 index 000000000..27cd390d9 --- /dev/null +++ b/src/net/torvald/gdx/backends/lwjgl/audio/Opus.kt @@ -0,0 +1,17 @@ +package net.torvald.gdx.backends.lwjgl.audio + +import com.badlogic.gdx.backends.lwjgl.audio.OggInputStream +import com.badlogic.gdx.backends.lwjgl.audio.OpenALAudio +import com.badlogic.gdx.backends.lwjgl.audio.OpenALMusic +import com.badlogic.gdx.backends.lwjgl.audio.OpenALSound +import com.badlogic.gdx.files.FileHandle +import com.badlogic.gdx.utils.StreamUtils +import java.io.ByteArrayOutputStream + +/** + * Created by minjaesong on 2017-06-26. + */ + +class Opus { + +} diff --git a/src/net/torvald/gdx/backends/lwjgl/audio/OpusInputStream.java b/src/net/torvald/gdx/backends/lwjgl/audio/OpusInputStream.java new file mode 100644 index 000000000..a87f20edc --- /dev/null +++ b/src/net/torvald/gdx/backends/lwjgl/audio/OpusInputStream.java @@ -0,0 +1,60 @@ +package net.torvald.gdx.backends.lwjgl.audio; + +import org.jetbrains.annotations.NotNull; + +import java.io.IOException; +import java.io.InputStream; + +/** + * Created by minjaesong on 2017-06-26. + */ +public class OpusInputStream extends InputStream { + public OpusInputStream() { + super(); + } + + @Override + public int read(@NotNull byte[] b) throws IOException { + return super.read(b); + } + + @Override + public int read(@NotNull byte[] b, int off, int len) throws IOException { + return super.read(b, off, len); + } + + @Override + public long skip(long n) throws IOException { + return super.skip(n); + } + + @Override + public int available() throws IOException { + return super.available(); + } + + @Override + public void close() throws IOException { + super.close(); + } + + @Override + public synchronized void mark(int readlimit) { + super.mark(readlimit); + } + + @Override + public synchronized void reset() throws IOException { + super.reset(); + } + + @Override + public boolean markSupported() { + return super.markSupported(); + } + + @Override + public int read() throws IOException { + return 0; + } +} diff --git a/src/net/torvald/spriteanimation/SpriteAnimation.kt b/src/net/torvald/spriteanimation/SpriteAnimation.kt index 670505135..52ed9ec40 100644 --- a/src/net/torvald/spriteanimation/SpriteAnimation.kt +++ b/src/net/torvald/spriteanimation/SpriteAnimation.kt @@ -93,7 +93,6 @@ class SpriteAnimation(val parentActor: ActorWithPhysics) { if (visible) { val region = textureRegion.get(currentRow, currentFrame) - region.flip(flipHorizontal, !flipVertical) batch.color = colorFilter batch.draw(region, diff --git a/src/net/torvald/terrarum/StateInGameGDX.kt b/src/net/torvald/terrarum/StateInGameGDX.kt index 6d9df7681..e519a4c22 100644 --- a/src/net/torvald/terrarum/StateInGameGDX.kt +++ b/src/net/torvald/terrarum/StateInGameGDX.kt @@ -158,10 +158,10 @@ class StateInGameGDX(val batch: SpriteBatch) : Screen { } // Create camera with the desired resolution - camera = OrthographicCamera(width, height) + //camera = OrthographicCamera(width, height) // Move camera center to push 0,0 into the corner - camera.translate(width / 2, height / 2) + //camera.translate(width / 2, height / 2) // Set Y to point downwards camera.setToOrtho(true, width, height) @@ -181,6 +181,9 @@ class StateInGameGDX(val batch: SpriteBatch) : Screen { fun enter() { + initViewPort(Gdx.graphics.width, Gdx.graphics.height, Gdx.graphics.width.toFloat() / Gdx.graphics.height.toFloat()) + + // load things when the game entered this "state" // load necessary shaders //shader12BitCol = Shader.makeShader("./assets/4096.vert", "./assets/4096.frag") @@ -414,27 +417,47 @@ class StateInGameGDX(val batch: SpriteBatch) : Screen { blendNormal() - camera.position.set(0f, 0f, 0f) // make camara work - batch.projectionMatrix = camera.combined batch.inUse { + camera.position.set(WorldCamera.gdxCamX, WorldCamera.gdxCamY, 0f) // make camara work + camera.update() + batch.projectionMatrix = camera.combined WeatherMixer.render(batch) // drawing to gwin so that any lights from lamp wont "leak" to the skybox // e.g. Bright blue light on sunset + + + LightmapRenderer.renderLightMap() + + BlocksDrawer.renderWall(batch) + BlocksDrawer.renderTerrain(batch) + + + batch.color = Color.WHITE + player?.drawBody(batch) } + println("Player: (${player?.hitbox?.centeredX}, ${player?.hitbox?.centeredY})") + ///////////////////////////// // draw map related stuffs // ///////////////////////////// - worldDrawFrameBuffer.inAction { + /*worldDrawFrameBuffer.inAction { // FIXME wrong and flipped coord; one camera code does not concern other - camera.position.set(-WorldCamera.x.toFloat(), -WorldCamera.y.toFloat(), 0f) // make camara work - batch.projectionMatrix = camera.combined - batch.inUse { + camera.position.set(WorldCamera.x.toFloat(), WorldCamera.y.toFloat(), 0f) // make camara work + camera.update() + batch.projectionMatrix = camera.combined + + + batch.color = Color.WHITE + batch.fillRect(WorldCamera.x.toFloat(), WorldCamera.y.toFloat(), 16f, 16f) + + + BlocksDrawer.renderWall(batch) actorsRenderBehind.forEach { it.drawBody(batch) } actorsRenderBehind.forEach { it.drawGlow(batch) } @@ -540,7 +563,7 @@ class StateInGameGDX(val batch: SpriteBatch) : Screen { batch.inUse { val tex = backDrawFrameBuffer.colorBufferTexture // TODO zoom! batch.draw(tex, 0f, 0f) - } + }*/ //backG.drawImage(worldDrawFrameBuffer.getScaledCopy(screenZoom), 0f, 0f) //backG.flush() diff --git a/src/net/torvald/terrarum/TerrarumGDX.kt b/src/net/torvald/terrarum/TerrarumGDX.kt index acb5c3eae..a7fc5bb67 100644 --- a/src/net/torvald/terrarum/TerrarumGDX.kt +++ b/src/net/torvald/terrarum/TerrarumGDX.kt @@ -599,12 +599,6 @@ infix fun Color.minus(other: Color) = Color( // don't turn into an operator! ) fun Int.toHex() = this.toLong().and(0xFFFFFFFF).toString(16).padStart(8, '0').toUpperCase() -fun Long.toHex() = { - val sb = StringBuilder() - (0..16).forEach { - - } -} diff --git a/src/net/torvald/terrarum/gameactors/ActorWithPhysics.kt b/src/net/torvald/terrarum/gameactors/ActorWithPhysics.kt index f68d2d791..a88e44223 100644 --- a/src/net/torvald/terrarum/gameactors/ActorWithPhysics.kt +++ b/src/net/torvald/terrarum/gameactors/ActorWithPhysics.kt @@ -323,6 +323,10 @@ open class ActorWithPhysics(renderOrder: RenderOrder, val immobileBody: Boolean override fun update(delta: Float) { if (isUpdate && !flagDespawn) { + hitbox.translate(0.0, 2.0) + + + if (!assertPrinted) assertInit() if (sprite != null) sprite!!.update(delta) @@ -1317,7 +1321,7 @@ open class ActorWithPhysics(renderOrder: RenderOrder, val immobileBody: Boolean - private inline fun forEachOccupyingTileNum(consumer: (Int?) -> Unit) { + private fun forEachOccupyingTileNum(consumer: (Int?) -> Unit) { val tiles = ArrayList() for (y in tilewiseHitbox.startY.toInt()..tilewiseHitbox.endY.toInt()) { for (x in tilewiseHitbox.startX.toInt()..tilewiseHitbox.endX.toInt()) { @@ -1328,7 +1332,7 @@ open class ActorWithPhysics(renderOrder: RenderOrder, val immobileBody: Boolean return tiles.forEach(consumer) } - private inline fun forEachOccupyingTile(consumer: (BlockProp?) -> Unit) { + private fun forEachOccupyingTile(consumer: (BlockProp?) -> Unit) { val tileProps = ArrayList() for (y in tilewiseHitbox.startY.toInt()..tilewiseHitbox.endY.toInt()) { for (x in tilewiseHitbox.startX.toInt()..tilewiseHitbox.endX.toInt()) { @@ -1339,7 +1343,7 @@ open class ActorWithPhysics(renderOrder: RenderOrder, val immobileBody: Boolean return tileProps.forEach(consumer) } - private inline fun forEachOccupyingTilePos(hitbox: Hitbox, consumer: (BlockAddress) -> Unit) { + private fun forEachOccupyingTilePos(hitbox: Hitbox, consumer: (BlockAddress) -> Unit) { val newTilewiseHitbox = Hitbox.fromTwoPoints( hitbox.startX.div(TILE_SIZE).floor(), hitbox.startY.div(TILE_SIZE).floor(), @@ -1357,7 +1361,7 @@ open class ActorWithPhysics(renderOrder: RenderOrder, val immobileBody: Boolean return tilePosList.forEach(consumer) } - private inline fun forEachFeetTileNum(consumer: (Int?) -> Unit) { + private fun forEachFeetTileNum(consumer: (Int?) -> Unit) { val tiles = ArrayList() // offset 1 pixel to the down so that friction would work @@ -1370,7 +1374,7 @@ open class ActorWithPhysics(renderOrder: RenderOrder, val immobileBody: Boolean return tiles.forEach(consumer) } - private inline fun forEachFeetTile(consumer: (BlockProp?) -> Unit) { + private fun forEachFeetTile(consumer: (BlockProp?) -> Unit) { val tileProps = ArrayList() // offset 1 pixel to the down so that friction would work diff --git a/src/net/torvald/terrarum/gameactors/DecodeTapestry.kt b/src/net/torvald/terrarum/gameactors/DecodeTapestry.kt index ac2ba93c5..3ca2e5346 100644 --- a/src/net/torvald/terrarum/gameactors/DecodeTapestry.kt +++ b/src/net/torvald/terrarum/gameactors/DecodeTapestry.kt @@ -125,7 +125,7 @@ object DecodeTapestry { if (colourModel != FORMAT_16 && colourModel != FORMAT_64) throw RuntimeException("Invalid colour model: $colourModel") - val width = file[6].toUint().shl(8) + file[7].toUint() + val width = file[7].toUint().shl(8) + file[6].toUint() val artNameBytes = ArrayList() val authorNameBytes = ArrayList() diff --git a/src/net/torvald/terrarum/itemproperties/ItemCodex.kt b/src/net/torvald/terrarum/itemproperties/ItemCodex.kt index 4ad90c4ea..de8aae710 100644 --- a/src/net/torvald/terrarum/itemproperties/ItemCodex.kt +++ b/src/net/torvald/terrarum/itemproperties/ItemCodex.kt @@ -32,7 +32,6 @@ object ItemCodex { val ITEM_DYNAMIC = 32768..0x0FFF_FFFF val ACTORID_MIN = ITEM_DYNAMIC.endInclusive + 1 - private val itemImagePlaceholder = TextureRegion(Texture("./assets/item_kari_24.tga")) diff --git a/src/net/torvald/terrarum/virtualcomputer/peripheral/PeripheralVideoCard.kt b/src/net/torvald/terrarum/virtualcomputer/peripheral/PeripheralVideoCard.kt index f953049fe..384782070 100644 --- a/src/net/torvald/terrarum/virtualcomputer/peripheral/PeripheralVideoCard.kt +++ b/src/net/torvald/terrarum/virtualcomputer/peripheral/PeripheralVideoCard.kt @@ -289,11 +289,11 @@ import java.util.* } fun drawRectBack(x: Int, y: Int, w: Int, h: Int, c: Int = color) { - (0..w - 1).forEach { + for (it in 0..w - 1) { vram.setBackgroundPixel(x + it, y, c) vram.setBackgroundPixel(x + it, y + h - 1, c) } - (1..h - 2).forEach { + for (it in 1..h - 2) { vram.setBackgroundPixel(x, y + it, c) vram.setBackgroundPixel(x + w - 1, y + it, c) } @@ -306,11 +306,11 @@ import java.util.* } fun drawRectFore(x: Int, y: Int, w: Int, h: Int, c: Int = color) { - (0..w - 1).forEach { + for (it in 0..w - 1) { vram.setForegroundPixel(x + it, y, c) vram.setForegroundPixel(x + it, y + h - 1, c) } - (1..h - 2).forEach { + for (it in 1..h - 2) { vram.setForegroundPixel(x, y + it, c) vram.setForegroundPixel(x + w - 1, y + it, c) } diff --git a/src/net/torvald/terrarum/virtualcomputer/terminal/GraphicsTerminal.kt b/src/net/torvald/terrarum/virtualcomputer/terminal/GraphicsTerminal.kt index 65e743a8f..98790864c 100644 --- a/src/net/torvald/terrarum/virtualcomputer/terminal/GraphicsTerminal.kt +++ b/src/net/torvald/terrarum/virtualcomputer/terminal/GraphicsTerminal.kt @@ -203,7 +203,7 @@ import java.util.* rgba, 0, rgba.size - displacement ) - (rgba.size - 1 downTo rgba.size - displacement + 1).forEach { rgba[it] = 0.toByte() } + for (it in rgba.size - 1 downTo rgba.size - displacement + 1) { rgba[it] = 0.toByte() } } else { System.arraycopy( @@ -211,7 +211,7 @@ import java.util.* rgba, displacement, rgba.size - displacement ) - (0..displacement - 1).forEach { rgba[it] = 0.toByte() } + for (it in 0..displacement - 1) { rgba[it] = 0.toByte() } } cursorY += -amount diff --git a/src/net/torvald/terrarum/worlddrawer/BlocksDrawer_old.kt b/src/net/torvald/terrarum/worlddrawer/BlocksDrawer_old.kt index 1ed98ab94..c19326a6b 100644 --- a/src/net/torvald/terrarum/worlddrawer/BlocksDrawer_old.kt +++ b/src/net/torvald/terrarum/worlddrawer/BlocksDrawer_old.kt @@ -101,7 +101,7 @@ object BlocksDrawer { val tileItemImgPixMap = Pixmap(TILE_SIZE * 16, TILE_SIZE * GameWorld.TILES_SUPPORTED / 16, Pixmap.Format.RGBA8888) tileItemImgPixMap.pixels.rewind() - (ITEM_TILES).forEach { tileID -> + for (tileID in ITEM_TILES) { val tile = tilesTerrain.get((tileID % 16) * 16, (tileID / 16)) diff --git a/src/net/torvald/terrarum/worlddrawer/WorldCamera.kt b/src/net/torvald/terrarum/worlddrawer/WorldCamera.kt index 07552edcb..02e980c97 100644 --- a/src/net/torvald/terrarum/worlddrawer/WorldCamera.kt +++ b/src/net/torvald/terrarum/worlddrawer/WorldCamera.kt @@ -16,6 +16,10 @@ object WorldCamera { private set var y: Int = 0 private set + var gdxCamX: Float = 0f + private set + var gdxCamY: Float = 0f + private set var width: Int = 0 private set var height: Int = 0 @@ -42,6 +46,14 @@ object WorldCamera { world!!.height * TILE_SIZE - height - TILE_SIZE.toFloat() )) + + gdxCamX = Math.round(// X only: ROUNDWORLD implementation + (player?.hitbox?.centeredX?.toFloat() ?: 0f)).toFloat() + gdxCamY = Math.round(FastMath.clamp( + (player?.hitbox?.centeredY?.toFloat() ?: 0f), + TILE_SIZE.toFloat(), + world!!.height * TILE_SIZE - height - TILE_SIZE.toFloat() + )).toFloat() } } } \ No newline at end of file diff --git a/work_files/DataFormats/Map chunk data format.numbers/Index.zip b/work_files/DataFormats/Map chunk data format.numbers/Index.zip deleted file mode 100755 index 76dd6ce05..000000000 Binary files a/work_files/DataFormats/Map chunk data format.numbers/Index.zip and /dev/null differ diff --git a/work_files/DataFormats/Map chunk data format.numbers/Metadata/BuildVersionHistory.plist b/work_files/DataFormats/Map chunk data format.numbers/Metadata/BuildVersionHistory.plist deleted file mode 100755 index 8d353c704..000000000 --- a/work_files/DataFormats/Map chunk data format.numbers/Metadata/BuildVersionHistory.plist +++ /dev/null @@ -1,15 +0,0 @@ - - - - - numbers-trunk-20080702_1 - numbers-trunk-20080731_1 - numbers-trunk-20080801_2 - numbers-trunk-20080909_1 - numbers-trunk-20080911_1 - numbers-trunk-20080926_1 - numbers-trunk-20081016_1 - local build-Oct 16 2012 - M3.1-1769-1 - - diff --git a/work_files/DataFormats/Map chunk data format.numbers/Metadata/DocumentIdentifier b/work_files/DataFormats/Map chunk data format.numbers/Metadata/DocumentIdentifier deleted file mode 100755 index 018863838..000000000 --- a/work_files/DataFormats/Map chunk data format.numbers/Metadata/DocumentIdentifier +++ /dev/null @@ -1 +0,0 @@ -DDAED13E-5DFB-407C-AAD2-A0A2DEC89519 \ No newline at end of file diff --git a/work_files/DataFormats/Map chunk data format.numbers/Metadata/Properties.plist b/work_files/DataFormats/Map chunk data format.numbers/Metadata/Properties.plist deleted file mode 100755 index c7b3b052e..000000000 Binary files a/work_files/DataFormats/Map chunk data format.numbers/Metadata/Properties.plist and /dev/null differ diff --git a/work_files/DataFormats/Map chunk data format.numbers/preview-micro.jpg b/work_files/DataFormats/Map chunk data format.numbers/preview-micro.jpg deleted file mode 100755 index 128a099dc..000000000 Binary files a/work_files/DataFormats/Map chunk data format.numbers/preview-micro.jpg and /dev/null differ diff --git a/work_files/DataFormats/Map chunk data format.numbers/preview-web.jpg b/work_files/DataFormats/Map chunk data format.numbers/preview-web.jpg deleted file mode 100755 index 1ab37b8fc..000000000 Binary files a/work_files/DataFormats/Map chunk data format.numbers/preview-web.jpg and /dev/null differ diff --git a/work_files/DataFormats/Map chunk data format.numbers/preview.jpg b/work_files/DataFormats/Map chunk data format.numbers/preview.jpg deleted file mode 100755 index 9c4346f0a..000000000 Binary files a/work_files/DataFormats/Map chunk data format.numbers/preview.jpg and /dev/null differ diff --git a/work_files/DataFormats/Map chunk data format.pdf b/work_files/DataFormats/Map chunk data format.pdf deleted file mode 100755 index 251a7849f..000000000 Binary files a/work_files/DataFormats/Map chunk data format.pdf and /dev/null differ diff --git a/work_files/DataFormats/Map data format.numbers b/work_files/DataFormats/Map data format.numbers deleted file mode 100644 index afcd3136d..000000000 Binary files a/work_files/DataFormats/Map data format.numbers and /dev/null differ diff --git a/work_files/DataFormats/Map data format.pdf b/work_files/DataFormats/Map data format.pdf deleted file mode 100644 index 2c429e131..000000000 Binary files a/work_files/DataFormats/Map data format.pdf and /dev/null differ diff --git a/work_files/DataFormats/Map data format.txt b/work_files/DataFormats/Map data format.txt index df4454d17..feafe90b7 100644 --- a/work_files/DataFormats/Map data format.txt +++ b/work_files/DataFormats/Map data format.txt @@ -1,6 +1,6 @@ Terrarum Game Map Format -* Endianness: big +* Endianness: LITTLE Ord Hex Description 00 54 T diff --git a/work_files/DataFormats/Paper tape format.txt b/work_files/DataFormats/Paper tape format.txt new file mode 100644 index 000000000..f4961aa71 --- /dev/null +++ b/work_files/DataFormats/Paper tape format.txt @@ -0,0 +1,51 @@ +Paper tape format header + +* Endianness: LITTLE + +'T '8 'p 't id en ti er // Terrarum 8-Bit punched tape; + // identifier: unique 32-bit int used by app + +================================================================================ +Music tape format + +* 8 bytes make one tape row + +identifier: 0x41 AB 41 EC // mabl_mek (marble machine) + +## Payloads: + +sp ed 00 00 00 00 00 00 // speed: ticks per minutes [1..65535] + +na me of th e- mu si c0 // name of the music +mu st be th ir ty tw o- // 32 bytes long, padded with null(s) +by te s- lo ng pa dd ed +by nu ll ch ar ac te r0 + +na me of th e- au th or // name of the author +tw en ty fo ur by te s- // 24 bytes long, padded with null(s) +lo ng pa dd ed by nu ll + +## Music data: + +bb bb bb bb bb bb bb bb // 64 bits make one tick + +^^ Bit 60 Bit 0 ^ +|Highest Lowest +|Note Note +|(C6) (C1) +3 bits are program notes, which are: +- 000 : NOP +- 001 : (unused) +- 010 : Halve the speed (applied to next tick) +- 011 : Double the speed (applied to next tick) +- 100 : Quarter the speed (applied to next tick) +- 101 : Quadruple the speed (applied to next tick) +- 110 : (unused) +- 111 : Play current tick and halt + +================================================================================ +Computer tape format + +identifier: 0x7E 12 2A C0 + +## Payloads: bytes \ No newline at end of file diff --git a/work_files/DataFormats/Savegame metadata.txt b/work_files/DataFormats/Savegame metadata.txt index 6bc8b94ae..083aece39 100644 --- a/work_files/DataFormats/Savegame metadata.txt +++ b/work_files/DataFormats/Savegame metadata.txt @@ -1,6 +1,6 @@ Savegame metadata -* Endianness: big +* Endianness: LITTLE * Filename: 'world' * Remarks: GZipped diff --git a/work_files/DataFormats/User art format.numbers b/work_files/DataFormats/User art format.numbers deleted file mode 100644 index 577fdfdec..000000000 Binary files a/work_files/DataFormats/User art format.numbers and /dev/null differ diff --git a/work_files/DataFormats/User art format.txt b/work_files/DataFormats/User art format.txt index 559c1acea..b00c5724c 100644 --- a/work_files/DataFormats/User art format.txt +++ b/work_files/DataFormats/User art format.txt @@ -1,6 +1,6 @@ Terrarum User Art format -* Endianness: big +* Endianness: LITTLE * Palette colour is encoded as 0b0000RRRR 0bGGGGBBBB (yep, four bits are wasted) @@ -21,8 +21,8 @@ Ord Hex Description - 256 colours (using user-defined) nn - Colour count (1-255) -06 Width of the image (MSB) -07 Width of the image (LSB) +06 Width of the image (LSB) +07 Width of the image (MSB) 08 Name of the art in UTF-8 ... 00 String terminator @@ -30,12 +30,12 @@ Ord Hex Description ... Name of the author in UTF-8 ... 00 String terminator -... Palette colour 0, if any (MSB) -... Palette colour 0, if any (LSB) -... Palette colour 1, if any (MSB) -... Palette colour 1, if any (LSB) -... Palette colour 2, if any (MSB) -... Palette colour 2, if any (LSB) +... Palette colour 0, if any (0R) +... Palette colour 0, if any (GB) +... Palette colour 1, if any (0R) +... Palette colour 1, if any (GB) +... Palette colour 2, if any (0R) +... Palette colour 2, if any (GB) ... Colour indices diff --git a/work_files/GameDesign/GAME_MECHANICS_GENERAL.md b/work_files/GameDesign/GAME_MECHANICS_GENERAL.md new file mode 100644 index 000000000..1a6f5ad67 --- /dev/null +++ b/work_files/GameDesign/GAME_MECHANICS_GENERAL.md @@ -0,0 +1,28 @@ + +## Using items + +## Roguelike identity + +### Randomised things + +#### Potion + Lime-coloured potion + First play: "Potion (???)" + After drank: "Potion (Healing)" is revealed. + + Second (new) play: "Potion (???)" + After drank: "Potion (Neurotoxin)" is revealed. + + +### size variation of tools/weapons/etc. + +Race base weapon/tool size <- 10 [kg] +Size tolerance <- (50% * str/1000), or say, 20% + +If the size is bigger than tolerable, weapon speed severely slows down, tools become unusable + if use time >* 0.75 second, the weapon/tool cannot be equipped. +Small weapons/tools gains no (dis)advantage + +When drawing: scale by (craftedWeaponSize / baseWeaponSize) + +Crafted tool/weapon size is dependent to the baseRaceMass. \ No newline at end of file diff --git a/work_files/GameDesign/MISC_MECHNANICS.md b/work_files/GameDesign/MISC_MECHNANICS.md index b9aab7069..fd1eaa1b2 100644 --- a/work_files/GameDesign/MISC_MECHNANICS.md +++ b/work_files/GameDesign/MISC_MECHNANICS.md @@ -1,16 +1,3 @@ -## size variation of tools/weapons/etc. - -Race base weapon/tool size <- 10 [kg] -Size tolerance <- (50% * str/1000), or say, 20% - -If the size is bigger than tolerable, weapon speed severely slows down, tools become unusable - if use time >* 0.75 second, the weapon/tool cannot be equipped. -Small weapons/tools gains no (dis)advantage - -When drawing: scale by (craftedWeaponSize / baseWeaponSize) - -Crafted tool/weapon size is dependent to the baseRaceMass. - ## Colouring ## @@ -38,18 +25,6 @@ Things are colour-keyed so that players would get the idea by just a glance. NOTE: cyan is a tricky colour for deuterans; will be inextinguishable between greys! -## Roguelike identity ## - -* Randomised things - - E.g. potion - Lime-coloured potion - First play: "Potion (???)" - After drank: "Potion (Healing)" is revealed. - - Second (new) play: "Potion (???)" - After drank: "Potion (Neurotoxin)" is revealed. - - ## Making sprite ## * Layers diff --git a/work_files/GameDesign/WORLD_UNIVERSE_LORE.md b/work_files/GameDesign/WORLD_UNIVERSE_LORE.md new file mode 100644 index 000000000..9be890a6e --- /dev/null +++ b/work_files/GameDesign/WORLD_UNIVERSE_LORE.md @@ -0,0 +1,35 @@ +A chapter of the WORLD series + + +# Universe + +## Shape + +The world is cylindrical. (really it is -- the very shape is used to sample noises) It loops at left and right end. One of the in-game tapestry reflects this. + + +## Multiverse + +Multiverse exists. On the main screen, players can only select a persona (user in Terraria), and the game loads the world where player saved the game. + +Multiple maps are multiverse in this game; users don't have an access to the multiverse or concerning techs; only after hard play (and several deaths, possible) players can reach the technology and create the new universe (new world) where the player can exploit. + +Let's be honest: when you play the Terraria bit heavily, you create multiple world to farm resources; this is cheat and you know it, which is why, in this game, you technically can but after hard working so that it'd be less of a cheat. + +### New World (New Universe) + +The teleporter also works as "world manager"; players can create new world or delete existing ones. Lore-wise, creation and deletion is regarded as linking and unlinking. + +When players create a new world (by new multiverse or new persona), they can choose the size of the new world, and that and the name would be the only thing players can _control_. + + +### New Game + +The only way to make a new game is to create new persona and thus, the game creates a new world for the first time. In single player mode, one persona cannot cross other persona's universes. + + + +# Lore + +## Backstory + diff --git a/work_files/graphics/fonts/devanagari_bengali_variable.psd b/work_files/graphics/fonts/devanagari_bengali_variable.psd new file mode 100644 index 000000000..193ed2286 --- /dev/null +++ b/work_files/graphics/fonts/devanagari_bengali_variable.psd @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3e45393ca0948479eef602c3a060dd35b4195b220ba554d0d67001aa8d9405f9 +size 267667 diff --git a/work_files/graphics/fonts/futhark.psd b/work_files/graphics/fonts/futhark.psd index 7fb49ff6d..6114d5179 100644 --- a/work_files/graphics/fonts/futhark.psd +++ b/work_files/graphics/fonts/futhark.psd @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:b2c2f5122cfa70acfbfdff5ee529b3750dbab90b37a9c8553df498b0e737c9fc -size 33019 +oid sha256:b0a011d715abc24c22f11db49748180e875d59403d34a079dfb01607fd029033 +size 93879 diff --git a/work_files/graphics/fonts/hangul_johab.psd b/work_files/graphics/fonts/hangul_johab.psd index 9fc926574..c5dcf6617 100644 --- a/work_files/graphics/fonts/hangul_johab.psd +++ b/work_files/graphics/fonts/hangul_johab.psd @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:86c344dee468164090efdd6a402f5097ac8dbf26e4e240438e2677ab27bc6a1c -size 146302 +oid sha256:3ad43bd83627d98bbbdecb66ce7cc2c793ba9197936494e3a278d15b0adf2011 +size 146381 diff --git a/work_files/graphics/fonts/insular_variable.psd b/work_files/graphics/fonts/insular_variable.psd index ef8cfb6a4..10c794627 100644 --- a/work_files/graphics/fonts/insular_variable.psd +++ b/work_files/graphics/fonts/insular_variable.psd @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:968a0571f2a157ff390a854578cbffacff7dbc856b6bd0e43d2bfedb54176ec3 -size 59092 +oid sha256:7364d60f62852cf425b460284362dbfc094a3754800229d2e57d8e3ca97db197 +size 59227 diff --git a/work_files/graphics/fonts/kana.psd b/work_files/graphics/fonts/kana.psd index a1a92cd7e..c33da7080 100644 --- a/work_files/graphics/fonts/kana.psd +++ b/work_files/graphics/fonts/kana.psd @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5c5e4cf0bf367f2acfd3b25ffbabb8d0c0c8b11867a4389ce686560dca2663af -size 129515 +oid sha256:b4162d6f6f1dd76a9175a00a0e2eba33b08cf009f836a340e2bbe81ab89b3193 +size 129736