Pokemon Progresseion
|
So this past week we have actually gotten quite some work done. Successfully gotten a working state manager that handles our different states or as they are in our case different scenes ex. Intro, houses, an open world and a battle phase. I spent my Christmas weeks working on a concept for a state manager I found when browsing through lazy foo´s website and tried to recreate it using a clean version of the arkanoid code we have created up until recently during our class. In arkanoid we had two different classes for handling states. One which was pure virtual (a class that is pure virtual do not have a function of it own, it must be inherited by another state class to fully function) and the states mentioned above would inherit from it and then there is a state manager whose function is to look over which state is current active and check that´s update function (this is a bool function which is returning true or false depending on what we want it to do) for when it is turned to false it would switch to what state comes next in the list. There is a function in each state inherited from our virtual state class which points towards which state is supposed to be created next, it will delete the current active state and then draw what state comes next. Although I could not figure out how this was supposed to work until I came back and asked my teacher to go through my none functional code and look for what errors I had missed. My mistake in my code was that I had combined both the virtual state class with the state manager and let my states inherent it with the empty functions, including the function which is looking for the update function in all classes. The thing that troubled me was when I tried building my code is returned a success (meaning there is no problem in the code and the game should run as intended) and it created a window without crashing and maintained it only that the window was completely black. Where I was supposed to draw each state up onto the window there existed no such draw function as I had made the state manager into a pure virtual class it could not return a draw function since it´s own draw function was empty and were not called anywhere and contained nothing to be returned onto the screen. What had taken me almost two weeks over Christmas was broken down and repaired into a functional state manager in less than two hours by my teacher when he looked over the program I had written. With one week now reaming until we must turn in our game I now feel much more confident that by our deadline we will have created a representational game fulfilling the requirements set for this project. P.S I sincerely apologize if this blog post seems incoherent and hard to follow but it is because I am not entirely certain of exactly what I am currently doing at this point. Bear with me for now. |