News:

Herr Otto Partz says you're all nothing but pipsqueaks!

Main Menu

Bliss / Cas-Stunts track editor

Started by Cas, March 08, 2015, 01:16:12 AM

Previous topic - Next topic

Duplode

#60
Quote from: Cas on September 12, 2016, 05:11:27 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  :)

Quote from: Cas on September 12, 2016, 05:11:27 AM
  • 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.

Quote from: Cas on September 12, 2016, 05:11:27 AM
  • 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.

Quote from: Cas on September 12, 2016, 05:11:27 AM
  • 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) .

Cas

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.
Earth is my country. Science is my religion.

Cas

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

New features:

  • To rotate in-situ, it is now possible to select a perfect square. If a rectangle is selected, you're asked whether you would like to adjust X or Y
  • Track-check has been improved and now there's a whole comprehensive track analysis system. It is possible to analyse every possible path in the track and estimate its OWOOT time, among other things
  • Warnings have been added. If Cas-Stunts finds no error in the track (meaning it will run in Stunts), it will still report relevant warnings in case it would be useful
  • A very flexible scenery generation option has been implemented!  Take a look :)
  • Using the new Settings menu option, it is possible to modify the configuration file from within Cas-Stunts
  • You can calibrate your own speed by racing the track 4am.trk in OWOOT and submitting your time in the Settings menu. Path time estimates will be based on this value

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.
Earth is my country. Science is my religion.

Duplode

The new big features are endearingly sophisticated. I have particularly enjoyed the elegant path analyser.

Cas

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
Earth is my country. Science is my religion.

zaqrack

ZCT178 makes the track analysis and the editor crash.  8)

Cas

#66
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.
Earth is my country. Science is my religion.

Duplode

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  :)

Cas

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!
Earth is my country. Science is my religion.

Cas

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

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

New features:

  • Tournament interface option. Not very powerful yet, but already useful. This is an example of what I mean by "integration". A lot more can be done and I had to deal with horrible HTML and text parsing, but it works :)
  • Very convenient way to quickly produce a closed circuit by selecting an area and pressing ENTER. Still cannot work with elevated and banked roads, but I'm working on that. Try pressing ENTER more than once to change the corners. If the selection is too narrow, you can use this to produce long straightways
  • Finally, a better, more intuitive keyboard cursor, properly highlighting the affected element on the track as well as marking the area that where the current tile will be pasted
  • Many keyboard shortcuts for selecting tile types. "S" for straightway, "M" for material, "L" for loop, "W" for corkscrew, "E" for elevated road and more. 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

Fixed bugs:

  • Scenery generation errors that would hang the program or create fewer tiles than supposed to
  • Track checking bugs, mostly having to do with jumps. Now Cas-Stunts can even analyse inverted jumps and interrupted bridges
  • Tunnels and chicanes now cause an error if placed before a jump, like in Stunts
  • 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
Earth is my country. Science is my religion.

Shoegazing Leo

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.

Cas

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.
Earth is my country. Science is my religion.

Duplode

#72
Quote from: Cas on September 27, 2016, 05:17:51 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  :)

  • There could be a "transition" button, which would work analogously to the material button but switching to between pipe and pipe entrance, highway and highway entrance, banked road and (both kinds of) banked road entrance and elevated road and (the various kinds of) ramps.
  • A corner button could then work in the same way, switching between straight road and corner (of the same material), elevated road and bridge corner and banked road and banked corner. A split button might work in the same way. As for distinguishing between small and large corners/splits, SHIFT would work fine if you'd rather not spend two more keys on that.
  • If you don't wan't to give slaloms a separate shortcut I guess no one would mind if you put them together with tunnels, as both fall into the category of "weird straight roads from the F4 panel"  :)
  • Next, crossroads (both normal and bridge ones). SHIFT plus the straight road button could work. Simply skipping their shortcut wouldn't be too bad either, as the "link tiles" feature seems to work very well for inserting them.
  • As for start/finish tiles, they are special enough to merit a wholly separate shortcut, but perhaps not common enough (only once per track!) to justify spending a key on them. If you don't want a separate key (or to leave them to the "link tiles" command applied on the desired piece of straight road), perhaps they could go together with the crossroads under SHIFT+S, cycling in this order: normal crossroad, bridge crossroads, start/finish lines -- there are "only" seven orientations between these three cases, so it wouldn't be too much to cycle, though the fact that bridge crossroads don't have a choice of material while the other ones do might feel a little weird.
  • And then there is scenery. Since it is crazy to assign one key to each scenery type, or to cycle between 26 possibilities with a single shortcut, something that might work is having a key which only cycles between the (ten) types of scenery, and then using R, SHIFT+R, F and SHIFT+F to select the orientation. One disadvantage is that this behavior would be inconsistent with the other shortcuts -- unless, of course, you think it is worth it to make all other shortcuts work in the same way...

Quote from: Cas on September 27, 2016, 05:17:51 AM
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.)

Quote from: Cas on September 27, 2016, 05:17:51 AM
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, 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.)

Cas

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?
Earth is my country. Science is my religion.

Duplode

Quote from: Cas on September 28, 2016, 04:52:47 AM
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)

Quote from: Cas on September 28, 2016, 04:52:47 AM
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 :)

Quote from: Cas on September 28, 2016, 04:52:47 AM
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.

Quote from: Cas on September 28, 2016, 04:52:47 AM
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.

Quote from: Cas on September 28, 2016, 04:52:47 AM
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 :)

Quote from: Cas on September 28, 2016, 04:52:47 AM
OK, then... I'll try to leave no item without a shortcut :)

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

Quote from: Cas on September 28, 2016, 04:52:47 AM
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?