Commit Graph

310 Commits

Author SHA1 Message Date
63aa190afe move Debug.Enabled check into DrawToasts
GitOrigin-RevId: 8265b948f772443580166f89fc39d46735852da3
2020-02-13 14:51:00 -05:00
e30aa75f80 Debug: draw rasterized DebugLines to screen
GitOrigin-RevId: aa4253477fa8e3657e19c5e0d534a3288bc23a0a
2020-02-13 14:50:56 -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
252fe5b243 remove unused using
GitOrigin-RevId: 1584816927db6030172d5b762782d249ccd6aa0c
2020-02-13 14:50:50 -05:00
3246f8ea45 capitalize struct field names
GitOrigin-RevId: 6b4cca3873a88c308a98dac9282959b13ab840bb
2020-02-13 14:50:47 -05:00
cb66a32a24 add 1-space gap so that i can test bug #4
GitOrigin-RevId: 89e6e06f1dbf85823846757a57939a263c322947
2020-02-13 14:50:43 -05:00
34e7ab3ee1 make Toasts a list & implement FPS counter as a toast
GitOrigin-RevId: bae35697a0329f7d5c1c45cdbc13c3be500b8c73
2020-02-13 14:50:39 -05:00
bee17a99af create Debug.AddLine() function [currently does nothing]
GitOrigin-RevId: c4f9afb4b06181ddff79c207a99bb6ba902e7ade
2020-02-13 14:50:36 -05:00
938a38bd77 Camera.Update: remove unused time parameter
GitOrigin-RevId: b3c427b9ccee9a2cfef1c8f24d1c653d975cb513
2020-02-13 14:50:32 -05:00
8752f53ac8 add GitLab config to copybara config
GitOrigin-RevId: d933c46b219ef6d70e3616d206236329875e928f
2020-02-13 14:50:28 -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
f6f25144b6 SharedTests: don't depend on specific MonoGame version
GitOrigin-RevId: d30010bbacd2ae06bf6ca0055b39c29260682e29
2020-02-13 14:50:16 -05:00
ea07fc146b add TODO about setting ySpeed = 0 in head-bonk
GitOrigin-RevId: 657d92ebbd303e3da4375ad23dfaf403025622cf
2020-02-13 14:50:13 -05:00
2f75847615 remove toast
GitOrigin-RevId: f4e9adf692392df1406f55b32e4a441caeb56f58
2020-02-13 14:50:09 -05:00
459e43186a refactor Player input/state handling to be less tangled
GitOrigin-RevId: 68bd79b722d7fcf2ef8abaf644e2b13544a08ae8
2020-02-13 14:50:05 -05:00
ea82c4ffd3 rename SpritePosition -> SpriteIndex
GitOrigin-RevId: b620c8922b92ac9f5b1b4298dfa9ed35a7641f11
2020-02-13 14:50:01 -05:00
03b8688f1e World: use single multi-line string instead of a string[]
GitOrigin-RevId: 38c0745c95e2341a1a2712d480f6403a6ec68ecf
2020-02-13 14:49:57 -05:00
a719e5b370 Add secondary buttons for jump & attack
GitOrigin-RevId: adac7b3aa185e10e8cf86046f8a88817c300ef36
2020-02-13 14:49:53 -05:00
bbdc3c3053 SneakGame: remove History<GamePadState> & History<KeyboardState>.
GitOrigin-RevId: 1b8dfef93a9024094e342fd2f00f02513451c14f
2020-02-13 14:49:49 -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
9a1c6646dd properly handle non-rectangular input string[]s
GitOrigin-RevId: eb580f2e9c5a6d93827982240fd295ba30fdb0c4
2020-02-13 14:49:41 -05:00
f58faa0b9f comment out Toast from Camera
GitOrigin-RevId: 3507b5cd381e69ea1d86b533b9e7335df3afeb4b
2020-02-13 14:49:37 -05:00
fb074dc318 History: make backing array readonly
GitOrigin-RevId: 33c1bfb915b4f2fb80c3bb1f4b88ef924a45363d
2020-02-13 14:49:34 -05:00
cc37561076 run dos2unix on all source files
GitOrigin-RevId: c65ff59d86415057167f600d1c31545b1ff0b49b
2020-02-13 14:49:30 -05:00
960521a6e0 History: add ToArray() method to make tests cleaner
GitOrigin-RevId: 5bbf5be614ed6c2d9884ac924ab627ccaa57e355
2020-02-13 14:49:26 -05:00
3f6fc67cb6 add unit tests to copybara config
GitOrigin-RevId: 4ad6471d55815fa14730d9c9d316ff3b7b68592a
2020-02-13 14:49:23 -05:00
ab692f94a7 Add unit tests for History class.
Also introduce .editorconfig file and update .csproj files.

