Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1387158 Posts in 66523 Topics- by 59076 Members - Latest Member: kaikecarlos

January 21, 2021, 03:16:06 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsStartron (The procedurally generated ASCII space sandbox) ▲
Pages: 1 ... 5 6 [7] 8 9
Print
Author Topic: Startron (The procedurally generated ASCII space sandbox) ▲  (Read 7395 times)
Rogod
Level 1
*



View Profile WWW
« 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 Tongue )

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-
Level 1
*


View Profile
« 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
Level 1
*



View Profile WWW
« 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 Sad

I think this is just going to have to be "one of those limitations with the Linux version" am afraid Ninja



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.
Beer!
« Last Edit: October 24, 2020, 02:03:21 PM by Rogod » Logged

Rogod
Level 1
*



View Profile WWW
« Reply #123 on: October 25, 2020, 07:44:15 AM »

Update v0.53
Gotta catch em all! Gomez


List of updates/fixes
  • Rewrote the save/load checks and thread safety to play nicer with Linux (it's now not trying to do 2 things at once)

  • Made Startron happier about being resized in a Linux terminal (plus a new configuration option to turn this off if it causes performance issues)

  • Added a ready room off from the bridge

  • Added 14 collectible objects that can be found in any newly generated cosmos - each displaying in your ready room (never underestimate the power of a "Something to hunt for" mechanic in a game, it can do wonders for breaking up any monotony)
    A free copy of Startron to the first person to collect them all! Big Laff

  • Fixed on screen messages only disappearing when in the overview perspective

  • Fixed crashes when going to the bridge after grabbing some space junk (removing the entity caused an NPE Tongue)

More fun stuff coming soon! Gomez


Logged

JobLeonard
Level 10
*****



View Profile
« Reply #124 on: October 25, 2020, 08:06:06 AM »

Those are some cute collectibles! Kiss

Gonna give the new version a try Smiley
Logged
Rogod
Level 1
*



View Profile WWW
« Reply #125 on: October 28, 2020, 12:21:14 PM »

Update v0.54
Listen carefully friend... Gomez


List of updates/fixes
  • Added talking to patrons at the bar to find out snippets of information (some of these may or may not be clues to collectible items mind)

  • Made the red & blue docking lights on space stations less flickery and random

  • Throttled the screen updates (from v0.53) on Linux so it's not as taxing

  • Relinquished the save timeout, on the main menu, sooner if the file exists (still prevents generation spam and should keep the same control over what actions are performable)

  • Made all entities in a system emit dust particles that will orbit the sun in the centre (helps make things feel a little more space-like with a few things whizzing around)

  • Draw the engineering backdrop finally (I'd put this off for so long because I knew it was going to be complicated and I wasn't wrong)

  • Fixed an unlikely but reproducible crash on entering the cargo bay


« Last Edit: October 28, 2020, 12:28:55 PM by Rogod » Logged

JobLeonard
Level 10
*****



View Profile
« Reply #126 on: October 29, 2020, 03:17:57 AM »

Quote
No record found in ship's computer
The requested information was not found
I think either the file failed to upload or the link somehow might have a typo?

https://startron.neocities.org/releases/ubuntu/Startronv054U.zip
Logged
Rogod
Level 1
*



View Profile WWW
« 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
Level 10
*****



View Profile
« 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)
Quote

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
Level 1
*



View Profile WWW
« 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 Sad

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 Wink
« Last Edit: October 29, 2020, 02:59:46 PM by Rogod » Logged

vdapps
Level 2
**


Head against wall since 2013


View Profile WWW
« Reply #130 on: October 29, 2020, 01:48:36 PM »

Serious testing and debugging going on here, with stack trace. Hand Metal Left Hand Metal Right
Logged

Rogod
Level 1
*



View Profile WWW
« Reply #131 on: October 29, 2020, 02:29:38 PM »

Update v0.55
Level 3 diagnostic complete Gomez


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.



@JobLeonard
Bingo! 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. Who, Me?

@vdapps
Only the finest in this thread! Wink
« Last Edit: October 29, 2020, 02:51:20 PM by Rogod » Logged

JobLeonard
Level 10
*****



View Profile
« Reply #132 on: October 30, 2020, 03:06:21 AM »

Quote
Serious testing and debugging going on here, with stack trace.
Free benefit of a console-based game: free stack traces when it crashes!

Quote
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 Facepalm

Quote
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
Level 1
*



View Profile WWW
« Reply #133 on: October 30, 2020, 03:40:36 AM »

Big Laff 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  Smiley - 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
Level 10
*****



View Profile
« 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 Cheesy
Logged
Rogod
Level 1
*



View Profile WWW
« Reply #135 on: October 30, 2020, 04:08:44 AM »

Tongue 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. Gentleman
Logged

JobLeonard
Level 10
*****



View Profile
« Reply #136 on: October 30, 2020, 04:13:01 AM »

I feel this should be the back of it now. Gentleman
I admire your optimism, but come on, we're all coders here. We know better than that
Logged
Rogod
Level 1
*



View Profile WWW
« Reply #137 on: October 31, 2020, 02:37:09 PM »

Update v0.56
There's something lurking beneath... Gomez


List of updates/fixes
  • Added actual support for internationalisation (including key highlighting) demonstrated with just English UK/English US for now - any other language would require a willing translator first Tongue
    It's a little wonky at the moment as the language is saved with your cosmos and that doesn't get loaded until you press play so this'll get tidied up later when I split player-data from cosmos-data in a future update (there'll be an options menu to go along with all that too).
    In the meantime, the menu got shuffled around to a more appropriate format:

    I only gave the strings a cursory glance for any obvious US/UK equivalencies so I may have missed some (not being American) - if anyone using the English (US) language setting finds anything spelled incorrectly, please let me know Gentleman

  • Made it clearer whether a tile on an entity can be mined (also stopped it being possible to mine gases or liquids)

  • Added bugs and bug colonies which will spawn fairly infrequently on planets or moons you're building on. (You'll be told off and fined for destroying a bug colony, so be aware of that (killing the bugs as individuals is fine for now))
    One way to avoid this problem altogether is to build on asteroids or gas giants, but this presents its own set of problems so it's a trade-off Blink

  • Added a new wall structure for protecting your operations from wandering bugs (bugs will chew through conduit, road and conveyors but cannot get over walls because they're stoopid)

  • Added some more random dialog in the bar just for the hell of it :3


Logged

JobLeonard
Level 10
*****



View Profile
« 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 Cheesy
Logged
Rogod
Level 1
*



View Profile WWW
« 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. Grin

(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

Pages: 1 ... 5 6 [7] 8 9
Print
Jump to:  

Theme orange-lt created by panic