Colin McMillen
fb3538cea9
Add ability to move by a single pixel in DEBUG builds.
Fixes #15 .
Also enables the LeftShoulder + RightShoulder + [BUTTON] combos only while
we're in DEBUG mode.
4 years ago
Colin McMillen
9bd33a406a
remove unused Crouching & Stretching poses
4 years ago
Colin McMillen
393e9d14b9
Player: track position with a Vector2.
Fixes #10 (mostly).
4 years ago
Colin McMillen
3d1de388b8
remove jumpTime / jumpElapsed
4 years ago
Colin McMillen
8f79bb8680
add a little screen-shake
4 years ago
Colin McMillen
4870964cc5
attach LinesOfSight to the first NPC
4 years ago
Colin McMillen
fa4784fc49
IsHarmful -> IsHazard
4 years ago
Colin McMillen
5121f6d775
World: load levels by parsing a JSON level description.
4 years ago
Colin McMillen
0f8d9c2814
FSM / Player / NPCs now get World as an argument to Update()
4 years ago
Colin McMillen
b574a5a702
change Sprite / Animation times to double (sec) instead of int (ms).
4 years ago
Colin McMillen
53c6d8483f
include multiple NPCs, have them turn around based on platforms.
4 years ago
Colin McMillen
0b8eb3e3f1
Player: start using Sprite data to calculate texture source / animations.
4 years ago
Colin McMillen
02b1dd4874
Add simple NPC.
GitOrigin-RevId: 47cd7abaf8
4 years ago
Colin McMillen
de8ca4a374
Add sword-swing sound effects.
GitOrigin-RevId: 946a808c6f
4 years ago
Colin McMillen
f4581ecaf8
Player now takes damage from spikes.
GitOrigin-RevId: e909631621
4 years ago
Colin McMillen
c189cfcc09
Add player health & a heart sprite.
GitOrigin-RevId: 3389f46044
4 years ago
Colin McMillen
c2fa12db9b
Stop printing out jumpTime.
GitOrigin-RevId: dc06228338
4 years ago
Colin McMillen
0a64d17db5
fix lint errors
GitOrigin-RevId: 5de396b259
4 years ago
Colin McMillen
74b5e1ec2d
Debug rects: pull in top & left sides by a 1-pixel margin.
GitOrigin-RevId: 0f1f846e3f
4 years ago
Colin McMillen
ed7afd2fa1
TextureRef: make Get a property rather than a function
GitOrigin-RevId: a36369c33b
4 years ago
Colin McMillen
e72b8999e4
Make TextureRef class for holding textures.
Use it in World so that all Terrain-specific configuration can be specified in
one place.
GitOrigin-RevId: 31acf292ae
4 years ago
Colin McMillen
026623ac82
Fix memory leaks of graphics resources.
Make Scene & LinesOfSight dispose of the graphics resources they create.
Force GC when a new level is loaded.
GitOrigin-RevId: 0640cced78
4 years ago
Colin McMillen
cf5167fba7
Player: tweak constants, track jump hangtime.
GitOrigin-RevId: 868003a326
4 years ago
Colin McMillen
57d15cbbd9
Load all textures & fonts in one place.
GitOrigin-RevId: 076c86b24f
4 years ago
Colin McMillen
02aba3ad84
Game objects now take in a ContentManager & load their own textures.
GitOrigin-RevId: 4f40548d9f
4 years ago
Colin McMillen
24078d6c62
move FieldOfView into Player
GitOrigin-RevId: 6d6a409453
4 years ago
Colin McMillen
66f895fab8
Player: remove GetPose, add VisionRange and VisionRay.
Fixes #21 .
GitOrigin-RevId: 720972d1c8
4 years ago
Colin McMillen
c94ae6eb25
Player: make Facing an int property.
Partial work toward #21 .
GitOrigin-RevId: 902c46d19a
4 years ago
Colin McMillen
93a5d477bb
New FOV algorithm that works pretty well.
Saved for posterity here, approximately:
https://twitter.com/mcmillen/status/1227326054949408768
GitOrigin-RevId: e960dad1d9
4 years ago
Colin McMillen
ff0c9ddc26
Add a transformation matrix to spriteBatch.Draw().
Instead of having every drawable object know how to transform itself based on
the camera position, we pass in a transformation matrix to spriteBatch.Draw().
Unfortunately MonoGame only lets us specify a translation that works over an
entire SpriteBatch.Begin() call, so we need to begin & end separately for
objects that *aren't* supposed to translate at the same rate as the camera.
Fixes #39 .
GitOrigin-RevId: afab72c392
4 years ago
Colin McMillen
6b9890b6f7
Player: more line-of-sight debug lines
GitOrigin-RevId: 655eef2286
4 years ago
Colin McMillen
d44ac76d49
fix cones-of-sight tilting in the wrong up/down direction when facing left
GitOrigin-RevId: 6b4925c75f
4 years ago
Colin McMillen
4758ce519b
allow player to look up/down
GitOrigin-RevId: 00041d6736
4 years ago
Colin McMillen
c1232d462d
make swordSwingMax const
GitOrigin-RevId: 911bff5fb6
4 years ago
Colin McMillen
5cb3ff9fbd
first pass at implementing line-of-sight algorithm
partial solution for #29
GitOrigin-RevId: bb5f5dc057
4 years ago
Colin McMillen
57b65f559c
rename Aabb -> AABB
GitOrigin-RevId: 37b49d7a3f
4 years ago
Colin McMillen
f78bff249c
cycle through different attack animations
GitOrigin-RevId: e40102b81b
4 years ago
Colin McMillen
0e363de306
change player sprite to ninja
GitOrigin-RevId: 73bc09808a
4 years ago
Colin McMillen
fe64ec705d
Bound player position by both edges of the World.
Fixes #10 and #22 .
GitOrigin-RevId: 166be07898
4 years ago
Colin McMillen
ab62e8929a
cleanup: sprite{Height,Width} -> halfSize
GitOrigin-RevId: 5620d26f72
4 years ago
Colin McMillen
793b292a29
pass in AABBs instead of Rectangles to Player.Update
GitOrigin-RevId: 08fe1aaf34
4 years ago
Colin McMillen
946497160b
Player.Update() now uses Bresenham's line algorithm.
This works, but is still a bit hacky. Cleanups to follow soon.
GitOrigin-RevId: 597a857a20
4 years ago
Colin McMillen
f2db2f4b9e
use new collision-detection algorithm with old resolution algorithm (wip, slightly hacky)
GitOrigin-RevId: 998aa02a56
4 years ago
Colin McMillen
08792320df
make Facing's enum value correspond to the x-direction they're looking
GitOrigin-RevId: fe9318a68e
4 years ago
Colin McMillen
61b50efa40
make CollisionTargets an array, and don't recompute it every frame
GitOrigin-RevId: 92a02231ed
4 years ago
Colin McMillen
84fa044675
more readability fixed via Visual Studio suggestions
GitOrigin-RevId: 330f13485c
4 years ago
Colin McMillen
4b14aef1b5
make a bunch of fields readonly
GitOrigin-RevId: 0c3533c650
4 years ago
Colin McMillen
f5ca85264f
Add Clock class & use it from Player and SneakGame
GitOrigin-RevId: fe20c836ca
4 years ago
Colin McMillen
c7ec9e3ad7
start Player on ground
GitOrigin-RevId: e781328586
4 years ago
Colin McMillen
87100eaa67
Player.Update now takes a float which is the model time elapsed.
Player.Draw doesn't depend on time elapsed any more.
GitOrigin-RevId: 3396f85f61
4 years ago