Commit Graph

15 Commits

Author SHA1 Message Date
57d15cbbd9 Load all textures & fonts in one place.
GitOrigin-RevId: 076c86b24f4e4e314a52457a01d5c77e197a2fa2
2020-02-19 11:20:20 -05:00
7e7b0f7715 Move most of the drawing code into a Scene class
GitOrigin-RevId: 4515493a3bbf99b9513f2f1e66acadae1df53a5a
2020-02-17 21:08:32 -05:00
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: 0e769d3288dce17fe174b2a1d82a99b1d9994213
2020-02-13 14:55:18 -05:00
5672e292cc add Levels file to hold level definitions (for now)
GitOrigin-RevId: ba9c09158f615844be53a1c294d7b8d88c9a62e2
2020-02-13 14:54:30 -05:00
bf2f33f698 add Timer class to projitems
related to issue #33

GitOrigin-RevId: 2870974cfb34ec14a754d6fcdc976fc7e3fb126c
2020-02-13 14:54:10 -05:00
878d434b22 Add code for intersecting axis-aligned bounding boxes with segments & each other
GitOrigin-RevId: 99a855c1a813c0fcdd4fca0fd31456b62e964abb
2020-02-13 14:52:07 -05:00
f5ca85264f Add Clock class & use it from Player and SneakGame
GitOrigin-RevId: fe20c836ca693fdabad4ce72bfdf8952b59b735b
2020-02-13 14:51:19 -05:00
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: 525098f8c76c6c3d1a6ff2c32fa2206cff080a11
2020-02-13 14:50:53 -05:00
ae8fa0d21d Revert "Add .gitignore and .gitattributes."
This reverts commit 5c9f574644ecd78b112ea857d658f670ef4773e3.

GitOrigin-RevId: 277054282d105e4a5f185ac51983581c89b8a031
2020-02-13 14:50:24 -05:00
cb1b78b875 Add .gitignore and .gitattributes.
GitOrigin-RevId: 5c9f574644ecd78b112ea857d658f670ef4773e3
2020-02-13 14:50:20 -05:00
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: 80fbed887408ae2b80c01273a49b150f38285dcb
2020-02-13 14:49:45 -05:00
361a02c67f rm KeyboardInput
GitOrigin-RevId: 1725d577c5be04488a6723b65c0c93fa25d12ab5
2020-02-13 14:49:12 -05:00
9af191e801 remove last Jumpy vestiges
GitOrigin-RevId: 259aa3ce7311b1b82f0d0edee81adfa07e50ef7f
2020-02-13 14:48:42 -05:00
d75a469acc Move JumpyGame -> SneakGame & fix references
GitOrigin-RevId: ec99138000848e4cdcf371b53ce0dd2fe5ebed70
2020-02-13 14:48:39 -05:00
569a330e89 move Jumpy.Shared -> Shared directory
GitOrigin-RevId: 781f1fb42b49baa0463ac284ffba7df767fdf8b3
2020-02-13 14:48:28 -05:00