Stunts Forum

Stunts - the Game => Stunts Related Programs => Topic started by: Cas on March 08, 2015, 01:16:12 AM

Title: Bliss / Cas-Stunts track editor
Post by: Cas on March 08, 2015, 01:16:12 AM
Hi, folks!  I had been off for a long time and recently visited the forum, found it still very active, so I decided if I wanted to come back, better not do it empty-handed!  Then, I started to work on a new track editor and here I'm bringing you the first beta version. I hope you like it. I'm still working on it, so please do tell me of any bug or general suggestion.

EDIT:
Current latest version: Bliss 2.5.8
Download from site: http://www.raceforkicks.com/bliss (http://www.raceforkicks.com/bliss)
Or from NotABug repository: https://notabug.org/xlucas/bliss/releases (https://notabug.org/xlucas/bliss/releases) (down as of today)
Supports GNU/Linux 64bit, Windows, FreeDOS and DOSBox
GNU/Linux 32bit is still compatible and you could compile from source (which is included) if you want the binary for it. If you do need a 32bit executable and can't compile it, Bliss 2.5.4 is still available on the website too.
I'm unable to upload the ZIP file directly to the forum because it's larger than 1MB.

NOTE for GNU/Linux users: distros are switching from libtinfo.5 to libtinfo.6. Because I updated my OS, the program is now compiled for libtinfo.6, which will be OK for updated distros, but may fail to work out of the box in older LTSs. If so, the program can be recompiled from source or you may upgrade your libtinfo to version 6.

Please feel free to host a copy of Bliss in your sites, guys, so there are as many places to download it from as possible.
Title: Re: Introducing my new track editor
Post by: Duplode on March 08, 2015, 06:41:34 PM
Nice! The editor has some interesting features already. Before getting into them, a note on running the program for other folks willing to try it: the Windows executable is 64-bit, while the Linux one is 32-bit (I had to install the 32-bit libxpm to run it here). Also, the DOS executable needs an extender called CWSDPMI, which you can download from here (http://homer.rice.edu/~sandmann/cwsdpmi/) (pick the first "binary distribution" link, then extract CWSDPMI.EXE into the program directory).
Title: Re: Introducing my new track editor
Post by: Cas on March 08, 2015, 08:34:08 PM
   Thank you, Duplode!  You've done a lot of testing. You found some undocumented keys and bugs I hadn't noticed!
I compiled the Windows version for 64bit (I actually had my brother do it for me, since I use Linux), but I could compile it 32bit if necessary. The Linux version is 32bit because I'm currently using a 32bit Linux, but would like to upgrade and probably next versions will be 64bit.
    What Linux distro are you using?  Were you able to run the binaries without any dependencies expect for the 32bit lib? I'm interested in knowing more about this. The error about file name duplication, I had not noticed, because I did most of my tests under GNU/Linux, but now that I read it, I know exactly why it happens. I will have it fixed and upload the update. It's not hard to resolve. The editor can actually combine track elements already, but I compiled it without that option, because I hadn't added the switch yet and I preferred the default to be more like the original editor. Next version will include at least a key shortcut to switch editing mode. There is also an option for not showing the terrain warnings. It can be used for checking what's "under the yellow box". I'll also include that in the next upload.
    About the high CPU usage, I've noticed that in some of my programs and I really don't know why that happens. I think I need to include more idling time in it. I can see DOSBox takes some time to load the DOS version. I believe it is because I load the Targa graphics byte by byte, as the screen format is different from that of the graphics. I could make this work faster by changing the file format, but the file would be 25% larger and the loading time would only vary significantly under DOSBox. I'll consider it :)
Title: Re: Introducing my new track editor
Post by: CTG on March 08, 2015, 08:52:25 PM
well-done
Title: Re: Introducing my new track editor
Post by: Cas on March 08, 2015, 09:13:02 PM
Thank you, CTG! :D  I'm fixing the bugs and I'll try to publish the next beta tonight!
Title: Re: Introducing my new track editor
Post by: Cas on March 09, 2015, 02:44:51 AM
Updated!  ;)
Some errors fixed, like file names no longer duplicate. Also, you're able to toggle terrain-track conflict generation and display. I tried changing the yellow box to something more transparent so the actual terrain element could be seen in spite of the warning, but it was very difficult to notice that the warning was there. By toggling warning display off and back on, now, you can easily check what's underneath the yellow box, though.

EDIT: Also downloadable here: https://mega.co.nz/#!jcBgEKQC!pF_4AdoJdoWwfbgxsk6wKMfBaqJnfnePuSM2d85KMLE (https://mega.co.nz/#!jcBgEKQC!pF_4AdoJdoWwfbgxsk6wKMfBaqJnfnePuSM2d85KMLE)
Title: Re: Introducing my new track editor
Post by: Duplode on March 09, 2015, 04:38:56 AM
Updated!  ;)

Wow, that was quick!  :) The CTRL+D toggle solves the terrain conflict, and the debug mode helps a lot when playing with filler tiles. As for the CTRL+E combining mode, it works well for simple superpositions; however, since a left click will always insert all four tiles of an element, some complex combinations can't be done. For instance, among the relevant examples in this Wiki page (http://wiki.stunts.hu/index.php?title=Illusion_track#Examples) I can do the broken cork l/r, but not the bridge chicane, which is an L-shaped mosaic of two corks u/d:

79  FF
7B  FD
FE  FD

(As for the symmetrical splits shown there, some orientations can be done, but not all of them. A south-to-north split with the fake path east of the real track runs into the same problem of needing an L pattern.)

    What Linux distro are you using?  Were you able to run the binaries without any dependencies expect for the 32bit lib? I'm interested in knowing more about this.

Arch Linux 64-bit; and yes, I only needed to install lib32-libxpm for it to work.
Title: Re: Introducing my new track editor
Post by: Cas on March 09, 2015, 04:07:39 PM
Ah!  I see what you mean!  Some combinations don't go from left to right and top down entirely. I think the best way for me to solve this is to include a way to manually enter the complements FD/FE/FF. They are always the same, regardless of the track element, so there is no need to actually copy each track element piece by piece, but only the main element and then modify it by changing the complements. It's a lot faster. Cas-Stunts will realise. For example, in your example, the red FD corresponds to the 79h and not to the 7Bh. Cas-Stunts is already able to tell that and will draw the corresponding section of the 79h 4x4 element. Only you can't enter it. I'll device a way to do it.

It's great that you can run the binary without problems. It means that if I later on install a 64bit distro, I will be able to compile 64bit and most people will run the program without dependencies. I really hate dependencies: they complicate program installation and if automated, they make the installation internet-dependent, so you can't just save a copy of the program in a CD/DVD/Flash drive and copy it to your computer whenever you want. Besides, dependencies bring license conflicts sometimes. I like to use only what is guaranteed to find on every system.
Title: Re: Introducing my new track editor
Post by: Duplode on March 09, 2015, 04:58:58 PM
I think the best way for me to solve this is to include a way to manually enter the complements FD/FE/FF. They are always the same, regardless of the track element, so there is no need to actually copy each track element piece by piece, but only the main element and then modify it by changing the complements. It's a lot faster.

Looks like a good solution. By the way, as you say things like bridge chicanes are already loaded correctly when in a pre-existing track, the only difficulty is in recreating them.

I really hate dependencies: they complicate program installation and if automated, they make the installation internet-dependent, so you can't just save a copy of the program in a CD/DVD/Flash drive and copy it to your computer whenever you want. Besides, dependencies bring license conflicts sometimes. I like to use only what is guaranteed to find on every system.

Agree 100%. Packaging Cairo and associated libraries with the Windows build of stunts-cartography was quite unpleasant. (And now it seems changes in libraries which depend on Cairo mean I will have to change the included DLLs when/if I release a new version  ::))
Title: Re: Introducing my new track editor
Post by: Vector on March 09, 2015, 07:50:27 PM
Can i be a beta tester? PLZ!
Title: Re: Introducing my new track editor
Post by: Cas on March 10, 2015, 05:23:40 AM
Sure!  Everybody can download it and try it :)
I've been making some additional changes to it, but it's still not ready for another update. If anybody can give me a hint, for example, of how I could reduce the CPU usage, I'd appreciate it. I'm not really doing anything unusual. It's just a normal main loop.
Title: Re: Introducing my new track editor
Post by: Shoegazing Leo on March 10, 2015, 05:00:58 PM
An advantage what I see: I can edit tracks without the DOS Box. The system remembers the classic TB.
Title: Re: Introducing my new track editor
Post by: zaqrack on March 10, 2015, 06:35:13 PM
I am very excited to try out this new tool.
Title: Re: Introducing my new track editor
Post by: Cas on March 12, 2015, 05:57:32 PM
Well... first, I have to say that I'm very happy that the forum is back :)  I've been trying every few hours to see if it was working and today I had the good surprise!

You can all download the editor and try it freely, of course!
I've now added a couple of features to make it easy to create hybrid track elements. I need to add some touches before I upload this, though. I also want to make track editing even more comfortable and I have some ideas.  ;D
Title: Re: Introducing my new track editor
Post by: Cas on March 15, 2015, 08:49:48 AM
I've fixed some bugs and added a couple of features, mostly concentrated in "illusion track" editing. Some additional features I'm working on are not ready to be published, so they are disabled in this distribution.
I still have to ask my brother to compile the source for Windows, so this zip does not contain the Windows executable. I'll upload it soon. Till then, you can test it with the DOS executable. Please tell me what you think about the new changes. Thank you, guys!
Title: Re: Introducing my new track editor
Post by: Duplode on March 16, 2015, 03:34:11 AM
Just had a quick look at the new features. The arrows in debug mode are a very intuitive way to display fillers. Overall the workflow for creating illusion combos is quite efficient - position the main tiles first, then use X/Y/Z to fix any wrong fillers, using the debug mode if you get confused. A minor addition that occurred to me would be an indicator of whether the CTRL+E combining mode is activated.

If anybody can give me a hint, for example, of how I could reduce the CPU usage, I'd appreciate it. I'm not really doing anything unusual. It's just a normal main loop.

I have no FreeBasic experience, but as you implied earlier on it does feel like a main loop looping too fast, with more idling time needed. I wonder if you have margin to increase it without affecting GUI responsiveness.
Title: Re: Introducing my new track editor
Post by: Cas on March 21, 2015, 04:20:30 AM
And.... upgrade!
It took me a few days this time and it may seem that I didn't do much, but I'm trying to get the editor out of the beta status, which soon will happen, so I'm concentrating on bug correction and optimisation.
Among other things, I added an indicator for manual editing, as you suggested, Duplode. What took me most of the time was the directory listing system, which has been highly improved. There could still be bugs there, I'd appreciate if you guys tested the program and used it intensively.
I need confirmation from users of both Windows and Linux distros other than Ubuntu that the shortcuts SHIFT+F1 and SHIFT+F2 work on your computer and whether the alternatives F11 and F12 also work. In Ubuntu, F11 and F12 are currently not working. I can fix that, but I would like to first know if this is an Ubuntu problem only.
Also, please take a look at the new graphics. Currently, many elements are still just like the original Stunts graphics, but many others have been enhanced to look better.

Please spread the word. I'm sure Cas-Stunts is already at a level as to replace all other editors available. If any of you still prefer to use another editor for any particular reason, please let me know, so I can continue to better the program and make it the number one choice for every stunter. Thank you!
Title: Re: Introducing my new track editor
Post by: Duplode on March 21, 2015, 05:48:54 AM
Among other things, I added an indicator for manual editing, as you suggested, Duplode.

Thanks!

What took me most of the time was the directory listing system, which has been highly improved.

Directory browsing is indeed an important improvement. Speaking of that, two nice things to have (for people like me with messy directories with loads of tracks  :)) there would be PageUp/PageDown support and moving through (or filtering) the track list as you type the file name.

I need confirmation from users of both Windows and Linux distros other than Ubuntu that the shortcuts SHIFT+F1 and SHIFT+F2 work on your computer and whether the alternatives F11 and F12 also work. In Ubuntu, F11 and F12 are currently not working.

Same thing here in Arch - SHIFT+F1 and SHIFT+F2 work, F11 and F12 don't.

If any of you still prefer to use another editor for any particular reason, please let me know, so I can continue to better the program and make it the number one choice for every stunter.

At this point, I believe the main Track Blaster feature to be added would be the selection-and-clipboard commands (cut-copy-paste, mirror and fill). That might be a good opportunity - those commands are very unintuitive in TB, and they would probably feel a lot more natural in a more mouse-driven interface.
Title: Re: Introducing my new track editor
Post by: Cas on March 22, 2015, 07:52:31 AM
That's good!  Thank you!

PgUp and PgDn are easy to implement. I could also do filtering, but I have a practical problem there: suppose you enter a text. As you type, the list should be changed. Now, if you typed a complete file name, only that file should be shown below. Well, you currently can click on files in the file list and the name will populate in the entry box and you can continue to scroll and click on other file names, but if I do the automated filtering, this will no longer be possible, since clicking on one file name will take that to the entry box, thus filtering and leaving only that file in the list. I have to find an alternative, another idea, so that I can do the filtering without that interfering with the current working of the list.

I'll probably also enable F11 and F12 for GNU/Linux, even though they're not necessary, since SHIFT+F1 and SHIFT+F2 work well and you also have "T".

A clipboard would be a major addition to the editor, but I agree that it's a very important one. In order to get that done, I realised I had to change the way graphics are being handled. Because I saw this was probably going to also solve the problem with the slow start-up in DOS, I've already made that graphic system change. The loading speed in DOS has only increased a little, which makes me think the actual problem has to do with DPMI initialisation when I try to allocate memory for the first time, but I'm not sure. Anyway, the change now allows for a "third layer", which I will use for the clipboard selection system. It will also make it possible to improve the graphic quality. This is going to take some time.

I think the first thing I will do is get rid of the bugs and get the first non-beta release. Then, I will be able to continue with the new features.
Title: Re: Introducing my new track editor
Post by: Duplode on March 22, 2015, 05:54:56 PM
PgUp and PgDn are easy to implement. I could also do filtering, but I have a practical problem there: suppose you enter a text. As you type, the list should be changed. Now, if you typed a complete file name, only that file should be shown below. Well, you currently can click on files in the file list and the name will populate in the entry box and you can continue to scroll and click on other file names, but if I do the automated filtering, this will no longer be possible, since clicking on one file name will take that to the entry box, thus filtering and leaving only that file in the list. I have to find an alternative, another idea, so that I can do the filtering without that interfering with the current working of the list.

An alternative would be just moving through the list as you type, selecting the closest match to the prefix you typed. It would work just as well (and arguably even better, as you can keep moving freely through the list).

I think the first thing I will do is get rid of the bugs and get the first non-beta release. Then, I will be able to continue with the new features.

A sensible plan.
Title: Re: Introducing my new track editor
Post by: Cas on March 26, 2015, 04:44:08 AM
I just updated to a 64bit GNU/LInux, so next update will have a 64bit ELF executable file :)
I didn't feel ready to try Arch Linux yet, though. But it looks like I'll eventually get to that. It's the kind of OS I'd like to try :P
Title: Re: Introducing my new track editor
Post by: Duplode on March 26, 2015, 05:15:02 AM
I didn't feel ready to try Arch Linux yet, though. But it looks like I'll eventually get to that. It's the kind of OS I'd like to try :P

I switched to Arch in early 2013, after nearly five years using Fedora in my home desktop. The accumulation of small annoyances over those years made me get over the inertia (the most immediate cause was that I had gotten sick of Fedora's crazy distro release upgrades). The initial effort with Arch was significant, but it has paid itself many times since. Transparency rules!
Title: Re: Introducing my new track editor
Post by: zaqrack on March 26, 2015, 03:27:18 PM
I used Arch for several years in the late 00s. I switched from Gentoo - that was overkill. I liked Arch, but have not used Linux on a daily basis since 2010 or so. :(
Title: Re: Introducing my new track editor
Post by: Cas on March 26, 2015, 06:31:55 PM
Oh, well, I had DOS only in my computer until internet became very important. Then I figured how to make partitions and I installed Windows 95 (then 98) alongside DOS. At that time, I used DOS for everything except to get to the Internet. Later, many programs, like CD burners and MP3 encoders, came for Windows almost exclusively, so I started to use Windows more, but I didn't like it. In about 2006, I first tried a Linux, a very old Ubuntu, on my computer, but I was just testing it and continued to use DOS and Windows. Later, I tried an old Red Hat and then returned to Ubuntu. Once I was able to get online with Ubuntu, I got rid of Windows and haven't used it since. Only at the office where I worked. Say last time I used Windows on my PC was about 2008, to edit WarCraft II maps :P

I've tried Fedora and OpenSUSE, but I always end up going back to Ubuntu. There's something I don't like about it, though: it's bloated and too commercial. It is known to send you dash search information to third parties unless you opt-out. That's why I want to switch, but I want to switch to a distro where I have true control. Until then, I'll stay with Ubuntu. I have the feeling Arch might be the distro I'm looking for, but I'm certain I need to get prepared :D
Title: Re: Introducing my new track editor
Post by: Cas on April 07, 2015, 08:01:14 AM
Well, I think I've finally got it ready for the first non-beta version. This is Cas-Stunts 2.1 and it's complete. Of course, there are still many things I want to add, but for this version, it's ready. Only thing is I still haven't been able to build it for Windows, but you can try the other two. What took most of my time was the graphics. I wanted to have a complete new graphics set. Now I will be able to concentrate in functionality. I'll be uploading the Windows executable soon, hopefully tomorrow.
I built a simple website for the editor. You can check it and download it there. Tell me what you think:

http://castunts.lixter.com/index.html (http://castunts.lixter.com/index.html) 8)

EDIT: It's updated now. The Windows executable is available too!
Title: Re: Introducing my new track editor
Post by: zaqrack on April 10, 2015, 10:11:08 PM
the terrain brush is beautiful. Where were you in the past 15 years? You could have saved around a hundred hours of my life :)

Overall the tool is very pleasant and easy to use. I love how easy it is to delete unwanted track elements.
However, I am really a keyboard guy and depending almost entirely on the mouse is quite awkward. Especially in context of Stunts. I probably only need some time to adapt though:)
I know it is tough to deal with pixels but some upscaling would be nice. Elements are tiny even at my 1600x900 resolution. I assume I could use the dos executable and the DosBox scaler though...


