On Hold Castle Run

Discussion in 'Terrains, Levels, Maps' started by krallopian, Jan 29, 2019.

  1. TarTi

    TarTi
    Expand Collapse

    Joined:
    Feb 27, 2019
    Messages:
    122
    Well doooone ! :D looks nice !

    EDIT : Ahah that Dodge crash at the end x3

    Looking forward to test this >:3
     
    • Like Like x 1
  2. krallopian

    krallopian
    Expand Collapse
    NC114-85EKLS
    BeamNG Team

    Joined:
    Dec 5, 2013
    Messages:
    789
    Thanks a lot TarTi!! Hahah yeah the ai's been having a rough time with me throwing impossible tasks at them ;)

    Here's a vid I just took explaining the how, what, where, and why of it all!

     
    • Like Like x 8
    • Informative Informative x 1
  3. CN877

    CN877
    Expand Collapse

    Joined:
    Jun 27, 2017
    Messages:
    1,465
    I really enjoyed that video mate! :D It was really interesting to see how everything works and the amount of effort you put into your work.

    Also, on another note, you have a really good voice for YouTube so I hope to see more videos with voice overs in the future. :D
     
    • Agree Agree x 2
    • Like Like x 1
  4. krallopian

    krallopian
    Expand Collapse
    NC114-85EKLS
    BeamNG Team

    Joined:
    Dec 5, 2013
    Messages:
    789
    Hahah, well hey there ;) ;)

    Thanks a lot dude, I plan on showing more of it either through videos or here in this thread as it develops.

    Right now I'm working on grabbing each car's speed and doing stuff with it. Such as, "if you are going over 200km/h you aren't going to make that turn, so pick a different turn as a result" and just the same, "if you're going under 100km/h, don't wait to turn WAY DOWN THERE just turn here now."

    A big trick I was after was figuring out how to take the speed calculated from 148.4182472834829 to something more realistic, and that magic was: "print("Car 1 Speed: "..string.format("%.3f",(speed)))" takes the variable I have "speed" and basically reduces it down to 3 decimal places.
     
    • Like Like x 3
  5. Danny Werewolf

    Danny Werewolf
    Expand Collapse

    Joined:
    Mar 31, 2017
    Messages:
    2,268
    This map better keep being updated for years to come, I wanna do this once I can run more than three cars easily XD.
     
    • Like Like x 1
  6. krallopian

    krallopian
    Expand Collapse
    NC114-85EKLS
    BeamNG Team

    Joined:
    Dec 5, 2013
    Messages:
    789
    Haha, I'm actually surprised with these 6 cars, 4k res, full gfx, the game's still maintaining 40fps for me! :O

    Shadow distance is 3500 too. Craaaaaaaasee.

    Check this out:

    upload_2019-3-8_22-15-14.png

    That shows up as I drive over the 1/4mile mark! Custom icon, and.. yeah, exciting! =D
    --- Post updated ---
    Here's a video of them in their current test state!

    Using, icons already in the game, most of the ones I've tested work:

    https://material.io/tools/icons/?style=baseline kinda cool!

    Watch the top left of the screen as the cars pass over the 1/4mile mark.

    I'd like to see how to get multiple lines showing up, and then do more exciting things with the info.

     
    • Like Like x 5
  7. krallopian

    krallopian
    Expand Collapse
    NC114-85EKLS
    BeamNG Team

    Joined:
    Dec 5, 2013
    Messages:
    789


    Enough work for today.

    When the white car enters the trigger, it's speed is calculated, translated, truncated, and a buncha other magic, and shows up as a 3D model!

    Basically, I'll have lane 1..2..3..4..5..6.. each with speeds shown at the end of the track on a large speed trap board. Time as well. For now, the proof of concept is there. Speed will be displayed up to 999.99 and time up to 100.000. Lane 1 Speed and Time, Lane 2 Speed and Time, etc..
     
    • Like Like x 6
  8. krallopian

    krallopian
    Expand Collapse
    NC114-85EKLS
    BeamNG Team

    Joined:
    Dec 5, 2013
    Messages:
    789
    Well, fortunately I haven't been banned yet for spamming thomatoes50 every time I get stuck.

    As a result I was able to vent enough frustration to eventually get to this point:

    upload_2019-3-11_15-46-54.png

    That's showing lane 1, 2, 3 speeds! Each car hit the same trigger and it took their information - their lane, their speed, and translated it to something readable that then creates variables that create other variables that call up decimal points and digits in 3D and presto! 3D, glowing, speed display!

    Again this'll be at the end of the track on a proper board, for testing purposes...... I'm over the moon about this, it's been DAYS of solid coding tests, and I swear it was always this:

    Me: "1+1 = 2"
    Code: "Banana!!!"

    Me: "Hmmm, 1 + 1 = 2"
    Code: "BANARPA!"

    Me: "Hmmmmmm, one + one = two"
    Code: "BanananaAnne"

    Me: "..... *sigh* ONE PLUS ONE EQUALS TWO"
    Code: "FIVE!"

    Me: "JUST WORK DAMN YOU! 4+4 = 8"
    Code: "Two"

    .........

    Eventually I got it worked out, but I'm almost positive I've gone completely grey over the past week =D
    --- Post updated ---
    (the speeds will have two decimal places of course so the top number would be 72.97)

    Depending on your speeds, it will display:

    8.52km/hr
    18.52km/hr
    218.52km/hr
     
    • Like Like x 6
  9. TarTi

    TarTi
    Expand Collapse

    Joined:
    Feb 27, 2019
    Messages:
    122
    Ahahah good work ! ;3

    I love your design ! It should look too futurist or breaking the 4th wall, but nope, it's just so cool :D
     
  10. krallopian

    krallopian
    Expand Collapse
    NC114-85EKLS
    BeamNG Team

    Joined:
    Dec 5, 2013
    Messages:
    789
    Hahah thanks, it's not going to remain floating in the air like that, again I'm going to have a proper signage setup.

    My plan is to have "gates" at the end of the track - makes for more exciting crash potential too - and above each lane will be their time and speed displayed.

    I'll get a quick vid up right now though of this working.
    --- Post updated ---

    --- Post updated ---
    During some more testing, I kinda like the whole futurist look of it, and it's so hard not to go that way with the entire level when doing props etc.. but here's a more realistic version of how the displays will work at the end of each lane. They will be on a hanging sign above the track.


    --- Post updated ---
    Current status of program:
    upload_2019-3-11_19-25-2.png
    --- Post updated ---
    Lane 5 is the T series with a trailer =D Not much of a dragster!
     
    • Like Like x 7
  11. krallopian

    krallopian
    Expand Collapse
    NC114-85EKLS
    BeamNG Team

    Joined:
    Dec 5, 2013
    Messages:
    789
    A big stress-point for me has been, "how the heck am I going to CLEAR the boards!?"

    I have all the digits named as per their lane, decimal then digit, so for instance, L524 would read:

    L: short for Lane
    5: Lane
    2: Decimal Place
    4: Digit

    So L243 would be the fourth decimal place within the 2nd lanes speed, and the digit would be 3.

    If I was going 124.42km/h in lane 1, I would need to show: L111, L122, L134, L144, L152.

    My concern on how to delete them was, how do I know which ones are on and not on once they've been set and their variables are deleted by the game? SIMPLE thanks to my naming convention, I know that all of lane1's digits are: L110 to L159 so I simply made a loop that creates variables from 110 to 159, and used those to find and delete all the numbers in lane one:

    Code:
     for i = 110, 159 do           -- This generates, "L110, L111, L112, L113" to be used to CLEAR the trap board
                    local erase = "L" ..i        -- create a variable that will read "L" plus whatever i is, 110, 111, etc..
                    erase = scenetree.findObject(erase);    -- now convert that variable to the object's game-name
                    erase.hidden = true;      -- set that object to hidden, thus "clearing" the board
                end
    As a result, now when the cars return to their staging point, the score board will reset - and only for that lane! If I reset the car, same thing. If I reset ALL the cars, then all the boards clear.

    I'm . . for lack of better words, SOOOOOOOO PLEASED! =D
     
    • Like Like x 1
  12. krallopian

    krallopian
    Expand Collapse
    NC114-85EKLS
    BeamNG Team

    Joined:
    Dec 5, 2013
    Messages:
    789
    I've been laying out the drag strip most of today. Did a bunch of code-cleanup and reduction to make things even more efficient (not sure it was needed, but.. makes me feel better) attached are pics of the end of the strip earlier today before I started, and the start of the track.. now that I've got things pretty much blocked off and placed. Just need to get in and actually model everything cleanly - as I always say, it's just placeholder stuff for now so I can get an overall feeling for it. Big changes to come still but. . yeah
    --- Post updated ---
    Third photo shows the build being done within Maya.

    So I just build something, export it see how it fits, adjust it in Maya, export again, adjust, etc.. until I've got a layout that FITS and also works =D

    Thanks to the Italy map, I just grabbed the parking lot structure, ripped it apart, and used bits and pieces to block something out.
     

    Attached Files:

    • 0080.jpg
    • 0081.jpg
    • 0082.jpg
    • Like Like x 8
  13. krallopian

    krallopian
    Expand Collapse
    NC114-85EKLS
    BeamNG Team

    Joined:
    Dec 5, 2013
    Messages:
    789
    Bunch more work on the modeling today. Then I got back to coding, and within 15 minutes was able to re-use my code and re-write some names (0-9 digits for 5 decimals, for 6 lanes, so that's 50x6 = 300 lines of code "adjusted" no biggy) and suddenly, I have quarter-mile speeds showing!

    Now to work on timers, then build a display at the quarter mile mark and then the half mile mark.
    --- Post updated ---
    Quarter mile speed at the top, half mile speed bottom.

    The plan will just be a typical TIME at top, and SPEED below.
     

    Attached Files:

    • 0083.jpg
    • Like Like x 5
  14. krallopian

    krallopian
    Expand Collapse
    NC114-85EKLS
    BeamNG Team

    Joined:
    Dec 5, 2013
    Messages:
    789
    1/4 timer and speed trap done!

    1/2 timer and speed trap done!

    AFTER. . . 101 issues to deal with between creating and unhiding the individual digits in each decimal place, and then hiding them when respawning/resetting the car.

    Then I kept editing a BACKUP lua file instead of the working one and it took . . far longer than it should have to realize why nothing I was doing was making any difference.

    THEN I learned, you cannot change directory names in the "main" folder of your level, it'll delete all the .json files in there - thus making you lose 2 hours of coding effort.

    Regardless, timers and speed trap working, and man it's awesome!
     

    Attached Files:

    • 0084.jpg
    • Like Like x 7
  15. Gamergull

    Gamergull
    Expand Collapse
    BeamNG Team

    Joined:
    Jun 3, 2018
    Messages:
    460
    Wow, great scripting work! Lua is really fun, eh? Your progress lately is stunning, and it's cool that you push forwards so much despite setbacks. I'm feeling inspired, I wanna work on more map making myself (but it won't be eye candy like this).
     
    • Like Like x 3
    • Agree Agree x 3
  16. krallopian

    krallopian
    Expand Collapse
    NC114-85EKLS
    BeamNG Team

    Joined:
    Dec 5, 2013
    Messages:
    789
    Hey now, glad I'm inspiring! :D

    Seriously though, that's truly the reason behind projects like these. I know myself that I'm always looking for inspiration and when I see possibilities in things I love diving in and learning/sharing through forums. Over the years I've done car builds, or electronics builds, or other game dev that people learn from and it's very rewarding - albeit the expensive, insomnia-inducing, diet-ruining kind of rewarding! Haha

    Now that I've finally got the code ironed out, I can focus on modeling: Bleachers, track-side objects, light-tree, pedestrian walkway, mid/end track objects. Then eventually make my way back to the offroad track and it's objects, theeeen back to the redesign of the castle I started almost a month ago. @bob.blunderton this is all your fault for helping me get in to Maya, if it wasn't for YOU I'd have finished the map 2 months ago !!! (To be clear, I'm grateful and wouldn't have it any other way!)
     
    • Like Like x 1
    • Agree Agree x 1
  17. bob.blunderton

    bob.blunderton
    Expand Collapse

    Joined:
    Apr 3, 2015
    Messages:
    3,289
    Yeah, when you get into modeling, a whole-new world of possibilities opens up. It's a whole new can-of-worms.
    Do enjoy, and make sure you're truly making what you want to make, because now you can.
    *hint* If other maps such as stock game maps already have objects you need, use those in-stead. (if not stock, the obligatory 'ask permission of course' applies out of kindness, regardless that the EULA of this site permits sharing objects / scripts or map/vehicle assets between creators). Unless you'd have to significantly change the map to use them, it can save you some time, especially when you're me and you like to have a TON of stuff that 'needs to be done' to keep your brain functional. It can save your sanity though.
    Example: I reached out to Occam's Razer to kindly ask if I could use Garfield Heights home assets and such if not an issue, because I didn't have enough homes for Roane County, back in 2016~2017. They still stand to this day, they look good, although they aren't as updated as his own map has them, that is deliberate because he made them and I will not piggy-back off his every move. That would be a bit rude.

    That being said, I have a set of bridges & textures coming with the new Roane County update, if anyone's got a USA map in the works, there's a nice assortment of them there for all to use.

    *I totally feel your pain with Maya, it can be a devil as much as a godsend. Quite a bit of hair-pulling sometimes until it comes out correct at times. Other times it's clear sailing. If it wouldn't round every darn corner though...
     
    • Like Like x 1
    • Agree Agree x 1
  18. krallopian

    krallopian
    Expand Collapse
    NC114-85EKLS
    BeamNG Team

    Joined:
    Dec 5, 2013
    Messages:
    789
    @bob.blunderton Maya has been my baby since 2000/2001 and I've tried my best to migrate to the more recent builds (2016, 2017 etc..) but 2013 is still running strong for me and doing everything I need. As for rounding every corner. . . are you referring to the normals being softened automatically?
     
  19. bob.blunderton

    bob.blunderton
    Expand Collapse

    Joined:
    Apr 3, 2015
    Messages:
    3,289
    Yes. They always seem to round edges on normals. I can't tell you how many objects of mine ended up going to the map with some form of that, likely about 300 or so. I have to go back and fix them all one day but it's sure a needless pain in the rear. I wish it wouldn't do that by default. Only times you don't need hard edges is on things like vehicles, pipes, or round pillars. I'd sooner have to apply softening then have to remove it every time I pull up the gable of a roof, or use the bend tool on an object (which ends up mangling more than it helps when it comes to normals).

    There's some nice new features, but in a way, there's so many features in the program that I never use, it can tend to make it very intimidating or next to impossible to find the right thing sometimes.

    Year 2000... that's when I graduated high school and vo-tech, wow, that's almost 20 years now. Sheesh. Of course, I am quickly approaching 40, so no surprise, but how quickly time goes by. Better use it for mapping!
    I will be here lurking in the forums though, if you have any questions. Just drop me a line or tag me.
     
    • Like Like x 1
  20. krallopian

    krallopian
    Expand Collapse
    NC114-85EKLS
    BeamNG Team

    Joined:
    Dec 5, 2013
    Messages:
    789
    AHA!

    Found a bug that I'm not so sure about right now:

    If you use "dtSim" as a timer, it will only be as precise as your frame rate. So if you're getting 10fps it won't be very accurate at all.

    I noticed this while running 6 identical cars, they all hit at 23.482 seconds exact, even though they didn't cross the line at the same time. If I run in slow motion it's much more precise! I didn't notice this during development because each lane had a different car, and thus crossed the line at different times. SO, it's not the end of the world, it's just sort of a let down. Either run 100% true timing, BUT it will no longer react to slowmotion/pausing OR run it based on framerate/sim speed and just cross the line in slow motion for extra precision.

    I suspect this is why the dev's haven't had it in their maps as of yet.

    Also, because it's script based, if I record a replay of them driving, the times will not match due to simulation speed and cpu time differences.

    All in all, it still works totally fine but for that three-decimal place precision, slow motion is a must while running simulation delta time.
     
    • Informative Informative x 1
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice