Friday, 30 October 2015

Day 33: Persistence

Today I worked on getting everything to work throughout multiple rooms. I got it to works a little bit by making the rooms persistent, and I think I need to do the same to the player object, but it would seems as though that is causing alot of problems for me. I have issues teleporting between rooms, problems with variables not being equal after the teleport, and a whole variety of other issues. I tried making the variables global using the globalvar string, but after some research online, I think that it has been removed from gamemaker entirely, which would be the cause of some issues as well. I may have to make everything a global.var, which would be a very tedious task. Tomorrow I will probably be working on the house sprite, making some final touches to it before having it gone over by Jake.

Thursday, 29 October 2015

Day 32: Dang it, Dropbox!

So I think that something messed up with my dropbox syncing a gain, as I lost my progress from last day. Thankfully it was really easy to correct. I was able to just go into my search history in chrome and find all of the code that I used to help my game. From there, it was pretty easy to remember the changes I had made in the previous day, and I was able to get everything back in about 20 minutes tops. I started work on making a house today, because I had no idea what the heck I was to do for today. I actually made some decent artwork, which will soon be passed off to Jake, who will make the thing look amazing, and fit it into the scenery well. Tomorrow I will be consulting the others to see what should be tackled next. I think it would be good to start on making some persistence between each of the rooms. This game making thing is going quite well right now. (I also made an extra save to the desktop for today, just in case dropbox wrecks my progress again.)

Wednesday, 28 October 2015

Day 31: Time is Money

I got the zombies to avoid each other.
Finally.
It took alot of searching, but I found this code to put into the zombie's collison event with itself:

if x>other.x
x+=1;
else if x<other.x
x-=1;

if y>other.y
y+=1;
else if y<other.y
y-=1;

That makes the zombies stay apart, and not bunch up into one mega zombie, which has been a problem for a long time now.

I also got some code to make a 24 hour clock, which is working very nicely. I had to modify it a slight bit to get it the way  I want it to look, but that was easy enough. Now all I need to do is sync the night cycle with the clock, and all will be good.

Tomorrow I will be working on a house sprite if I can't find anything to do. Right now I can't think of much else to work on, but we'll see what the day brings.

Day 30: Health and Text

I got the health bar totally completed now, with the health "round[ing](obj_Player.health)." So now the health counter shows with perfect integers. I also discovered a small problem with there being two instances of the ammo text variable, and one somehow got messed up. There was one normal instance, and another that was slightly smaller, being overlapped above the larger one. Thankfully it was an easy fix; I had accidentally put the same ammo text code in two different places at once, so all I had to do was delete the smaller one. Now I can finally work on some more important stuff as well, as I can unstick the zombies from each other. That will be my project for tomorrow. Then it should hopefully move smoothly.

Monday, 26 October 2015

Day 29: NOW it's done.

Last day I finished the health bar sprite and laying it over top of the health bar the we had before, however I somehow managed to lose the files, maybe I messed up with dropbox or something. Anyways, I got it done again, making the sprites look even better, with a shading over top of the now red bar. I also added a numerical counter to the bottom of the health bar too, the only problem I am having is that it is writing the value of the health to 2 decimal places. I would rather have it round to the nearest whole number, but it isn't that hard to fix. Something for tomorrow that I can do. I got the dropbox thing down today, so everything should be fine. Just have to be a bit more careful.

Thursday, 22 October 2015

Day 28: Health Fix

I managed to get the health bar working, with the new sprite added in. I had to modify it a little bit because I was having a few troubles with the dimensions of the sprite, and the health bar being misaligned. I think it looks better now anyways with the change. I just need to add a little bit to the health bar sprite, for it all to connect properly. I am thinking of adding a numerical health counter too, but I haven't fully decided yet. Maybe that will be something for the future. I don't know exactly what I want to work on next, but there is alot to do. Maybe I can work on artwork and getting the main screen finished. However, tomorrow I will probably be working on the health bar, and finishing up stuff with a few extra details.

Wednesday, 21 October 2015

Day 27: Various Things