Title: Re: Introducing my new track editor
Post by: Cas on April 11, 2015, 12:54:33 AM
Thank you, Zak!

Yeah, I've already thought about the size. I wanted to make it bigger, but I started with graphics borrowed from the built-in editor, which are 16x16 and slowly made my own. I'm planning to make a whole new environment, somewhat smaller than 1024x768 with bigger graphics, but that's going to take quite some time. What I could do as a temporary fix is a 2x zoom of the whole thing, but it'd go 1280x960. Uhm... I think I should better just make a whole new bigger graphics set.
What will come very soon is a lot more keyboard, because I do have that crave for keyboard shortcuts too. There are also some suggestions by Duplode I'm wanting to implement. The graphics kept me busy for a long time.
Title: Re: Introducing my new track editor
Post by: Shoegazing Leo on April 12, 2015, 04:34:21 AM
Very good and easy to use. I can edit track without dosbox, then I can test when edit.
Title: Re: Introducing my new track editor
Post by: Cas on April 12, 2015, 07:28:33 AM
Thank you, Leo!

Yes, that's a comfortable side of it!  I'm now working on bigger graphics. It will take some time, but it'll be worth it :)
Title: Cas-Stunts 2.2 - high-res graphics!
Post by: Cas on May 05, 2015, 01:31:09 AM
Guys, it took me some time, but a new version of Cas-Stunts track editor is ready with bigger graphics. I'm very slow at drawing!  You can download the new Cas-Stunts at http://castunts.lixter.com (http://castunts.lixter.com).

The graphics still need a couple of touches and there's some empty space in the panel I want to organise. Many features are in the process of being implemented and some new bugs may be present because I had to modify the code significantly for the new graphics to work. Please do let me know of any issue or suggestion. DOSBox support has been dropped for now, as it seems DOSBox does not recognise 1024x768 pixel resolution. I will try to find a solution for that, although other things have a higher priority in the project. If you find a way to make the program run under DOSBox without modifications, please tell me.

Duplode: PgUp/PgDn and file-searching as you type have been implemented too!
Title: Re: Introducing my new track editor
Post by: Duplode on May 05, 2015, 04:25:29 AM
Sounds nice! Hopefully I'll be able to give it a proper try soon.
Title: Re: Introducing my new track editor
Post by: zaqrack on August 30, 2015, 02:57:30 PM
I was unable to download the latest package. Is it still available?
Title: Re: Introducing my new track editor
Post by: Duplode on September 04, 2015, 06:03:50 AM
I was unable to download the latest package. Is it still available?

Cas' site is offline. I had downloaded the latest version back in May, so I will make it available from Southern Cross on the next update (which should happen within the next few days, hopefully).
Title: Re: Introducing my new track editor
Post by: dreadnaut on April 03, 2016, 01:12:20 PM
Cas' site is offline. I had downloaded the latest version back in May, so I will make it available from Southern Cross on the next update (which should happen within the next few days, hopefully).

Do you still have the file around, Duplode? Trackblaster is not for me :|
Title: Re: Introducing my new track editor
Post by: Duplode on April 04, 2016, 07:28:29 AM
Do you still have the file around, Duplode? Trackblaster is not for me :|

Timely reminder. I didn't upload it to Southern Cross back then because I couldn't find the package as Cas distributed it originally. I attached to this post whatever I found within the "cast220b" subdirectory in my Stunts folder, including a DOS extender which wasn't in the original package. The Windows version seems to be working fine; as for the other two, I can't test them at the moment (the 2.20 DOS build doesn't work in DOSBox, and the Linux one is giving some dynlink error in my system).
Title: Re: Introducing my new track editor
Post by: dreadnaut on April 04, 2016, 09:41:26 PM
Thank you!

A bit cpu intensive, but definitely more usable.
Title: Re: Introducing my new track editor
Post by: Cas on August 04, 2016, 05:49:22 AM
Sorry about my disappearance, guys. And yes, the site went down. I've been fixing some bugs in the last version of Cas-Stunts. Here it is:

Cas-Stunts 2.23b
https://mega.nz/#!JZRFCIbK!FQP1pAHV50CLZnjrALxMQytaVqSgxwk1BvJZJm5EpZg (https://mega.nz/#!JZRFCIbK!FQP1pAHV50CLZnjrALxMQytaVqSgxwk1BvJZJm5EpZg)

Fixed a problem with file filters, added the ability to edit with the keyboard (which Zak told me he liked from TB) and made a couple of touches that can't be seen, but will help add more features later. I also split the Linux version in two (you have a 32bit and a 64bit executables) and the Windows executable is 32bit, which appears to run fin in Win64 as well.

As Duplode said, this one doesn't work in DOSBox. I realised later that resolutions higher than 800x600 don't work well there. Even in FreeDOS, it works, but it's kind of slow. Next time I want to make something that can run on all three platforms, I'll make sure it can also work in two different resolutions. But if you do prefer to run a version that works well in DOSBox, even if it has fewer features and I'm not maintaining it anymore, this is the last stable version that ran well in DOSBox:

Cas-Stunts 2.10
https://mega.nz/#!RMwlXQQI!_9VXPP-SgEFix8pw98Aa2tFVX83VUnopYoBxoe13Yz0 (https://mega.nz/#!RMwlXQQI!_9VXPP-SgEFix8pw98Aa2tFVX83VUnopYoBxoe13Yz0)

Question. Is there a chance I could get Cas-Stunts hosted here?  My free hosting sites keep going down because of the lack of visits, ha, ha. Also, it'd be nice to have a cast.stunts.hu  ;D  or just to have my editor in the tool list at zak.stunts.hu  :P
Title: Re: Cas-Stunts track editor (ex "Introducing my....")
Post by: Duplode on August 04, 2016, 09:08:34 PM
Welcome back Cas!

Question. Is there a chance I could get Cas-Stunts hosted here?  My free hosting sites keep going down because of the lack of visits, ha, ha.

I have just uploaded the latest version to  the tools collection at Southern Cross (http://scr.stunts.hu/mods.html)  -- as the posts upthread show, something I was supposed to do eleven months ago!

A few random notes:
Title: Re: Cas-Stunts track editor (ex "Introducing my....")
Post by: Cas on August 05, 2016, 12:39:47 AM
Thanks, Duplode!

I can quickly and easily add the grid lines. I was already thinking about that. I'm also wanting to add select/copy/cut/paste + rotate/flip. That will take a little more work, but I can do it. I also could add something to take care of the CPU usage. My idea is to issue idle sleeps while the mouse cursor is not being moved in the program window. This means the editor would still eat up CPU while you're editing, but would become extremely light when not in focus or when you're just viewing the track. Would that be good?
Title: Re: Cas-Stunts track editor (ex "Introducing my....")
Post by: Duplode on August 05, 2016, 01:33:55 AM
I also could add something to take care of the CPU usage. My idea is to issue idle sleeps while the mouse cursor is not being moved in the program window. This means the editor would still eat up CPU while you're editing, but would become extremely light when not in focus or when you're just viewing the track. Would that be good?

Yup, that would help -- a big gain with that plan is that it would be possible to keep the editor open alongside Stunts without interfering with DOSBox performance.
Title: Re: Cas-Stunts track editor (ex "Introducing my....")
Post by: Cas on August 05, 2016, 07:12:35 AM
Great!  Here's an update:
https://mega.nz/#!5YRXyIxL!pQciGDMII_UkfnlkMuYNk_jrcoBYpZrN9PCWBtlwjTk (https://mega.nz/#!5YRXyIxL!pQciGDMII_UkfnlkMuYNk_jrcoBYpZrN9PCWBtlwjTk)

Added:
- By default, the grid will be visible. You can turn it off and back on with CTRL+G at run-time or modify cast.cfg so that it always starts with the grid on or off.
- Select, copy, cut and paste have been implemented and work well, although there's something I'm not getting used to. Try it and tell me what you think.
- Anti-hogging system implemented. You have to be at the editor. After a second of not having the pointer on the window and not hitting any key, it'll quit hogging. It will take half a second for it to respond again when you return to it. If you're anywhere else, such as at the presentation screen or opening a track, the anti-hogging system will not activate.

Something to check:
- I've noticed that the Windows build opens up a Wine console window alongside the main program window in my system, which I don't remember having seen before. I have no idea why this happens and I wonder if the same thing occurs when running the program on a real Windows machine.
Title: Re: Cas-Stunts track editor (ex "Introducing my....")
Post by: Duplode on August 06, 2016, 06:08:28 AM
Great!  Here's an update:
Now available from Southern Cross :)

Added:
- Select, copy, cut and paste have been implemented and work well, although there's something I'm not getting used to. Try it and tell me what you think.

The one thing about the current system that has drawn my attention is that before pasting you have to select a rectangle of the correct size. Perhaps it would be more intuitive if, on clicking the paste button, a highlighted rectangle corresponding to the area to be pasted (and possibly with its track elements drawn on it) began to follow the cursor, allowing you to preview the results before a second click confirms the pasting. (An additional suggestion in the nice-to-have category would be an indicator of some sort on the left panel that there is something in the transfer area waiting to be pasted.)

Something to check:
- I've noticed that the Windows build opens up a Wine console window alongside the main program window in my system, which I don't remember having seen before. I have no idea why this happens and I wonder if the same thing occurs when running the program on a real Windows machine.

I can reproduce it, both when launching with Wine (but not when doing so from a terminal) and with a Windows XP virtual machine.
Title: Re: Cas-Stunts track editor (ex "Introducing my....")
Post by: Cas on August 06, 2016, 10:18:59 PM
Quote
Perhaps it would be more intuitive if, on clicking the paste button, a highlighted rectangle corresponding to the area to be pasted (and possibly with its track elements drawn on it) began to follow the cursor, allowing you to preview the results before a second click confirms the pasting.

Yes. That was exactly what I was thinking of. I thought it'd be complicated to accomplish, but after a few changes, I was able to implement it. There are a few other things I would like to change before posting the new version, though.

And I haven't figured out why the console window appears in Windows. I suspect it's triggered by the program icon, I mean, I think it wasn't there when the program did not have a custom icon. I'll make some tests with that.

Another thing I'm thinking of, for the future, is to make the editor able to add meta-data to the track as an overlay, including a track title, author name, creation time and date, editing time and some championship-oriented information, such as a recommended car, which race and which championship it was designed for, etc. I remember that I once posted a track with an overlay and ZakStunts system was not taking it, so if I do this, I want to make sure the website will be compatible with it. The information I would add would also be useful to the site so, instead of just skipping it, it'd be good to agree on a format that's easy to handle for the site so the info can be shown. Any ideas about this?

I'll post a new version soon
Title: Re: Cas-Stunts track editor (ex "Introducing my....")
Post by: Duplode on August 07, 2016, 04:26:16 AM
Another thing I'm thinking of, for the future, is to make the editor able to add meta-data to the track as an overlay [...] Any ideas about this?

For now, just a preliminary warning: IIRC (it was many years ago, and so I might be misremembering it) I once managed to corrupt/write garbage to memory by doing similar things with game files, so any such feature probably should be tested quite carefully.
Title: Re: Cas-Stunts track editor (ex "Introducing my....")
Post by: Cas on August 09, 2016, 08:28:35 AM
Update!

Cas-Stunts 2.3.1 beta
https://mega.nz/#!4JIHmLDJ!jukTQzipiDc09SKaEb45i7TjAVB29Nw4nFhAY3Y2nUA (https://mega.nz/#!4JIHmLDJ!jukTQzipiDc09SKaEb45i7TjAVB29Nw4nFhAY3Y2nUA)

Fixed:
- Console window opening beside the main program window in Windows (ugh... so many "windows"!) :P
- Select, Copy, Cut and Paste are no longer uncomfortable (especially Paste)

New features:
- Keys to select, copy, cut and paste. Hold CTRL to select and use standard CTRL+C, CTRL+X, CTRL+V to copy, cut and paste
- Flip and rotate on the fly. Also use F, SHIFT+F, R and SHIFT+R
- Enable/disable terrain pasting with T, also on the fly

Changed:
- T no longer switches terrain editing mode
- Debug mode is now enabled/disabled with CTRL+Q, since CTRL+X is now used for Cut

I expect this will be a much more user-friendly version of the editor. There have been many changes so I expect a bug or two might be hiding underneath some key or mouse button. Let me know if that is the case. Also... were you able to verify the anti-hogging system works well?
Title: Re: Cas-Stunts track editor (ex "Introducing my....")
Post by: Duplode on August 10, 2016, 12:09:13 AM
Excellent work! I believe we are quickly approaching the point at which we should recommend Cas-Stunts over TrackBlaster to newbies  :)

Also... were you able to verify the anti-hogging system works well?

I forgot to mention that in the last post. Here it works exactly as you described, both with the Linux build and the Windows one under Wine.

There have been many changes so I expect a bug or two might be hiding underneath some key or mouse button. Let me know if that is the case.

Here are a few things I noticed -- truly minor stuff next to the strides made over the last few updates:

And two further feature suggestions:
Title: Re: Cas-Stunts track editor (ex "Introducing my....")
Post by: Cas on August 10, 2016, 01:08:09 AM
Thank you, Duplode!  And yes... some things are already in my work queue.

Quote
The flip, rotate and mirror commands probably should also act on selected tiles without having to cut and paste them beforehand.
I've thought of this. It's easy to implement. I'll do it.

Quote
[...]given the four new buttons on the left panel (which currently do nothing).
They do have a function!  When you're pasting, you can flip and rotate using those buttons, not just the shortcut keys. Yet, it'd be good for them to have a function when you're not pasting.

Quote
Similarly, pressing DEL with selected tiles probably should delete their elements.
Could be... Anyway, you have CTRL+X (cut). DEL would delete the region without copying it to the clipboard, which would be unrecoverable as of now. I think this is a good thing to implement once I have added undo/redo capabilities.

Quote
If you have a multi-tile picked the keyboard editing cursor will occupy more than one tile; however, pressing DEL will only delete the upper left tile.
I had not thought of that. Yes, I think it'd be better to expand the keyboard cursor so that it marks not only the current track element, but also the element on the current tile. This may take a little more work, but I can do it.

Quote
[...]it took me several seconds to realise the "LMB" in the mouse selection shortcut stood for left mouse button.
As I was writing that, I realised it wasn't completely obvious, but "left-mouse-button" didn't fit there. I figure I should make some nice touches to the documentation. Do you think a PDF with images would be better?  Or is it good to use a standard TXT format?  Now I'm thinking it's not so standard after all. Since I wrote it in Linux, it must be using 0Ah for line end, which would be ignored in DOS/Windows.

Quote
A copy-cut-paste mode for terrain.
This already can be done. Use T to switch terrain-pasting on. You can do it while pasting too. What cannot be done now is to past only the terrain. Internally, it is already implemented, but there is no key or button for that. I'm going to add some clickable indicators on the panel soon for these things, though.

Quote
A keyboard brush mode, either as an editing mode (analogous to what TAB does in TrackBlaster) or activated by holding a key.
I have something better than that in mind, but it's kind of challenging. I'll see what I can do.

Also... what do you think about licensing?  The project is currently freeware. I was considering making it free software.
Title: Re: Cas-Stunts track editor (ex "Introducing my....")
Post by: Duplode on August 10, 2016, 01:46:16 AM
Quote
[...]given the four new buttons on the left panel (which currently do nothing).
They do have a function!  When you're pasting, you can flip and rotate using those buttons, not just the shortcut keys. Yet, it'd be good for them to have a function when you're not pasting.

Oops! Somehow I hadn't thought of this meaning and the corresponding motion while testing.

Quote
Similarly, pressing DEL with selected tiles probably should delete their elements.
Could be... Anyway, you have CTRL+X (cut). DEL would delete the region without copying it to the clipboard, which would be unrecoverable as of now. I think this is a good thing to implement once I have added undo/redo capabilities.

I see -- just like X in vi  :) The relatively minor advantage of using DEL will be not overwriting the clipboard then. In any case, I agree undo/redo should probably come first. 

I figure I should make some nice touches to the documentation. Do you think a PDF with images would be better?

All things equal, I tend to favour simple text files, though images might be useful indeed. There is also the option of going for both by writing the readme in markdown and adding a rendered PDF version alongside it. As for the current readme, I'd only suggest wrapping it to 72 characters and changing the line endings to DOS format (which would ensure it is easily readable under both target OSs).

