How to handle this... more delicately

rover2341

Is riding a roller coaster...Wee!
Reaction score
113
I made a roller coaster game in C# a while back. and surprisingly the back-end doesn't have many issues. Yet I still want to re-explore it, in the name of improving ability to code.

Issue:

When a User Builds a track and the user brakes one of the rules... like go out of bounds (x,y), go into the ground (go to low), build tracks into another track, the game attempts to fix the issue and move on. Instead of give them in error sound or message, saying no go. your going out of bounds.

This is extremely important. As I found in war3 modding, and on the phone that if they cant mash buttons and it build a coaster people lose interest really fast. Avg Age is likey 8-16 years old.

So I am able to fix one rule with no problems and its fairly isolated. But the issue is being resolved and another issue comes up at the same time....

like your building out of bounds, but it backs up and turns left to get you in bounds and you run into a track.. or you run into the ground because you happened to be pointed at a down ward angle.

Then Issue A, And Resolution A, get mixed in with Issue B, And Resolution B. This doesn't always cause melt downs but it can.

I don't mind. Removing tracks from the user to get them back on track.

So... image (2) is what it really is. and capture.png is me in a attempt to streamline it (flow chart program) but realizing i have no idea how i would do it. (A,B,C,D are modules that would attempt to fix the issue)
 

Attachments

  • Capture.PNG
    Capture.PNG
    216.6 KB · Views: 436
  • image (2).png
    image (2).png
    346 KB · Views: 457

rover2341

Is riding a roller coaster...Wee!
Reaction score
113
Attempt:

Builder Has 3 Options, Build, Remove, Finish Coaster. All 3 are considered a Task.

Task is a string being sent into Task Manger. (I says single task to make it clear, unlike before only one Task Can be attempted at a time).

In Task Manger, It will attempt the task, And if the task Fails, And it is Any of the users requested functions, it will have failed due to a "Rule" being broken.

Then Fail, Will find what caused it to fail, and Change the task with what caused it to fail.
(For example you try to build stright 3 tracks, it finds you go out bounds, so now instead of building any tracks, it takes your request tosses it out, and attempts to get you in bounds, even though you haven't gone out of bound yet. This is a preventive measure as you were attempting to go out of bounds).

So Now It changes your Task to a "Fix Task" that will attempt all methods it knows to get a Pass. So Task Manger may run Test Task many times for a single Fix Task, as it may have many different ways to attempt to fix it. for example if you were going out of bounds it would try going left, and if that fails going right. Also For All Fix Tasks there is threshold of how many times it can back up your tracks.

If all of those fail. it will go to the fail circle, and then remove the task, (It possible it would give the user in error sound or MSG here)

If the Task Pass, or the Fix Task passes, it will then build the tracks for real. and Check if your now in the finish area. If you are, It will call the finish coaster, that will then start that task.

If your coaster is in the finish area, It will finish. If the user pressed the finish coaster button it will attempt to get to the finish area and finish, but can fail.



The Real question is... how much worse or better will this be for the user then my old system.

My old system. would look for issues every track built, and if found attempt to fix it. and then if inside of that, another issue found try to fix it. The issue was many of the fixs requied backing up of tracks. making it much more complex. When I built this i kept that in mind, so i did alot of complex logic to make it able to address 2-3 problems all at the same time fixing each other while finshing the users request. But Its a huge mess. and takes me hours to understand what hte crap is going on when i need to go back in and add anything to the Builder, and although isnt causing crashs or real issues as it has fail safes... seems like a bad idea.


If I make the change, and then I find that its HARDER to build a coaster. I will be fairly upset, even if its the much nicer code. and likely 2-4 factors less.


HMMMMM.....

added another version (2) this one has all the functions... I think. besides The UI, and on load fuction..
 

Accname

2D-Graphics enthusiast
Reaction score
1,463
I would go with the less error prone method that is easier to maintain.
What you said there sounds pretty reasonable.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top