King_DuckZ
e2d307da52
Initial WiP implementation of 2D grid raytracing. Not working.
2017-02-08 16:39:46 +00:00
King_DuckZ
f91ff6625f
No need for requiring int position here.
2017-02-08 16:37:59 +00:00
King_DuckZ
24d67c7cd6
Experimental code that turned out to be too slow and got scrapped.
2017-02-08 16:37:12 +00:00
King_DuckZ
cb8654ac7e
Add a TileProperty struct so one can store info about tiles.
2017-02-08 16:36:36 +00:00
King_DuckZ
5a8c3fcac0
Add Catch for unit testing.
2017-02-08 16:32:55 +00:00
King_DuckZ
8e1c19df47
Add an fsgn() function.
...
fsgn() returns -1/0/1 depending on the parameter's sign.
2017-02-08 16:30:48 +00:00
King_DuckZ
67e8ceefa3
Update licence notice to 2017.
2017-01-30 14:56:16 +00:00
King_DuckZ
ab02e7ef58
Let Character store a pointer to the world.
...
It's going to be needed for collision testing.
2017-01-30 14:49:56 +00:00
King_DuckZ
2062d50775
Use explicit loop
2017-01-30 13:05:26 +00:00
King_DuckZ
3907ef6d6d
Move movement logic out from the gameplay scene.
...
Character now knows how to move by itself.
2017-01-30 12:29:57 +00:00
King_DuckZ
7a0d2c3267
Center viewport on the character when possible.
2017-01-27 19:39:47 +00:00
King_DuckZ
4715552b44
Update to latest vectorwrapper.
2017-01-27 19:37:20 +00:00
King_DuckZ
952a8af9c6
Register things that need the world size as observers to WorldGrid.
...
Character and WorldViewport get notified when the world size is set.
This way even if world size never changes they still get notified
about the proper world size as soon as that information is ready,
be it during instantiation or registration. Previously I was having
trouble because at the point where Character was instantiated, the
world size was not known yet. As such, I had to call a
character.update_world_size() function after it became available. The
same happened for the viewport, and this looked a bit too brittle
from the programmer's perspective. Now you just instantiate the
Character and things get sorted out automatically.
2017-01-27 16:07:50 +00:00
King_DuckZ
0dab671ce4
Forgot to commit this
2017-01-26 19:47:37 +00:00
King_DuckZ
19889313e2
Make a ConstrainedPosition helper class.
...
Use the new class to replace the ad-hoc code in worldviewport.
2017-01-26 17:37:12 +00:00
King_DuckZ
7971e85be5
Fix url to vectorwrapper submodule
2016-11-23 18:25:09 +01:00
King_DuckZ
9a0e7abb52
Attach GPL3 licence.
2016-11-23 17:54:41 +01:00
King_DuckZ
38826b94b8
Fix randomly happening floating point error during clipping.
2016-11-09 01:46:36 +01:00
King_DuckZ
e65c2341c2
Draw a test character to start experimenting.
2016-11-09 01:46:10 +01:00
King_DuckZ
4c105fc3df
Don't move the viewport if it would generate gaps in the map.
...
In other words, don't let the player see past the end of the world.
2016-11-08 20:34:04 +01:00
King_DuckZ
5d231206ef
Fix rect clipping
2016-11-08 20:15:19 +01:00
King_DuckZ
89ac57eee7
Don't crash when going past the bottom/right border.
2016-11-07 22:31:52 +01:00
King_DuckZ
20f8e75937
Use boost spirit to load csv files.
...
Allow loading of multiple csv files. Iterating on tiles now returns
a list of tiles, in back-to-front order.
Add a nicer tileset (although it's non-free and needs permission from
its author, need to get in touch in due time).
2016-11-07 22:02:46 +01:00
King_DuckZ
1313dad568
Allow moving past the top-left edge of the world.
2016-11-04 20:31:41 +01:00
King_DuckZ
d7868800d4
Temporary code to load a csv tilemap from Tiled.
2016-11-04 20:31:17 +01:00
King_DuckZ
087e1cd8b1
Make the viewport able to return the tile of a given index.
2016-10-31 01:36:30 +01:00
King_DuckZ
458ec6bcce
Make m_index uint16 again and replace magic -1 number.
2016-10-30 23:41:14 +01:00
King_DuckZ
5da4cef4a5
Move clipping and drawing to base class and fix int<->float warnings.
2016-10-30 23:30:32 +01:00
King_DuckZ
c8920ea997
Implementation of vector_cast that works with vwr::Vec.
2016-10-28 22:20:23 +02:00
King_DuckZ
629a3d9e08
Add movingobject
2016-10-28 21:06:19 +02:00
King_DuckZ
f1467d7d99
Use pimpl to hide properties used by the gameplay scene.
2016-10-28 01:45:45 +02:00
King_DuckZ
33c18680d6
Make scrolling speed depend on frame duration.
2016-10-28 01:31:34 +02:00
King_DuckZ
7e8657b9d8
Allow viewport to move past the top-left edge of the map.
2016-10-27 10:29:37 +02:00
King_DuckZ
86bf492507
Allow navigating with the keyboard arrows.
2016-10-27 02:05:26 +02:00
King_DuckZ
a70c97a569
Fix input update.
2016-10-27 02:05:05 +02:00
King_DuckZ
b8840045a5
Load and display actual tiles
2016-10-27 00:06:59 +02:00
King_DuckZ
b5a6b9f9bc
Quick dirty implementation of a world grid+viewport+iterator.
...
This commit makes the program quit immediately.
Prints debug info about iterator.
Incomplete, no actual tile being iterated.
2016-10-26 02:24:59 +02:00
King_DuckZ
92a1069324
Show window and allow user to close it to quit.
2016-10-26 01:20:01 +02:00
King_DuckZ
6afa1a4cd4
Make virtual methods protected.
2016-10-26 00:50:14 +02:00
King_DuckZ
482a13ea47
Import DeathHandler.
2016-10-25 01:28:05 +02:00
King_DuckZ
865efc3eb4
Update VectorWrapper
2016-10-25 01:24:23 +02:00
King_DuckZ
95499e3d77
First commit
2016-10-24 00:48:30 +02:00