GitOrigin-RevId: 60369ee53b0fe53135f4c2b7403284eabced3755
2020-02-13 14:49:19 -05:00
b169584794 cleanup: spritePosition -> SpritePosition
GitOrigin-RevId: b715b0be5499f41c905257f3b19481a9fd81bf71
2020-02-13 14:49:15 -05:00
361a02c67f rm KeyboardInput
GitOrigin-RevId: 1725d577c5be04488a6723b65c0c93fa25d12ab5
2020-02-13 14:49:12 -05:00
660d163119 converted all TODOs into Issues
GitOrigin-RevId: aae80308b34fcfa7a99b8dc97c56ee33ceb900ef
2020-02-13 14:49:08 -05:00
c9d3bc7f66 add README to copybara config
GitOrigin-RevId: 07b6d968d5f5dc59c9246c66e78d51651b7e9ce2
2020-02-13 14:49:04 -05:00
ac27972dba add skeletal README.md
GitOrigin-RevId: a0d588b6a46df14c9ebf1dd8fb7396384f302e55
2020-02-13 14:49:00 -05:00
9959c5702b rename LICENSE -> LICENSE.txt & add copy to tools/
GitOrigin-RevId: 62c1e512fd59bec50d4c92b281aed504f3387990
2020-02-13 14:48:56 -05:00
6ad9167818 add copybara script & config
GitOrigin-RevId: 3f8e5453ae75ef5724c00131a55e1315cef70841
2020-02-13 14:48:53 -05:00
ef84fa85a1 Add LICENSE to Shared/ directory
GitOrigin-RevId: 03aa301a15ca0721de385e6579d4a5f20866c444
2020-02-13 14:48:50 -05:00
710d1042ab remove TODO
GitOrigin-RevId: 91ae9789334d2e1096a2a75cde49e8e48472d8f6
2020-02-13 14:48:47 -05:00
f0630d1679 go back to just a single RenderTarget
GitOrigin-RevId: 0b8fc3090098f84047a85804bb5eb2a15249aadd
2020-02-13 14:48:44 -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
096f577e61 change namespace to SemiColinGames
GitOrigin-RevId: 3c4e116e770edfcca7f661b3f0d74bb312aa6a04
2020-02-13 14:48:35 -05:00
7e64f2a0be remove "Jumpy." from {Android, OpenGL, UWP}
GitOrigin-RevId: 26b6863116efa26e87fe7818a4ff4dda434e1968
2020-02-13 14:48:31 -05:00
569a330e89 move Jumpy.Shared -> Shared directory
GitOrigin-RevId: 781f1fb42b49baa0463ac284ffba7df767fdf8b3
2020-02-13 14:48:28 -05:00
9736e85345 rename "Jumpy.Shared" project to just "Shared"
GitOrigin-RevId: a1a4b62938748d3906512fee0129aa83ab9fa0bc
2020-02-13 14:48:25 -05:00
fc02b768a1 remove stale TODO
GitOrigin-RevId: b6ea9c98a19625ceaaa8ac4148d8b3b1a6a8c05f
2020-02-13 14:48:22 -05:00
37e3a8baba add keyboard controls for Player & toggling debug info
GitOrigin-RevId: 0ab5e524855b29d8a6261aef328a91893b2b4897
2020-02-13 14:48:20 -05:00
7ed88960a5 gate toasts behind Debug.Enabled, rearrange their position & color
GitOrigin-RevId: 4efcd95c3034a51f224fdc452d525b2e20057354
2020-02-13 14:48:17 -05:00
70d8bbfa29 make camera 1/4 size instead of 1/6
update World to match

GitOrigin-RevId: 0bcfc250909ad8f3e57d29a8cd78f1ea69dc58a7
2020-02-13 14:48:14 -05:00
010424f43f anchor the background images at the top
GitOrigin-RevId: caa4dc0ec3c84ea94dde51aef6f584fbd70ba45b
2020-02-13 14:48:10 -05:00
d3283a64c0 transcribe 1-1 as testing World
GitOrigin-RevId: 0267ea2f77636413d5681b212a23177de47c91dd
2020-02-13 14:48:06 -05:00