From 18d5c1492f061bbec9b73932d712cc5c4a4f2202 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Mon, 8 Mar 2021 16:04:51 +0100 Subject: [PATCH] jump pad --- GreatSpringGameJam/Content/Maps/Level1.tmx | 26 +++++++++--------- .../Content/Tilesets/World.aseprite | Bin 1101 -> 1184 bytes GreatSpringGameJam/Content/Tilesets/World.png | Bin 1183 -> 1344 bytes GreatSpringGameJam/Content/Tilesets/World.tsx | 14 ++++++++++ GreatSpringGameJam/Entity.cs | 25 +++++++++++++---- GreatSpringGameJam/GreatSpringGameJam.csproj | 6 ++-- GreatSpringGameJam/Player.cs | 22 +++++++++++---- GreatSpringGameJam/WaterDrop.cs | 5 ++-- 8 files changed, 69 insertions(+), 29 deletions(-) diff --git a/GreatSpringGameJam/Content/Maps/Level1.tmx b/GreatSpringGameJam/Content/Maps/Level1.tmx index 6100796..da7ecc2 100644 --- a/GreatSpringGameJam/Content/Maps/Level1.tmx +++ b/GreatSpringGameJam/Content/Maps/Level1.tmx @@ -25,14 +25,14 @@ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,22,0,0,0,22,23,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, diff --git a/GreatSpringGameJam/Content/Tilesets/World.aseprite b/GreatSpringGameJam/Content/Tilesets/World.aseprite index 8cb7089968a5d5d0a9b8aeb291be8e2a776abd6a..9891552c002d885db53d7ce8321c5927e5db8d57 100644 GIT binary patch delta 805 zcmV+=1KRw}2%rf8ppgN80w4sDg7*R^1Cx6J9e-{WF%X9LBuGez{KcE~`t4>}mgV`U zH|tEX{N?BS7wgu@m045PGBLS!_;7pnB&^%^$S3#Q!SA;hPeSvQ)_;F@{!iH{tob~m z-G6x~we@Hry>kc2ClBdJ?!(KKxt9DC(e6A*-D%eC-+0?mV3OY`Okm zjb8a$-RXE-Dvuwxz4_7ZJmfx;{QTN_>$;Zt+A{OTD$*W{BA^1k=`Yh#L8v5sFx3GO|* zF468hl{w(A7QIGQ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5qf~sJUw@*-i3#G_bd7{ zkkq?>s4!uxhk8Ap{Y=hG(dzkozqp~ogq_BG03QK{a6cq7DKvnT#C^90o%d%t*e?+J ztX(Tf(;wvNo*GUP1Bw)>#4VR|p}TMuqYw7d90bw>q%2DERed*gJpc^D^^*YwD3cHc c2p9B*|AfsRsESjFHvj+t07*qoM6N<$g6u3fVgLXD diff --git a/GreatSpringGameJam/Content/Tilesets/World.tsx b/GreatSpringGameJam/Content/Tilesets/World.tsx index 64d2339..f1de25d 100644 --- a/GreatSpringGameJam/Content/Tilesets/World.tsx +++ b/GreatSpringGameJam/Content/Tilesets/World.tsx @@ -41,6 +41,11 @@ + + + + + @@ -51,4 +56,13 @@ + + + + + + + + + diff --git a/GreatSpringGameJam/Entity.cs b/GreatSpringGameJam/Entity.cs index 570f352..51a315e 100644 --- a/GreatSpringGameJam/Entity.cs +++ b/GreatSpringGameJam/Entity.cs @@ -1,9 +1,11 @@ using System; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; +using MLEM.Extended.Tiled; using MLEM.Extensions; using MLEM.Startup; using MLEM.Textures; +using MonoGame.Extended.Tiled; using RectangleF = MonoGame.Extended.RectangleF; namespace GreatSpringGameJam { @@ -26,17 +28,28 @@ namespace GreatSpringGameJam { public virtual void Draw(GameTime time, SpriteBatch batch) { } - protected void Collide(Func getArea, ref Vector2 velocity, out bool onGround) { + protected void Collide(Func getArea, ref Vector2 velocity, ref bool onGround) { + // if we're not on the ground, we should prioritize x collisions to be pushed out of walls first + var penetrations = this.Map.Collisions.GetPenetrations(getArea, prioritizeX: !onGround); onGround = false; - foreach (var (normal, penetration) in this.Map.Collisions.GetPenetrations(getArea)) { - if (penetration.Equals(0, 0.015F)) - continue; + foreach (var (normal, penetration) in penetrations) { this.Position -= normal * penetration; - velocity *= new Vector2(Math.Abs(normal.Y), Math.Abs(normal.X)); - if (normal.Y > 0) + if (normal.Y > 0) { onGround = true; + var below = this.GetTileBelow(); + if (below != null && below.Properties.GetBool("JumpPad") && velocity.Y > 0) { + velocity.Y = -velocity.Y; + continue; + } + } + velocity *= new Vector2(Math.Abs(normal.Y), Math.Abs(normal.X)); } } + protected TiledMapTilesetTile GetTileBelow() { + var tile = this.Map.GetTile("Ground", (this.Position.X + 0.5F).Floor(), (this.Position.Y + 1).Floor()); + return !tile.IsBlank ? this.Map.GetTilesetTile(tile) : null; + } + } } \ No newline at end of file diff --git a/GreatSpringGameJam/GreatSpringGameJam.csproj b/GreatSpringGameJam/GreatSpringGameJam.csproj index 6b749b1..9cf0eaf 100644 --- a/GreatSpringGameJam/GreatSpringGameJam.csproj +++ b/GreatSpringGameJam/GreatSpringGameJam.csproj @@ -9,9 +9,9 @@ - - - + + + diff --git a/GreatSpringGameJam/Player.cs b/GreatSpringGameJam/Player.cs index 2ed323a..dba8e30 100644 --- a/GreatSpringGameJam/Player.cs +++ b/GreatSpringGameJam/Player.cs @@ -4,11 +4,13 @@ using Microsoft.Xna.Framework.Graphics; using Microsoft.Xna.Framework.Input; using MLEM.Animations; using MLEM.Extended.Extensions; +using MLEM.Extended.Tiled; using MLEM.Extensions; using MLEM.Input; using MLEM.Startup; using MLEM.Textures; using MonoGame.Extended; +using MonoGame.Extended.Tiled; using RectangleF = MLEM.Misc.RectangleF; namespace GreatSpringGameJam { @@ -25,6 +27,7 @@ namespace GreatSpringGameJam { private TimeSpan jumpTime; private bool facingRight; private HeldItem heldItem; + private float currJumpHeight; public Player(Map map, Vector2 position) : base(map, position) { this.animations = new SpriteAnimationGroup(); @@ -34,6 +37,13 @@ namespace GreatSpringGameJam { public override void Update(GameTime time) { base.Update(time); + float jumpHeight; + var tileBelow = this.GetTileBelow(); + if (tileBelow != null && tileBelow.Properties.GetBool("JumpPad")) { + jumpHeight = 0.25F; + } else { + jumpHeight = 0.15F; + } // input var move = 0F; @@ -50,20 +60,22 @@ namespace GreatSpringGameJam { if (MlemGame.Input.IsAnyDown(Keys.Up, Keys.Space)) { // only start jumping if we just started pressing the buttons - if (this.onGround && MlemGame.Input.IsAnyPressed(Keys.Up, Keys.Space)) + if (this.onGround && MlemGame.Input.IsAnyPressed(Keys.Up, Keys.Space)) { this.jumpTime = TimeSpan.FromSeconds(0.3F); + this.currJumpHeight = jumpHeight; + } this.jumpTime -= time.ElapsedGameTime; if (this.jumpTime > TimeSpan.Zero) - this.velocity.Y = -0.15F; + this.velocity.Y = -this.currJumpHeight; } else { this.jumpTime = TimeSpan.Zero; } // movement and collisions this.Position += this.velocity; - this.Collide(() => this.Bounds.ToExtended(), ref this.velocity, out this.onGround); - this.velocity *= new Vector2(this.onGround ? 0.5F : 0.6F, 0.9F); - this.velocity.Y += 0.02F; + this.Collide(() => this.Bounds.ToExtended(), ref this.velocity, ref this.onGround); + this.velocity *= new Vector2(this.onGround ? 0.5F : 0.6F, 0.95F); + this.velocity.Y += 0.015F; // item usage var rot = this.GetHeldRotation(); diff --git a/GreatSpringGameJam/WaterDrop.cs b/GreatSpringGameJam/WaterDrop.cs index 8827349..37f9e34 100644 --- a/GreatSpringGameJam/WaterDrop.cs +++ b/GreatSpringGameJam/WaterDrop.cs @@ -11,6 +11,7 @@ namespace GreatSpringGameJam { private readonly bool growsPlants; private Vector2 velocity; private TimeSpan timeToLive; + private bool onGround; public WaterDrop(Map map, Vector2 position, Vector2 velocity) : base(map, position) { this.velocity = velocity; @@ -22,8 +23,8 @@ namespace GreatSpringGameJam { base.Update(time); this.Position += this.velocity; - this.Collide(() => new RectangleF(this.Position - new Vector2(1 / 16F), new Vector2(2 / 16F)), ref this.velocity, out var onGround); - if (onGround) + this.Collide(() => new RectangleF(this.Position - new Vector2(1 / 16F), new Vector2(2 / 16F)), ref this.velocity, ref this.onGround); + if (this.onGround) this.velocity = Vector2.Zero; this.velocity.Y += 0.008F;