Colin McMillen
3cd98d08f4
Newtonsoft.Json -> System.Text.Json for SneakWorld.cs
3 years ago
Colin McMillen
987c86fae9
mv World & Scene to SneakWorld & SneakScene.
4 years ago
Colin McMillen
5a9b98455f
Add TODO about World taking in a GraphicsDevice
4 years ago
Colin McMillen
811df57950
Make new IWorld interface.
4 years ago
Colin McMillen
fccca0c676
bound camera y-position by world & change dynamics slightly
4 years ago
Colin McMillen
e0d5385350
camera now tracks player y-position too
4 years ago
Colin McMillen
393e9d14b9
Player: track position with a Vector2.
Fixes #10 (mostly).
4 years ago
Colin McMillen
dfb80c9fde
NPC: Position is now a Vector2, not a Point
4 years ago
Colin McMillen
4346f20024
remove World.TileSize constant
4 years ago
Colin McMillen
a4802031d5
World: load size directly from JSON.
4 years ago
Colin McMillen
b85661e2c4
add support for 8x8 obstacles
4 years ago
Colin McMillen
8f79bb8680
add a little screen-shake
4 years ago
Colin McMillen
37c679b704
move Camera into World
4 years ago
Colin McMillen
4870964cc5
attach LinesOfSight to the first NPC
4 years ago
Colin McMillen
66ce866b12
move LinesOfSight into World
4 years ago
Colin McMillen
3fc8b49636
World: move Tile to bottom of file
4 years ago
Colin McMillen
bb910fbe58
World: rearrange a bunch of code to be in a more sensible order
4 years ago
Colin McMillen
36e70989af
rename "tiles" to "obstacles"
4 years ago
Colin McMillen
fa4784fc49
IsHarmful -> IsHazard
4 years ago
Colin McMillen
299ab41ec2
add hazards layer
4 years ago
Colin McMillen
9aa0d05eb2
add the background layer
4 years ago
Colin McMillen
5121f6d775
World: load levels by parsing a JSON level description.
4 years ago
Colin McMillen
0a37453dbd
switch to sourcing all tiles from Grassland
4 years ago
Colin McMillen
0f8d9c2814
FSM / Player / NPCs now get World as an argument to Update()
4 years ago
Colin McMillen
08091106ea
Terrain: use optional arguments for IsObstacle / IsHarmful
4 years ago
Colin McMillen
b2583677bf
Terrain now takes an IsHarmful param in constructor.
4 years ago
Colin McMillen
53c6d8483f
include multiple NPCs, have them turn around based on platforms.
4 years ago
Colin McMillen
4299a009b7
use auto property
4 years ago
Colin McMillen
d270efe643
move Player into World
4 years ago
Colin McMillen
02b1dd4874
Add simple NPC.
GitOrigin-RevId: 47cd7abaf8
4 years ago
Colin McMillen
f4581ecaf8
Player now takes damage from spikes.
GitOrigin-RevId: e909631621
4 years ago
Colin McMillen
0a64d17db5
fix lint errors
GitOrigin-RevId: 5de396b259
4 years ago
Colin McMillen
ed7afd2fa1
TextureRef: make Get a property rather than a function
GitOrigin-RevId: a36369c33b
4 years ago
Colin McMillen
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: 31acf292ae
4 years ago
Colin McMillen
0ee671c8b1
fix how the first line of World is parsed
GitOrigin-RevId: 9409e491fd
4 years ago
Colin McMillen
c4e211e750
more level decorations
GitOrigin-RevId: b6446a7451
4 years ago
Colin McMillen
f1b71ca87d
Tiles can now be obstacles (in the foreground) or decorations (in the background).
Updated Levels to show off some of these.
GitOrigin-RevId: d8d04410c1
4 years ago
Colin McMillen
0df153581c
Add new terrain types to World
GitOrigin-RevId: ab811a1b52
4 years ago
Colin McMillen
57d15cbbd9
Load all textures & fonts in one place.
GitOrigin-RevId: 076c86b24f
4 years ago
Colin McMillen
8f5514b776
More refactoring of Tile loading.
GitOrigin-RevId: 96a697bc78
4 years ago
Colin McMillen
2934296649
Refactor tile creation to support assets from multiple tilesets.
GitOrigin-RevId: 9863c36821
4 years ago
Colin McMillen
02aba3ad84
Game objects now take in a ContentManager & load their own textures.
GitOrigin-RevId: 4f40548d9f
4 years ago
Colin McMillen
ff0c9ddc26
Add a transformation matrix to spriteBatch.Draw().
Instead of having every drawable object know how to transform itself based on
the camera position, we pass in a transformation matrix to spriteBatch.Draw().
Unfortunately MonoGame only lets us specify a translation that works over an
entire SpriteBatch.Begin() call, so we need to begin & end separately for
objects that *aren't* supposed to translate at the same rate as the camera.
Fixes #39 .
GitOrigin-RevId: afab72c392
4 years ago
Colin McMillen
80746ecaed
Use world definition from Levels file
GitOrigin-RevId: a5d19f4f08
4 years ago
Colin McMillen
1f7da03515
make char-to-terrain lookup dictionary-based instead of switch-based
GitOrigin-RevId: 0d81e95bf0
4 years ago
Colin McMillen
b731e1a785
make tile-texture lookup dictioanry-based instead of switch-based
GitOrigin-RevId: 2f0c215bf9
4 years ago
Colin McMillen
3286db1c86
remove Terrain.Empty and clean up TextureSource() switch statement
GitOrigin-RevId: 7de691a440
4 years ago
Colin McMillen
f7f7d5076e
Pre-compute texture-source Rectangles.
Fixes #14 .
GitOrigin-RevId: e09d86a099
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