iOs game app – Dev Log Entry # 1
Today I am wanting to get iOS app for friend that I am working on (see previous post), displaying sprites for game board properly (with the right widths and heights, and at the right positions).
If I can get just THAT done today, that will make me feel like I am getting somewhere.
If I can get gradients too that would be nice. But Orville… dude… the other stuff is more important!!
#journal #ios #app #objc
10:30 am – Removed problematic swift file from project I got for doing gradients. There were problems with it, and I did not want to have to spend lots of time figuring out how to fix it.
11:40 am – Spent a bit of time cleaning up the code’s comments, and adding more useful comments. I figure that spending time doing this up-front will:
- Help me ease back into this project and get comfortable in Xcode again.
- Help me re-familiarize myself with my original project’s code and what I was trying to do.
- Make it easier going forward to follow the code and know the flow of execution and be able to find specific snippets of code quicker.
- I modified a class category to return just a basic sprite that is colored.
- I commented out a bunch of sprite generation code (for now) so I can concentrate on positioning and sprite dimensions (mentioned above as my goal for the day.
- I’ve got a sprite coming up now for the app’s “background” (albeit in the wrong color and positioned wrong). But still, I feel like I am getting somewhere.
2:33 pm – I have now done the following:
- Tested my sprite positioning code. It is working. So, at a generic level, positioning and sizing works. This does not ness mean that the position of all the sprites in the game are being positioned properly in the game code though.
- I have a class category for the SKColor class. It has some bugs I ran into… which I have fixed.
- I wanted to make it so that I could set a sprite’s color based on a web color name like “LightBlue”. I added to my class category for SKColor this functionality. I got hex codes for all the color names from here.
- I’ve tested setting my sprite’s background color using a color name and it works. Cool!
- I’ve started working on some code in my singleton class to add some extra debugging abilities…
- I do have some questions about how the current code for board sizing works. I will need to drill down into this soon.
6:00 pm – wrapped up for the day. Before which I got the following done:
- Debugging code will write a log file containing log data in a JSON format. Not a perfect solution for debugging, but for me, it is better than trying to scroll through the Console panel in Xcode.
- Started working on calculations for the game board size, the size of spots on the board to place “tiles,” and the size of the “tiles” themselves. There are still things that need resolving here.