Posts

Showing posts from September, 2019

More Game Off 2019 Prep

Hey, I just wanted to give a quick update as to what I've been up to recently.  I bought a Unity Book Bundle from Humble Bundle.  It had a Cookbook for Unity 2018, and had some videos on how to develop games using Unity and C#.  I don't know if I'll use it for the Game Off or not.  I will have to read into more, though. Jedulz also told me about glitch.com .  It is a collaborative web app developer tool, and that's pretty neat.  It runs a little bit like Google Docs.  However, it seems like it only works with the three Website Languages: HTML, CSS, and JavaScript.  Which is great, if I wanted to create another game like Shield Bearer that you can play from the browser.  Since we have so many languages to choose from for this Game Jam, I'm having a difficult time figuring out which one I want to use.  I also love learning new programming languages, too!  Which is what is making this decision so hard: go with the tried and true...

Game Off 2019 Prep

Image
In preparation for the Game Off 2019 competition , I made an account on itch.io.  You can view my itch.io profile , but I don't have anything on there right now.  I was thinking about uploading my game "Star Trek: Borg Attack" on there, but I don't want to infringe on any IP Holder rights.  Plus, Viacom, Paramount, and CBS have been known to be really defensive about fan productions of Star Trek.  Here's a screen shot of the game if you think I'm bluffing: I think I made it with Game Maker 5 or 6 a long time ago (around 2004).  I remember "programming" this game before high school.  The YoYo Games logo does not show up when started, so it has to be before Game Maker 7 (2007).  At least, according to the Wikipedia articles on Game Maker. The game started by giving you this big text window that just explained the controls: I had WASD for moving the ship, spacebar to fire phasers, and I also had TFGH for going into warp.  There was even a ...

JS13K Games 2019 Day 32 (Final)

It's the final day to upload Shield Bearer before the deadline.  Well, more like the final 6 hours.  Let's see what I can do. I wanted to get that collision with the Backscatter Buster shots and the spiders going, so I immediately jumped into the playerProjectile's update function.  I added a for loop to go through the array of enemies and check for collisions.  If there was a collision, mark the projectile for dead and kill the spider.  The collision is good, and the score is increasing!  Now I just need to make the spiders a bigger threat by having them fire at the Bearer every second after they have stopped! In Orion's Revenge, I created Enemy Ships  that could shoot at the Player Character no matter where the Player's Ship was on the screen.  I want to do something like that for the spiders.  To implement something like that, I created the enemyProjectile class.  If the enemy is a spider, I want it to fire a projectile from the c...

JS13K Games 2019 Day 31

Image
Oh, boy!  It's 4:53pm right now and I have only about 14 hours to finish my game.  Hopefully, I can get something playable by then. My first goal was to finish the collisions with the Backscatter Buster shots.  I have them moving, but they're only affected by the walls.  It's been a while since I did collision checking, so I had to think about it.  I decided to create a separate function called collisionCheck to check for collisions between two objects.  It would be cleaner, and smaller, to have this check be in a function that I can reuse.  So, what is the algorithm that I should use? What does it mean when two objects collide?  I drew it out, and I think checking the corners on one object to see if they are within the bounds of the object.  I think that will work for a majority of cases, but probably not all of them. As I was eating dinner, I was thinking about objects that overlap each other but their corners don't touch.  Th...

JS13K Games 2019 Day 30

Hmm...less than 34 hours to complete Shield Bearer for the contest.  Hopefully, tonight will be just like yesterday. Okay, let's get a Heads Up Display (HUD) going to display the player's current score and their Health Bar.  I wanted to get the score going first, so I looked up how to draw text using the HTML5 canvas context .  I then read up on the JavaScript classes , because I wanted to know if I could create a static class just to display the score.  I can: if I add the word "static" before the function in the class, it becomes a static function that can be called right from the class without creating an instance of that class.  I gave it a static draw() function, and made a few const variables to hold the color that I wanted for the text.  I then added it to my main draw() function to get the score to draw on the Canvas.  I had to change the x and y variables around to fully display the text, but I got it in an area that I like. Now, we need a...

JS13K Games 2019 Day 29

First of all, I need to give a shout out to my friend jedulz for helping me get Shield Bearer to be drawn on the HTML5 Canvas!  I was having trouble getting the height and width to be correct until he sent me this pull request to fix drawing to the Canvas .  Now that I can see what is going on, I can start solving some of the issues I'm currently having with my game.  I changed the Bearer from being drawn by strokes, to just a filled rectangle so I could see it better.  I'm hoping I can get some sprites going before the deadline. The first issue I sent out to tackle was that the Bearer would get stuck traveling to the left of the screen.  Jedulz suggested to me that it might be caused by moveLeft, moveRight, stopLeft, and stopRight functions.  I didn't like using them in the first place, because they kept messing with the dx.  So, I stepped back and ask myself this question: what are the keyup and keydown events trying to tell my game?  The orig...

