Pit to car radio app available - work in progress

Discussion in 'Community Workshop' started by mr_belowski, Jun 24, 2015.

  1. mr_belowski

    mr_belowski Well-Known Member Beta tester

    Joined:
    Apr 23, 2015
    Ratings:
    +1,307 / 0 / -0
    The lack of support for Threading worries me a bit, but probably only because I've not got my head around co routines. Would the concept of a polled queue need to be reconsidered?
     
  2. pixeljetstream

    pixeljetstream Well-Known Member Beta tester

    Joined:
    Jan 29, 2015
    Ratings:
    +412 / 0 / -0
    Have a direct line to the author of zerobrane as he branched it from the estrela editor I co-founded, in case we run into debug issues...

    Am not a master around co-routines either, friend used them a lot for ui or entity events in a past game engine we wrote (luxinia.de). If we really need a certain task in an extra hardware thread (say the polling of shared memory), that could be done via a c/c++ dll that the Lua program can interface with, of course would try to avoid this, but it is possible.

    I think we would keep the event queue, because we likely have the notion of event priorities, if that is what you mean. A benefit of the script is that because it's so laxly defined, it's normally less work to change detail implementation of some systems, without affecting a lot of other code. Others see these loose definitions as downside as for big projects it means the interface/data discipline is not directly enforced by the compiler.
     
    Last edited: Jun 27, 2015
  3. machwebb

    machwebb Well-Known Member

    Joined:
    Feb 2, 2015
    Ratings:
    +224 / 0 / -0
    Done that to my samples... Also added cars in the atmos.
     
    • Informative Informative x 1
  4. mr_belowski

    mr_belowski Well-Known Member Beta tester

    Joined:
    Apr 23, 2015
    Ratings:
    +1,307 / 0 / -0
    I'm not trying to be awkward here - I'm quite keen on porting to Lua now I know it can be debugged properly. But the event queuing still doesn't seem to fit the Lua threading model.

    I think it might be the last piece of the puzzle - if it's possible to implement this concept of a queue of messages that the app works its way through while also monitoring the shared data and potentially appending to this queue, then Lua might be a winner
     
  5. pixeljetstream

    pixeljetstream Well-Known Member Beta tester

    Joined:
    Jan 29, 2015
    Ratings:
    +412 / 0 / -0
    cool, I've started on the prototype already anyway ;) let's see how it turns out and you can give it a shot. Getting the basics to work is still a "fun project" and not wasted effort.
     
  6. Georg Ortner

    Georg Ortner KW Studios Developer

    Joined:
    Jan 13, 2015
    Ratings:
    +3,507 / 0 / -0
    Made a short video to demonstrate it in action. If you haven´t tried this app yet, i absolutely recommend it!



    PS i made a little modification to the beep, feel free to use it if you like.
     
    • Like x 5
    • Love it! x 4
    • Agree x 1
    • Winner x 1
    • Informative x 1
  7. James Nance

    James Nance Well-Known Member

    Joined:
    Jan 31, 2015
    Ratings:
    +301 / 0 / -0
    Thats insane, Awsome touch to R3E now.
     
    • Agree Agree x 4
  8. mr_belowski

    mr_belowski Well-Known Member Beta tester

    Joined:
    Apr 23, 2015
    Ratings:
    +1,307 / 0 / -0
    Awesome, thanks Georg :)
     
  9. mr_belowski

    mr_belowski Well-Known Member Beta tester

    Joined:
    Apr 23, 2015
    Ratings:
    +1,307 / 0 / -0
    • Like Like x 1
    • Love it! Love it! x 1
  10. pixeljetstream

    pixeljetstream Well-Known Member Beta tester

    Joined:
    Jan 29, 2015
    Ratings:
    +412 / 0 / -0
    great indeed,
    @mr_belowski, one thing I am adding for the lua version is that an event can contain multiple sounds. That way we can combine things like "one more lap to go" "keep it together" from different sound files. Actually an eventtype can also trigger multiple events if required.
     
    • Like Like x 1
  11. mr_belowski

    mr_belowski Well-Known Member Beta tester

    Joined:
    Apr 23, 2015
    Ratings:
    +1,307 / 0 / -0
    Great, look forward to seeing it in action
     
  12. Jona777

    Jona777 Well-Known Member

    Joined:
    Jan 31, 2015
    Ratings:
    +409 / 0 / -0
    Virtual Belgian Chocolates on its way :D if you want the true ones, pm me adress :innocent:
     
  13. Christian G

    Christian G Topological Agitator Beta tester

    Joined:
    Apr 8, 2015
    Ratings:
    +2,411 / 0 / -0
    I love what you guys are doing, this is one of the most crucial elements missing in R3E, apart from working wipers and crushed flies on the windshield. ;)

    I guess you want to keep the single beep file so you can combine multiple audio files into one pit message without having a beep after every message? Would it be possible to have that beep played at the end of the message(s) as well?

    Just asking cause, well, I don't understand most of the programming stuff your discussing but I do have a knack for audio editing, reaching back to my glorious days of Winning Eleven modding. :D

    So I played around with the files you've added so far, and I did insert a beep at the beginning and the end and muted the beep file for now but can easily remove those. (Thanks for the beep Georg :))
    Anyways, attached is a sample of what I've done, if you'd be interested in more let me know.

    Kepp this going if you can, loving it.
     

    Attached Files:

    • Like Like x 2
  14. Hannes Wallstedt

    Hannes Wallstedt Well-Known Member

    Joined:
    Jan 15, 2015
    Ratings:
    +280 / 0 / -0
    This sounds really cool, will need to check it out when I have the time!
     
  15. mr_belowski

    mr_belowski Well-Known Member Beta tester

    Joined:
    Apr 23, 2015
    Ratings:
    +1,307 / 0 / -0
    Bad news Machwebb. I've just added another set of events. This looks at the laptimes over a 3 lap window and triggers a 'your times are improving', 'your times are consistent', or 'your times are worsening' type messages. I've been testing it out this evening and it looks good so I'll sanity check it tomorrow and push the new build up to Google Drive. Your work will never be finished ;)

    The code changes and sound files are in GitHub (note the sound files have been moved to another subfolder). But in best late-night coding tradition I did a little farting about with the code just before pushing it up, so I'll test again with a fresh head.
     
    • Like Like x 1
  16. mr_belowski

    mr_belowski Well-Known Member Beta tester

    Joined:
    Apr 23, 2015
    Ratings:
    +1,307 / 0 / -0
    Christian - I like what you've done with that sound file, it's a big improvement. I'm going to tweak the audio player so it's smart enough to recognise when it's playing a stack of files one after the other, so it will only beep once at the start, rather than at the start of each file. Once this is done it's easy to add a beep at the end
     
    • Like Like x 2
  17. Tarik Userli

    Tarik Userli Well-Known Member

    Joined:
    Mar 7, 2015
    Ratings:
    +578 / 0 / -0
    S3 have connections to real race staff, can they ask for some pit staff communication samples? That would be great!
     
    • Like Like x 2
  18. Anthony Monteil

    Anthony Monteil KW Studios Developer

    Joined:
    Jan 14, 2015
    Ratings:
    +1,199 / 0 / -0
    We have several options to create these samples, but we didn't decide how we will do it yet ;)
     
    • Informative Informative x 4
  19. mr_belowski

    mr_belowski Well-Known Member Beta tester

    Joined:
    Apr 23, 2015
    Ratings:
    +1,307 / 0 / -0
    I think mixing the background noise in with the sound files is a mistake. When there are two or sounds played consecutively the background noise isn't continuous. Each clip has its own background so this discontinuity is really obvious.

    The background sounds need to be separate wav files, mixed in real time. To achieve this I need to be able to play 2 concurrent wavs and start background playback from some offset. The background files will each have to be quite long (10 seconds or do with a few different ones, or much longer if there's only one).

    I'm not sure the simple C# SoundPlayer can do this - will have a fiddle
     
  20. pixeljetstream

    pixeljetstream Well-Known Member Beta tester

    Joined:
    Jan 29, 2015
    Ratings:
    +412 / 0 / -0
    @mr_belowski am pretty far with the Lua port and can account for the background looping and so on. Currently working on the simulator to test the events more easily. Totally agree with you that the voice should be clean and background or other "fx" done by system. Maybe that's a point where investing into system logistics in c# could be not worth it. At least give me around 8 more hours ;)
    Will not have ported all the events until then, but the framework should be stable and feature complete.