Quote
A copy-cut-paste mode for terrain.
This already can be done. Use T to switch terrain-pasting on. You can do it while pasting too. What cannot be done now is to past only the terrain. Internally, it is already implemented, but there is no key or button for that. I'm going to add some clickable indicators on the panel soon for these things, though.

Awesome -- I had skipped that line of the release notes.

Also... what do you think about licensing?  The project is currently freeware. I was considering making it free software.

It's up to you of course, but I would wholeheartedly endorse such a change.
Title: Re: Cas-Stunts track editor (ex "Introducing my....")
Post by: Cas on August 12, 2016, 06:06:44 AM
New update!

Cas-Stunts 2.3.2 beta
Download this version (https://mega.nz/#!8QAAgAYI!AKr2y5OvkbHyAroC9ncXVV9aHCfxMAMEZgJEu5PRi74)

New features:

By far, the most complex changes are in the Undo/Redo and Flipping/Rotating options. They seem to work well, but maybe there's a bug I haven't seen. Notice that rotating the selection in situ is not possible unless it's a square. Also, being able to disable track affected by pasting operation now allows, for example, for copying the terrain from a track. Current Undo/Redo system can hold 29 levels. This is because they're supposed to be 30, but there's a known bug that seems to be innocuous. Undo level can be easily modified. Any thoughts? :)
Title: Re: Cas-Stunts track editor
Post by: Shoegazing Leo on August 12, 2016, 07:19:58 PM
My last two tracks were made almost 100% on Cas editor.
Title: Re: Cas-Stunts track editor (ex "Introducing my....")
Post by: Duplode on August 12, 2016, 11:06:53 PM
New update!

Already uploaded!  :) Generally speaking, the new features work beautifully. It is a minor detail, but I particularly liked the look of the mode indicators.

New update!

Cas-Stunts 2.3.2 beta
Notice that rotating the selection in situ is not possible unless it's a square.

Makes perfect sense. It would be nice to have a modifier (SHIFT?) to drag square selections without having to count pixels, though that lies in gold-plating territory already.

The only issues I noticed this time were:

Title: Re: Cas-Stunts track editor
Post by: Cas on August 13, 2016, 02:10:20 AM
@Leo - Thank you!  And what did you use for the other almost 0%? :P  The built-in editor or Track Blaster?  I'd like to know which things are still felt more comfortable in editors other than Cas-Stunts. Track Blaster is actually a great work and if I understand correctly, it was made for the Stunts community, just like Cas-Stunts, so I have great appreciation for it.

@Duplode:

Thanks for the review!  I hadn't seen the problem with SHIFT+R. Just fixed it. It was almost a "typo". My idea with full track transformation was that it'd be done with the mouse. When you're using the keyboard, just like you see it, it's more comfortable to have a current element transformation instead. Yet, I could implement a full-track selection with they keyboard easily.

I was unable to reproduce the errors with Cut + Undo that you mentioned. Probably I misunderstood the error. Could you please give me sequential details on how it gets to happen?  Maybe I haven't tested it thoroughly enough.

As regards undoing copy operations, my idea with the Undo/Redo system is that only grid modifications are affected by it, so the clipboard is not part of that system. I considered making it part, but then you would sometimes press CTRL+Z and see nothing happen and think something is wrong and you've actually dropped what you had in the clipboard, which is not immediately seen. Also, say I add the controversial meta-data, I don't think meta-data modifications should be undoable with CTRL+Z either. But if you think it'd be useful, I could think of "uncopying" and "uncutting". Paste is indeed undoable because it does affect the grid.

The forced-square selection system is not difficult to produce. I will consider it

EDIT:  I think I found what you meant. I've fixed something that was wrong. It affected both cutting with CTRL+X and deleting blocks with DEL. After these operations, the changes were not being pushed to the Undo queue. On the other hand, cutting by pressing the corresponding panel button was pushing the changes. You can verify that this error would not occur if you use the panel instead. In that case, I've fixed it now for the keyboard too.
Title: Re: Cas-Stunts track editor
Post by: Duplode on August 13, 2016, 02:47:44 AM
My idea with full track transformation was that it'd be done with the mouse. When you're using the keyboard, just like you see it, it's more comfortable to have a current element transformation instead.

Oh, sure -- once more I skipped one obvious action to test  :)

As regards undoing copy operations, my idea with the Undo/Redo system is that only grid modifications are affected by it, so the clipboard is not part of that system. I considered making it part, but then you would sometimes press CTRL+Z and see nothing happen and think something is wrong and you've actually dropped what you had in the clipboard, which is not immediately seen. Also, say I add the controversial meta-data, I don't think meta-data modifications should be undoable with CTRL+Z either.

I'd agree on those being good reasons for not implementing it. The benefit would be marginal, and as you say it could get confusing.
Title: Re: Cas-Stunts track editor
Post by: Cas on August 27, 2016, 05:56:38 AM
New update:

Cas-Stunts 2.3.3 beta
Download this version (https://mega.nz/#!JAAXxL4I!enrMhyIhyrLkbGx37rXiC-Y1aHXTvOHjPTB7NIud-K4)

New features:

Some bugs fixed, some bugs still linger. Next update, I shall kill all bugs and remove the beta.
Don't know if I should publish the meta-data format spec here or in the other thread... probably in the other thread.
Title: Re: Cas-Stunts track editor
Post by: Duplode on August 28, 2016, 03:24:43 AM
Nice!

In debugging mode, the parent element is shown as a small icon, for clarity

At first glance, I found that a little uncomfortable --- the icons get quite small for 2x2 elements, and the track direction becomes a little harder to follow with the eyes. Then, however, I remembered that (as the name says!) you are not supposed to do most of your editing in debug mode, but only activate it if you get confused about the fillers. Additionally, the small icons sidestep the issue when displaying main tiles of 2nd or 4th quadrant large corners (in which only a tiny sliver of the corner near the centre is displayed), which is a far more annoying issue. On the whole, therefore, I now feel this change is an improvement.

Tracks with info can be saved as a single file or split, which can be changed at run-time while saving, but also in the configuration file for start-up default

I will ask a few more things about the metadata in the other thread, but here is something specific to Cas-Stunts: One thought that crossed my mind was whether it would be better to delete the .smd file on changing the format from split to combined, as otherwise a superfluous and possibly outdated .smd file would be left behind. However, doing so might not be worth the trouble, as if later on you add an "Export Metadata" command the same "issue" will reappear, with no sensible way of "solving" it (not to mention that, with the current behaviour, changing the format from combined to split and then back to combined works as an export command of sorts).
Title: Re: Cas-Stunts track editor
Post by: Cas on August 28, 2016, 04:36:56 AM
Yeah, the small icons, I decided to implement when I noticed how the arrows in debug mode make it very difficult to identify the track element. For two-tile elements, there's no problem, but four-tile ones normally keep at least two tiles when you're building an illusion track. Very rarely only the parent element will be used, so in non-debugging mode, it's almost always clear what element is there. In debugging mode, on the other hand, clarity focuses on showing where fillers are, so you are left with only one quarter, which, as you say, it's too tiny to distinguish in most cases.

About deleting the .smd file, I hadn't thought about that and now that you mention it, I see the issue with the export format too. One thing I can say that will make this less of the problem is that .smd files contain a hash that allows to link them to a certain track; therefore, forgotten .smd files would not get accidentally linked to the wrong track. Anyway, I agree this is not a comfortable behaviour. My original intention, as you know, was to only implement the overlay system, which would only need to be ignored by applications not using it, but I'm sure we can figure out a method we can all find optimal.
Title: Re: Cas-Stunts track editor
Post by: Cas on August 31, 2016, 08:08:30 AM
Upgrade. Beta removed!

Cas-Stunts 2.4
Download this version (https://mega.nz/#!FVYzTLAJ!GqxWSkTVUOqxumJ0ahjIsP6GWW7W4viHh0m3jtbz8as)

This is mostly a bug fix and beautifying upgrade. Now I can concentrate on new features for the next version. This is what we've got on this one:

New features:

Fixed bugs:
Title: Re: Cas-Stunts track editor
Post by: Cas on September 11, 2016, 06:42:52 AM
One more update. Going back to beta, but with a few bells and whistles. There's a lot more "invisible work" that will help in the future than what's evident, but still, this time you'll enjoy a few new features. So...

Cas-Stunts 2.4.1 beta
Download this version (https://mega.nz/#!wNYjhYYK!DN-DOZ_Nbrz5QSvFF2mNAN9q_toCXlc0pxw4cVswodI)

New features:

Lots of bugs have been fixed, as can be seen in the distribution file. However, with the introduction of these complex features, I fear new bugs may have come up. If you give the track checking system a hard time, you may encounter some. Also, the built-in scenarios have not been made with exquisite patience. If some of them are too ugly or dull, they could be removed and replaced with better ones. Suggestions are welcome :)
Title: Re: Cas-Stunts track editor
Post by: Duplode on September 12, 2016, 03:19:17 AM
First of all, I love the long list of built-in terrains. It feels like starting a new town in SimCity  :)

It is great to finally have an external track checker. You can be sure I will throw everything I've got at it!  :D Here are a few issues I have noticed so far:
There are other smaller issues with the checking rules, but given the infuriating amount of edge cases, exceptions and exceptions-of-exceptions of the in-game track checker I believe it will be more useful for everyone if I, rather than pointing them one by one, write down a complete description of the rules as applied by Stunts. Between the experiments I have accumulated over the years and what we have learned through restunts that won't be difficult to prepare, and so I should be able to to post it here in the near future.

Finally, a question about distribution. Now that there is a stable version, what do you prefer for me to make available at Southern Cross: the latest stable version, the latest version even if it is a beta, or both of them?
Title: Re: Cas-Stunts track editor
Post by: Cas on September 12, 2016, 05:11:27 AM
Thank you so much for testing, Duplode. This track-checking system is extremely complex!  Even before reading your post, I had acknowledged a number of errors (or sometimes not errors, but differences from Stunts) and other limiting issues that I still don't know how I will solve. Just to analyse tracks, I had to build several arrays and user-defined types (structures), plus a number of testing routines, many of which are recursive. I am still working on adding more features and, although I have not finished what I was doing, you may be interested in what I've just added: Cas-Stunts can now estimate the time it will take you to race the track OWOOTly. This will be yet another feature to play with, ha, ha.

Now, going back to the issues:
Title: Re: Cas-Stunts track editor
Post by: Duplode on September 12, 2016, 06:11:32 AM
Cas-Stunts can now estimate the time it will take you to race the track OWOOTly. This will be yet another feature to play with, ha, ha.

I think this feature will be quite useful for me... More often than not, when I sit down to design a competition track the first draft comes out about a minute longer than it was supposed to be, and I have lots of trouble deciding which parts of the track I should cut. In such cases, a lap time estimator would be like a early warning system  :)

  • I tested your pathological track, found the problem and solved it. Still, it wasn't really an "error", but a limitation. Cas-Stunts divides the track in "sections" and then creates "paths" combining these sections. The maximum number of sections was 100 and your track had more than 100. Now the maximum is 255. Still, a very pathological track may make it jump. Extending it past 255 will require me to change some functions because of obvious reasons. It's nice to see that even a track like the one you sent me works with just 255 maximum sections. I should make Cas-Stunts at least warn when this number is exceeded. If it worked in Windows, it means it did by overwriting other data in the program memory and probably was unstable after that.

There is a maximum limit of simultaneous paths enforced by the checker (I think it was 64, though I'll have to double-check it). There is no such limit for non-simultaneous paths, though there should be one: if there are way too many overall paths some of them will not be recognised (and so you will get penalty for them), and the game will crash if you try to race against an opponent (the SFOO5.TRK attached below is an extreme example of such a situation). All things considered, I think it would be entirely OK for the Cas-Stunts checker to give up with a warning at 255 sections.

  • I haven't been able to reproduce the second problem. By dual-way, do you mean a track with more than one path or a track that attempts to re-enter another path in the wrong-way?  In the first case, everything seems to work fine on my side. In the second case, it's not doing it right, but it's still not placing the cursor at (1, 1). Can you send me a track in which this happens?

By "dual-way" I meant a track with more than one path. I have checked it again, and indeed the conditions for triggering the issue are more narrow than that: you need to have a straightway-before-jump error and a path rejoin at some point after it -- even if the track isn't actually dual-way. The DUALGAP.TRK attached is an example.

  • About distribution... this time I kept the previous one because I realised I may have introduced bugs, although the bugs would be only in the new sections (especially in track-testing). I think it'd be nice if you included the new version, but keeping the stable one is important. Also, I'll be posting a newer one in a matter of days, so if it's much work for you, it's OK if you just keep the stable one on the site. Anyway, the new one is here. But if you include both, even better.

That's fine. I will keep the main download link pointing to the stable version and add a link to the beta to the description text (like I used to do with the Stressed binaries and sources) .
Title: Re: Cas-Stunts track editor
Post by: Cas on September 12, 2016, 07:14:07 AM
Uhmmm... that DUALGAP error is really interesting. It definitely is a bug in Cas-Stunts, but I will have to trace carefully to find it. It's not obvious what causes it. I'm sure I can solve it, though.

The other track exceeds 255 sections and is crashing Cas-Stunts the same as before. I'll have to add a warning, definitely.

The time estimation is currently hard-wired to my skill level. Before passing it to you, I'll add an option to calibrate it. There will be a track included with Cas-Stunts (could be 4am.trk; castunts.trk is not a good idea because it has two paths) that you race the best you can in OWOOT and then enter your time somewhere and Cas-Stunts will use that to calibrate your time estimations. I would like to also include a list of default "famous pipsqueaks", ha, ha, so that others can use the estimations for reference. If you'd submit your calibration time, I can add you and so I can do with others at ZakStunts that were interested. Also, I can use timings at old OWOOT tracks to calibrate Ayrton, for example.
Title: Re: Cas-Stunts track editor
Post by: Cas on September 17, 2016, 08:57:42 AM
Significant update!

Here, I've concentrated more on adding features than on fixing bugs. Now the feature set of Cas-Stunts looks almost complete :)

Cas-Stunts 2.4.2 beta
Download this latest version (https://mega.nz/#!BJ5BCbhJ!1JkMfS1u7mzJUdEwstRE1EYUuSsKci3qLPZF4r8H3C0)

New features:

Besides, many bugs were fixed mostly having to do with the track-check system!

Duplode... this one has a lot to play with. It's much more comfortable now to edit tracks with the scenery thingy. I hope the guys give it a try.
Title: Re: Cas-Stunts track editor
Post by: Duplode on September 19, 2016, 04:02:13 AM
The new big features are endearingly sophisticated. I have particularly enjoyed the elegant path analyser.
Title: Re: Cas-Stunts track editor
Post by: Cas on September 19, 2016, 07:13:46 AM
Thanks... you have no idea how much work that was  ;D  And it still has tons of bugs.
If you find something that must be changed, please do let me know
Title: Re: Cas-Stunts track editor
Post by: zaqrack on September 20, 2016, 01:32:23 PM
ZCT178 makes the track analysis and the editor crash.  8)
Title: Re: Cas-Stunts track editor
Post by: Cas on September 20, 2016, 07:43:54 PM
Ha, ha!  Thanks, Zak!  I'll download it and check it. I've made some changes since last release, so I may have fixed that already, but I want to make sure :)  Also, I'm aware of some errors in scenery generation.

EDIT: Found the problem!  Cas-Stunts supported up to 100 paths and this track contains 256!  I've just extended so now the editor will be able to handle up to 1000 paths. It will still crash if you add tons of splits. What I have to add is something that detects when the number of paths is exceeded, just like it already does with the number of sections.
Title: Re: Cas-Stunts track editor
Post by: Duplode on September 20, 2016, 11:55:33 PM
I have raced on ZCT(1)78 two times, and reasoned about the paths at least once, but never quite realised there were so many paths. Exponentiation has a funny way of catching you off guard  :)
Title: Re: Cas-Stunts track editor
Post by: Cas on September 21, 2016, 01:21:46 AM
Yeah, lucky Zak pointed this out, because I hadn't thought paths could ever shoot up so high. The thing is like this: Cas-Stunts analyses tracks using a three-layer method. First, the lowest level analyses the connection between each track element and the next to determine whether there's a local error and classifies these errors as TF (track-fatal, i.e.: that cause the track to not be accepted), PF (path-fatal, i.e.: that particular path is interrupted or otherwise fails to reach the s/f line) and NF (non-fatal, that is, warnings). That's enough for "splitless" tracks. Then, the second layer divides the track in sections. Each section begins either at the s/f line (first section, only one section starts there) or at a joint and ends either at a split point or at the s/f line (last section, only one ends there). The third layer resolves paths (a way from the s/f line to itself in closed-circuit or from the s/f line to somewhere else, open path, non-finishing). As a consequence, each split will create new sections and also new paths.

If sections are linked in parallel, both paths and sections will grow arithmetically (linearly), with sections growing about twice as fast. But when groups of sections are connected serially, the number of paths multiplies and grows geometrically, which I hadn't taken into account!
Title: Re: Cas-Stunts track editor
Post by: Cas on September 27, 2016, 05:17:51 AM
Update. Last major option implemented!  From here on, I'll just complete some things that are unfinished and fix bugs. I'll work to remove the beta.

