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
0e164f7b75
mark field readonly
GitOrigin-RevId: 9e06f8a03a
4 years ago
Colin McMillen
0ee671c8b1
fix how the first line of World is parsed
GitOrigin-RevId: 9409e491fd
4 years ago
Colin McMillen
c4e211e750
more level decorations
GitOrigin-RevId: b6446a7451
4 years ago
Colin McMillen
f1b71ca87d
Tiles can now be obstacles (in the foreground) or decorations (in the background).
Updated Levels to show off some of these.
GitOrigin-RevId: d8d04410c1
4 years ago
Colin McMillen
08a31231e9
Draw LinesOfSight behind most other things.
Also remove the currently-unneeded lightingTarget.
GitOrigin-RevId: 95d96d966a
4 years ago
Colin McMillen
2fe8e53e77
Call GC.SuppressFinalize() from Dispose().
GitOrigin-RevId: 57b1d3760a
4 years ago
Colin McMillen
af9a48bc5d
small cleanups suggested by VS
GitOrigin-RevId: b1b3a687e3
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
1eb4d7a7d2
Debug off by default
GitOrigin-RevId: 0e0325057b
4 years ago
Colin McMillen
44bd3c6896
Show lines of sight only when Debug enabled
GitOrigin-RevId: 77de51cce5
4 years ago
Colin McMillen
b858c45b7e
Cycle through levels when player hits the "restart level" button.
GitOrigin-RevId: bbe909515f
4 years ago
Colin McMillen
6b9aa0844c
Update demo level.
GitOrigin-RevId: 90064478fe
4 years ago
Colin McMillen
0df153581c
Add new terrain types to World
GitOrigin-RevId: ab811a1b52
4 years ago
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