Tuesday, March 2, 2021

Well That Was Easier Than I Expected

So yeah, I didn't expect to get this first iteration done so quickly. 

At a VERY rudimentary level I've managed to create a client application in Unity. This client application has a some input fields and a button. When you click the button, the values are read from the input fields and then written to the console. After that, a request is sent to Mabel. Once the response from Mabel is returned and if it was successful, the response body is printed to the console.

Initially I found a short youtube video that was very helpful in just getting me pointed in the right direction in terms of how to create the UI.

The Unity documentation was pretty well structured but I didn't really have to rely on that very much yet.

When it came to writing the C# that handled the remote api call, I was able to find an online reference that allowed me to put together some very rudimentary code that worked almost immediately.

I'm definitely going to need to get my hands on modern references for C# and related best practices. It's been a while since I've written anything in it.

In particular, it looks like the C# libraries for handling remote api requests are very heavily tilted towards being asynchronous. This is fine (and good), but not something I'm extremely familiar with. I had to deal with this years ago when I wrote a basic nodejs server application, so I'm comfortable with the concept. I just don't know how the C# syntax for this fits together and what the best practices are. Something new to learn, I suppose.

Next step is to flesh out in more detail what the client application needs to do with respect to starting the game for the first time (new account creation, etc.) and what that implies with respect to the C# code that supports it.

No comments:

Post a Comment