Cas-Stunts 2.4.3 beta
Download this latest version (https://mega.nz/#!BZR12IiA!O_qympFSOQd-aWPEVzEvEgnFT4wfKM2p8Xlz5jo6vIY)

Although this is still a beta, I expect this version to be pretty stable

New features:

Fixed bugs:
Title: Re: Cas-Stunts track editor
Post by: Shoegazing Leo on September 27, 2016, 05:13:39 PM
I liked the version which I dowloaded (one before this last). I considered a revolution for who makes dual tracks and has the intention to do ways with similar times.
Title: Re: Cas-Stunts track editor
Post by: Cas on September 27, 2016, 06:59:28 PM
Thanks, yeah, I tried to approximate the time it'd take to race each path. You can measure both the length in tiles and the time approximation. For the second, you can calibrate with the time you'd make in 4am. I could make it possible to calibrate with any track, but there's a catch I would have to solve to do that.

This last version also has some corrections in path-solving.
Title: Re: Cas-Stunts track editor
Post by: Duplode on September 28, 2016, 01:56:08 AM
Many keyboard shortcuts for selecting tile types. [...] and more.

There are quite a few more, indeed! Here are a few ideas about completing the set, hopefully without exhausting the available keys  :)

Besides, "Z" for linking tiles. This is a bug (since "Z" is supposed to select the corner tile); I'm changing it to "U" on the next version

Now that all those other shortcuts cycle among multiple variants of a track element, one alternative is putting all fillers under the same shortcut, which would save you two more keys.

(Before changing subject: the only bug I have noticed with these track element shortcuts is that G skips one of the up/down corks, namely the ascending-towards-south clockwise one.)

The DOS version is no longer buggy. Still, it won't run in DOSBox, since that would require redesigning the whole editor to make it fit in a much smaller screen

I wonder if there isn't a more subtle issue involved here. According to the DOSBox Wiki (http://www.dosbox.com/wiki/dosbox.conf#.5Bdosbox.5D), the default svga_s3 choice of emulated graphics hardware is supposed to support 1024x768 in full colour. Is it possible that some sort of configuration of your graphics toolkit might be leading to an incompatible video mode? (This is just an uninformed guess: I know nothing about the interaction between DOSBox and FreeBASIC SDK you use, and so it is entirely possible that I am talking nonsense about this.)
Title: Re: Cas-Stunts track editor
Post by: Cas on September 28, 2016, 04:52:47 AM
About the DOSBox issue, I just read the link. The s3svga option is about S3 cards. Makes me think it has to be interfaced as if it were an S3. On the other hand, if you go down that page, you'll see that the VESA interface only supports up to 800x600 and in DOS, FreeBasic relies on VESA. I am using no toolkit. FreeBasic has an internal graphics library that provides primitives (like lines and text drawing). I'm drawing the buttons and pull down menus myself and I'm operating them manually... In other words, I've built my own toolkit from scratch in the measure that Cas-Stunts required it.

Thanks for pointing up the missing element for G. I hadn't noticed it. I chose "G" for those because "S" for spin was taken by straightway and "C" for cork u/d was taken for track check, but at least the letter "G" resembles these tiles :D

Uhm.. I had thought I could save half the shortcut by using the link option to set the transitions, but maybe a special key for that could be more comfortable. I imagined the designer drawing first the primary elements in a section, then pointing at the spot in-between and clicking "link" to create the transition. Did you notice that you can use "link" both with the keyboard and mouse cursors?  Another thing that could make this more comfortable is the linear keyboard editing mode that I had told you about

I could easily implement a corner shortcut. I didn't do it because I thought "link" would cover for it for small corners and Select+Enter for most of the time would be more comfortable, but if I reorganise well, I could make space for it. The same goes for crossroads. I had thought linking would be comfortable enough, but I could pack it together with splits. Pressing "link" many times will give you all possibilities, so you can also use it to select different ramps. I omitted the start/finish line precisely for the reason you give (it's only used once) and because when you start the editor, this tile is selected and you can easily rotate it and change its material, but again, maybe I can just give everything a shortcut. There are enough keys if I pack some things together, you're right.

With scenery, I thought there's already the Scenery Generation option, but I could switch by type with just one key and then rotate, like you say. I could make this shortcut to always select the item that's facing in the same direction as current item if you're already selecting scenery. Other items seem to rotate when you press their shortcut again. This is because the shortcut looks for the next item of the same time, which is often the rotated version, but doesn't have to be.

OK, then... I'll try to leave no item without a shortcut :)

How does the Tournament integration option work on your end?
Title: Re: Cas-Stunts track editor
Post by: Duplode on September 28, 2016, 07:59:40 PM
On the other hand, if you go down that page, you'll see that the VESA interface only supports up to 800x600 and in DOS, FreeBasic relies on VESA.

That explains it, I guess. (By the way, by "toolkit" I just meant "whatever it is in the FreeBasic infrastructure that allows you to draw things on screen". I was going to write "SDK" instead, but that would sound even more Java-esque  :D)

I imagined the designer drawing first the primary elements in a section, then pointing at the spot in-between and clicking "link" to create the transition.

That is not what I usually do, but it does make sense, and I think I could get used to it without too much trouble :)

I could easily implement a corner shortcut. I didn't do it because I thought "link" would cover for it for small corners and Select+Enter for most of the time would be more comfortable [...]

Using "link" for individual corners would be a bit further away from my usual workflow (which is not at all universal, of course -- what follows is just to explain where I'm coming from). I tend not to think of my tracks as modified rectangles or straights linked by corners, but as something more... let's say "organic": most of the time I do not start with an overall track shape set in my mind, but begin with one or two isolated sectors and let the track grow around them, making lots of small changes as I go along.

The same goes for crossroads. I had thought linking would be comfortable enough, but I could pack it together with splits. Pressing "link" many times will give you all possibilities, so you can also use it to select different ramps.

Do you mean placing ramps and splits together? If so, that might not work so well: there are eight splits for each size/material combination and twelve ramps overall, which sounds like a lot to cycle with a single shortcut.

With scenery, I thought there's already the Scenery Generation option [...]

As far as my tracks are concerned, I almost always arrange the scenery by hand, and so there will be quite a few opportunities for using any such shortcuts. That said: (1) Scenery shortcuts are certainly among the least important ones, for several reasons. One that just occurred to me is that in most large-scale scenery placement -- e.g. when creating a large forest -- you can fill the tiles with abandon without having to care about orientations. (2) The Cas-Stunts generator is flexible enough to make me consider using it, at least occasionally :)

OK, then... I'll try to leave no item without a shortcut :)

Sounds nice! :) Let's see how it will play out in practice.

How does the Tournament integration option work on your end?

No issues here -- it does what it says on the tin. I suppose the demo points towards a future in which we have a standard format for making, for instance, current scoreboards available, so that simply adding the relevant web address would be enough for the program to do the proper thing, right?
Title: Re: Cas-Stunts track editor
Post by: Cas on September 29, 2016, 01:11:35 AM
Quote
by "toolkit" I just meant "whatever it is in the FreeBasic infrastructure that allows you to draw things on screen"

Yeah, it's difficult not to use these terms today :P  Both "toolkit" and "SDK" sound like a different paradigm. It's like saying "folder" instead of "directory"... makes no harm, but we Linux users see a warning sign come up when we hear that word and wonder if maybe the guy assuming we're talking about Windows. I used to do all the blitting in assembly, but FreeBasic really does have very powerful primitives and for 2D, most of the time, it's not necessary to get that deep... and I like the fact that anybody can compile my source with just FreeBasic and no more requirements.

*  I've added shortcuts for everything. You'll see that in the next update. There's even one for transitions, but although you can use that, I have the feeling that it'll be more comfortable getting used to using the link shortcut, because the transition one requires that you press it again and again until you find the transition you're looking for. And about ramps, no, they have a shortcut of their own. What I mean is that ramps can easily be produced with the link shortcut most of the time.

I'm thinking it is still worth trying to implement the keyboard editing style I told you about before.

Quote
[...] so that simply adding the relevant web address would be enough for the program to do the proper thing, right?

Yes, that's my idea. If the tournament is ZakStunts, Cas-Stunts will parse the HTML. If it's any other, it will look for specific text-based configuration files from where it will get the info to do the same thing, so any tournament can implement that "protocol" easily without having to display a particular appearance. Downloading the current track from ZakStunts using Cas-Stunts can be more convenient than doing it from the website, because Cas-Stunts won't automatically save it to disk, but will just load it into memory and allow you to save it wherever you want, which by default, will be the directory you set in the configuration (probably Stunts' directory). Besides, Cas-Stunts gets the track title and author's name from the site and you can store that in your format of preference. On the other hand, the scoreboard is just a gadget and it will always be more comfortable to check it on the website, which also allows communication and navigation.
Title: Re: Cas-Stunts track editor
Post by: Duplode on September 29, 2016, 02:34:43 AM
I'm thinking it is still worth trying to implement the keyboard editing style I told you about before.

Oh yes, that plan about a smart TAB brush! Am I right in suspecting that, at this point, it would be essentially an extension of the "link tiles" feature, powered up by the individual shortcuts? Suspending practical concerns for a moment, I'm imagining the following sort of behaviour, with examples in increasing order of trickiness:
(Do note that this whole vision is clearly biased towards the suggestions I made in the previous post. Reinterpret it as you see fit  :))
Title: Re: Cas-Stunts track editor
Post by: Cas on September 29, 2016, 04:33:11 AM
It's more or less like that, what I had been thinking. Although there are some differences, the spirit is the same and it still have some difficulties. I'll describe me vision, more or less:


Alright. Here are the specifics. When following a path to check a track or when finding transitions, what Cas-Stunts does currently is keeping a database of the characteristics of each tile. One of these characteristics is the connector type in each of the four directions. Connector type 1 is that of paved, dirt and icy roads. Connector type 0 stands for no connector. Connector type 2, for example, means elevated road. A ramp is a tile element that has a type-1 connector on one end and a type-2 connector on the opposite one, the other two connectors being type-0. Banked roads have two connector types: on for right-handed banked road and another for left-handed banked road. The catch is that there always exists a transition (i.e.: a tile with two opposed connectors of different types and the other two being type-0) that has a type-1 connector on one end and any other connector type you want at the opposite end. This means you can create a combined connector very easily. First check if a simple connector exists. If it does, insert it. If it does not, create a simple transition to type-1 followed by a simple transition from type-1 to the new type. This way, it no longer sounds that magical :)
Title: Re: Cas-Stunts track editor
Post by: Duplode on September 29, 2016, 06:54:14 AM
Arrows will not turn, but instead, they will try to continue the road in the absolute direction of the arrow. When you press the arrow in the direction you came from, the last tile will be deleted and the cursor will move to the previous position. If it were not possible to move in the direction you request, nothing will happen. Say you're standing at North-to-South straighway and activate the mode, then hit the right arrow key; a split will be created

...so that the arrow keys always create straights, regardless of context. It does makes sense.

Upon pressing an arrow or a shortcut (such as L), Cas-Stunts will pick one of the tiles such that it properly connects with the previous tile. If there is more than one possibility, the first available one will be inserted immediately and you'll be left at the next position. A key will allow you to switch to alternatives for the previously inserted tile, which will sometimes modify the resulting position, like in the case of the chicane

I like this way of doing it too -- it makes the command set more orthogonal. For corners, would that mean pressing the corner button would insert, say, a right turn, and then the switch button would flip it into a left turn?

You can just hit ESC and the whole path will be cancelled

That is a welcome feature. (I'm now thinking of the times I accidentally wrecked a track with the TAB brush in TrackBlaster :D)
Title: Re: Cas-Stunts track editor
Post by: Cas on September 29, 2016, 07:11:20 AM
Pressing an arrow would create a straightway or turn depending on where you press it. Say you start and go up, so you get a vertical straightway. You continue to press up several times and the straightway gets longer. The keyboard cursor stays not where you just placed a tile, but where you're going to place the next tile. So now you press the right arrow. What happens is a corner from South to East appears where you were standing and now you're standing to the right of the corner. If you continue to press right, you'll get straightways. So the alternating shortcut key would not change the direction of turns, but rather, for example, whether the turn is large or sharp.

Now, saying all this is already complicated, you see. Imagine what it is like to code it! :D
Title: Re: Cas-Stunts track editor
Post by: Cas on October 05, 2016, 09:11:18 AM
New update... almost finishing...

Officially, the name of the editor is changed from Cas-Stunts to Bliss and this version can almost be considered complete!

Bliss 2.4.4 beta
Download this latest version (https://mega.nz/#!wFJWBbzT!CLxBpg8mSmhGrsAOyXEcLkenzS9zYzTO8maicNXZX8Q)

Lots of new features and bug fixes!

Most important features and bug fixes:

I would say the most worked-on area in this update has been keyboard-based editing, but there are many "invisible things" that have been enhanced or fixed. Hope you guys like it. This is likely the last update before the final, stable version. I consider this one already very stable. If you guys find anything that's really important to change or add, this is the best moment to come up with it :)
Title: Re: Cas-Stunts track editor
Post by: dreadnaut on October 06, 2016, 10:26:23 PM
If the tournament is ZakStunts, Cas-Stunts will parse the HTML. If it's any other, it will look for specific text-based configuration files from where it will get the info to do the same thing, so any tournament can implement that "protocol" easily without having to display a particular appearance.

You can also use the current track data from here: http://zak.stunts.hu/track.json
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on October 06, 2016, 11:10:01 PM
Thanks, Dreadnaut!  I didn't know that one. It certainly is a lot simpler than the HTML. Only parsing the paths would be more complicated, but since that is a constant, I wouldn't need to do that part.

Is this file always present and does it always point to the current track?  If you ever make changes to the website (which could break Bliss parsing the HTML), will this file still have the same structure, so I can rely on it instead of the HTML?

If I would ever not be present to update Bliss and you would need to make changes to the site that would break the communication between Bliss and ZakStunts, you can still use "Bliss Tournament Protocol", like it's described in the manual.txt file. Instead of entering zak.stunts.hu for the link (which would result in Bliss trying to parse the HTML, or json, if I update it), enter btp:zak.stunts.hu and it will use BTP like it were any other tournament site.
Title: Re: Bliss / Cas-Stunts track editor
Post by: dreadnaut on October 07, 2016, 10:54:12 AM
Is this file always present and does it always point to the current track?  If you ever make changes to the website (which could break Bliss parsing the HTML), will this file still have the same structure, so I can rely on it instead of the HTML?

You can consider the json schema fixed. Any changes will be backward compatible. The file is always up to date, a similar one was there for USC as well, and is used to show races on http://stunts.hu
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on October 09, 2016, 09:23:40 PM
I'll switch to reading that file instead, then, so that any future HTML updates on the site won't break communication with Bliss :)
Title: Bliss 2.5 - final version
Post by: Cas on December 22, 2016, 03:57:45 AM
Hi, guys. I'm here announcing that we can now consider Bliss to be complete, although some bugs might be detected in the future, that I would have no problem to fix and maybe some feature would become important one day and requested, but other than that, it already does all it has to do. You can download the latest, final version from here:

http://www.dimioca.com/bliss (http://www.dimioca.com/bliss)

I would suggest that you guys download it and keep the zip file and if you can also replicate it to your sites, to have an alternative download source, it would be even better, in case my server would ever fail. Following are some changes you're going to find in this final version:


Thank you all guys for your support on this project and special thanks go to Duplode, for his amazing feedback!
Title: Re: Bliss / Cas-Stunts track editor
Post by: Duplode on December 23, 2016, 04:15:28 AM
Downloaded! I will upload it to Southern Cross in the next few days, possibly tomorrow. Congratulations for the final release  :)
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on May 17, 2017, 03:08:48 AM
My goodness!  Duplode's was the last message in the Stunts Related Programs subforum till now!  And it was in December... Anyway...
Just wanted to tell you guys I've made a few touches to Bliss in the last months and I thought I should by now update the program as it's published. You can download the latest version (Bliss 2.5.2) from here: http://www.dimioca.com/bliss (http://www.dimioca.com/bliss)

It's just a couple of bug fixes and two simple features:
- You can now set a "Stunts directory" and a "Tracks directory" for more comfortable access. If you feel comfortable editing the configuration file, you can also add your own extra directory links there by following the instructions in the manual, but the two I mentioned can also be modified from the Settings menu.
- Although Bliss is a portable project, you can, if you prefer, move the executable to a protected location so that it cannot be written to by other programs (protection from trojans). Bliss will try to find its data files at /home/user/bliss or /home/user/.bliss for GNU/Linux or %appdata%\bliss for Windows or follow the PATH for DOS. Only if not found there, it will try to locate them at the executable directory.
Title: Re: Bliss / Cas-Stunts track editor
Post by: arturbmallmann on May 18, 2017, 11:21:20 PM
Good improvements! :)
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on May 20, 2017, 09:50:46 PM
Thanks. If you see anything acting up, just let me know.
Title: Re: Bliss / Cas-Stunts track editor
Post by: Shoegazing Leo on May 21, 2017, 01:44:59 AM
I like it because is easier to make some dual tracks and design tracks without Dosbox use.
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on November 26, 2017, 06:10:33 AM
Well, I've been into other things really, but when I'm bored, I make some touches to Bliss. As you all know, it's already totally functional since long ago, but I wanted to tell you I've updated a bit. So...

Bliss 2.5.3

New features:

Fixed bugs:

If you haven't updated the last time, for the custom directories option, I really recommend you to do so. It's a lot more comfortable to navigate the filesystem with that.
As always, you can get this update from http://www.dimioca.com/bliss (http://www.dimioca.com/bliss). I would be very thankful if Bliss were included in the Downloads area in ZakStunts.
Title: Re: Bliss / Cas-Stunts track editor
Post by: dreadnaut on November 29, 2017, 11:45:52 PM
I would be very thankful if Bliss were included in the Downloads area in ZakStunts.
Good point, I actually thought it was already there! Well, it will be in a minute :)

