Skip to content

Commit

Permalink
Character animation (#87)
Browse files Browse the repository at this point in the history
* Added Sprite Sheet (#85)

* Added Sprite Sheet

Added a sprite sheet for the sample character and a data sheet to reference it's animation cycle

* Wrote the SpriteSheet class, which will hold information about a sprite sheet.

* Added XML (#86)

Added a sprite sheet for the sample character and a data sheet to reference it's animation cycle

* Added XML

* Wrote the ComponentRenderer

* Moving around an information class, working on layers.

* Moved a bunch of things.

* Working on cleaner deserialization.

* Sprite sheet reader now functional.

* Switching to the new rendering system.

* Plenty of work on the animated texture system.

* Fixing animation system bugs. Fixed the 1st.

* Fixed a invisibility bug in the animation framework.

* Added an FPS counter, disproved that bad FPS was the cause of my issues.

* Fixed the error that caused creatures to not transition smoothly between tiles.

* Fixed a memory leak.

* Tweaked the FPS of the walking animations.

* Many code tweaks.
  • Loading branch information
TBye101 authored Oct 14, 2018
1 parent 406175b commit 2d2720a
Show file tree
Hide file tree
Showing 133 changed files with 1,522 additions and 978 deletions.
16 changes: 16 additions & 0 deletions Assets/Graphics/Characters/Base model/BaseCharacterData.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<tilemap tileswide="3" tileshigh="4" tilewidth="64" tileheight="64">
<layer number="0" name="Layer 0">
<tile x="0" y="0" tile="0" rot="0" flipX="false"/>
<tile x="1" y="0" tile="1" rot="0" flipX="false"/>
<tile x="2" y="0" tile="2" rot="0" flipX="false"/>
<tile x="0" y="1" tile="3" rot="0" flipX="false"/>
<tile x="1" y="1" tile="4" rot="0" flipX="false"/>
<tile x="2" y="1" tile="5" rot="0" flipX="false"/>
<tile x="0" y="2" tile="6" rot="0" flipX="false"/>
<tile x="1" y="2" tile="7" rot="0" flipX="false"/>
<tile x="2" y="2" tile="8" rot="0" flipX="false"/>
<tile x="0" y="3" tile="9" rot="0" flipX="false"/>
<tile x="1" y="3" tile="10" rot="0" flipX="false"/>
<tile x="2" y="3" tile="11" rot="0" flipX="false"/>
</layer>
</tilemap>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ SneakyTactician <[email protected]>
* Job system is now client side
* Job system now has enhanced support for dependencies
* Job system now has enhanced support for "bound" (same worker) jobs
* Graphics API reworked to support animations, as well as any future different types of rendering

#### Server
* The newgame command now requires a 3rd parameter, the world's name
Expand All @@ -26,12 +27,16 @@ SneakyTactician <[email protected]>
* Stone rubble texture has been replaced
* Pickaxe icon in map when tile is queue up to be mined has changed
* Added the ability to zoom in
* Characters now have new texture
* Characters now have animations

#### Sound

#### Bugs

* Fixed a mining command bug
* Fixed a memory Leak

---

## [Version 0.0.9]
Expand All @@ -45,7 +50,7 @@ SneakyTactician <[email protected]>
* Added internal support for sfx/sound events

#### Server
* Seperated server loading and server starting into two seperate commands
* Separated server loading and server starting into two separate commands
* Now handles player connections and disconnections in a safer way

#### GUI
Expand Down
3 changes: 3 additions & 0 deletions EarthWithMagic.sln
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MagicalLifeDedicatedServer", "MagicalLifeDedicatedServer\MagicalLifeDedicatedServer.csproj", "{38385939-AFA9-44AA-9291-20F48EBFE8E9}"
EndProject
Global
GlobalSection(Performance) = preSolution
HasPerformanceSessions = true
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Expand Down
1 change: 1 addition & 0 deletions MagicalLifeAPI/Asset/AssetManager.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using MagicalLifeAPI.Error.InternalExceptions;
using Microsoft.Xna.Framework.Graphics;
using System;
using System.Collections.Generic;

namespace MagicalLifeAPI.Asset
Expand Down
83 changes: 52 additions & 31 deletions MagicalLifeAPI/Asset/TextureLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,35 @@ public class TextureLoader : IGameLoader

private readonly ContentManager Manager;

public static readonly string GUIListBoxItemBackground = "GUI/ListBoxItemBackground";
public static readonly string GUIPickaxeButtonGold = "GUI/PickaxeButton_Gold";
public static readonly string GUIPickaxeButtonGrey = "GUI/PickaxeButton_Grey";
public static readonly string GUICursorCarrot = "GUI/CursorCarrot";
public static readonly string GUIInputBox100x50 = "GUI/InputBox100x50";
public static readonly string GUIMenuBackground = "GUI/MenuBackground";
public static readonly string GUIMenuButton = "GUI/MenuButton";
public static readonly string GUIPickaxeMapIcon = "GUI/PickaxeMapIcon";

public static readonly string TextureDirt1 = "Textures/Tile/Dirt_01";
public static readonly string TextureDirt2 = "Textures/Tile/Dirt_02";
public static readonly string TextureGrass1 = "Textures/Tile/Grass_01";
public static readonly string TextureGrass2 = "Textures/Tile/Grass_02";
public static readonly string TextureGrass3 = "Textures/Tile/Grass_03";
public static readonly string TextureGrass4 = "Textures/Tile/Grass_04";
public static readonly string TextureStone1 = "Textures/Resource/Stone_01";
public static readonly string TextureStone2 = "Textures/Resource/Stone_02";
public static readonly string TextureStoneRubble1 = "Textures/Items/StoneRubble_01";
public static readonly string TextureStoneRubble2 = "Textures/Items/StoneRubble_02";
public static readonly string TextureTestTile = "Textures/Tile/TestTile";

public static readonly string FontMainMenuFont12x = "Fonts/MainMenuFont12x";
public static readonly string FontMainMenuFont24x = "Fonts/MainMenuFont24x";

public static readonly string LogoFMOD = "Logo/FMODLogo";
public static readonly string LogoMonoGame = "Logo/MonoGameLogo";

public static readonly string AnimationBaseCharacter = "Character/Base Character/BaseCharacterSprite";

public TextureLoader(ContentManager manager)
{
this.Manager = manager;
Expand All @@ -29,40 +58,32 @@ public TextureLoader()

private void Prepare()
{
this.TexturesToLoad.Add("Basic Human");
this.TexturesToLoad.Add("CursorCarrot");

this.TexturesToLoad.Add("MenuBackground");
this.TexturesToLoad.Add("MenuButton");
this.TexturesToLoad.Add("InputBox100x50");
this.TexturesToLoad.Add("GUI/ListBoxItemBackground");

this.TexturesToLoad.Add("Stone");
this.TexturesToLoad.Add("StoneRubble_01");
this.TexturesToLoad.Add("StoneRubble_02");

this.TexturesToLoad.Add("TestTile");
this.TexturesToLoad.Add("Dirt");
this.TexturesToLoad.Add("Character/Character");
this.TexturesToLoad.Add(GUIListBoxItemBackground);
this.TexturesToLoad.Add(GUIPickaxeButtonGold);
this.TexturesToLoad.Add(GUIPickaxeButtonGrey);
this.TexturesToLoad.Add(GUICursorCarrot);
this.TexturesToLoad.Add(GUIInputBox100x50);
this.TexturesToLoad.Add(GUIMenuBackground);
this.TexturesToLoad.Add(GUIMenuButton);
this.TexturesToLoad.Add(GUIPickaxeMapIcon);

this.TexturesToLoad.Add("DirtGrassTrans1");
this.TexturesToLoad.Add("DirtGrassTrans2");
this.TexturesToLoad.Add("DirtGrassTrans3");
this.TexturesToLoad.Add("DirtGrassTrans4");
this.TexturesToLoad.Add("DirtGrassTrans5");
this.TexturesToLoad.Add("DirtGrassTrans6");
this.TexturesToLoad.Add("DirtGrassTrans7");
this.TexturesToLoad.Add("DirtGrassTrans8");
this.TexturesToLoad.Add("DirtGrassTrans9");
this.TexturesToLoad.Add("DirtGrassTrans10");
this.TexturesToLoad.Add("DirtGrassTrans11");
this.TexturesToLoad.Add("DirtGrassTrans12");
this.TexturesToLoad.Add(TextureDirt1);
this.TexturesToLoad.Add(TextureDirt2);
this.TexturesToLoad.Add(TextureGrass1);
this.TexturesToLoad.Add(TextureGrass2);
this.TexturesToLoad.Add(TextureGrass3);
this.TexturesToLoad.Add(TextureGrass4);
this.TexturesToLoad.Add(TextureStone1);
this.TexturesToLoad.Add(TextureStone2);
this.TexturesToLoad.Add(TextureStoneRubble1);
this.TexturesToLoad.Add(TextureStoneRubble2);
this.TexturesToLoad.Add(TextureTestTile);

this.TexturesToLoad.Add("Grass");
this.TexturesToLoad.Add(LogoFMOD);
this.TexturesToLoad.Add(LogoMonoGame);

this.TexturesToLoad.Add("GUI/PickaxeButton_Grey");
this.TexturesToLoad.Add("GUI/PickaxeButton_Gold");
this.TexturesToLoad.Add("PickaxeMapIcon");

this.TexturesToLoad.Add(AnimationBaseCharacter);
}

public void InitialStartup()
Expand Down
26 changes: 0 additions & 26 deletions MagicalLifeAPI/Components/Generic/Renderable/AbstractRenderable.cs

This file was deleted.

14 changes: 0 additions & 14 deletions MagicalLifeAPI/Components/Generic/Renderable/IRenderable.cs

This file was deleted.

29 changes: 0 additions & 29 deletions MagicalLifeAPI/Components/Generic/Renderable/StaticTexture.cs

This file was deleted.

153 changes: 0 additions & 153 deletions MagicalLifeAPI/Components/Tile/Renderable/AbstractConnectedTexture.cs

This file was deleted.

Loading

0 comments on commit 2d2720a

Please sign in to comment.