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
Colin McMillen
10453ee5ea
World: add Height property (in pixels)
GitOrigin-RevId: 0ae9f03f8e
4 years ago
Colin McMillen
bb8cf9e63b
make CollisionTargets an auto property
GitOrigin-RevId: ca7bf8f68b
4 years ago
Colin McMillen
76dbdc6913
Bound camera by right edge of World.
Fixes #32 .
GitOrigin-RevId: e193c89509
4 years ago
Colin McMillen
fe64ec705d
Bound player position by both edges of the World.
Fixes #10 and #22 .
GitOrigin-RevId: 166be07898
4 years ago
Colin McMillen
793b292a29
pass in AABBs instead of Rectangles to Player.Update
GitOrigin-RevId: 08fe1aaf34
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
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