Cas, do you prefer just a link to your website, or a link and we keep a copy of the zip?
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on November 30, 2017, 12:15:12 AM
Thanks, Dreadnaut!

Well, while I would like, of course, to have traffic in my website, I reckon that it serves a better purpose for the community to have the ZIP accessible there. Remember in the past, I was off for some time and the website I had at that time was lost, so Duplode had to share his copy of Bliss. I don't intend to abandon my current site or the community, but it's safer if it's uploaded there, I reckon. What do you think?
Title: Re: Bliss / Cas-Stunts track editor
Post by: dreadnaut on November 30, 2017, 12:19:30 AM
I put a link, but I'm also keeping a copy of the zip file for safety :)   I'll probably "upgrade" the download page in the next weeks, so they'll both be available. I think it's nicer to send people to your page because you have more information about the software and source code, and all the rest of the website!
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on November 30, 2017, 12:25:37 AM
Yes, that's true. Yeah, I think having both is the best, because people can choose to go to the site and see the latest version and all the details, but if something fails, it is also available right there. You may want to add that Bliss also runs in GNU/Linux, as that's probably not expected.
Title: Re: Bliss / Cas-Stunts track editor
Post by: Shoegazing Leo on February 12, 2018, 01:29:43 PM
The website is suspended. I need to show this program to a group that is thinking a type of car race simulator and Bliss will be an inspiration for the track design mode.
Title: Re: Bliss / Cas-Stunts track editor
Post by: Duplode on February 13, 2018, 09:46:37 AM
The website is suspended. I need to show this program to a group that is thinking a type of car race simulator and Bliss will be an inspiration for the track design mode.

I have just uploaded the latest version of Bliss (which I had downloaded a few days ago) to Southern Cross (http://scr.stunts.hu/mods.html).
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on March 07, 2018, 11:18:55 PM
Yeah, the site sometimes goes offline. Is not that they are unreliable. What happens is that the web hosting is free, so one requirement is that I log in to the client area website at least once per month. When I fail to do that, they disable the page until I re-enable it. It's up again now.

Hey, I would like to know these guys. I wanted to recreate the essence of Stunts, but it's a lot of work and I had never given much attention to 3D before. I managed to make a simple 3D rendering engine similar to that of Stunts, but I have a little problem with clipping near the camera.
Title: Re: Bliss / Cas-Stunts track editor
Post by: afullo on April 26, 2018, 11:34:23 AM
Hola! I would like to write down some suggestions about things that can be improved in the following releases of the tool:

- If you design a track with a bifurcation just after the start/finish line (see image), the analyzer said that the track will run fine, but in fact due to a well known bug of Stunts, the race comes to an end in the very first seconds, when the bifurcation is reached.

- If you run analysis on a track without winning path, and you access estimated pipsqueaks' times, results are given while it is impossible to complete the race. By doing some computations, it seems that the time is computed as the track would have 100 000 tokens (or 99 999, no precision to determine exactly with the tests done).

This is inferred by the fact that I computed, for Duplode driving an Indy, a ratio of 0.0688170 ± 0.0000043 sec/token for a 1175 tokens long track, and a ratio of 0.0688155 ± 0.0000033 sec/token for a 1545 tokens long track (while the uncertainty reduces to 0.0000006 for a 10215 tokens long track). Since the time proposed is 1:54:41.50, or 6881.5 s, the computation follows easily.

- Some typos are present, like "Alipne" instead of "Alpine" in the scenery selection, "Nissasn" instead of "Nissan" in the car selection for time estimates.

- When a split later joins to a path that is already forked and then rejoins, the analyser does not identify correctly the paths, and as a consequence their number could be computed wrongly. Maybe for particularly complicated tracks it would be easier to write, by basing upon their structure, some lower and upper bounds on that number, instead of the exact value (quantities L and U such that the number of paths N satisfies L <= N <= U); nevertheless to do so, by having L and U in general sufficiently close to N to be information of practical interest, would probably require an adequate amount of not so trivial combinatorics.

- By going on Track Analysis and then to See Times, then pressing OK and finally trying to start a New Track, old buttons will appear.

They are just aspects which could guide future development of the utility, which is already quite great at the state-of-the-art.
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on April 26, 2018, 08:35:05 PM
Thanks for posting, Afullo. Some of these bugs, we had already discussed. I've already fixed some things, others I had pointed out to you. In general, it's complicated for me to work on the Track Analysis menu because it's a really big not. Maybe I should rewrite it completely. But to be more precise:

- If you design a track with a bifurcation just after the start/finish line (see image), the analyzer said that the track will run fine, but in fact due to a well known bug of Stunts, the race comes to an end in the very first seconds, when the bifurcation is reached.
> I knew about this bug in Stunts, but really hadn't brought to my mind that I could apply it to the Analyser. I guess it shouldn't be too hard. Still, this bug can be avoided. Sometimes, if you start the track by driving to the side opposite the split, you're able to continue driving just fine. Other times, you can drive normally, but when you watch the reply, it finishes prematurely. Maybe I should just make this come up as a warning.

- If you run analysis on a track without winning path, and you access estimated pipsqueaks' times, results are given while it is impossible to complete the race. By doing some computations, it seems that the time is computed as the track would have 100 000 tokens (or 99 999, no precision to determine exactly with the tests done).
> I had not realised this happened. I'll make a few tests and fix this. I wonder why this happens.

- Some typos are present, like "Alipne" instead of "Alpine" in the scenery selection, "Nissasn" instead of "Nissan" in the car selection for time estimates.
> Both typos have been corrected. You'll see them fixed in the next issue

- When a split later joins to a path that is already forked and then rejoins, the analyser does not identify correctly the paths, and as a consequence their number could be computed wrongly. Maybe for particularly complicated tracks it would be easier to write, by basing upon their structure, some lower and upper bounds on that number, instead of the exact value (quantities L and U such that the number of paths N satisfies L <= N <= U); nevertheless to do so, by having L and U in general sufficiently close to N to be information of practical interest, would probably require an adequate amount of not so trivial combinatorics.
> This is very hard to resolve and it's something I found out as I was building the current track (No Kidding). The number of paths is always calculated exactly because individual paths are loaded in buffers, that is, in an array. I believe the difficulty in analysing this type of path lies deeply in the strategy used to analyse them currently, so to fix this, the simplest way would be to rewrite the analyser. This may take a couple of months, ha, ha. Unless I invent a new, much simpler an elegant method.

- By going on Track Analysis and then to See Times, then pressing OK and finally trying to start a New Track, old buttons will appear.
> I noticed this one some time ago. Easy to fix. No problem.
Title: Re: Bliss / Cas-Stunts track editor
Post by: afullo on April 27, 2018, 04:46:43 PM
Thanks for posting, Afullo. Some of these bugs, we had already discussed. I've already fixed some things, others I had pointed out to you. In general, it's complicated for me to work on the Track Analysis menu because it's a really big not. Maybe I should rewrite it completely. But to be more precise:

- If you design a track with a bifurcation just after the start/finish line (see image), the analyzer said that the track will run fine, but in fact due to a well known bug of Stunts, the race comes to an end in the very first seconds, when the bifurcation is reached.
> I knew about this bug in Stunts, but really hadn't brought to my mind that I could apply it to the Analyser. I guess it shouldn't be too hard. Still, this bug can be avoided. Sometimes, if you start the track by driving to the side opposite the split, you're able to continue driving just fine. Other times, you can drive normally, but when you watch the reply, it finishes prematurely. Maybe I should just make this come up as a warning.

Good idea, a warning could be a proper compromise between not signalling anything and stating that the track will substantially fail (because it could happen or not).

- If you run analysis on a track without winning path, and you access estimated pipsqueaks' times, results are given while it is impossible to complete the race. By doing some computations, it seems that the time is computed as the track would have 100 000 tokens (or 99 999, no precision to determine exactly with the tests done).
> I had not realised this happened. I'll make a few tests and fix this. I wonder why this happens.

Maybe you set a maximum somewhere, and the analyzer tries to compute the tokens until the end is reached, with this condition never satisfied, so the computation ends while the maximum is hit.

- Some typos are present, like "Alipne" instead of "Alpine" in the scenery selection, "Nissasn" instead of "Nissan" in the car selection for time estimates.
> Both typos have been corrected. You'll see them fixed in the next issue

Great.  :D

- When a split later joins to a path that is already forked and then rejoins, the analyser does not identify correctly the paths, and as a consequence their number could be computed wrongly. Maybe for particularly complicated tracks it would be easier to write, by basing upon their structure, some lower and upper bounds on that number, instead of the exact value (quantities L and U such that the number of paths N satisfies L <= N <= U); nevertheless to do so, by having L and U in general sufficiently close to N to be information of practical interest, would probably require an adequate amount of not so trivial combinatorics.
> This is very hard to resolve and it's something I found out as I was building the current track (No Kidding). The number of paths is always calculated exactly because individual paths are loaded in buffers, that is, in an array. I believe the difficulty in analysing this type of path lies deeply in the strategy used to analyse them currently, so to fix this, the simplest way would be to rewrite the analyser. This may take a couple of months, ha, ha. Unless I invent a new, much simpler an elegant method.

There is probably some literature on that (by considering every path morphic to a simpler figure and so on), maybe there are interesting results in graph theory.

- By going on Track Analysis and then to See Times, then pressing OK and finally trying to start a New Track, old buttons will appear.
> I noticed this one some time ago. Easy to fix. No problem.

In my opinion it is a secondary issue, anyway.

Another observations concerning estimated times could be:

- rounding times to the nearest multiple of 0.00:05, since Stunts express times in terms of multiples of 1/20th second;
- not allowing times higher than the maximum admitted by Stunts, which I remember to be near 25 minutes, probably something like 32767/20 seconds, but I need to (re)check precisely.
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on April 29, 2018, 05:25:31 AM
Well, found a few more bugs that were fixed. Some are remaining. Track analysis is very difficult to change. Sometimes I don't even remember my intention from some lines. I'm still studying the thing about the premature race ending when there's a curve right after start. As I said in the shoutbox, you were right about the time estimations when a track is incomplete: I had set some maximum values that I believed would never show up and used them as a start for the estimations. Because there were no such estimations when the track was incomplete, the default value was left. I have now made the estimation list unavailable when the track is incomplete.

Another thing I've been working on is track-shots. Bliss already has the ability to take a snap-shot image of the track when you press CTRL+S, but this is not obvious, so I've added a button and a menu to select the image format. Besides, there are some bugs with this in the currently available version. I'll soon post the update.

Graph theory does help with the analysis, but there is a catch. I can tell easily whether there is a cycle, but in principle, there always is for every complete track. Now, I should make as if start and finish were two separate points and I can detect any cycle other than the default circuit. But this isn't enough, because I want to calculate the paths, so what is a path if it contains a cycle?  And this is what I thought was defined and now I see is not. Say you drive from point A to a split. If you take one of the sections and end up returning to point A, then this is a cyclic path, so you should instead take the other section. The problem is, if A was located before a joint and then afterwards you reach such split, it is not clear whether the path is a cycle because it depends on whether you had come from A or from the other section before the joint. Sounds confusing?  With words, it does, but use the analyser on No Kidding, see the path problem and you'll understand exactly what I mean. In other words, it's not just I don't know how to do it, but I don't really know what I'm supposed to do, ha, ha.
Title: Re: Bliss / Cas-Stunts track editor
Post by: afullo on May 02, 2018, 06:58:13 PM
Hmm, it gives indeed several aspects to think about. At least, see what I posted on the shoutbox today, we know now what happens when the replay and the race limits are hit (not counting the abnormal freeze occurring to me with BB1.1; MS1.1 was fine). I will copy that observations here to keep the material ordered...
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on May 02, 2018, 08:20:48 PM
I believe the behaviour of Stunts with replays deserves its own thread so that people can find it more quickly. I think I'll have the time today to post the updated version of Bliss. Still, there are a few things I would like to do that would require major changes, such as fixing the way the paths are counted and analysed and allowing one to make analysis of a particular section of the track or display all sections in different colours.
Title: Re: Bliss / Cas-Stunts track editor
Post by: afullo on May 02, 2018, 10:19:05 PM
Ok, I will create a separate topic. Another suggestion: the scenery byte (the 901st if I'm not saying wrong) can also assume the value 05h, according to the wiki; in this case, the scenery is "chaotic" but the game may show some weirdness. Could be that possibility inserted in the editor, provided that the user is warned about the potential instability of that choice?
Title: Re: Bliss / Cas-Stunts track editor
Post by: dreadnaut on May 02, 2018, 10:23:28 PM
I believe the behaviour of Stunts with replays deserves its own thread so that people can find it more quickly.

There is now such forum thread ;)
http://forum.stunts.hu/index.php?topic=3409.msg72638
Title: Re: Bliss / Cas-Stunts track editor
Post by: afullo on May 02, 2018, 10:37:44 PM
I believe the behaviour of Stunts with replays deserves its own thread so that people can find it more quickly.

There is now such forum thread ;)
http://forum.stunts.hu/index.php?topic=3409.msg72638
Thank you dread! :)
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on May 02, 2018, 10:49:44 PM
Thanks, Dreadnaut!

Now that you mention the chaotic scenery, I don't remember how Bliss behave if you loaded a track that has this byte modified. I want to make sure it doesn't crash or something. I probably took this into account when I first added the scenery selection option.

Uhm... to my taste, I don't like it very much to introduce features that look abnormal. This is why Bliss, by default, does not break up track elements. Because illusion tracks were important in the community, I made it possible to change to a debug mode in which you could do this. While in "manual editing mode", as I called it, you feel clearly that you're working directly with the cables. So, if I enable setting a scenery other than the normal ones, I would like to do it in a similar fashion. I think I could add an option to the scenery selection menu to set other values. I'll consider that.
Title: Re: Bliss / Cas-Stunts track editor
Post by: afullo on May 02, 2018, 11:00:41 PM
Ok. On the other hand, as far as I know, it is not known whether that "scenery" is an unfinished feature, an error of interpretation (remember Ermac, "error macro", in Mortal Kombat, which was retconned a posteriori as a character?), or something else.
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on May 03, 2018, 12:06:59 AM
Yes, of course. I agree that being able to introduce as many modifications is a good thing... If it's exploitable somehow, why leave it out?  But if the resulting behaviour is abnormal, I think the way to do it should look really different. I've just tested. Bliss does recognise any value past 4 as "chaotic" currently. It does not let it select it, though. Stunts BB1.1 crashes on any "chaotic" value. It says there was an error with a file.

I think I'm goint to make Bliss display an additional option only when debug mode or manual editing mode is set. I also may add the ability to directly enter track/terrain codes and to display the values on the map when they don't have a valid element to show.
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on May 03, 2018, 05:25:28 AM
Update: Bliss 2.5.4

New features:

Bug fixes:

Download from: http://dimioca.com/bliss (http://dimioca.com/bliss)
Comments and tests appreciated :)
Title: Re: Bliss / Cas-Stunts track editor
Post by: afullo on May 15, 2018, 04:25:17 PM
I'm back testing! About elements on slopes, I'm seeing that not only the s/f line causes the track not to be run: every situation in the pics results in a failure. More to come, probably.  ::)
Title: Re: Bliss / Cas-Stunts track editor
Post by: afullo on May 15, 2018, 04:27:14 PM
Also tunnels and slaloms don't fit at all in there.  :(
Title: Re: Bliss / Cas-Stunts track editor
Post by: Duplode on May 15, 2018, 07:47:05 PM
Ok. On the other hand, as far as I know, it is not known whether that "scenery" is an unfinished feature, an error of interpretation (remember Ermac, "error macro", in Mortal Kombat, which was retconned a posteriori as a character?), or something else.

