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
Colin McMillen
cb1b78b875
Add .gitignore and .gitattributes.
GitOrigin-RevId: 5c9f574644
5 years ago
Colin McMillen
f6f25144b6
SharedTests: don't depend on specific MonoGame version
GitOrigin-RevId: d30010bbac
4 years ago
Colin McMillen
ea07fc146b
add TODO about setting ySpeed = 0 in head-bonk
GitOrigin-RevId: 657d92ebbd
4 years ago
Colin McMillen
2f75847615
remove toast
GitOrigin-RevId: f4e9adf692
4 years ago
Colin McMillen
459e43186a
refactor Player input/state handling to be less tangled
GitOrigin-RevId: 68bd79b722
4 years ago
Colin McMillen
ea82c4ffd3
rename SpritePosition -> SpriteIndex
GitOrigin-RevId: b620c8922b
4 years ago
Colin McMillen
03b8688f1e
World: use single multi-line string instead of a string[]
GitOrigin-RevId: 38c0745c95
4 years ago
Colin McMillen
a719e5b370
Add secondary buttons for jump & attack
GitOrigin-RevId: adac7b3aa1
4 years ago
Colin McMillen
bbdc3c3053
SneakGame: remove History<GamePadState> & History<KeyboardState>.
GitOrigin-RevId: 1b8dfef93a
4 years ago
Colin McMillen
db6f3e1425
Add Input class to group gamepad & keyboard inputs together.
For motion directions (up/down & left/right), have them cancel each other out
if the player attempts to go in opposite directions at once.
Refactor Player & SneakGame to use the new Input class & remove direct access
to Keyboard & GamePad.
GitOrigin-RevId: 80fbed8874
4 years ago
Colin McMillen
9a1c6646dd
properly handle non-rectangular input string[]s
GitOrigin-RevId: eb580f2e9c
4 years ago
Colin McMillen
f58faa0b9f
comment out Toast from Camera
GitOrigin-RevId: 3507b5cd38
4 years ago
Colin McMillen
fb074dc318
History: make backing array readonly
GitOrigin-RevId: 33c1bfb915
4 years ago
Colin McMillen
cc37561076
run dos2unix on all source files
GitOrigin-RevId: c65ff59d86
4 years ago
Colin McMillen
960521a6e0
History: add ToArray() method to make tests cleaner
GitOrigin-RevId: 5bbf5be614
4 years ago
Colin McMillen
3f6fc67cb6
add unit tests to copybara config
GitOrigin-RevId: 4ad6471d55
4 years ago
Colin McMillen
ab692f94a7
Add unit tests for History class.
Also introduce .editorconfig file and update .csproj files.
GitOrigin-RevId: 60369ee53b
4 years ago
Colin McMillen
b169584794
cleanup: spritePosition -> SpritePosition
GitOrigin-RevId: b715b0be54
4 years ago
Colin McMillen
361a02c67f
rm KeyboardInput
GitOrigin-RevId: 1725d577c5
4 years ago
Colin McMillen
660d163119
converted all TODOs into Issues
GitOrigin-RevId: aae80308b3
4 years ago
Colin McMillen
c9d3bc7f66
add README to copybara config
GitOrigin-RevId: 07b6d968d5
4 years ago