Today I worked on a few different things; I tried continuing on my running animation, which I learned is a pain to do, because it is hard to make it look decent. I started on the title screen as well, but I don't know how I want it to look. I tried changing the gun sprites to look similarly to the guns that the player holds, but I can't get them exactly right. Tomorrow I think I will work on getting the health bar back and running better than before, which shouldn't be too hard. All I need to do is make a part of the health bar transparent, lay it over the health bar, and put a black background behind that to make it look solid. Should be pretty easy.


Day 26: Run

I tried to make all of the variables global.

It was a bad idea.


I decided to load an earlier version of the game and import the health bar files into the game, but I lost them too... Oh well, I have an easy way I can fix it, and I have 1 backup sprite anyways. I tried helping Justin combine my game into his, but that is turning out to be *a world of fun.* I am trying to make a new running animation for the player, but it kinda sucks right now, so I'm going to redo it again. I guess I will just be working on some more art stuff tomorrow. No more messing with technical stuff for a while.

Tuesday, 20 October 2015

Day 25: Persistence

I have unofficially finished the health bar! It works properly, and follows the proper spot in the game's view, so it is visible at all times. I set the depth to be above everything else, and noticed that at night time, it does look a little bit plain, however it will be pretty easy to edit in the future if I want to do that. (All I have to do is make on sprite change, then copy and paste it 100 times over the existing sprites. Shouldn't take long at all.)

I have begun working on a very important feature, which is causing alot of problems already, and I just started. I need to make it so that the player still has the same amount of health and has all of their weapons and ammo while transitioning from room to room. I learned 2 ways of fixing this, one being that I just have to check the "persistent" box on each of the objects. That doesn't entirely work, so I'm attempting to make all of the variables into global variables. That will be my project for tomorrow. Hopefully it will all go smoothly.

Monday, 19 October 2015

Day 24: Health Progress

 I finished the health bar! I was able to make the last of the health sprites, and finally have coded it in, using alot less code than I thought I would be using. I expected to have to write out a statement for each value of health, making for over 300 lines of gml, although about half way through diong that, I was able to make a much simpler way of doing it (that actually works better too).

image_index=health+1;

Pretty simple stuff. So I lost about ten minutes on that, but it is no big deal. The main thing is that  I was able to make it work, and that is what matters. Now I think I am going to be working on a bit of persistence, in the idea of the player having the same amount of health no matter where they are.

Thursday, 15 October 2015

Day 23: Unfinished Business

     Today  I started by working on the custom health bar. Yesterday, I had set a goal of making up to the 50th image for the bar, but I only made it to 45. The reason being for that, is that I was trying to help Justin with creating the shadows that work behind the player. I could have made more progress had I not been doing so.

     The problem that I was having while making the shadows with Justin was that one of the sprites was not changing to the correct image at the right time. When the player is standing still with the gun, the shadow behind them looks as though they are in a still running position, and the shadow for the player's arm was way off of the position it was meant to be in. I tried a few different ideas of correcting the image for the player, but in the end I decided to trash it and just revert back to what Justin had made in the first place. ( And even then he chose to just get rid of the shadows entirely. They looked a little bit odd anyways. )

      I tried adding a few variables to help tell if the player was moving or not, whether they were      holding a weapon or not, as well as which direction they are facing in order to help determine the sprite to draw. 

for reference, 1 means true, and 0 means false.

obj_player, in event draw

if holding=1 && Left=0 && Right=1 && Holding=1 && Moving=0{
draw_sprite(spr_PlayerGunRight,1,black,0.5,1,1,1,1)
}

Something along those lines really, I don't know the exact arrangement of the numbers in the draw_sprite event. 

     As for the health bar, I should be able to hit 100 by tomorrow if I make a good enough amount of progress tonight, however with the Grad Cruise in place, I will not have as much time to work on it. I think that if I can get to approximately 60 health tonight, I will have enough time in class tomorrow to be able to finish the bar entirely. Then from there I will be able to put the health bar in it's proper position and size on screen, following the view of the current room. We'll just see what tonight brings in terms of progress.

     For the future, I am considering making a custom ammo counter as well, which shouldn't be too difficult, just alike the health bar, alot of work. I will have to cap the amount of ammo a player can carry at one time, so that I am able to make a limited number of sprites. (That or I could make a few sprites and use the draw_sprite feature with a few custom numbers to show the ammo in a similar fashion.)

     Tomorrow I plan on finishing the health bar (if I have completed enough work by tonight), and if so then I hope to code in all of (or at least some of) the changes to the health bar based on the health value of the player. What did I learn today?