I'm fairly certain that all setting the scenery byte outside of the 00h-04h range does is filling the memory area used for the horizon bitmap with arbitrary stuff, and that the "chaotic scenery" interpretation is not canon, in an Ermac-esque way indeed. I also remember reports of it working for some people but not from others back from Z77 (http://forum.stunts.hu/index.php?topic=1978.msg29951#msg29951), which originally used it.
Title: Re: Bliss / Cas-Stunts track editor
Post by: afullo on May 15, 2018, 11:29:51 PM
Ok, it makes much sense, since the "arbitrary stuff" behaviour for invalid data has been seen also in several other contexts, like this famous bug (https://bulbapedia.bulbagarden.net/wiki/Glitch_City) in the early Pokemon games.

This is likely a consequence of the well known fact in programming that, if a memory address in which information has not been set properly is read, the data relative to what it contains in that moment is retrieved, even if its content comes from a totally different context.
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on May 16, 2018, 11:10:04 PM
You mean these configurations make the track not load at all?  Well, I believe it's enough with the yellow warning anyway. If I complicate the track analysis any more, I'll break something. It'd be better to just rewrite everything. I also wanted to make Bliss able to measure intervals between any two points on the track, but again, that's something that would work better if done from the beginning. Maybe for Bliss 3, ha, ha!
Title: Re: Bliss / Cas-Stunts track editor
Post by: afullo on May 17, 2018, 10:20:16 AM
Hmm, it seems more complicated: by loading in Bliss the cited by Duplode Z77, apart from the chaotic scenery, it is possible to see that it contains several associations terrain-block which gave me a failure, while that track is loaded correctly.

I think it could be conjectured that the track loads provided that at least one path is winning and it does not contain any terrain unsafe tile (of course excluding other kinds of error, like hills without ramps or path flows which would cause the track to be not orientable), so indeed it would be more difficult to identify whether the track would load, albeit with possible terrain errors, or it would not load at all (on the other hand, "terrain unsafe" does not mean "not accepted by the internal editor": for example, road blocks on water do not give problems in this sense). Among other things, the outcome would depend not only of the association, but also of the rest of the track.

Maybe the internal analyzer of Stunts is not able to identify correctly a terrain unsafe path; it could be tried to confirm or not so, by constructing a track with one terrain safe path and one terrain unsafe path, and by seeing if by taking the terrain unsafe one, some penalty time is given (because of, from the perspective of the game, skipping tiles without following a valid path).
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on May 18, 2018, 01:12:11 AM
Yes. As a matter of fact, the hardest part of the track analysis isn't to properly find things that should not work, but to emulate the high number of exceptions in Stunts internal track analyser. For example, if you place a ramp, two spaces and another ramp (which sometimes is possible to perform while racing), Stunts will refuse to accept that; but if you have an elevated road, then a space and then a ramp going down (which is completely not possible to ride on), Stunts will accept the track (inverted jump detection bug). Even worse, if you have a long elevated road, you can place spaces in between two pieces and it will still be accepted by Stunts. The first versions of my analyser would not allow this because it was the most sensible thing that they wouldn't work, but then I saw Stunts did, so I had to change it for a warning.
Title: Re: Bliss / Cas-Stunts track editor
Post by: afullo on May 18, 2018, 07:00:30 PM
I see. This is why probably in more recent games like those of the TrackMania series it was preferred to require validation of the track "a posteriori", as the possibility to complete the lap by actually driving, rather than determine whether is possible to return to s/f by analyzing it. But in my opinion it has been a less elegant solution.  ::)

Apart from that, I found two minor things: the 100 000 tokens estimation is partially still present (when the track would fail, it is still possible to select the car for which the estimations of the times are to be given, and a time with number of tokens appears in the upper-left corner of the window), and when a ZCT is loaded, the title of the box appears as "Indentifying Track" instead of "Identifying Track". ;)
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on May 20, 2018, 12:36:51 AM
Thank you, Afullo!  You've got a great eye on typos!  I've already fixed the two tings. Next release, they won't be there.
Title: Adding UTF-8 support to Bliss
Post by: Cas on May 29, 2020, 05:05:30 AM
It's been a long time since I last made changes on Bliss. It's pretty much complete, but recently, I've been thinking that there were a few things that had been in demand for long and I feel capable of implementing them now. One of them is UTF-8 support. This is a work in progress, but I wanted to tell you I'm doing it and to give you an idea of the difficulties.

So far, Bliss has only worked with plain ASCII. Only 128 characters and control ones are not valid for metadata anyway. Now I would like by default all text that Bliss saves or reads to be UTF-8. I can do it, but I am encountering the following problems:

- I'm having to deal with four encoding types at the very minimum. Why?  Because FreeBasics graphics by default use a 8-bit font based con CP437, but I want to read and save UTF-8, which is variable character with, so it's difficult to handle internally, reason why I'll use UTF-32 inside the program. To make things worse, the window title in X or GTK, I don't know, seems to be ISO-8859-15 for some reason, which is yet another 8bit encoding, so if I want the track title to appear on the window title, I will have to use that as well.
- This ISO-8859-15 is specific to certain languages, so I expect that, depending on the language you choose for the installation of your distro, it'll change, so I can't even rely on it. Besides, I don't know what encoding Windows will use. So I'll probably have to treat this encoding as ASCII and post all non-ASCII characters as question marks or something.
- UTF-8 has some tricky cheats having to do with bits on and off that are very smart and made it super efficient and highly compatible with old code pages. Yet, these things also make it very easy to make a mistake when programming the conversion routines. I am trying to be as careful as possible.
- To display what the strings contain, I'm still having to use that CP437, but the languages we use in the community have characters that are not present in that code page, like most uppercase letters with diacritics for Spanish and Portuguese and like the double-accented "o" and "u" of Hungarian. I will have to start by replacing the rendering of these characters with something similar (i.e.: the non-diacritical version of them), but later, I will have to make my own font-renderer so that these characters can be seen.

I don't expect all of you will be interested in as much detail, but maybe you are... and it's good to document this here in case I want to read it later on or it could help understanding the source code of Bliss in the future. Anyway, opinions are welcome!
Title: Re: Bliss / Cas-Stunts track editor
Post by: afullo on May 30, 2020, 01:26:27 AM
For Western languages, Windows may use also CP1252. By the way, they do exist test sentences in Hungarian using all the special wovels, like these ones (https://zgfabian.wordpress.com/2019/06/27/the-hungarian-alphabet/).
Title: Re: Bliss / Cas-Stunts track editor
Post by: dreadnaut on May 30, 2020, 10:52:51 PM
I would say "stay away from UTF-8", unless you have a library that deals with it or a lot of spare time and nothing else to do :)
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on May 31, 2020, 09:19:26 PM
By the way, they do exist test sentences in Hungarian using all the special wovels, like these ones (https://zgfabian.wordpress.com/2019/06/27/the-hungarian-alphabet/).

In English, there is a well-known sentence that contains all leters only once each:
The quick fox jumped over the lazy dog

In Spanish, we don't have such, or not that I know of, but we do have a more or less known palindrome sentence that goes like this:
Dábale arroz a la zorra, el abad
It means more or less: Giving rice to the (female) fox, was the monk

It'd be interesting to get to know more things like those in other languages.

I would say "stay away from UTF-8", unless you have a library that deals with it or a lot of spare time and nothing else to do :)

Oh, I've already delved into UTF-8 when I was making Fodix, the data analyser. I got it to work well, but in this case, I have to do a few more things that are trickier. That's fine, I'm a low-level programmer. Not a great one, but I'm one. I don't find it easy, but I enjoy dealing directly with the actual thing going on in the background. That's what originally got me into programming :)  Don't worry, it'll work :P

Ah, and another thing I'm adding to the next version of Bliss (and, as a matter of fact, that part is already complete) stems from a request you made long back, Dreadnaut. I added a text meta-data format... and it can both read and write!  I had to do text binary parsing, which I'm not a fan of, but the result is good. So, when you save a track in one-file mode (with overlaid meta-data), that's still binary, but if you split it, you can choose the meta-data file to be text or binary. I think that, with this available, it doesn't make much sense to use binary external meta-data anymore, but I kept it available for compatibility and so that you can do things like spliting a file with another program and then it still be useful or just appending metadata directly. In one-file format, there wouldn't be a reason to make it text, because the first part would be binary anyway (the track itself).

The feature works well. Only thing is it will fail if you include a BOM at the beginning of the file and it's exclusively UTF-8. No support for UTF-16 and other encodings. The files produced are always CRLF in line-ending, but it can read any line ending. It can't tell whether there are empty lines in the file, but that's not necessary for track metadata. I'll soon put the new version online for you guys to test if you want.
Title: Re: Bliss / Cas-Stunts track editor
Post by: dreadnaut on May 31, 2020, 10:10:29 PM
I added a text meta-data format... and it can both read and write!  I had to do text binary parsing, which I'm not a fan of, but the result is good. So, when you save a track in one-file mode (with overlaid meta-data), that's still binary, but if you split it, you can choose the meta-data file to be text or binary.

Oooh, I like that! Now, I see why you want to support UTF-8, nice ;)
Title: Re: Bliss / Cas-Stunts track editor
Post by: afullo on May 31, 2020, 11:58:30 PM
By the way, they do exist test sentences in Hungarian using all the special wovels, like these ones (https://zgfabian.wordpress.com/2019/06/27/the-hungarian-alphabet/).

In English, there is a well-known sentence that contains all leters only once each:
The quick fox jumped over the lazy dog

In Spanish, we don't have such, or not that I know of, but we do have a more or less known palindrome sentence that goes like this:
Dábale arroz a la zorra, el abad
It means more or less: Giving rice to the (female) fox, was the monk

It'd be interesting to get to know more things like those in other languages.

In Italian:

I topi non avevano nipoti (The mice had not nephews/nieces [or grandchildrens, it is used for both])
Ai lati d'Italia (At sides of Italy)
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on June 02, 2020, 02:34:29 AM
Quote from: dreadnaut
Oooh, I like that! Now, I see why you want to support UTF-8, nice ;)

Oh, I actually had thought of the two features separately. That is, even without adding support for UTF-8, the text format does naturally allow that encoding... only that inside Bliss, it'd look like gibberish if you enter extended characters, but now that you say that, yes... it's another good reason for implementing it!  I actually remember that at some point, somebody asked me about special characters in Bliss. The text format already works very well.


Quote from: afullo
I topi non avevano nipoti (The mice had not nephews/nieces [or grandchildrens, it is used for both])
Ai lati d'Italia (At sides of Italy)

Ah!  Those are very good ones :D
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on June 04, 2020, 10:47:16 PM
Giving you guys and update. I've successfully managed to get UTF-8 working. In the Bliss environment, it renders to CP437 and on the window title, it renders to Latin-1 (a.k.a. CP850 or ISO-8859-1). I was mistaken when I identified it at ISO-8859-15, which is identical to Latin-1 except for the fact that it includes the Euro sign replacing the currency sign. Of course, only a bunch of characters are rendered in the Bliss environment. I've concentrated on diacritical marks. Because the code page is limited, some are rendered as their non-diacritical counterparts, but at least, they are recognised and shown. When files are saved, the actual UTF-8 code point is stored.

I still expect some discrepancies to appear given the fact that different regions configure the system with different code pages (we're still not 100% in the Unicode era, it seems), but since most characters we use are ASCII, that'll be fine. For Hungarian, I made sure to recognise the O and U with double-acute accent, which are not included in Latin-1. Other Hungarian letters can be represented with Latin-1 indirectly. Of course, CP437 does not contain these letters, so they will appear as Ö and Ü respectively, but when stored, the correct UTF-8 code point will be used. I plan on retouching the font later on so these characters are all properly displayed.

I will soon be posting the new version. I have another smaller feature to add.
Title: Posting a new beta version of Bliss
Post by: Cas on June 06, 2020, 01:37:58 AM
Bliss 2.5.5 is out... or almost!

I've uploaded a ZIP file that includes the executables of Bliss 2.5.5 for DOS, GNU/Linux (64bit only) and Windows 32bit. Data files are not included as I've made no important change to them, so you can test the new version by just dropping the executables on top of the previous version. If this works well to you guys, I'll make a full package. The ZIP is loaded at the first post in this topic.

I suggest you that you guys keep the old executable just in case, as I've only been testing the GNU/Linux version thoroughly. But of course, version 2.5.4 will continue to be available in the website until 2.5.5 is confirmed to be stable.

In the new version, you will encounter the following new features:
- Trackshots can be taken of a selected region of a track and not just on the whole track. This is very useful when you're making a tutorial or an analysis about a track or race and you need to include images.
- A new file format (split text) has been added and can be set as the default format in the Settings menu if you wish. I still recommend the one-file format for almost all applications, if you ask me, though, but if you'll use split, I recommend this new split text instead of the split binary, which is kept for compatibility (and because it was easy to keep :P)
- UTF-8 support. You will notice this when you edit the meta-data or change the default track author name. In GNU/Linux and Windows, you should be able to enter non-ASCII characters now. In all file formats, these characters will be saved as UTF-8. If you use split-text mode, you'll be able to edit the meta-data file with any editor that supports UTF-8. Same way, Bliss will read UTF-8 from the meta-data file, although text will be truncated to the maximum length allowed by the meta-data editor within Bliss. If truncation occurs in the middle of a UTF-8 multi-byte codepoint, this may result in an unwanted character at the end of the text, but nothing serious. You'll also see that the window title will take the changes as you modify the track title. If your system uses a codepage other than Latin-1, this may look weird. I'd like to know about that in detail if it happens. Some characters will be displayed without diacritics, but still be saved with the proper UTF-8 codepoint. Please verify this externally.

Any bugs or suggestions (especially about UTF-8, which is pretty complex and surely has more to be added) will be highly welcome. I expect bugs mostly in the Windows platform and for users of countries that don't use Latin-1. It might also happen that Windows is using UTF-8 for the window title... So if anything looks wrong, please tell me which country you have configured your system for, which OS and OS version you have and which wrong characters you see (a screenshot would be good).

Thank you guys so much
Title: Re: Bliss / Cas-Stunts track editor
Post by: afullo on June 08, 2020, 07:28:16 PM
On Ubuntu 16.04 64-bit, I just tried to give a track a title containing all the Italian accents, i.e. vowels with diacritical marks (à, è, é, ì, ò, ù). It seems all of them are displayed correctly, as the attached screenshot shows.
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on June 10, 2020, 02:54:51 AM
Thank you, pal. I found a bug now that I really didn't expect and I think it had to do with some flickering issues when typing special characters, so the final version will not do that. I also added extended character support for DOS, because in the version I passed, DOS could only type ASCII (although it could see Unicode). I also solved a little problem with Hungarian letters ? and ?. They were not being render on the window title because they were not part of Latin-1, but I realised that they do have code points in Latin-2 that I can simply "de-injectivise", so now these letters should be visible as such on the window title for those using a Hungarian configuration. Only downside is that those using Latin-1 will, instead of a question mark, see an O with tilde or a U with circumflex respectively. Not a big deal. That actually looks to me as an improvement even for our configuration.

You use GNU/Linux, like I do, and Latin-1 is also good for Italian, so our systems are not so different. Let's see what happens with Windows computers and with other countries configurations (especially Hungarian), but I am pretty certain it'll work well. I just need confirmation from the guys.

Anybody could test Bliss UTF-8 support on a Windows machine?  And on one configured in Hungarian?  Please. Thanks, guys!
Title: Re: Bliss / Cas-Stunts track editor
Post by: afullo on June 10, 2020, 01:17:31 PM
Thank you, pal.

You are welcome!  ;)

Anybody could test Bliss UTF-8 support on a Windows machine?

Bad news: I just tried with Windows 10 Pro 64-bit, but I am unable to insert accents at all via dedicated keys (https://upload.wikimedia.org/wikipedia/commons/e/e5/Italian_Keyboard_layout.svg) (those between P, L and Enter).  :(

Some insertions with Alt do work, albeit without any diacritical mark (e.g., Alt+0200 should return È, instead it returns E), but other ones do not (Alt+0201 should return É, but it returns nothing).
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on June 11, 2020, 09:55:38 PM
Uhm.... some things that you describe, I expected, but others, I didn't. Let's see...

This is what Bliss does:
- When you press a key, it's supposed to receive the UTF-8 string for from GNU/Linux and Windows in different ways. For DOS, it will instead receive the (extended) ASCII value. For GNU/Linux and Windows, it will then transform this into UTF-32 that it uses internally for easier editing.
- When displaying inside the window, such as inside the Track Info menu, since Bliss relies on a FreeBasic function to display the characters, it's forced to only support visual for CP437-compatible characters. Thus, letters like È, which are not present in CP437 are expected to show up as approximations (such as E). Characters for which Bliss can't find a good approximation or that are not recognised should display as a filled box (extended ASCII 254).
- When saving the data, Bliss will transform the string back to UTF-8 and store it. Even characters that were not recognised will be stored with the values they came in, so you can verify this by storing in text metadata format and then taking a look at the output with a text editor.
- DOS extended characters are supported now, but not in the version I passed. I tested them with DOSBox and they work.

So about these two things:
- For characters not showing exactly the same, but as an approximation, that should be OK. It's expected. I will later on add something to fix even that. But for now, you can see files should be stored with the right values and the window title will probably support more characters than the program text.
- For keys not responding at all and not even causing a 254 filled box to appear, I'm concerned. It might make sense if these are dead keys (keys that require you to type a second key to compose a character, such as the grave accent key), but otherwise, all character keys should be supported. If you find that a particular key that normally issues a character does not respond, please tell me which so I can analyse the situation.
Title: Re: Bliss / Cas-Stunts track editor
Post by: afullo on June 12, 2020, 01:53:16 AM
- For characters not showing exactly the same, but as an approximation, that should be OK. It's expected. I will later on add something to fix even that. But for now, you can see files should be stored with the right values and the window title will probably support more characters than the program text.

Ok, on Ubuntu I was able to insert À, È, É, Ì, Ò, Ù and display them correctly on the window title, although not on the program text. But, as you said, it is expected; furthermore, in Italian you can use È to start a sentence with the third person present of the verb "to be", but there aren't many chances to use another accented vowel as the first letter unless you have to specify accentuation for diction purposes, since excluding that case only the last letter of a word can bring an accent (È is a particular case, being a single-letter word), so they are of some use only by writing in caps lock; see the attached screenshot.

- For keys not responding at all and not even causing a 254 filled box to appear, I'm concerned. It might make sense if these are dead keys (keys that require you to type a second key to compose a character, such as the grave accent key), but otherwise, all character keys should be supported. If you find that a particular key that normally issues a character does not respond, please tell me which so I can analyse the situation.

On Windows, all the keys that are meant to issue respectively à, è, é, ì, ò, ù do not respond; they are not dead keys, since the character is composed by pressing a single key.
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on June 12, 2020, 10:48:05 PM
Oh, I'm starting to see where the problem likely lies and I don't like it much. Anyway, for GNU/Linux, I'll soon add the possibility to display the other accents in the program screen. On Windows, it looks like my assumption that the key input function was taking special characters for that platform was wrong, so if I want them to be available, I should research on how to interact with the Windows keyboard libraries just like I did for GNU/Linux keyboard.

I remember having tried a program compiled for Windows in my computer under Wine and it did respond to those special characters, but now maybe that's something only Wine does. Or perhaps older versions of Windows do work that way?  I don't know. Since I don't have Windows in my computer since 2005 or so, I have no other way to test this than Wine. I'll be reading about this and testing with Wine to see what happens. In the meantime, if anybody else can test on another Windows computer or with another version, that'd be cool (with Wine, it'd also be interesting to know). If it works with Wine, but not with Windows, I'm afraid I'll have to drop special character typing support under Windows (of course, UTF-8 file reading and storage will be available) because I'm not willing to install Windows any more, ha, ha.
Title: Re: Bliss / Cas-Stunts track editor
Post by: afullo on June 13, 2020, 12:42:30 AM
In the meantime, if anybody else can test on another Windows computer or with another version, that'd be cool (with Wine, it'd also be interesting to know). If it works with Wine, but not with Windows, I'm afraid I'll have to drop special character typing support under Windows (of course, UTF-8 file reading and storage will be available) because I'm not willing to install Windows any more, ha, ha.

