JS13K Games 2019 Day 11
Yeah, I actually did some work after a week of not working on it! Yay, me! Alright, here's what I've done so far...
I actually got started on the actual code that will drive my game. I now have a basic index.htm file that is used to play the actual game! I also did a little experiment...
Here I have two zip files: one with the htm and css files in one directory that I've called flat, and another with the css in a sub-directory that I've called tree. As anyone would have guessed, the one with the sub-directory is bigger. So, in order to conserve as much data as I could, I've decided to keep all the source files in one directory. I've checked the rules, and there is nothing in them that says I can't do that. It's just a really bad procedure to do so, because usually you would want to keep your files organized. It also helps when you have a ton of source files to sort through: all your html code is in the current directory, all the JavaScript is in the js folder, and all your css is in the css folder. Since I got that 13K limit, I'm hoping I won't have as many source code files to sort through.
I was also wondering what to do with my JavaScript file that will store the actual game. I know I would have to include in the index.htm somehow, but if I don't include it correctly, it might cause the page to load incorrectly or slowly. Granted, I don't see the index.htm file getting any bigger than "here's the title, the JavaScript file, and a canvas to draw the game on" but I want to make sure everything is as good as I can make it. Thankfully, someone on Stackover was asking the same question. I've never heard of adding "async" or "defer" to a script tag before, but since it is just one file, I'll use the async attribute.
Wow! I got a lot of stuff done for it, today. Well, it might not look like much, but I know I can confidently move forward with the JavaScript. Plus, I've managed to knock two things off of my TODO list! Yay! Anyway, feel free to check out Shield Breaker on GitHub!
I actually got started on the actual code that will drive my game. I now have a basic index.htm file that is used to play the actual game! I also did a little experiment...
Here I have two zip files: one with the htm and css files in one directory that I've called flat, and another with the css in a sub-directory that I've called tree. As anyone would have guessed, the one with the sub-directory is bigger. So, in order to conserve as much data as I could, I've decided to keep all the source files in one directory. I've checked the rules, and there is nothing in them that says I can't do that. It's just a really bad procedure to do so, because usually you would want to keep your files organized. It also helps when you have a ton of source files to sort through: all your html code is in the current directory, all the JavaScript is in the js folder, and all your css is in the css folder. Since I got that 13K limit, I'm hoping I won't have as many source code files to sort through.
I was also wondering what to do with my JavaScript file that will store the actual game. I know I would have to include in the index.htm somehow, but if I don't include it correctly, it might cause the page to load incorrectly or slowly. Granted, I don't see the index.htm file getting any bigger than "here's the title, the JavaScript file, and a canvas to draw the game on" but I want to make sure everything is as good as I can make it. Thankfully, someone on Stackover was asking the same question. I've never heard of adding "async" or "defer" to a script tag before, but since it is just one file, I'll use the async attribute.
Wow! I got a lot of stuff done for it, today. Well, it might not look like much, but I know I can confidently move forward with the JavaScript. Plus, I've managed to knock two things off of my TODO list! Yay! Anyway, feel free to check out Shield Breaker on GitHub!
Comments
Post a Comment