diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..4cc7fe2 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,27 @@ +0.15.0 +------ +* Added display tank player name in `Render` +* Fixed join game after relogin +* Updated `CreateGamePopup` for any screen sizes +* Fixed tank destroy zero score label + +0.14.0 +------ +* Added `CreateGamePopup` +* Fixed null tank color +* Updated `Ticker` + +0.13.0 +------ +* Added `Ticker` +* Fixed `PacketQueue` stream reading +* Added `PlayerControl` and `ControlPreset` +* Added `BaseControlFactory` + +0.12.0 +------ +* Added `GameRoomFrame` +* Improved websocket connection with using binary protocol instead of text +* Added `GameListFrame` +* Added `DesktopConnection` for linux client build +* Updated `SoundManager` diff --git a/WORK.md b/WORK.md index fca9f3e..3382372 100644 --- a/WORK.md +++ b/WORK.md @@ -1,73 +1,7 @@ -* build - * gulp 100% - * linux 100% - * deb-package 100% - * windows 0% - * exe-package 0% (inno setup) - -* deploy - * capistrano 100% - -* ui - * auth frame 0% - * select game frame 100% (classic 1/2 player, dota singe/coop/vs) - * select level frame 10% - * game frame 50% - -* engine - * config 100% - * map 100% - * tanks 100% - * bullets 100% - * boxes 100% - * map changes 100% - * bonuses 100% - * eagle 100% - -* game - * classic - * state 50% - * bot 50% - * human 100% - * dota - * state 50% - * bot 10% - * human 100% - -* bonus - * star 50% - * grenade 0% - * helm 0% - * clock 0% - * shovel 0% - -* state - * score 0% - * human tank 0% - * save/load 0% - * export/import 0% - -* render - * map 100% - * tanks 100% - * bullet 100% - * calc redraw 50% - * animations - * tank spawn 0% - * tank move 100% - * map water 100% - * bullet boom 90% - * tank boom 90% - * bonuses 100% - * html5 50% - -* proto - ... - -* editor - * level - * open 100% - * edit 50% - * save 100% - * tank - * color 10% \ No newline at end of file +* [bug] (server) **grenade** bonus +* [bug] **clock** bonus for spawned tanks +* [feature] **shovel** bonus with armor bricks +* [feature] tanks and bullets speed balancing +* [bug] record system broken +* [feature] custom map size +* [bug] bullet and tank collision with bricks under bonus diff --git a/src/client/haxe/ru/m/tankz/render/Render.hx b/src/client/haxe/ru/m/tankz/render/Render.hx index b38ceaf..5e46989 100755 --- a/src/client/haxe/ru/m/tankz/render/Render.hx +++ b/src/client/haxe/ru/m/tankz/render/Render.hx @@ -187,7 +187,7 @@ class Render extends SpriteView implements IRender { var item = items[id]; entryLayer.removeChild(item.view); playAnimate(item.rect.center, AnimateBundle.tankBoom()); - if (shot.score != 0) { + if (shot.score != null) { showScore(item.rect.center, shot.score); } items.remove(id); @@ -206,7 +206,7 @@ class Render extends SpriteView implements IRender { if (items.exists(id)) { var item = items[id]; playAnimate(item.rect.center, AnimateBundle.tankBoom()); - if (shot.score != 0) { + if (shot.score != null) { showScore(item.rect.center, shot.score); } cast(item, EagleRenderItem).death = true; @@ -215,7 +215,7 @@ class Render extends SpriteView implements IRender { if (items.exists(id)) { var item = items[id]; upperLayer.removeChild(item.view); - if (shot.score != 0) { + if (shot.score != null) { showScore(item.rect.center, shot.score); } items.remove(id); diff --git a/src/common/haxe/ru/m/tankz/config/Config.hx b/src/common/haxe/ru/m/tankz/config/Config.hx index 654b56a..9d8e045 100644 --- a/src/common/haxe/ru/m/tankz/config/Config.hx +++ b/src/common/haxe/ru/m/tankz/config/Config.hx @@ -55,13 +55,13 @@ typedef TankConfig = { @:optinal var hits:Int; @:optinal var upgrade:TankType; @:optinal var downgrade:TankType; - @:optinal var score:Int; + @:optinal var score:Null; } typedef BonusConfig = { var type:BonusType; - @:optional var duration:Int; - @:optinal var score:Int; + @:optional var duration:Null; + @:optinal var score:Null; } typedef TankSpawn = { @@ -80,7 +80,7 @@ typedef PlayerConfig = { } typedef EagleConfig = { - @:optional var score:Int; + @:optional var score:Null; } typedef TeamConfig = { diff --git a/src/common/haxe/ru/m/tankz/game/GameEvent.hx b/src/common/haxe/ru/m/tankz/game/GameEvent.hx index 76985fe..bd3ed35 100644 --- a/src/common/haxe/ru/m/tankz/game/GameEvent.hx +++ b/src/common/haxe/ru/m/tankz/game/GameEvent.hx @@ -32,8 +32,8 @@ enum SpawnEvent { typedef Shot = { var tankId:Int; - @:optional var bulletId:Int; - @:optional var score:Int; + @:optional var bulletId:Null; + @:optional var score:Null; } enum HitEvent { diff --git a/src/common/haxe/ru/m/tankz/game/GameRunner.hx b/src/common/haxe/ru/m/tankz/game/GameRunner.hx index d40517f..7152046 100644 --- a/src/common/haxe/ru/m/tankz/game/GameRunner.hx +++ b/src/common/haxe/ru/m/tankz/game/GameRunner.hx @@ -68,7 +68,7 @@ class GameRunner extends Game implements EngineListener { } gameEventSignal.emit(EventUtil.buildBricksSpawn(engine.map)); gameEventSignal.emit(START(state)); - //for (i in 0...10) spawnBonus(); + //for (i in 0...10) spawnBonus("grenade"); } private function spawn(task:SpawnTask):Void { @@ -138,7 +138,7 @@ class GameRunner extends Game implements EngineListener { public function onSpawn(entity:EntityType):Void { } - private static function buildShot(bullet:Bullet, score:Int = 0):Shot { + private static function buildShot(bullet:Bullet, score:Null = null):Shot { return { tankId: bullet.tank.id, bulletId: bullet.id, @@ -200,7 +200,7 @@ class GameRunner extends Game implements EngineListener { emitTankChange(tank); } else { var score = tank.config.score; - if (tank.playerId.team == bullet.playerId.team) { + if (score != null && tank.playerId.team == bullet.playerId.team) { score = Math.round(score * -0.5); } gameEventSignal.emit(DESTROY(TANK(tank.id, buildShot(bullet, score)))); @@ -230,8 +230,10 @@ class GameRunner extends Game implements EngineListener { public function onDestroy(entity:EntityType):Void { } - private function spawnBonus():Void { - var type = config.bonuses[Math.floor(Math.random() * config.bonuses.length)].type; + private function spawnBonus(type:BonusType = null):Void { + if (type == null) { + type = config.bonuses[Math.floor(Math.random() * config.bonuses.length)].type; + } var point = { x: Math.floor(Math.random() * (engine.map.gridWidth - 1)), y: Math.floor(Math.random() * (engine.map.gridHeight - 1)), @@ -350,7 +352,7 @@ class GameRunner extends Game implements EngineListener { case DESTROY(EAGLE(id, shot)): var eagle:Eagle = engine.getEntity(id); eagle.death = true; - if (shot.score != 0) { + if (shot.score != null) { var tank:Tank = engine.getEntity(shot.tankId); changeScore(tank.playerId, shot.score); } @@ -376,7 +378,7 @@ class GameRunner extends Game implements EngineListener { if (tank.bonus && shot.bulletId != null) { spawnBonus(); } - if (shot.score != 0) { + if (shot.score != null) { var shooterTank:Tank = engine.getEntity(shot.tankId); changeScore(shooterTank.playerId, shot.score); } @@ -385,7 +387,7 @@ class GameRunner extends Game implements EngineListener { var bonus:Bonus = engine.getEntity(id); var tank:Tank = engine.getEntity(shot.tankId); applyBonus(tank, bonus); - if (shot.score != 0) { + if (shot.score != null) { changeScore(tank.playerId, shot.score); } engine.destroy(id); diff --git a/src/common/resources/classic/config.yaml b/src/common/resources/classic/config.yaml index 6e78091..828d750 100644 --- a/src/common/resources/classic/config.yaml +++ b/src/common/resources/classic/config.yaml @@ -40,8 +40,7 @@ team: players: - {<<: *human, index: 0, color: 0xFFFF00, control: 'null'} - {<<: *human, index: 1, color: 0x15C040, control: 'null'} - eagle: - score: 0 + eagle: {} points: - {team: human, type: eagle, index: -1, direction: right, x: 12, y: 24}