I just tried with both Wine and Vineyard (W&V): same behaviour as with Windows 10, even by trying to reproduce Windows 98 (do I have to try with even older versions?). Furthermore, insertions with Alt do not work, but this is because W&V are not emulators, but rather compatibility layers, so you are basically running a Windows applicative under a Linux environment.

On the native front, I have also a partition with Windows 7 Ultimate 64-bit, but I don't keep it in a very good shape, so it is really slow to boot; anyway, I can give it a try in the next few days.
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on June 15, 2020, 12:29:53 AM
This really calls my attention. I remember having initiated a topic in the FreeBasic forum about keyboard input and arguing that, while the InKey function worked well in DOS, catching even extended characters and in Windows, was able to read UTF-8, it failed to do so in GNU/Linux, so I was forced to use system functions. FB was never updated, but the thing is, if I wrote that, I must have seen it work with Wine. Maybe, as you say, it's because Wine is not an emulator and perhaps how it works depends on the GNU/Linux distro or something. If you can later try it on true-Windows, let me know what you get, but if it doesn't work there, I'm afraid I wouldn't be fixing that anytime soon. It was complex with GNU/Linux and it's the system I'm using. It'd be super complicated with Windows. But maybe... who knows... ha, ha.

One thing that Windows users will have anyway is that, when Bliss loads a track and the metadata is already written in it, it will correctly display both in the program window and on the window title... I expect. That can also be checked by using the split-file text mode.

Anyway, thank you for testing. I'm going to see if I can fix the characters to look better now
Title: Re: Bliss / Cas-Stunts track editor
Post by: afullo on June 15, 2020, 12:49:43 AM
If you can later try it on true-Windows, let me know what you get

I tried also on (real) Windows 7, same issue. :(

One thing that Windows users will have anyway is that, when Bliss loads a track and the metadata is already written in it, it will correctly display both in the program window and on the window title... I expect. That can also be checked by using the split-file text mode.

I can try to create a track with Linux, to name it with accents, and to finally load it in Windows. As soon as I will be possibilitated, I'll do it.  ;)

Anyway, thank you for testing.

I'm glad to be of some help.  :)
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on June 20, 2020, 10:00:35 PM
Alright. The new version of Bliss, that is 2.5.5, is ready and up at http://r4k.fnhost.org/bliss (http://r4k.fnhost.org/bliss). Feel free to mirror it and of course, to download it and try it. I encourage anybody who's using Bliss 2.5.4 to switch to this new version. There are a couple of bug fixes, plus the new features I had mentioned. I intend this to be the final version of Bliss 2, although I may have to go one more bit if important bugs are found, but I won't be adding any more features. The code is already too bulky.

In particular, for what Afullo and I have been testing, you may have problems with entering special characters under Windows, yet UTF-8 support in all other respects should be OK (even on Windows). I'll update the main post on this thread to reflect this.
Title: Re: Bliss / Cas-Stunts track editor
Post by: afullo on June 20, 2020, 10:53:30 PM
I have still to try what in my previous post, sorry but they have been very busy days. I will proceed asap!
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on June 23, 2020, 01:07:39 AM
Don't worry. I think if it fails, I anyway don't have the tools to fix it right now. Of course, it'd be nice to know. But at worst, the Windows version will only be able to enter ASCII, yet it will recognise UTF-8.
Title: Re: Bliss / Cas-Stunts track editor
Post by: afullo on June 23, 2020, 11:03:03 PM
Indeed, I had still to try whether Windows would have properly recognized UTF-8 or not, and the answer is positive, even if it is unable to enter at least several non-ASCII characters. I tried to save in Ubuntu a track with the same title as of my 8 June post, and by reloading the track with Bliss via Wine, its title is correctly displayed.

By the way: as I said on the shoutbox, if I try to download Bliss 2.5.5 from http://r4k.fnhost.org/bliss/bliss255.zip, it redirects me to https://ifastnet.com//. The download of the version 2.5.4 from http://r4k.fnhost.org/bliss/bliss254.zip does work, though.
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on June 24, 2020, 09:22:03 AM
Thanks for checking that!  And I hadn't noticed the error in the download page. The issue was that I had incorrectly named the file. It's fixed now and Bliss 2.5.5 can be downloaded from http://r4k.fnhost.org/bliss
Title: Re: Bliss / Cas-Stunts track editor
Post by: Daniel3D on June 29, 2020, 10:56:46 AM
I've found a little bug in the load track part.
When you click in a track name the cursor moves but name blanks out and it doesn't load.
If you manually type the name it loads fine.

can't make a screenshot of it,
But i use Bliss 2.5.5 in W10.
Bliss 2.5.4 did not have this problem.

Its not a big problem, easy way around.
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on June 29, 2020, 10:45:51 PM
Thank you for pointing it out, Daniel!  I have already found this problem about a couple of days ago and I fixed it. At first, I was confused, because I was attributing the problem to something else, but then I realised it was a very simple thing that was causing it: Bliss looks up its files in the directory called "bliss" or ".bliss" under your home directory in GNU/Linux or %APPDATA% in Windows. Only if it can't find the configuration file there, then it falls to looking them up in the same directory as the executable. When I made the UTF-8 update, I included a new font file and at the moment of loading it, I forgot to make it so that it was read from those same directories. Instead, Bliss was looking it up wherever it was run from. The file can't be loaded, so the font is empty. There was another bug that contributed to the problem and I fixed it too. On next release, this will not happen :)
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on July 29, 2020, 08:43:37 AM
Alright. So finally, I uploaded the version with the bug fixes. I had fixed it weeks ago, but I hadn't uploaded it till now in part because I want to give it time in case I (or somebody else) found another bug and in part because I was super lazy, especially about having to compile the windows version with Wine on the other computer (I don't have it installed here currently). Version 2.5.5 was very buggy, so if any of you guys is using that version, I recommend you to switch to 2.5.6. The previous one (2.5.4) doesn't have the newest features, but is stable.

Besides fixing the bugs, I added a very simple feature I realised I could've added very long ago, because it was so easy: it is now possible to copy the clipboard between two instances of Bliss, so you can copy parts of a track into another. And well, I've updated the version both in R4K site and in my repository at NotABug. Take a look: https://notabug.org/xlucas/bliss/releases (https://notabug.org/xlucas/bliss/releases). Anyway... that's it for now!
Title: Re: Bliss / Cas-Stunts track editor
Post by: afullo on July 29, 2020, 10:19:53 AM
It seems you solved also the UTF-8 issue on Windows, great!  :D
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on July 30, 2020, 12:42:57 AM
Did I?  :o  Great!  ;D

I actually did touch a few things that were very buggy until they worked fine, so yes, there's a chance that this fixed other problems too. I concentrated mainly of getting things stable again.
Title: Re: Bliss / Cas-Stunts track editor
Post by: afullo on July 30, 2020, 10:42:09 AM
Yes, I tried to insert vowels with diacritical marks, and they worked, as they already did in Ubuntu!
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on July 31, 2020, 03:18:07 AM
Man, I wonder why they didn't work before, ha, ha. But alright, I'm happy now!
Title: Re: Bliss / Cas-Stunts track editor
Post by: afullo on July 31, 2020, 11:06:33 AM
Considering that usually the worst programmer's nightmare is something like "ouch, yesterday it worked, today it doesn't!", and here on the contrary we have "yesterday it didn't work, today it does!", that's quite fine ;D
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on August 01, 2020, 12:39:55 AM
As a matter of fact, sometimes the last situation you describe is even more annoying, though not in this case. It has happened to me many times that I'm making a program and I see that it often produces a problem and I'm pretty certain that I can reproduce it, so I prepare everything to make it happen and it doesn't and then, it seems to work fine, so because it's not producing the error, I can't find it and it happens when I least expect it.

In this case, I know more or less what I've touched, so I don't expect the problems to reappear, even though I don't know why it didn't work before. But I was concerned about this before because, as I changed the keyboard input system, some parts that had nothing to do with extended characters were affected (such as the Settings menu, where you enter the default paths and default author's name and even the Load and Save menus showed problems at some point).

It is my thinking that this will be the last release of Bliss version 2 because it's very complete already and, if I am to add anything to an editor, it would be things of a different kind, such as support for my future project, which would be indifferent to Stunts... for example, larger track terrains or higher layers. If I develop an editor to do that, it will be from scratch.
Title: New Bliss 2.5.7
Post by: Cas on October 22, 2020, 05:18:55 AM
Alright... I've been saying for over a year that Bliss is complete and I'm only going to make more changes in case of bugs, but...

NEW VERSION: BLISS 2.5.7

New features:

Other changes:

This update isn't crucial, as no major bugs have been fixed, but if you use track-shots and would like to use it for track schematics, I recommend upgrading.
Title: Re: Bliss / Cas-Stunts track editor
Post by: GTAMan18 on October 22, 2020, 01:08:58 PM
This new version is so cool, you can download tracks from R4K
Title: Re: Bliss / Cas-Stunts track editor
Post by: dreadnaut on October 22, 2020, 08:35:18 PM
This new version is so cool, you can download tracks from R4K

This reminds me of a recent work-in-progress on ZakStunts: http://zak.stunts.hu/api/seasons/2020
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on October 23, 2020, 05:17:46 AM
Glad you like it, GTAMan! :D  This was something that should've been done before. About colouration, it's been an unfinished and unofficial feature in Bliss for quite some time.

And Dreadnaut, wow!  I understand from this that I will be able to give Bliss a true full interface with ZakStunts, right?  At this moment, the interfacing to get the current track and its metadata uses official interchange information (from the json file), but for the scoreboard, I'm having to parse the HTML, which will break if at any time a modification is made to the style of the page. If you do get a stable interchange file working (a.k.a. "API"), let me know and I'll make the changes. It would make the tournament access faster and more reliable.

Bliss is getting very complicated to update. The code is too big and each piece of it has been made without thinking of the ones that came after it, of course, which has accumulated a lot of redundancy and inconsistences. At this point, I feel like rewriting the whole thing, but that would be too much work. Yet, something like changing the procedure to read the scoreboard from ZakStunts is, in my opinion, important to update if it comes up. I can see that the project involves a lot more information, but I don't think I'll make this Bliss able to navigate through past races and such. It's too much to add to this code. I'll leave that last part for Bliss 3.0... if I decide to do the big thing.

Oh, and KyLiE found a bug in Bliss 2.5.7, but it only affects the DOS version. I'm fixing that now.
Title: Re: Bliss / Cas-Stunts track editor
Post by: Daniel3D on December 15, 2020, 02:05:11 PM
Hey CAS,
i was working with Bliss (still 2.5.5 so i may be noticing something already fixed)

I opened a test track that was a bit Hex modified (enough to crash stunts)
But Bliss could see the terrain fault without trouble, made the tiles nice red.
but i found no way to fix the tiles,. couldn't overwrite.

Fixed it in the hex modifier but it I expected maybe more because Bliss could see the bad data.
Title: Re: Bliss / Cas-Stunts track editor
Post by: afullo on December 15, 2020, 02:14:09 PM
There is also a debug mode in Bliss, did you try even within it?
Title: Re: Bliss / Cas-Stunts track editor
Post by: Daniel3D on December 15, 2020, 04:36:25 PM
I have to admit that I'm not familiar with that function...
Didn't do much fancy stuff with bliss so far. Just basic and simple test tracks.
I'll check after work. (In about 6 hours)
Unless CAS is quicker..

I did update to the latest version in the meantime, but that made no difference in what I tried before.
Title: Re: Bliss / Cas-Stunts track editor
Post by: Duplode on December 15, 2020, 04:47:38 PM
I have to admit that I'm not familiar with that function...
Didn't do much fancy stuff with bliss so far. Just basic and simple test tracks.
I'll check after work. (In about 6 hours)
Unless CAS is quicker..

I did update to the latest version in the meantime, but that made no difference in what I tried before.

When you return, I suggest posting the track here, so we might try having a look at what's going on.
Title: Re: Bliss / Cas-Stunts track editor
Post by: afullo on December 15, 2020, 04:52:19 PM
From the manual, at the end of paragraph 5:

Quote
    If you  are experienced with Stunts' track format and  would like to
have more  freedom, you can  enable "manual edition" (read more about it
in the  section  about  the "switch bar"). While manual editing mode  is
active, the backslash  key can be  used  to enter a hexadecimal code and
select any  track  or  terrain  element  directly. This includes invalid
codes. Also, the background scenery selection will allow custom  scenery
codes when this mode is enabled.  In case  you don't know what  this  is
about, it is better to first experiment with  a new  empty  track and be
aware  that  Stunts may crash  or  behave  unpredictably  when  manually
edited tracks are loaded.

It seems I remembered wrong: it is MAN, not DEB, which has to be active. Note that when you press backslash no box opens, just insert the two hex digits relative to the track element or to the terrain (depending on which set of elements do you have open).
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on December 15, 2020, 09:19:18 PM
Quote from: afullo
Note that when you press backslash no box opens
You know, I was pretty sure the backslash option was undocumented. Now I see I even described it in the manual!  Anyway, it's true it doesn't even appear in the shortcut key list in the Help menu and no signal shows when you press it, so it's very much of a technical and debugging option. Maybe I should make its existence clearer.

Version 2.5.5 was particularly buggy, but not in this aspect, so you wouldn't notice a difference. Anyway, I do recommend anyone using that version to upgrade. If you're using 2.5.4 and you're fine and don't need the newer features, that's OK, but 2.5.5, as I said, is buggy.
Title: Re: Bliss / Cas-Stunts track editor
Post by: afullo on December 15, 2020, 09:58:22 PM
It should be a bit like the Fight Club: the first rule of a backslash user is...  :D

Maybe a box highlighting that it is active while \ is pressed could be useful, since if you press it inadvertently you cannot do anything else unless you input the two digits or you press ESC.. .
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on December 16, 2020, 02:15:01 AM
Yeah, I also should make it so that, if you haven't pressed any key for the following two seconds or so or if you pressed a key that's not a number or letter from A to F, it just goes back to normal
Title: Re: Bliss / Cas-Stunts track editor
Post by: dreadnaut on December 18, 2020, 07:41:35 PM
Hey Cas, could it be that I have found a small bug?

When I draw bridges with pillars, I get spans in Stunts.
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on December 18, 2020, 09:43:15 PM
Quote from: dreadnaut
When I draw bridges with pillars, I get spans in Stunts.
Yes!  That bug was there for very long and nobody noticed, not even myself. KyLiE pointed it out to me only recently and I've fixed it. The version of Bliss currently in its site has this fixed, but I've already fixed more bugs and have another version ready for upload that includes a clearer use of the backslash option and the possibility to read the manual from within Bliss. I'll try to upload it tonight!

EDIT: Version updated to 2.5.8!   I was trying not to add another version, but I kept finding bugs, so now I put all the bug fixes together and there it is. I think it's mostly bug fixes. The only two new features are that you can now read the manual from inside Bliss and the backslash option works more clearly.
Title: Re: Bliss / Cas-Stunts track editor
Post by: afullo on December 19, 2020, 11:32:16 PM
Thanks for the release!

Quote
NOTE for GNU/Linux users: distros are switching from libtinfo.5 to libtinfo.6. Because I updated my OS, the program is now compiled for libtinfo.6, which will be OK for updated distros, but may fail to work out of the box in older LTSs. If so, the program can be recompiled from source or you may upgrade your libtinfo to version 6.

As expected, it does not work on my Ubuntu 18.04.5:

Quote
./bliss
./bliss: error while loading shared libraries: libtinfo.so.6: cannot open shared object file: No such file or directory

But I managed to run the Windows version via Wine/Vineyard. I suppose the question mark highlights when backslash has been pressed and thus two hex digits are required...
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on December 20, 2020, 12:43:44 AM
Quote from: afullo
As expected, it does not work on my Ubuntu 18.04.5
I'm not sure if it'll work easily, but you can try doing: sudo apt-get install libtinfo.6. Because the library is newer than other files in your system, I assume it'll have unmet dependencies and will try to install them too (and probably fail, as is common in cases like this... "dependency hell"). It'd be easier if it were the other way around (you having a newer system and installing libtinfo.5), but unfortunately, I currently don't have a comfortable way to compile it that way. I love GNU/Linux, but I hate this shared-library trend. Hard drives today are huge and memory is abundant, why can't fully static compilation be the default and straightforward way of doing the things? Anyway...

Quote from: afullo
I suppose the question mark highlights when backslash has been pressed and thus two hex digits are required
Yes. Now if you wait too long or press something invalid, you get back to normal key recognition, so no more "What?  Did it crash?  What happened?" :)
Title: Re: Bliss / Cas-Stunts track editor
Post by: afullo on December 20, 2020, 01:03:50 AM
Quote from: afullo
As expected, it does not work on my Ubuntu 18.04.5
I'm not sure if it'll work easily, but you can try doing: sudo apt-get install libtinfo.6. Because the library is newer than other files in your system, I assume it'll have unmet dependencies and will try to install them too (and probably fail, as is common in cases like this... "dependency hell"). It'd be easier if it were the other way around (you having a newer system and installing libtinfo.5), but unfortunately, I currently don't have a comfortable way to compile it that way. I love GNU/Linux, but I hate this shared-library trend. Hard drives today are huge and memory is abundant, why can't fully static compilation be the default and straightforward way of doing the things? Anyway...

