Commit Graph

248 Commits

Author SHA1 Message Date
544b8d2464 lint: print # errors and return 1 if any errors found
GitOrigin-RevId: bab4a38d64540385b1a4dc509ba8ffc48feb9293
2020-02-25 20:43:47 -05:00
6b95a66859 lint: require const field names to be in ALL_CAPS
GitOrigin-RevId: 8b6c20e6d978f2756bdbf946ff860ce5cc48e3ce
2020-02-25 20:34:53 -05:00
5549f15029 rename numEdgeVertices -> NUM_EDGE_VERTICES
GitOrigin-RevId: c7a67e06ea330f1fd3de4abdbeb8021402b6f330
2020-02-25 20:34:49 -05:00
3a8defcf3f Letterbox the scene if the aspect ratio is out-of-whack.
Fixes #23.

GitOrigin-RevId: 2da580115e44f2658e7f9b9d3d39a366d3a1bbfd
2020-02-25 20:24:19 -05:00
0a64d17db5 fix lint errors
GitOrigin-RevId: 5de396b25947e1de5bea55ecc32bacc59e5b336d
2020-02-25 19:19:10 -05:00
efccefa5b1 Add lint script.
Fixes #5.
Also fixes #4.

GitOrigin-RevId: eaeeaac96040726472a2b604dc0567b4f8ba69ab
2020-02-25 19:15:59 -05:00
3e8b438b0f change copybara config to use new domain
GitOrigin-RevId: 78b38523a2887666e7e71bd5e616a7c02631e79d
2020-02-25 17:43:06 -05:00
bd78586a1d rm newline
GitOrigin-RevId: c369e8bd9f847a038c544db1094ba1aabbcf388d
2020-02-25 10:30:57 -05:00
74b5e1ec2d Debug rects: pull in top & left sides by a 1-pixel margin.
GitOrigin-RevId: 0f1f846e3f9251699917c43241efe73d6ba74849
2020-02-25 09:58:42 -05:00
a0ea63f96b make Input readonly
GitOrigin-RevId: 1bb3c6bb6fad236b0b974a78b2d0c75474c9fa23
2020-02-25 09:35:59 -05:00
4e4c2cccb3 Input: process debugging commands first & exit early if any are pressed.
GitOrigin-RevId: c36acce59305a0f2086b88c6206f73e3860e0c51
2020-02-25 09:26:28 -05:00
6802b3f162 Make separate ExtensionMethods file.
Add Point-deconstruction as an extension method.

GitOrigin-RevId: a804ba797a9b939b65652df67987628b1742dad6
2020-02-24 20:46:24 -05:00
ab2a57d632 update LangVersion=latest in all projects
GitOrigin-RevId: 197405574e498367ed719f81216ebbb23bb89ab0
2020-02-24 19:02:04 -05:00
f081a3db4e Apply VS suggestion for refactoring TextureRef.Get
GitOrigin-RevId: 9758a333c456f6a150282d3f4adb00c68095e416
2020-02-24 17:07:42 -05:00
26649ce20d Draw debug output within the TV-safe area.
Details here:
https://docs.microsoft.com/en-us/windows/uwp/design/devices/designing-for-tv#tv-safe-area

GitOrigin-RevId: 6bd4e9805a078f6b21cc40fc633c36cde371b6e6
2020-02-21 10:24:31 -05:00
ed7afd2fa1 TextureRef: make Get a property rather than a function
GitOrigin-RevId: a36369c33b0c23859768c7bd7b1548b7d834cbb3
2020-02-20 16:39:38 -05:00
e72b8999e4 Make TextureRef class for holding textures.
Use it in World so that all Terrain-specific configuration can be specified in
one place.

GitOrigin-RevId: 31acf292ae6e438f609a7396e78555e1db9b744e
2020-02-20 16:37:52 -05:00
0e164f7b75 mark field readonly
GitOrigin-RevId: 9e06f8a03a69c18da9e4828263eed65b13776904
2020-02-20 16:37:48 -05:00
0ee671c8b1 fix how the first line of World is parsed
GitOrigin-RevId: 9409e491fd04067af750333b693d0f992bf6315d
2020-02-20 13:37:32 -05:00
c4e211e750 more level decorations
GitOrigin-RevId: b6446a7451f877fc7c46a35a49d450dd1f3b9c26
2020-02-20 13:37:28 -05:00
f1b71ca87d Tiles can now be obstacles (in the foreground) or decorations (in the background).
Updated Levels to show off some of these.

GitOrigin-RevId: d8d04410c15dd36218d5a1504dd842827082180f
2020-02-20 12:26:47 -05:00
08a31231e9 Draw LinesOfSight behind most other things.
Also remove the currently-unneeded lightingTarget.

GitOrigin-RevId: 95d96d966a07624b2c6c648d7c208cfa16acd2b9
2020-02-19 17:33:44 -05:00
2fe8e53e77 Call GC.SuppressFinalize() from Dispose().
GitOrigin-RevId: 57b1d3760a781966e3dd673970b535bb8cade1a2
2020-02-19 17:18:25 -05:00
af9a48bc5d small cleanups suggested by VS
GitOrigin-RevId: b1b3a687e399f0672a436c6542914143adaea6bb
2020-02-19 16:36:51 -05:00
026623ac82 Fix memory leaks of graphics resources.
Make Scene & LinesOfSight dispose of the graphics resources they create.

