C
C#2y ago
Cookie

❔ Game telemetry & overlay project - help with framework & architecture decisions

tl;dr I want to create an application which continuously reads telemetry data from a racing game and displays the data via a local webpage and maybe also as a game overlay. I am new to .net and need help with decisions regarding technologies. The requirements are the following: - Application: Read and process A LOT of UDP data from the game (60 times per second / 60Hz). I already tested this with a prototype in C# (console app) and it works fine! It should have the experience of a "real" program (e.g. taskbar symbol, autostart) with a User Interface for setup/configuration for the webpage UI etc. - WebPage: Display the data (throttle, brakes, timings, standings etc) via a local web page with nice dynamic UI (see attached example img). The page doesn't need to be accessed outside from localhost. And the page should be able to update almost in realtime for a few things like throttle/brake/steering input. You can look at the attached screenshot to get an idea of the displayed data. - (optional) Overlay: Additionally to the information being display via a web page on localhost it would be nice to have the option to run it as a separate overlay over the game itself (always on top, click through, transparency - as you see in the screenshot). - I probably want to share the program. So it should be easy to make it available for others to use on their machine. I am new to the whole C# / .net ecosystem. But I thought that it could be a viable option for my project. But what exactly should I use (asp.net , Blazor, SignalR, WPF, UWP, .... soooo many choices!!! )?? Other existing projects like this use electronJS Framework but I wanted to have sth more performant and possibly more lightweight. As you see, I am lost in the forest of .net and it would be nice if you could guide me a little bit according to my requirements. Thanks in advance for your input/opinions! satisfactionsharp
16 Replies
Doombox
Doombox2y ago
looks like IRacing, https://github.com/NickThissen/iRacingSdkWrapper there is a wrapper for their SDK, it's insanely old but it'd be a good starting point https://github.com/vipoo/iRacingSDK.Net this too as for actually drawing overlays, there are libraries like this https://github.com/michel-pi/GameOverlay.Net or weird hacky things you can do with PInvoke yourself to force stuff to draw where you want it to though that's frankly not something I know a lot about, for actually displaying the data in a 3rd party tool like a website or a standalone desktop app, .NET absolutely has all that covered, though actually doing front-end web stuff in .NET is probably best avoided ASP.NET will at least handle the backend for it if you want, that's up to you, Blazor could run on the frontend if you wanted but it'd frankly probably run like garbage
Cookie
CookieOP2y ago
No, I dont know him 🙂 The screenshot is from another application which basically does the things I want to do called "racelab.app". I think the screenshot is iRacing but I am not sure. Thanks for the input. I am really new to .net so excuse my questions: So you would propose a .net project for the app itself (data processing and UI and Overlay). Then another project with asp.net for the webserver and for that use blazor?
Doombox
Doombox2y ago
I'd have a common library project for shared types and code, then one project for consuming the data from the app and your own API surface then for your other projects to interact with then you can have a project for overlays, a project for a desktop app, a project for web stuff, whatever
iRacingProject.Common (Class Library)
-> shared types, your API models and shared code go here, all projects reference this
iRacingProject.Data
-> Console app that runs hidden and consumes data from the game and spits it out using your own API design
-> Or however you want it to behave
iRacingProject.Overlay
-> Overlay project
iRacingProject.Web
-> Web project
etc.
iRacingProject.Common (Class Library)
-> shared types, your API models and shared code go here, all projects reference this
iRacingProject.Data
-> Console app that runs hidden and consumes data from the game and spits it out using your own API design
-> Or however you want it to behave
iRacingProject.Overlay
-> Overlay project
iRacingProject.Web
-> Web project
etc.
gives you nice clean separation and if the iRacing devs change anything on their end, you only have to fix one project, the iRacingProject.Data one, once you fix that all the other projects will carry on running the same assuming you don't also change your own API design
Cookie
CookieOP2y ago
Great input, thx! (hopefully) Last questions 🙈 : -And all that can be bundled in order to publish it for others to use? -Do you know if there is sth I could use for the webpage UI which accomplished sth like in the screenshot?
Doombox
Doombox2y ago
publishing it can be automated to bundle everything together in a single zip, as for the Web UI frontend is not really my area of expertise honestly can always ask in #web
Cookie
CookieOP2y ago
Perfect, thanks! So one lib, one console app, one application ( e.g. WPF UI ), one webserver (asp.net with blazor server), and then some web UI stuff 🙂
Doombox
Doombox2y ago
yep, once you've got the lib and the console app bit sorted you can freely create any frontend you want, hell even mobile stuff is possible in .NET
Cookie
CookieOP2y ago
It's really hard to wrap my head arround the "multiple projects in one big project" thing. Never had this , just always one which does all but of course with modules to encapsulate. But it was "one" project Thanks again!
Doombox
Doombox2y ago
in .NET you can reference other projects in the same solution easily, it'll all be built automatically for you whenever you need to run any of the individual projects the tooling is 👌
Cookie
CookieOP2y ago
And I assume nothing is duplicated from the framework side, so it stays "small"
Doombox
Doombox2y ago
pretty much, the only time things tend to get big with .NET is when you build self-contained then the entire runtime gets thrown in your binary
Cookie
CookieOP2y ago
So for users who do not have .net runtime installed yet I guess. @Doombox I still struggle with the project topic 🙈 I now have a console proj and a blazor project. Each one can be run on its own but as I understood there will be one "main" project which will be started by the user. Let's say it's the console app. So now I need to start the blazor project from within the console app? And how is communication done? I am trying to make the most minimalistic prototype:
console app (which will be the one executed) console app launches the webserver project when a condition is met console app sends data to the webserver project which displays it.
I referenced the webserver proj in the console proj but how do I start it now? Google told me to call the executable but that cant be correct?! Why do I have them in one solution with references then, if I cant start it from there 🙈
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
lazagna42
lazagna422y ago
I'm interested in this topic, but will be slow for a bit. I'm JUST learning how to code specifically for the purpose of using the iRacing API.
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server