Commit graph

34 commits

Author SHA1 Message Date
Alex Bethel aa7361df6b Work on restructuring world generator API
We need to be able to spawn entities from the generator function, both
as level props and as enemies; the previous API makes this impossible,
so I'm working on restructuring it. Not too happy with it yet, still
needs more work.
2022-01-15 14:49:15 -06:00
Alex Bethel 652db1241b Remove extra import 2022-01-15 14:20:33 -06:00
Alex Bethel a5f1cca981 Floor tile methods 2022-01-12 11:53:39 -06:00
Alex Bethel 6b6a6720ce Rename game.rs -> level.rs 2022-01-10 19:33:45 -06:00
Alex Bethel fee36f158b Tear out dungeon branch infrastructure
It's all unused at the moment, and I'll probably re-build it entirely
differently later.
2022-01-10 19:32:43 -06:00
Alex Bethel 97a78c8bb1 Formatting 2022-01-10 19:31:53 -06:00
Alex Bethel 0ec5fbbe8c Up stairs & down stairs 2022-01-06 16:57:20 -06:00
Alex Bethel 411b8091f9 Render room corners as + 2022-01-06 14:32:08 -06:00
Alex Bethel 72ed107d17 Disallow player phasing through walls 2022-01-06 14:04:55 -06:00
Alex Bethel 96525e24bf Represent positions with i32 rather than usize
Even though we can now represent the three empty negative quadrants,
it'll make the math simpler to implement so I figure there's no reason
not to do it.
2022-01-06 13:54:21 -06:00
Alex Bethel eeeeffba53 Movement code 2022-01-06 13:07:53 -06:00
Alex Bethel 42dc9a8625 Begin work on player control 2022-01-02 14:30:43 -06:00
Alex Bethel 54b9f2778c Appease Clippy 2022-01-02 13:17:17 -06:00
Alex Bethel 50024fa8fa Add ECS stuff 2022-01-02 12:56:42 -06:00
Alex Bethel b5ddf09bb9 Use A* rather than Dijkstra
The level generation algorithm now runs somewhere around 100x faster.
2022-01-01 18:19:55 -06:00
Alex Bethel 00efc1dda4 License project under GPLv3 2022-01-01 15:09:00 -06:00
Alex Bethel 955a1cd4b2 Add map generator margin 2022-01-01 15:04:43 -06:00
Alex Bethel aa0b600ec8 Move consts to top of file 2022-01-01 15:02:10 -06:00
Alex Bethel b62df4c79d Formatting 2022-01-01 14:57:37 -06:00
Alex Bethel 209c56ec50 Less biased hallway generation 2022-01-01 14:53:37 -06:00
Alex Bethel e720189f3e Stop rooms from generating too close to each other 2021-12-28 21:27:17 -06:00
Alex Bethel f25c8f7308 Wall rendering 2021-12-28 20:54:01 -06:00
Alex Bethel 57968fb59c Add paths between rooms 2021-12-28 20:12:45 -06:00
Alex Bethel e8030b9e07 gen_room_bounds -> associated function 2021-12-19 11:52:16 -06:00
Alex Bethel 515fa65e61 Room generation strategy description 2021-12-19 11:50:16 -06:00
Alex Bethel ec4b06c721 Prevent rooms from generating right next to each other 2021-12-19 11:40:26 -06:00
Alex Bethel 626093e694 Small cleanups 2021-12-19 11:33:39 -06:00
Alex Bethel 1c22a1be05 Whoops, that was backwards 2021-12-19 11:33:07 -06:00
Alex Bethel 4eded9446b Room generation
I'm too tired to write good code today, but this sorta works I guess
2021-12-18 21:03:00 -06:00
Alex Bethel 176a0f52c5 Extremely basic level drawing 2021-12-18 13:06:00 -06:00
Alex Bethel efac8fadf0 Doc comments 2021-12-18 12:29:07 -06:00
Alex Bethel 681185cf8f Basic data structures 2021-12-18 12:22:46 -06:00
Alex Bethel 960ca03ed1 Pancurses dependency 2021-12-18 12:06:50 -06:00
Alex Bethel 17e61edfd9 Initial commit 2021-12-18 11:58:33 -06:00