Colin McMillen
967e93d56e
update README
GitOrigin-RevId: 621666d7c6
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
82cf612834
update copybara config to point at new public URL
GitOrigin-RevId: a664378a81
4 years ago
Colin McMillen
d4f3b2b703
update copybara config to point at new private URL
GitOrigin-RevId: 4b40c2c55c
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
Colin McMillen
141a0660c4
Debug: draw lines correctly based on camera position.
Make convenience function for calling AddLine() with Vectors.
GitOrigin-RevId: 6ca9849f11
4 years ago
Colin McMillen
1fd515070d
make it possible for new sprite to hit the right end of world
GitOrigin-RevId: 95f7abdea1
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
a240f0dc31
Python script for importing assets from the CCG pack.
GitOrigin-RevId: ee77a84b9b
4 years ago
Colin McMillen
10453ee5ea
World: add Height property (in pixels)
GitOrigin-RevId: 0ae9f03f8e
4 years ago
Colin McMillen
bb8cf9e63b
make CollisionTargets an auto property
GitOrigin-RevId: ca7bf8f68b
4 years ago
Colin McMillen
76dbdc6913
Bound camera by right edge of World.
Fixes #32 .
GitOrigin-RevId: e193c89509
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
50479bac3c
while paused, don't clear the list of Debug rects & lines
GitOrigin-RevId: d298abc6ad
4 years ago
Colin McMillen
588b18f9ad
fix Debug.Toast() & re-enable it
GitOrigin-RevId: ae553145ed
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
4410ff137a
add Debug.AddRect(AABB) function
GitOrigin-RevId: 0acfc3f43f
4 years ago
Colin McMillen
f1f717da63
remove unused using statement
GitOrigin-RevId: d3730b153c
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
bff5d2b490
enable Debug by default
GitOrigin-RevId: ba7ff1d9b7
4 years ago
Colin McMillen
878d434b22
Add code for intersecting axis-aligned bounding boxes with segments & each other
GitOrigin-RevId: 99a855c1a8
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
644ed88dd8
World: add Tiles to list so that they're sorted by x-coordinate
GitOrigin-RevId: f9c6cf8be4
4 years ago
Colin McMillen
57e9ea558a
add Debug.AddLine() function that takes in integer coordinates instead of Points
GitOrigin-RevId: 145f4f0763
4 years ago
Colin McMillen
8c6b0e3c92
set vsync = true; setting it false seems to cause crashes on UWP
GitOrigin-RevId: 6f30cefcaa
4 years ago