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
Colin McMillen
95acee959d
clean up private fields/properties
GitOrigin-RevId: d2caf0d5d7
4 years ago
Colin McMillen
7e8e5c3e6d
pull Width and Height into properties
GitOrigin-RevId: fe969e51cd
4 years ago
Colin McMillen
16062f65c3
World: convert from Tile[][] to List<Tile>
GitOrigin-RevId: 27db59aa11
4 years ago
Colin McMillen
e6fa78e30f
World: convert fields to properties
GitOrigin-RevId: 7b0552c278
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
0c7c15c047
set target framerate back to 60
GitOrigin-RevId: 7a97b3cd07
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
1ea4d6c39b
don't vsync; set target FPS to 120-ish
GitOrigin-RevId: 724e876b9a
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
Colin McMillen
83839c92ac
add Pause functionality
GitOrigin-RevId: 18fb954757
4 years ago
Colin McMillen
63aa190afe
move Debug.Enabled check into DrawToasts
GitOrigin-RevId: 8265b948f7
4 years ago
Colin McMillen
e30aa75f80
Debug: draw rasterized DebugLines to screen
GitOrigin-RevId: aa4253477f
4 years ago
Colin McMillen
bba9f643eb
Implement Bresenham's algorithm for line rasterization.
This is implemented as a static Line.Rasterize(Point p1, Point p2) function
that returns an array of Points. There's also a Line.Rasterize(x1, y1, x1, y2)
version for convenience.
Unit tests included.
GitOrigin-RevId: 525098f8c7
4 years ago
Colin McMillen
252fe5b243
remove unused using
GitOrigin-RevId: 1584816927
4 years ago
Colin McMillen
3246f8ea45
capitalize struct field names
GitOrigin-RevId: 6b4cca3873
4 years ago
Colin McMillen
cb66a32a24
add 1-space gap so that i can test bug #4
GitOrigin-RevId: 89e6e06f1d
4 years ago
Colin McMillen
34e7ab3ee1
make Toasts a list & implement FPS counter as a toast
GitOrigin-RevId: bae35697a0
4 years ago
Colin McMillen
bee17a99af
create Debug.AddLine() function [currently does nothing]
GitOrigin-RevId: c4f9afb4b0
4 years ago
Colin McMillen
938a38bd77
Camera.Update: remove unused time parameter
GitOrigin-RevId: b3c427b9cc
4 years ago
Colin McMillen
8752f53ac8
add GitLab config to copybara config
GitOrigin-RevId: d933c46b21
4 years ago
Colin McMillen
ae8fa0d21d
Revert "Add .gitignore and .gitattributes."
This reverts commit 5c9f574644
.
GitOrigin-RevId: 277054282d
4 years ago