JS13K Games 2019 Day 28

Image
I'm back to work on my game!  Well, I'm actually kinda working on both mine and my friend's game for the competition.  I don't mind.  It gives me two places to try ideas.  Anyway, I just pulled off a manual merge to my fork of jedulz's entry.  That was a bit weird to do, but I'm glad GitHub gave me instructions on how to create the branch and pull the merge request.  Then, I just used Atom text editor to push the merge on the branch and then merge that branch onto master. Today, I mostly helped out jedulz and his entry .  He was using a big green square for his plant, bush, or whatever his purple food was growing on. So I went ahead and drew him this plant: Now, his game looks like this: Which, I think is a little better looking than that square. The only time I had today was spent learning how to use the canvas.  I think I found something really cool, though.  Actually, I found a lot of cool things with drawing images on th...

JS13K Games 2019 Day 26

Wow!  My brain is coming up with a lot of ideas for Shield Bearer tonight (12:27am on 9/7/2019)!  I just came up with a good idea: variable jumping height!  How do I implement that in my game?  In Jedulz's entry , he uses a variable called dy for change in the y direction.  He then has a gravity variable that will increase the dy, because it is negative to send the player upwards, and then the player falls to the ground when dy is positive.  I'm thinking, on a "keyup" event for the Up Arrow or W key, we set dy to zero if dy is less than zero.  That way the "downward force" of the gravity starts working immediately after releasing Up Arrow or W key.  Also, I came up with having that if condition because I don't want the player to be able to release the Up Arrow or W key at any time to restart accelerating to the ground. I wanted to get my "game over" state set up for later.  I'm thinking I'll have a health counter or something.  When...

JS13K Games 2019 Day 25

Ah!  I got it!  The name for the Bearer's laser cannon will be the "Backscatter Buster"!  It's freaking PERFECT!  Backscatter is another word for reflection, which will be how the cannon works: it fires a projectile that can hit a wall and reflect back at you.  It also contains the word "back", which was the theme of the competition !  I was a little worried about calling it a Buster, though.  It is also what they call Mega Man's, X's, and Zero's arm cannons.  However, Buster is an actual term in the dictionary that means a person or thing that can break/destory/overpower something.  That's probably why their cannons are named "Mega Buster", "X-Buster", and "Z-Buster" respectively: they can't just copyright or whatever the word Buster, since you can't really copyright a single word.  At least, that's what Quora is telling me . So, I've never really used the HTML5 Canvas before, if it wasn't ...

JS13K Games 2019 Day 24

Between work and everything I have to do after work, I've had no time to really sit down and work on Shield Bearer.  It might be a game that I might never finish for this competition.  However, even if I don't finish it in time for the competition, I'll try to finish it some day. I did have time to check in on my friend and coworker 's entry for the JS13K Games Competition.  He's got a red square that will be a porcupine later, and the goal is to collect food (the white dots) while avoiding enemies (the blue square).  It's a pretty good start.  I did find an issue where the porcupine could walk off the screen moving left or right, and it would clip through the floor on landing from a jump.  I saw where I could add some code to fix that, so I did.  Hey, this is a friendly competition!  After looking up how to collaborate on GitHub , I managed to set it up so that I can push commits to my copy of his repo  (called a Fork) and make pull reque...

JS13K Games 2019 Day 21

I've been trying to find out how to fix that height bug in my HTML5 Canvas.  I got really close using vh in my CSS , but that gave me the window.innerHeight issue of being too big.  Maybe, I could use fullscreen with the HTML5 Canvas , but I'll have to see how it works on mobile.  I've tested it on Chrome for Android and it works!  It also works for Firefox on the computer! However, that was all I could do for today.  I'll have to save experimenting with going Full Screen for later.  I really want to know what the screen size becomes when you go full screen.  Does it use the resolution of the device, or does it do something else?  I really need to find a solution that uses the device's full screen.

JS13K Games 2019 Day 20

Life just kept me away from the keyboard, so I'm really going to have to kick this in high gear if I want to have a working project by the end of the competition. I do have some good news, I got FireFox installed for testing and I found a really good snippet of code: jfriend00's docReady code will allow me to have a "$('document').ready(function(){});" without having to add jQuery.  Remember, I have to keep my game under 13K in a zipped folder. My test to see if docReady would work, was to get the Canvas to resize to the available browser screen size.  I found a w3School webpage on window's innerheight and innerwidth , but those would be WAY TOO BIG for the screen.  I then tried document.body.clientWidth and document.body.clientHeight, but I got the same result.  As I was playing around with Chrome's Developer Console, I found document.body.offsetWidth and document.body.offsetHeight; which, gave me the window's Height and Width that were curre...