I've just been reading a lot about Unity lately. I know what Prefabs are now, and how I'll need them if I want to do dynamic anything in Unity. I know about how there's no main script I can use to control how the game is run, and I know that it's absolutely unlike any coding environment I've ever worked with before. I said earlier that I found Unity intimidating. Now that I'm starting to understand it, I find it terrifying.
Through my research, I've had the revelation that the way my code is structured is fundamentally not going to cooperate with Unity. Unity is object based in a very different way from the one I'm used to... Which is to say, while I have multiple objects all used and updated in the main loop of my main program file, Unity has no such main loop. I need to have each character keep track of themselves and update themselves on each step of the game loop in the game object's Update class, which basically means I have to tear down my code and rebuild it in Unity this time. Additionally, I've been having a bizarre amount of trouble trying to get the scene initialization to work, in addition to some other bizarre bugs. Trying to get Unity to work is really stressing me out, and I feel like it's been distracting me from what the focus of my project was supposed to be - dynamically generating stories for games. I've e-mailed Aline to see how bad the consequences would be for not using Unity, and choosing a more simple approach to a graphical display (maybe something in 2D). I'm not expecting much, though, as I was told implementing my code in Unity would be an important element since I first proposed the project.
I'm currently drafting what I think will work as a scene intializer (if I can get ever get my code to compile). In theory, it should read the scene file and add a number of characters to the scene, but that's it - I haven't been able to figure out porting emotions or actions just yet. That said, I'd be happy to get just this up and running for now. Unfortunately, as I said, my code still will not compile in Unity so I can't tell if I'm going about this the right way (it's not a code error as far as I can tell - Unity says it's missing some important files for compiling my file and I can't seem to find the error online. Weird, as this wasn't happening to me before).
I'll keep trying to get Unity to work until I hear back from Aline. At the very least, I'd like to sit down with her or someone who knows Unity better to help me sort through all this mess, because the learning curve has been much steeper than it was with C#. In writing this, I have actually thought of some ideas on how to proceed without rewriting absolutely everything (don't it always seem to go?), so I will continue to attempt to port my code into Unity, even though I've made virtually no progress in almost a month. I'm going to go ahead and try to get what I have to compile first, though. That seems like a good first start.
EDIT: Code compiles now! Thank you, internet!
No comments:
Post a Comment