Hmm, I guess there is a certain degree of risk in breaking some other mechanics...

Quote from: afullo
I suppose the question mark highlights when backslash has been pressed and thus two hex digits are required
Yes. Now if you wait too long or press something invalid, you get back to normal key recognition, so no more "What?  Did it crash?  What happened?" :)

I see, you have three seconds to input the value, which can be a good time window.
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on December 20, 2020, 03:31:26 AM
Also, notice the built-in access to the manual, with hyperlinks and all :)
Title: Re: Bliss / Cas-Stunts track editor
Post by: afullo on December 20, 2020, 04:06:36 PM
Nice! I just compiled Bliss 2.5.8 on my machine with FreeBasic 1.07.1, I attach the executable for libtinfo.5.
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on December 20, 2020, 09:17:18 PM
Great!  You even compiled the icon!  I think I'll replace the executable in the package with this. Now, KyLiE has pointed out a little bug to me, so I will probably have to make a change to the source and recompile it in a few days. In that case, I'll let you know
Title: Re: Bliss / Cas-Stunts track editor
Post by: afullo on December 20, 2020, 10:29:35 PM
Don't forget the 32-bit exec!  ;)

Maybe it is rhetorical, but better to point out: executables compiled for libtinfo.5 are compatible with libtinfo.6 (but not vice versa), right?
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on December 21, 2020, 12:10:05 AM
Oh, I've just updated the package. I didn't change the version number because it's a minimal thing and well, I now see you've sent me the 32bit one, so it's not in the package. This is what I've done now:

- I had made a mistake and the Windows executable did not have the icon. It's now been added
- Both the GNU/Linux and Windows binaries were displaying rejected replays in R4K in the scoreboard. This has been fixed, but the package still contains the executable you sent me. I thought it'd be more important to maintain compatibility with older distros than to provide that update about the rejected replays, so only the Windows executable has this corrected

To answer your question, no, the libtinfos are different and this is very annoying. If the program is compiled for libtinfo5, it will complain on newer distros just as it does in older distros when it's compiled for libtinfo6. The difference is that it's very easy to fix this in newer systems by doing sudo apt-get install libtinfo.5 whereas in older systems, installing libtinfo.6 may lead to a dependency hell. In a year or so, it'll be better to have Bliss posted for libtinfo.6, as more people will have that natively than the other. I've been considering to make an AppImage out of Bliss, but it looks complicated. I have to learn how to do that.

Something specially annoying is that I know that Bliss does not use libtinfo at all. Libtinfo is, if I know well, an alias for ncurses. This library serves the purpose of providing a layer of abstraction that makes it seem like you can create text mode programs for GNU/Linux in a way similar to what was made for DOS. In reality, these text-mode programs position the cursor and change colours by using console escape codes. This is a lot slower and does not support "extended ASCII", so it's not at all the same. My preference is to only use the GNU console as a console, not as a pseudo-text-mode. If my program is a console program, then fine. Otherwise, I just use graphics mode and render my own fonts. Bliss does not use any console... just pure graphics, so this library should not be a dependency, but FreeBasic makes it one.
Title: Re: Bliss / Cas-Stunts track editor
Post by: afullo on December 21, 2020, 04:30:05 PM
Ok. I just recompiled the executables with libtinfo.5, attached you find both the 32-bit and 64-bit versions.

About libtinfo itself, so it is a bit like the Microsoft .NET Framework, for which more than one version installed at the same time could be necessary to run both older and newer software.
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on December 21, 2020, 06:49:17 PM
Thanks!  I'll put the binaries in the package.
Libtinfo is a relatively small API with a very specific purpose, as I understand it. It's not crucial at all, yet it's very commonly included. And for a long time, it has been version 5... in fact, I don't remember having had a previous version. By the time of the previous version, I must have still been very little informed about the GNU system. But  now there's version 6. I expect it won't change for a long time.
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on December 22, 2020, 07:04:00 AM
Unfortunately, I didn't realise and the scoreboard gathering function for Race For Kicks was still buggy in the version I last posted. KyLiE noticed the inconsistency and when I went to check, I realised it was more serious than I thought. I had to rewrite that whole part. Now it works fine. So again, I'll need new binaries!  I think I'm going to have to find a permanent solution for this. For now, I'd like at least a stable version 2.5.8. I hope this one is it. I'll post the source file alone here for now.
Title: Re: Bliss / Cas-Stunts track editor
Post by: afullo on December 22, 2020, 11:17:02 AM
Here they are!
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on December 22, 2020, 09:32:14 PM
Thank you!  I'll upload them tonight with the rest of the package!
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on January 06, 2021, 12:29:53 AM
A few bugs were found and I had to update the binaries. I've uploaded the updated Bliss 2.5.8 to http://www.raceforkicks.com/bliss (http://www.raceforkicks.com/bliss)

The GNU 64bit binary has been updated, but it now requires the newer libtinfo again. The 32bit binary is the same as before, so it still contains a couple of bugs. The DOS binary is not affected as the bugs impacted parts of the program that were not present in the DOS version. The Windows binary is updated and should work normally without bugs.
Title: Re: Bliss / Cas-Stunts track editor
Post by: afullo on January 06, 2021, 02:11:32 PM
Here is the GNU 64bit binary requiring libtinfo.5. For the 32bit one, next time I'll use the other PC I will compile it.
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on January 06, 2021, 08:41:10 PM
Thank you!  I could try to get cross compilation working, but the libtinfo problem would persist. I think I'll have to create a virtual machine exclusively for that! :S
Title: Re: Bliss / Cas-Stunts track editor
Post by: afullo on January 07, 2021, 01:37:26 PM
Thanks for your update! A 32-bit version for libtinfo.6 would probably be of limited use, since most Linux distributions do not support anymore x86 in their newer versions, such as Ubuntu 20.04 (although other ones like Mint do continue to support it). I attach the 32-bit version for libtinfo.5.
Title: Re: Bliss / Cas-Stunts track editor
Post by: Daniel3D on January 07, 2021, 02:04:16 PM
OFF-TOPIC
Linux Mint does claim to continue 32bit support as long as possible. I discovered that when I needed a latest version Linux halfway last year on a 32 bit laptop. (it was a pain in the but to find the right version to run the script)
I only needed it for one action because I was ameliorating the Windows version on that laptop. Which worked so I now have a reasonably quick Windows running on a cheap old laptop with 1x 1ghz core and 1GB memory..
Title: Re: Bliss / Cas-Stunts track editor
Post by: afullo on January 07, 2021, 07:09:34 PM
There was some debate over continuing supporting 32 bit also in Ubuntu 20.04, but it seemed how at last the ones that were contrary got the upper hand. In my opinion it would have been worthy to keep retro-compatibility, even if a huge majority of the CPUs from mid-2000s is x64. I hope that Mint will keep its promise.
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on January 07, 2021, 08:13:50 PM
Thanks!  I'll download the binary when I finish today's work. About GNU 32bit distros, I reckon at a certain point, it will be very rare to find one. The thing is that, as some projects that are important to a GNU system begin to abandon 32bit, the distribution developers are forced to using old pieces mixed with new pieces and we know how messy that is in an operating system that goes around shared objects. This is one of the reasons why I so strongly oppose shared libraries and 3rd party dependencies... They make it impossible to just keep your binaries in a drive and put them to good use years later. We can still run Stunts easily today because DOSBox emulates a stable system environment. This doesn't happen with GNU... and even with Windows, to certain degree.

In my opinion, the switch to 64bit from 32bit, while based on hardware, has been arguably the least necessary of the changes in CPU evolution. Besides, it is not true that in 32bit mode, you can't access beyond 4GB of memory. You just can't do it linearly, but you can use pages... Only good thing is I don't think there'll ever be a 128bit standard for home computers, ha, ha. Nothing against 64bit mode, of course. I just think it hasn't changed a thing from 32bit and we've had to go through the hassle of the upgrade for years. It's good, but it's the same. That's what I see.

Anyway, I'll confirm when I have updated Bliss packages! :)
Title: Re: Bliss / Cas-Stunts track editor
Post by: afullo on January 07, 2021, 08:43:34 PM
You're welcome! Indeed, 32-bit Ubuntu allows the so-called physical address extensions (pae), which result in 64 GB of memory accessible. The point is also how in the 2010s home PC market had not been so brilliant as in the 90s and in the 2000s, also since Moore's law has not been true anymore for years: I bought the PC from which I'm writing now at the end of 2009 and, after 11 years, it is still capable of performing the majority of the daily tasks I need, while my first PC back in 1992 would have been practically useless in 2003.

If, speaking of RAM, my PC from 1992 had 4 MB, my PC from 1996 had 32 MB (8x), my PC from 2001 had 256 MB (8x, later expanded to 512 MB), and my PC from 2005 had 2 GB (8x), by extrapolating 2018 PCs would possess 1 TB of RAM, while in fact nowadays with 16 GB you would have a machine which can be considered generally performant. I don't think we will ever see a computer with 2^64 byte of RAM...
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on January 08, 2021, 12:19:48 AM
I've uploaded and updated Bliss 2.5.8 with bug fixes. It's both up at http://www.raceforkicks.com/bliss (http://www.raceforkicks.com/bliss) and https://notabug.org/xlucas/bliss (https://notabug.org/xlucas/bliss) :)  Thank you!

It was clear that the trend in computer evolution had to have an end. We just didn't know when the industry would find a point of inflection. Usually, when they can't get you to buy bigger things, they just make them break sooner or invent something different and create a new fashion so that people move to a new item. Computer enthusiasts were many before the Internet-invasion. That brought so many people into our world most being completely not interested in computers in reality, which damaged the quality of the product. Now, all these people are moving the cell phones, but computer programming enthusiasts will remain with computers. I wonder if this will kill the classical computer world or if it will resuscitate it... or a mix of both. In the best case scenario, with the crowd moving to cell phones and less attention placed on desktop computers, the free software world will completely take over and PCs will return to being hacker/programmer/scientist/nerd-friendly.

I first had a 386 with 4MB RAM in 1993. After a year or so, I upgraded it to a 486 with 8MB. Then around 1996, I bought a Pentium 200MHz MMX with (I think) 16MB that I later upgraded to 32MB. At that moment, I got stuck. I had no money and because everybody else was turning to Windows and I was sticking to DOS, it was easy for me to continue using the same computer for many years. So my next computer I bought it when I had a job in 2005. It was a Celeron 700MHz with 128MB RAM. That was already the time of the Pentium IVs, but I wanted a Pentium III or similar because I had ISA hardware I wanted to use (SB AWE 64). DOS compatibility was important to me. My next computer was a used laptop I bought in New Zealand. I don't remember which CPU it had, but it had 512MB RAM in 2009. From that moment on, I stopped learning about new hardware. I just bought what there was at the moment. I've had a new desktop computer in 2012 and another in 2018, plus a laptop in 2017, which has never been my primary computer. The desktop computer I'm using now... I think it has 8MB RAM and four cores and it's AMD. And that's all I know, ha, ha.
Title: Re: Bliss / Cas-Stunts track editor
Post by: KyLiE on January 08, 2021, 02:05:18 AM
It's true, the computer that I am using now and which I use for the majority of my work is 10 years old.  This would have been unheard of in the 90s or early 2000s, even for me.

The desktop computer I'm using now... I think it has 8MB RAM and four cores and it's AMD.

Which web browser are you using that runs on 8 MB of RAM? :P
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on January 08, 2021, 04:31:59 AM
Oopsie!  Ha, ha... That happens when you're talking about different generations of computers at the same time  ;D
Title: Re: Bliss / Cas-Stunts track editor
Post by: dreadnaut on January 09, 2021, 09:26:50 PM
Hey Cas, thanks for the updates!

Two questions:
- which car should we use on 4AM.TRK, for the calibration?
- could you add "Raw, no metadata" as a default save option?
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on January 10, 2021, 12:27:58 AM
Uh, oh... I went to Bliss to make a few checks to be able to answer your questions correctly and I found new bugs :(   So, before I continue, these are the new bugs I found. Let me know if you guys observe them as well:



Besides these, there's what you, Dreadnaut, have pointed out. It's a text bug. Originally, Bliss could only calibrate with the track 4:00am and the Porsche March Indy. Now it can calibrate with any track you want, but unless you have a currently working track on the grid, it will default to 4:00am. If you do have a track there, it'll clearly state "this track with Porsche March Indy", but otherwise, it'll just say "4:00am". It should say it's with the PMIN too. I'll fix that.

About setting RAW to default, I can add that option to the menu. It should be easy. But even though it's not in the menu, that is already available!  Just edit the configuration file. Where it says "format=bliss" or whatever, change it to "format=none" or "format=trackblaster". Let me know if that works for you.
Title: Re: Bliss / Cas-Stunts track editor
Post by: KyLiE on January 10, 2021, 02:12:32 AM
I just tested the Windows version and the behaviour of the bugs you mentioned is slightly different:
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on January 10, 2021, 02:23:34 AM
Uhmm... yes, I expected it could be possible for Windows to do differently. This is because of a special GNU/Linux-based function I implemented for the UTF-8 update. I've just had some work on the code and I think I solved most of the bugs. One of them, I realised was produced when I fixed another bug. Adding features and fixing bugs creates bugs :(  I want to get a stable version once and for all. Once I have that, I'll call it 2.6.

EDIT: There!  I quickly uploaded a snapshot of version 2.6 which should fix these things and implement the feature requested by Dreadnaut. It's at http://www.raceforkicks.com/bliss (http://www.raceforkicks.com/bliss), as usual. Version 2.5.8 will continue to be available until 2.6 goes out of the beta, so you can get both from there. Afullo: since this is a quick snapshot, I don't think we need to update the binaries for the right libraries this time. Once it's stable and no more bugs are found, we can do it. What do you think?
Title: Re: Bliss / Cas-Stunts track editor
Post by: afullo on January 10, 2021, 08:48:05 AM
I agree: as a beta, interested pipsqueaks can compile it by themselves.
Title: Re: Bliss / Cas-Stunts track editor
Post by: dreadnaut on January 10, 2021, 11:45:32 AM
But even though it's not in the menu, that is already available!  Just edit the configuration file. Where it says "format=bliss" or whatever, change it to "format=none" or "format=trackblaster". Let me know if that works for you.

Ah, I knew that, then I forgot! Thanks for updating things :)

It could be useful to have options listed in the configuration, for example (probably with incorrect descriptions):
Code: [Select]
; Default format for new tracks
; Possible values:
; - bliss: binary metadata at the end of the track data
; - text: text metadata in a separate .smd file
; - none: no metadata
; Default:
;  format = bliss
format=bliss
Title: Re: Bliss / Cas-Stunts track editor
Post by: Cas on January 10, 2021, 07:49:47 PM
Dreadnaut:
Yes, there's something I should change about the config file. Currently, when you save the configuration, Bliss deletes the old config file and creates a brand new one from the configuration in memory. This is not good. What it should do instead if read the current configuration file and replace the relevant lines so they match the current configuration in memory. This way, one could add their own comments to the file and things like that and this would also make it easier to add what you suggest as I could just include that in the original config file that comes with Bliss.

One detail I wanted to point out about how I implemented the change in the menu option now. There are two different things in Bliss in memory at any time: the default file format and the current track default file format. Let's call them DTF (default track format) and CTF (current track format, not capture the flag). The DTF is the format in which your track will be saved as default if you create a new one from scratch. This is what you can change from the Settings menu. Bliss will warn you if you set this to Raw only if it wasn't Raw already. The CTF is the format in which the track you're currently editing is going to be saved by default. When you start a new track, the CTF is set to the DTF, but if you load an existing track, the CTF will be set to that track's current format. This prevents accidentally changing a file format because of making a little change. If your DTF is Raw and you access the Track Info menu (for metadata), you will get a warning saying that the CTF has been set to one-file. You still can save the track as Raw, only it won't be the default option in the menu and your DTF has not changed. When you create a new track, it will be Raw again. Let me know if this doesn't make much sense to you. I tried to make it as logical as possible, but it is kind of complex.

Afullo:
Thank you. That's right. Otherwise, at this stage, we'd be compiling over and over again. I'm sure I'm going to have to make a few more changes, so the best thing is to keep both the stable and the unstable versions in the website.