...this is some tedious work.

Day 22: "Health-y" Amounts of Progress

     Today I decided to continue working on the custom health bar that I started a while ago. I finished the main looks of the bar ( which can easily be changed if needed ) and I also started to make the 101 sprites that I need to show each possible value of health that the player can have, ranging from 0 to 100. I also came up with some possible code that could be used to cause a critical hit. Here's an idea of how that works:

In obj_Player

event collision with obj_Zombie

var crit = random_range(1,50);

if crit>=45 && hit=0{
health-=random_range(15,20)
alarm[1]=10;
}
else if hit=0{
health-=random_range(5,10)
alarm[1]=10;
}

      Basically this gives the zombie a 10% chance to get a critical hit on the player, dealing high amounts of damage. This percentage can be tweaked later on if it feels like they occur too often. Now I haven't exactly tested this critical hit code yet, but the game doesn't crash when trying to use it, so that's a good sign. Noticing a critical hit by the amount of damage it takes off should be pretty simple, but it would be alot easier to do something like drawing text on screen whenever it happens just for reassurance that it is working.

     Today I also helped Simran to get a new version of the game to work with, which proved somehow to be a bit of a hassle. I managed to get a copy of the game working on his computer, but I had to take some huge actions in doing so. Quite recklessly, I decided to save a single copy of the game I was currently working on to my desktop, and deleting the rest of the items in my dropbox folder, while also clearing out his folder. I then copied the save file from the desktop to both my folder, and his own, so that we both had the absolute latest version. I noticed much later at home that my game was having some problems, in the idea that it was crashing whenever I tried to run the game. I noticed that somehow, I had lost all of the fonts that we had created, which wasn't really a huge loss, just about a five minute fix. However, I soon after noticed that all of the backgrounds and tiles were missing from the game as well. I don't know if this was caused by a syncing issue with dropbox, or if I missed the files when copying and pasting between folders. Either way,  I can just retrieve a copy of all of the backgrounds from Justin or someone else and import the files into my own copy.

     I learned two important lessons in all of my work today. In creating the health bar, I learned it can be very tedious to make custom health bars, if you are going about the way of just making a hundred different sprites to represent each different health value. I am  even able to think of simpler ways to make this alot easier now, but I am a bit too far into this to want to quit now. What was suggested to me was to make the text a separate thing, using it's own font and object and whatnot, the problem being that the health bar itself would not be updating the visual representation of the health itself. Since I am just making the empty parts of the bar pure black, what could be done is just drawing individual sprites over top of the health bar that make it appear as though it is going down, when really something is just being put over top of it. I may try adding this into the game if I have the time to do so. It will take less work for making sprites, but it will also save a fair bit of coding that I will have to add in as well... both sides have their flaws.

     I also learned that I should probably be more careful with my files. I may have only lost the backgrounds and fonts this time, which was not a huge loss, but I could have lost alot more in the transportation of the files throughout multiple folders without keeping a backup. Something to keep in mind for next time I guess. Tomorrow I will be continuing my work on the custom health bar, and hopefully making a fair bit of progress there. I hope to get to at least 50 health tomorrow, but I don't know how long it is going to take to finish that.






Tuesday, 13 October 2015

Day 21: Flooring and Health

Today I wanted to work on the health bar and try to get it semi-functional in the game. However, it was requested by the others that I redo the floor tiles inside the house, so that is what  I am working on. I learned a few techniques along the way as to how to design the flooring, as taught to me by Jake. I need to make the texture more smooth and resize the boards a bit, but other than that it should be fine. Tonight I am hoping to get some work done on the health bar, saving the work on the floor tiles for tomorrow. I would like to get the opinions of others as I work on the tiles, because these stand out quite a bit in the game right now. Would be nice to get them perfect.

