Colin McMillen
b06155aa88
Render backgrounds from back-to-front in an array.
GitOrigin-RevId: 1f4ca760d4
4 years ago
Colin McMillen
cf5167fba7
Player: tweak constants, track jump hangtime.
GitOrigin-RevId: 868003a326
4 years ago
Colin McMillen
90b003e0b0
Change Debug button from left shoulder to Select.
GitOrigin-RevId: 7e633c9904
4 years ago
Colin McMillen
05638483a4
Support 4-layer parallax-scrolling backgrounds.
GitOrigin-RevId: 58c1d1fee9
4 years ago
Colin McMillen
8405f32f3c
simplify lightingEffect initialization
GitOrigin-RevId: 28ca3d2336
4 years ago
Colin McMillen
57d15cbbd9
Load all textures & fonts in one place.
GitOrigin-RevId: 076c86b24f
4 years ago
Colin McMillen
8f5514b776
More refactoring of Tile loading.
GitOrigin-RevId: 96a697bc78
4 years ago
Colin McMillen
2934296649
Refactor tile creation to support assets from multiple tilesets.
GitOrigin-RevId: 9863c36821
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
f0ea8d8ef2
Reorganize Content/ into multiple subdirectories.
Add new tilesets from anokolisa.
GitOrigin-RevId: 90cfd52a3c
4 years ago
Colin McMillen
9eeede2310
Shared.shproj: remove redundant & out-of-date file listings
GitOrigin-RevId: e7cc4d730f
4 years ago
Colin McMillen
7935b6aaff
Scene: go back to drawing Player behind tiles.
GitOrigin-RevId: afaff144f2
4 years ago
Colin McMillen
7e7b0f7715
Move most of the drawing code into a Scene class
GitOrigin-RevId: 4515493a3b
4 years ago
Colin McMillen
43f6bded70
draw backgrounds as partially transparent
GitOrigin-RevId: b570a9aab7
4 years ago
Colin McMillen
786b230a6c
LinesOfSight: don't draw yellow lines
GitOrigin-RevId: 1ebd5fe922
4 years ago
Colin McMillen
e2ea2e1d3f
Add ability to restart the level. Fixes #9 .
GitOrigin-RevId: e7a0cdcdde
4 years ago
Colin McMillen
1ffe1444b2
Debug: draw rects as 4 GPU-accelerated lines.
GitOrigin-RevId: 3286d0476b
4 years ago
Colin McMillen
48a9297a57
draw Debug stuff on top of everything (after lighting)
GitOrigin-RevId: e07fbc6b27
4 years ago
Colin McMillen
5d21ff2a0f
Debug.DrawLines: use GPU to draw lines.
Fixes #19 .
GitOrigin-RevId: d837e0ddaf
4 years ago
Colin McMillen
a21802e9f2
FMath.DegToRad(): use look-up table.
GitOrigin-RevId: 2dab2e175c
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
4d64d6fa12
Initialize and dispose of whiteTexture in SneakGame.
Fixes #7 .
GitOrigin-RevId: 024688e8fc
4 years ago
Colin McMillen
257a74ca58
LinesOfSight: use less-deprecated DrawIndexedPrimitives() call.
GitOrigin-RevId: 87d9482de3
4 years ago
Colin McMillen
23278334b0
use DrawIndexedPrimitives; fixes #41
GitOrigin-RevId: 6cc7429d0b
4 years ago
Colin McMillen
f01efcde01
Split LinesOfSight into separate Draw() and Update() functions.
Don't make new arrays every frame.
Partial solution to bug #41 , just need to DrawIndexedPrimitives() now.
GitOrigin-RevId: 0e769d3288
4 years ago
Colin McMillen
5b7c0dd888
move LinesOfSight into its own file
GitOrigin-RevId: 21a722cc9d
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
7cc953a44e
add extension method: Vector2.Rotate()
GitOrigin-RevId: ee1e84ff18
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
80746ecaed
Use world definition from Levels file
GitOrigin-RevId: a5d19f4f08
4 years ago
Colin McMillen
d30be7a460
Timer: don't automatically DumpStats(); refactor string prefixes during dump
GitOrigin-RevId: 93b7d65282
4 years ago
Colin McMillen
5672e292cc
add Levels file to hold level definitions (for now)
GitOrigin-RevId: ba9c09158f
4 years ago
Colin McMillen
2d2a3fde7d
Timer formatting: change 200%+ to 200+%
GitOrigin-RevId: d04c35760d
4 years ago
Colin McMillen
80f1104d82
Timer: better histogram formatting. bin into 10% intervals instead of 5%
GitOrigin-RevId: 9729f04bd6
4 years ago
Colin McMillen
9e4d863bcf
add performance counters to SneakGame. Fixes #33 .
Also, suppress drawing until Draw() has not been IsRunningSlowly for two
frames. This prevents janky behavior that happens during loading (I suspect
while texture loading is happening, but I'm not sure?)
GitOrigin-RevId: 5df31be371
4 years ago
Colin McMillen
0f9d546398
make Clamp() generic across comparables and move it into FMath.
GitOrigin-RevId: 4ed26cc24d
4 years ago
Colin McMillen
bf2f33f698
add Timer class to projitems
related to issue #33
GitOrigin-RevId: 2870974cfb
4 years ago
Colin McMillen
36ebeadddf
add Timer class for tracking draw & update times (etc)
related issue: #33
GitOrigin-RevId: 3762a7a5c7
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
1f7da03515
make char-to-terrain lookup dictionary-based instead of switch-based
GitOrigin-RevId: 0d81e95bf0
4 years ago
Colin McMillen
b731e1a785
make tile-texture lookup dictioanry-based instead of switch-based
GitOrigin-RevId: 2f0c215bf9
4 years ago
Colin McMillen
c1232d462d
make swordSwingMax const
GitOrigin-RevId: 911bff5fb6
4 years ago
Colin McMillen
3286db1c86
remove Terrain.Empty and clean up TextureSource() switch statement
GitOrigin-RevId: 7de691a440
4 years ago
Colin McMillen
f7f7d5076e
Pre-compute texture-source Rectangles.
Fixes #14 .
GitOrigin-RevId: e09d86a099
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
554578968d
Geometry: add FMath class & convenient accessors for AABB corners.
The FMath class is like the System.Math class, but returns floats instead of
doubles so that you don't have to redundantly cast things.
GitOrigin-RevId: 0e1d7f46c7
4 years ago