Colin McMillen
987c86fae9
mv World & Scene to SneakWorld & SneakScene.
4 years ago
Colin McMillen
0e44fa9730
Player: remove Pose as a concept.
4 years ago
Colin McMillen
c28f21eef5
Player: partial refactor to use FSM for player state-tracking.
4 years ago
Colin McMillen
3dea13a386
bump starting size of Player.movePoints & Player.candidates
4 years ago
Colin McMillen
e0d5385350
camera now tracks player y-position too
4 years ago
Colin McMillen
a6c297196a
Add ProfilingList & use it in Player.
4 years ago
Colin McMillen
70308a5d84
make fields readonly
4 years ago
Colin McMillen
2aef0e26f5
Player: stop making a List<AABB> every frame.
4 years ago
Colin McMillen
de01b04873
Player: stop creating a new Point[] via Line.Rasterize every frame.
4 years ago
Colin McMillen
7625339d4c
add TODOs for places where "new" is used during per-frame code
Fixes #12 .
4 years ago
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