Commit graph

67 commits

Author SHA1 Message Date
Zed A. Shaw
ae43dad499 Minor fixes to make initializing the terminal more consistent and to remove a magic number for wall limits. 2024-12-04 08:19:04 -05:00
Zed A. Shaw
c7607533ce A bit of a quick test for the GUI system, but not sure how to make this do more. 2024-12-02 17:02:59 -05:00
Zed A. Shaw
48df9248b2 Testing is almost complete, but now I'm in the area where it's a lot of interaction and probably need mocks or a way to inject keys to the gui. 2024-12-02 10:57:02 -05:00
Zed A. Shaw
bdfd61c8e7 GUI had old code when I was toying with doing lighting with a png. 2024-12-02 08:15:27 -05:00
Zed A. Shaw
3f7a9cc124 Lighting is now in its own class using the new Pathing class. This should allow me to make it more consistent and possibly make Pathing more efficient. 2024-12-01 17:54:43 -05:00
Zed A. Shaw
4ceacecfda Lighting system now works and does illumination for the whole map plus entities, but not walls or multiple lights yet. 2024-11-26 02:22:15 -05:00
Zed A. Shaw
1bb04b4562 Tried to set the background color in the ftxui canvas and weirdly it started doing almost what I want with lighting, but I didn't write any code to do that. There's some bug in how I'm doing it that's causing it to set the colors...correctly. Must find out why. 2024-11-23 23:11:20 -05:00
Zed A. Shaw
fb1fd9d8bc A bit of some clean up, API unifying, and some performance tweaks. 2024-11-22 23:12:18 -05:00
Zed A. Shaw
15a302d133 Renderer is now more standalone and doesn't try to protect against small maps, that's the GUI's job. 2024-11-21 15:51:22 -05:00
Zed A. Shaw
19b8bf1850 Totally a pile of garbage with a bunch of debug prints because I'm going to have to rewrite the renderer resizing to allow for any size image, not just the map. But this does display an image using averaged squares. 2024-11-21 02:49:58 -05:00
Zed A. Shaw
7cb03594a3 Renderer now knows how to render panels as grid/text based on how the panel is configured. 2024-11-18 12:51:57 -05:00
Zed A. Shaw
958c8545a7 It's actually better to just use FTXUI's Modal system than to invent my own. 2024-11-17 22:28:29 -05:00
Zed A. Shaw
88d362d6a5 A little clean up while I think about how to do this.... 2024-11-17 18:36:38 -05:00
Zed A. Shaw
d36c42038d Simple mouse clicks working but probably wrong coordinates. 2024-11-17 16:00:57 -05:00
Zed A. Shaw
64855f3c90 The gui can now pop open a modal based on clicking a button but I need to manage focus next. 2024-11-17 13:23:18 -05:00
Zed A. Shaw
89a70f398a Rewrote the ansi parser to exactly callback on color setting, so now just need to clean this all up and fix a few little bugs. 2024-11-16 12:10:14 -05:00
Zed A. Shaw
96ee16e598 Figured out that I don't need a special screen, just send events to the component directly with OnEvent. However, you have to component->Add() or call Render(component, []) with it or else it's not considered a child. 2024-11-14 12:37:31 -05:00
Zed A. Shaw
e3cff8142c Barely working stripped down version of ScreenInteractive. Now to bring on the SFML events. 2024-11-13 12:48:42 -05:00
Zed A. Shaw
7d3605f58b A bit of cleanup and testing of the panel, then some optimization to avoid re-rendering and multiple wchar converts. 2024-11-12 08:06:09 -05:00
Zed A. Shaw
6e848004c4 Panel is working and now I can work on the gui interactions parts. 2024-11-11 13:03:31 -05:00
Zed A. Shaw
9bc9c9007f Now have a nice panel to hold all the UI panels we'll use later. 2024-11-11 12:23:40 -05:00
Zed A. Shaw
baaf56d4de Can do better rendering of individual components and 'panels' but it's not too clean right now. 2024-11-11 10:12:36 -05:00
Zed A. Shaw
7b5c84b5f7 Cleaned up the gui display some more for future GUI elements. 2024-11-10 12:53:29 -05:00
Zed A. Shaw
824a384ffd Font sizes and map view now work with arbitrary map sizes. 2024-11-09 10:56:22 -05:00
Zed A. Shaw
2dccc6b17b Initial fix of the crash with different map sizes but that's not the ultimate fix. 2024-11-09 10:14:53 -05:00
Zed A. Shaw
43fb60ebaa Removed the ambient sound until I can redesign it. 2024-11-08 13:24:31 -05:00
Zed A. Shaw
113811bc84 Got some new sounds and camera shake came back but has a bug. 2024-11-08 13:18:43 -05:00
Zed A. Shaw
ed9d0de8e0 Event system now accepts any data and the GUI receives simpler events with data for them. 2024-11-07 09:16:21 -05:00
Zed A. Shaw
0e79288afc More notes on the next things to do. 2024-11-07 02:06:22 -05:00
Zed A. Shaw
011fee4872 A little bit nicer but ultimately the way the system talks to the GUI needs a redesign to be more 'coarse grain' 2024-11-07 01:00:17 -05:00
Zed A. Shaw
99d56b246c Looks like this is _possibly_ working but the last step of actually loading a save needs to be figured out. 2024-11-06 07:18:59 -05:00
Zed A. Shaw
da63f006c2 Config and save system almost there. 2024-11-05 21:33:28 -05:00
Zed A. Shaw
d113dba42f Almost working save sytem but the data I store is totally wrong. I need to also save the entity IDs being used and map them to the components. 2024-11-05 02:38:36 -05:00
Zed A. Shaw
707e9e3d6e Have to force the terminal detected by FTXUI to use full color no matter what it detects in the actual terminal. 2024-11-03 00:16:52 -04:00
Zed A. Shaw
35ef1e786d A bit more cleanup before I redesign the renderer. 2024-10-30 19:06:51 -04:00
Zed A. Shaw
9397af2a11 Rendering code stripped out of the GUI code. 2024-10-30 18:54:51 -04:00
Zed A. Shaw
009b1e63a7 More refactoring to get the GUI dumber. 2024-10-30 02:13:31 -04:00
Zed A. Shaw
2fdbd63f4c Cleaning up and sorting out how to use the new events best. 2024-10-29 23:39:03 -04:00
Zed A. Shaw
04350cb51e GUI is now decoupled from the ECS using the new DinkyECS event queues. That makes it easier to update and change the GUI without having to constantly alter the systems. 2024-10-29 18:33:11 -04:00
Zed A. Shaw
143fe7784c Clean up the DinkyECSso that it's easier to understand and more obvious what a fact vs. component is. 2024-10-29 07:33:00 -04:00
Zed A. Shaw
4ed06b10b1 Need the hit.wav to be mono, but now we have a sound we can move around, just not sure how to place it based on the visuals. 2024-10-28 19:46:55 -04:00
Zed A. Shaw
9102bdc8ad Created a combat system to start with and also added a 'HEARING' mechanic where enemies can hear you from a certain distance before moving to you. 2024-10-27 18:44:54 -04:00
Zed A. Shaw
4162287841 Implement a simple combat system and killing off enemies. See status for next steps. 2024-10-26 20:29:55 -04:00
Zed A. Shaw
5a123ae74c Refactor some code to have better naming and move Point and related point things into their own .hpp. 2024-10-26 18:26:42 -04:00
Zed A. Shaw
ec1ed23c52 Now using a simple collision map to track entities and then determine if they're near the player for attacking. 2024-10-26 04:33:23 -04:00
Zed A. Shaw
dbc2a10933 Very basic collision and combat to work out the idea and a logging system on the left. 2024-10-25 20:49:11 -04:00
Zed A. Shaw
e57a13846f A bit more caching and optimization then determine how to center glyphs in the center of the background if it fits. 2024-10-21 22:43:34 -04:00
Zed A. Shaw
9083582420 Make it possible to zoom in/out, but I may make this a combat thing where it's zoomed out until you encounter an enemy. 2024-10-21 20:31:59 -04:00
Zed A. Shaw
02a45d890f Make it so the canvas for the map view is calculated based on the font size, which will allow for zooming. 2024-10-21 00:12:04 -04:00
Zed A. Shaw
9f1e9717a0 Super jank prototype of my idea but I am rendering multiple characters per cell to give the effect of a more complex character. Now to make this a data setup so it's easy to make characters. Also, probably have little add ons to show things like weapons equiped, etc. 2024-10-18 21:59:06 -04:00