Rogod
|
|
« Reply #120 on: October 23, 2020, 08:42:53 AM » |
|
Thanks for trying it out! Yea there's definitely something screwy going on with the cosmos generation; it's a little bit of a mess due to having a thread for saving and also a non-spammy check for whether it exists. (I may just rewrite it these few lines) I'd suggest just pressing G once then waiting for the Play button to appear - even if "New game" comes back up in the meantime. I'll prioritise a fix for this in a near-future update as I had seen similar behaviour on my VM but couldn't be sure it wasn't just being unreasonably slow due to lack of RAM or something. As for the font and resizing, I found the best thing to do was set it to 120x60 and monospaced before playing then start the game - there's not very much the game can do if the console isn't set up right as it's reliant on the Ubuntu terminal co-operating and there aren't any handles to resize it from code (just one of the limitations I've had to accept for Linux). If there are artifacts on screen then I'd expect that's just the terminal not liking drawing and resizing at the same time. However, if those artifacts appear round the edge of the game screen, this is just outside of the drawn area, so I wouldn't expect those to fix themselves as the game refreshes (it just means you need to make the window smaller again ) I'm just glad it's playable at all :D EDIT:Just rewrote all the saving/loading for v0.53 - man that was a pain - trying to balance saving/loading/generation/process/render between their appropriate threads and hard disk access with a cooldown was a challenge but it works nicely now :D
|
|
« Last Edit: October 23, 2020, 03:15:06 PM by Rogod »
|
Logged
|
|
|
|
a-k-
|
|
« Reply #121 on: October 24, 2020, 12:54:55 AM » |
|
Fair enough. The blank characters were actually all over the window and seemed to only get worse with further changes to the font or window size, so I believe that ncurses's redraw optimization was at play. If that's the case, calling redrawwin() with the handle that initscr() returned whenever getch() returns 410 (= KEY_RESIZE) may do the trick. Or alternatively without hard-coded values, you may just call redrawwin() before refresh() in case that, say, 1 second has elapsed since the last time you called it. That may make it easier for first-time players to choose the best font, size and character spacing while the game is running (which is what I was trying to do, hence all those restarts).
In C# that would be something like [DllImport(...)] static extern int redrawwin(IntPtr window).
|
|
|
Logged
|
|
|
|
Rogod
|
|
« Reply #122 on: October 24, 2020, 01:26:35 AM » |
|
Oo now that is an interesting prospect. It's true, I hadn't really looked at the NCurses library beyond getting everything to work the way I have it, so I'm not surprised there's a mechanism like this to handle it. The only snag is that I removed the use of getch() in favour of Console.read so that people can use arrowkeys and things properly but I'd imagine the 2 should play nicely with eachother if it's just looking for 410 for window resize in the render process. I'll have a play with this and maybe we'll have v0.53 looking shinier than ever before :D! EDIT:So I had a go at doing this and cutting a long story short, the Console.ReadKey method I'm using to get all the input blocks blanks out getch() so I was just getting -1s back. (I also turned off the Console.ReadKey on Linux just to test this and even then getch() still wouldn't receive 410 on a window or font resize, so this seems like something a little out of reach here :S ) I even tried grabbing 410 from Console.ReadKey in case it was getting it there, but no luck either I think this is just going to have to be "one of those limitations with the Linux version" am afraid EDIT2:That being said, if I just call redrawwin() before each refresh, as long as the resizeterm is set when Startron starts, this appears to work. I am concerned about performance issues with this but given it appears to work fine in my underpowered VM and would suit new-comers better, I'll allow it to be set in the config file and have it on by default.
|
|
« Last Edit: October 24, 2020, 02:03:21 PM by Rogod »
|
Logged
|
|
|
|
|
JobLeonard
|
|
« Reply #124 on: October 25, 2020, 08:06:06 AM » |
|
Those are some cute collectibles! Gonna give the new version a try
|
|
|
Logged
|
|
|
|
|
|
Rogod
|
|
« Reply #127 on: October 29, 2020, 04:30:22 AM » |
|
Not sure how I managed to do that, as I can still remember the exact order of windows navigated, buttons clicked and folders dragged. But sure enough, I somehow managed to end up with v0.53 for Windows in the Ubuntu folder >_>
...I have fixed the problem now lol
|
|
|
Logged
|
|
|
|
JobLeonard
|
|
« Reply #128 on: October 29, 2020, 10:58:00 AM » |
|
Ok so... I made it out of the space station, like the mood (even without music) - was fun to chat with bar patrons and get a bit of "lore" Then it crashed when I entered a different system and pressed the down arrow key (the interface told me to select with up/down) Unhandled exception. System.IndexOutOfRangeException: Index was outside the bounds of the array. at Startron.SystemRendering.DrawUi(System system) at Startron.SystemRendering.Draw() at Startron.Game.Draw() at Startron.Program.Main(String[] arguments) [1] 30328 abort ./Startron
|
|
|
Logged
|
|
|
|
Rogod
|
|
« Reply #129 on: October 29, 2020, 11:25:31 AM » |
|
:D The lore will be expanded and more relevant later - this is just some loosely-relevant stuff for Startron in its current form. Hmm, I really don't understand where these random NPEs and array index errors have started popping out from because I cleared them all a few weeks ago, and now places that I'm sure I checked are throwing a wobbly suddenly. I will run a level 3 diagnostic on all subsystems and get back to you. EDIT: Any chance you could send me your cosmos file? It's the file with extension .cms next to the Startron executable.
That would help me narrow down what's going on over here because both of the array access points in that method have either a direct or implicit bounds check so I'm concerned there's something else happening I should be aware of.
EDIT2: No amount of fudging around with the generation/playing stations/navigating is recreating any problem for me on my Linux VM so am a bit lost without your cosmos file
EDIT3: I believe I figured out a fundamental flaw in how I was handling input and have defensively coded against this issue occurring in future, but I was only able to reproduce anything similar to it by pressing 2 keys at once (like I and O) - so I would still like to be absolutely sure.^EDIT4:Fixed, see below
|
|
« Last Edit: October 29, 2020, 02:59:46 PM by Rogod »
|
Logged
|
|
|
|
|
Rogod
|
|
« Reply #131 on: October 29, 2020, 02:29:38 PM » |
|
Update v0.55 Level 3 diagnostic complete List of updates/fixes- Hardened code against key-spam crashes
- Fixed crashing when navigating inside an empty system
- Added missing carpet characters to the engineering backdrop
- Added version to the cosmos file for debug purposes and to alert players when an old cosmos has been loaded
I was going to wait to release v0.55 along with other new features, but I prefer to fix bugs as soon as possible as I want any snapshot of Startron to be seen from a stable, playable standpoint as often as is feasible - not to mention some of the stuff coming up is considerably more complicated and would likely suffer if rushed.
@JobLeonardBingo! I reproduced the problem and it appears to be when attempting to navigate the entities in an empty system. I was sure I'd accounted for this but apparently not. @vdappsOnly the finest in this thread!
|
|
« Last Edit: October 29, 2020, 02:51:20 PM by Rogod »
|
Logged
|
|
|
|
JobLeonard
|
|
« Reply #132 on: October 30, 2020, 03:06:21 AM » |
|
Serious testing and debugging going on here, with stack trace. Free benefit of a console-based game: free stack traces when it crashes! Fixed crashing when navigating inside an empty system I woke up this morning remembering that I didn't mention that the system was empty! Sorry, that would have saved you a lot of time trying to figure out where it broke I was going to wait to release v0.55 along with other new features, but I prefer to fix bugs as soon as possible as I want any snapshot of Startron to be seen from a stable, playable standpoint as often as is feasible - not to mention some of the stuff coming up is considerably more complicated and would likely suffer if rushed. Given the size of the game and the current small core of testers I suspect fast release cycle is beneficial right now (neocities has a CLI, right? Might be able to automate the uploading process a bit with a little shell script) https://neocities.org/cli
|
|
|
Logged
|
|
|
|
Rogod
|
|
« Reply #133 on: October 30, 2020, 03:40:36 AM » |
|
Accidental stack traces! (Unfortunately it doesn't show the line number without an extra file which I remove in the release pipeline - oh well) I actually spent longer than needed testing it because I'd missed out the part where you said you went to another system to cause the crash - I had spent all my testing effort trying to cause it in the Cattus system thinking you'd only exited the space station and pressed down. It wasn't til I re-read it that it clicked and I instantly realised the likely problem. :3 Aye it has crossed my mind to use the Neocities API or another approach (I am versed in Selenium browser automation as well) but it's really not that much of a problem to perform the release manually once the files are built, especially considering the same files get uploaded to itch.io as well, and there's always some HTML to update on each site, and maybe a bit of blurb to write, or a screenshot to add, etc. - I've got the process worked out now so it means Neocities, itch.io and this forum thread all get the same treatment each time and things are consistent yet freeform if I want them to be - Technically it's all automatable, but right now I'd rather put the time into more gameplay or the actual website's content.
|
|
|
Logged
|
|
|
|
JobLeonard
|
|
« Reply #134 on: October 30, 2020, 04:00:32 AM » |
|
I mean... I'm happy to download debug builds if they're not too big
|
|
|
Logged
|
|
|
|
Rogod
|
|
« Reply #135 on: October 30, 2020, 04:08:44 AM » |
|
The Ubuntu build is actually already in Debug mode and the Windows build in Release mode, just so I can separate appropriate code more easily with #if preprocessors (the equivalent platform checks that one is supposed to use for this were not cooperating in this regard). I may just include the .pdb file in the Ubuntu build in future if we run into anymore issues like this, but I feel this should be the back of it now.
|
|
|
Logged
|
|
|
|
JobLeonard
|
|
« Reply #136 on: October 30, 2020, 04:13:01 AM » |
|
I feel this should be the back of it now. I admire your optimism, but come on, we're all coders here. We know better than that
|
|
|
Logged
|
|
|
|
|
JobLeonard
|
|
« Reply #138 on: November 01, 2020, 12:16:19 AM » |
|
Does that mean you're from the UK? I guess the game graphics do follow the tradition of glorious Teletext
|
|
|
Logged
|
|
|
|
Rogod
|
|
« Reply #139 on: November 01, 2020, 02:38:46 AM » |
|
While this is true, and I am old enough to remember teletext, I only looked at it myself one time just to go "Oh yea, what was all this... it's obsolete nowadays... oh that's how it works." then I never touched it again. (This musta been around 2005 I'd guess) Startron's graphics style is more likely to subconsciously resemble that of DOS games and Sinclair (Timex) Spectrum games as my adolescence included much tinkering with QuickBASIC examples on the family Windows 3.11 and a modern assessment of the art style on complicated Spectrum games like Tir Na Nog (both machines I still own for reference and nostalgia sake and the Spectrum being a gift purchased off Ebay for my 15th birthday - I am a generation younger than those who'd have used one in the 80s) I guess I often found lots of simple-graphics games that used these kinds of ways to make geometry appealing, yet I felt the developers sometimes had a lack of imagination; when you look at ASCII artwork on a Google image search, you can see all kinds of characters being used just to get different levels of saturation in a cell, yet lots of DOS interfaces or Spectrum games seemed to oversimplify their use of characters and I felt the games lost something thereby. (Another problem was that if a game's concept demanded something fanciful, the artist would opt for a 256-colour mode or an up-and-coming 3D perspective instead of just text.) Obviously later influence came from the generic "retro games" where everything's pixelized and games like Dwarf Fortress were coming along. So I realised a game could still be complex yet use an easily accessible way to create graphics. (Plus I just enjoy the challenge of seeing what complexities I can get characters on a page to perform - Winamp's Milkdrop plays a part in inspiring me there so I guess one can thank the demo scene for something.) So yea, if the game resembles teletext, this is likely convergent evolution or a coincidence. (Either that or it's a result of me being only a mediocre artist restricting myself to a grid for my own sanity and ease of comprehension while also trying to portray something more lofty.)
|
|
« Last Edit: November 01, 2020, 02:44:37 AM by Rogod »
|
Logged
|
|
|
|
|