Friday, 9 October 2015

Day 20: Lateness...

This post is a little late. Sorry 'bout that one.

       Anyways, the other day I was able to make a better system for spawning the zombies in our game.  I was able to make an object that once you get close enough to it, it will spawn a single zombie, then destroy itself. I could also rework it so that every time that you leave the range of spawning, it recreates itself and allows for another zombie to be spawned. I also reworked a bit of the bullet damage variables so that it is a bit more realistic; the shotgun isn't just mowing down hordes in seconds. I finally took the time out of my day to take a screenshot, so here's what we've been up to.



This is mostly what we have so far. There are alot more props in the game, but this is just to give an idea of what the game looks like for now. There is still alot to do as well, and all things I could work on tomorrow, time permitting. I need to bring the health bar up from behind the darkness, and I also need to fix the drawing of the ammo variables so that they are above all of the props, and the darkness too.

Wednesday, 7 October 2015

Day 19: Shotgun

Today as sort of mentioned in the title, I made the shotgun have a spread effect with the bullets that it shoots. All I did was make it create more instances of the bullets, and add a random_range in which the bullets will spread. Basically it creates 5 instances of obj_Bullet, where direction=somefiringvariable, and that variable is point_direction(x,y,mouse_x,mouse_y)+random_range(-15,15). (Or something along those lines) I worked on getting some collision code working as well thanks to Stephen. Not too much new information is really available other than that. Everyone is working together to make sure that the game looks good. Tomorrow I may play with the shotgun a bit, just to make sure it works right. I may also work out the spawning of zombies, which could be really cool if it works.

Tuesday, 6 October 2015

Day 18: Run in Guns Blazing

I finally got the guns to work, so now the all have separate ammo counters that don't overlap. They also all work with the magazine idea, where they shoot a certain amount before having to reload. I limited the fire rate of all of the guns as well to be more realistic. The next thing  I want to do is make the shotgun have a spread out shot, which shouldn't be too hard to create. I think that will be my project for tomorrow. It should be easy enough to make. I added and changed a few things in game based on requests of the others, but other than that, I didn't work on too much else. Everyone is still working on the same stuff as before for the most part, so there isn't too much to add.

Friday, 2 October 2015

Day 17: Hold Your Fire!

As mentioned in the Day 16 post, I have fixed the guns in the game, so now the arms work, and the game doesn't crash when I try to pick things up. Now, I am trying to make the guns shoot properly, so that that they can actually be used as firearms. They work somewhat, but after the clip is emptied, it won't reload. It's probably just an alarm error that I missed when copying and pasting my revolver code. Jake and Simran are still doing some artwork, and Justin has finished the text boxes. Tomorrow I will get some more work done on the guns, hopefully fixing the clips, and drawing of the text.

Day 16: Fire Away

Today was a challenge, but I managed to get some stuff working pretty well. I duplicated the revolver and made an AK47, shotgun and sniper rifle for the player to use. The art work for the player holding the weapons was very well done by Jake, and the icons were made by Simran. I got the AK and Shotgun to work for the most part, now I just need to fix the sniper rifle. The main thing is that the game doesn't crash when I try to pick up the weapons and ammo, so at least that's a bonus. Justin is working on some text boxes now, so the story can be added into the game pretty soon. Tomorrow I will work on making the guns work separately, having their own ammo and such.

Thursday, 1 October 2015

Day 15:More Firepower

Today I started working on getting the other weapons into the game, and just changing a few small details here and there. I have got everything in the game and working properly for now, I just need some sprites of the player holding all of the guns to be able to finish it, so I am waiting on those. For now I may just work on a house or something while I wait. Simran is also working on making a house at the moment so we can have multiple variations. Justin is doing some visual work as is Jake, and Stephen is doing a bit more technical stuff now. Progress is being made. Tomorrow I will be working on finishing the other guns, for I will hopefully have all of the sprites by then. That way  I will be able to tell if they are working or not.