Force GC when a new level is loaded.

GitOrigin-RevId: 0640cced784e6bf5ee15f4edce8bf11d122dac51
2020-02-19 16:33:32 -05:00
1eb4d7a7d2 Debug off by default
GitOrigin-RevId: 0e0325057b0b6fad5b11a2072dd6bb14643b7847
2020-02-19 15:34:28 -05:00
44bd3c6896 Show lines of sight only when Debug enabled
GitOrigin-RevId: 77de51cce5e9e6a009a866e0eb5bc213f00b176c
2020-02-19 15:09:03 -05:00
b858c45b7e Cycle through levels when player hits the "restart level" button.
GitOrigin-RevId: bbe909515fbc4b61be3357e506a113e82bb6e2bd
2020-02-19 15:07:55 -05:00
6b9aa0844c Update demo level.
GitOrigin-RevId: 90064478fe88d5dc7ade74ac2417012c16e639fa
2020-02-19 15:07:52 -05:00
0df153581c Add new terrain types to World
GitOrigin-RevId: ab811a1b52ea011a7acea078ec6e78735a298d59
2020-02-19 15:07:48 -05:00
b06155aa88 Render backgrounds from back-to-front in an array.
GitOrigin-RevId: 1f4ca760d4dc4a73a4f96f6b04ee2929e789a5eb
2020-02-19 15:07:44 -05:00
cf5167fba7 Player: tweak constants, track jump hangtime.
GitOrigin-RevId: 868003a32664b89212cdb4cf082d96016c5529f9
2020-02-19 15:07:40 -05:00
90b003e0b0 Change Debug button from left shoulder to Select.
GitOrigin-RevId: 7e633c9904572c0f88859f2929ee5743ae2f3261
2020-02-19 15:07:36 -05:00
05638483a4 Support 4-layer parallax-scrolling backgrounds.
GitOrigin-RevId: 58c1d1fee99e56dd656af5bbf628fbdc16d55e14
2020-02-19 13:07:58 -05:00
8405f32f3c simplify lightingEffect initialization
GitOrigin-RevId: 28ca3d2336fe78f152aff2b810e90dc06e7816b6
2020-02-19 11:24:56 -05:00
57d15cbbd9 Load all textures & fonts in one place.
GitOrigin-RevId: 076c86b24f4e4e314a52457a01d5c77e197a2fa2
2020-02-19 11:20:20 -05:00
8f5514b776 More refactoring of Tile loading.
GitOrigin-RevId: 96a697bc78cdaefc874b9eb7b9d4cca28efe27f2
2020-02-18 16:50:47 -05:00
2934296649 Refactor tile creation to support assets from multiple tilesets.
GitOrigin-RevId: 9863c368214536e09009e27dcb68b8d42f3d04f0
2020-02-18 15:24:49 -05:00
02aba3ad84 Game objects now take in a ContentManager & load their own textures.
GitOrigin-RevId: 4f40548d9f100f4bad181a59f4df44397f7ccf76
2020-02-18 13:58:04 -05:00
f0ea8d8ef2 Reorganize Content/ into multiple subdirectories.
Add new tilesets from anokolisa.

GitOrigin-RevId: 90cfd52a3c374beff7c1b8d07899e822bdf2e541
2020-02-18 10:30:05 -05:00
9eeede2310 Shared.shproj: remove redundant & out-of-date file listings
GitOrigin-RevId: e7cc4d730faa5bc22a6aae55df53d55c6e44b41a
2020-02-17 21:22:16 -05:00
7935b6aaff Scene: go back to drawing Player behind tiles.
GitOrigin-RevId: afaff144f2af1f0ebcaf5b640cb621413110f380
2020-02-17 21:22:12 -05:00
7e7b0f7715 Move most of the drawing code into a Scene class
GitOrigin-RevId: 4515493a3bbf99b9513f2f1e66acadae1df53a5a
2020-02-17 21:08:32 -05:00
43f6bded70 draw backgrounds as partially transparent
GitOrigin-RevId: b570a9aab75d18e6f7778dc851537794f30d801a
2020-02-17 19:59:52 -05:00
3107c8448e clean up copybara config a smidge
GitOrigin-RevId: 5179f64eecdf7f500a9341c22402fe42ef032529
2020-02-17 18:43:54 -05:00
143aeb983d copybara: github source url now comes from gitea private
GitOrigin-RevId: a926ea61d8b9d744dc8175dcae310d03760f1f26
2020-02-17 18:43:50 -05:00
c99a59ca51 change copybara config
GitOrigin-RevId: bef86d68989d27ad55efe5f3bb037ad87df1b723
2020-02-17 16:14:20 -05:00
786b230a6c LinesOfSight: don't draw yellow lines
GitOrigin-RevId: 1ebd5fe922856036d814a129520a5f3d6e1e4447
2020-02-16 19:44:36 -05:00
e2ea2e1d3f Add ability to restart the level. Fixes #9.
GitOrigin-RevId: e7a0cdcdded50e2f02067a166a33e18504aac344
2020-02-16 19:22:36 -05:00
a32ef2a0eb Add unit tests for Geometry.Rotate(Vector2).
Fixes #20.

GitOrigin-RevId: 45cd5e99a2c841235e2d9ed29744fe22900ce167
2020-02-15 16:49:57 -05:00