The semester is almost over and it is time for project submissions. I’ve gotten as far as I can in the allotted time. I feel OK about what I’ve been able to accomplish. I certainly wanted to do so much more but there just wasn’t enough time and I spent more time on things than expected. I learned a lot from this and went in knowing that I had the room for trial and error without major repercussions. Something that is really nice about an educational setting. I will take what I learned here and apply it to future projects. I had tons of fun working on this. Graphics are not my thing but I do love a puzzle.
The next step for the PS4 engine was to get texture working. I started by examining a piece of sample code that put a texture on a quad. Was straight forward enough, except the sample code is in a single file with global scope. It took some time to break down all of the parts and weave them into my structure. The most difficult parts were handling the vertex buffers from material to renderer and sorting out the render code, as theirs was done differently than mine. Once I stepped back and took it one step/piece at a time everything fell in and it can render basic platform specific textures on a quad or cube.
Now that I had a set way to share code I went back to the PC side and found that the method I used was not working the same as it did on the PS4 side. Not really sure why and after a few days of testing and trials I changed things up a bit and got both engines compiling. My current structure is two platform code bases, a shared code base, and a shared assets folder. Each platform has a helper class to convert data types from the platform specific type to a generic type that the shared code base uses. This will allow me to write the game code once and use it with both platforms.
After achieving a basic running PS4 graphics engine it was time to look into cross platform integration. This seemed like it would be easy enough. I identified which code I thought could be part of a shared base and started the process of moving it out and getting the PC side to run this way was trickier than I had thought it was going to be. Though at the time I did not realize that the PC side was to be far easier. When I tried to convert the PS4 side it all fall apart. I believe a lot of this is due to the fact that we cannot take any PS4 code or related items outside of our PS4 lab. Due to legal agreements with Sony. Which complicates cross platform engine development. So I got the PS4 engine happy and shifted the PC side to a similar structure. Both solutions have a shared code base, a set of platform specific code, and some generic code that will be copied from project to project inside of platform specific files. This is not a good way to build an engine, but with the restrictions it is a working way and will let me work on the project outside of the PS4 lab.
With a compiling code base the next step was to display a basic set of triangles on screen. This proved to be easy enough. Over the next week I started to uncomment code and got the basic structure of the engine running.
For the beginning of the project I decided to take the graphics engine from the previous semester and use that as a launch point. To do this I setup a new PS4 project and imported all of the code. Then I proceeded to comment out 95% of the code, add all of the platform specific code necessary, and set my base line at just getting it to compile.
Cross Platform Project Development Log