Tuesday, 21 June 2016

Class 79 - The End

Post 160

The End

So once again I have reached the final post of the semester. This time I won't be coming back though. I have now successfully graduated and do not plan on going back to high school.
Throughout both of my courses of Info Tech, I learned a lot. I learned basic coding and how to make animated sprites by putting together sections of images and many other things. This class has been by far one of the best ever. I would highly recommend people who enjoy working with computers to take this class.
This class not only is enjoyable it also allows you to do what you want to do, within reason of course.
The biggest challenge of course is the blogging everyday, now this can be hard, but once you get in the flow its pretty easy.
Obviously I have not completed every post unlike last semester, which is something i'm ashamed to say. The reason this happened is because I fell of the wagon and couldn't get back on for a few days. This is something you really need to be cautious of, because it is incredibly easy to find yourself saying you will do it tomorrow... and tomorrow... and tomorrow... and so on.
And as hard as this class can be, I guarantee that if you find something you actually like to do, you will not regret taking this class.
And remember you can pretty much do anything you want in this class as long as your learning and blogging, this is why its Independent.

Basically over the year I have learned that making games can be anywhere from hilarious to dreadful.
And that its 100% better with friends.
Thank you for giving us one of the best classes ever Mr Bilesky!

Here are some  GIF's and pictures from my posts throughout the year of being an Independent InfoTech Student!









Friday, 10 June 2016

Class 74 - Still Grass Stuff

Post 155

Still Grass Stuff

Today I want to fix up the dynamic grass, except this time I want to try a new method. My plan is to have it set the image_angle based on which side of the grass you are standing on. This might look choppy though and could be worse than having it not move at all.

So I duplicated the object so I could start over without deleting my old progress in case I didn't like the direction of this new tall grass. My thought process behind this code was it determines the side of the bush your standing on and makes it lean the other way. this gives its a parting effect when the player walks between bushes.


Once again its hard to notice, but it just gives the game an extra bit of immersion that is needed.
Next class I might look into creating a new player character, possibly one that has a higher resolution pushing my game out of the pixel style. I am still undecided on this so I will talk more about my choices next class.

Class 73 - Tall Grass

(Post meant for June, 9th, 2016)

Post 154

Tall Grass

So this class I decided to try and work on dynamic grass. Because recently my sister started to play a game called Stardew valley about farming. But the game is done entirely in pixel art. I looked at the game because she said it was good and happened to notice something very interesting about the tall grass in the game. When the player walks through the grass it shakes and moves out of the way, but this is a cool because the grass is still a 2D sprite. But having this shutter well you walk through just makes the game feel more immersive. So this is the effect I wanted to re-create today.
I started by taking my existing bush sprite and making it a little bit more green. I then made it into a new object called "TallGrass" and began some simple code. The code isn't the best and doesn't really achieve the goal I want, but it will work for now.
Currently the system looks like this. It is very hard to notice and has some issues with returning to its original state, so I will try to polish it up next class.

Wednesday, 8 June 2016

Class 72 - Even More Dodge Stuff

Post 153

Even More Dodge Stuff

So today I will work on fixing the dodge roll again. So I went back through the code and noticed I made the rookie mistake of writing in one of my variables completely wrong. I had put "Dodgingtimer" instead of "Dodgetimer". This caused some major problems and blew the game up. So I switched it around and corrected my mistakes to find out that the game now does this.


So not only was my variable wrong, the entire bit of code is wrong too. So now I have to go and figure out how to make this work.
So after some serious changes I can finally now say the dodge is working. The first thing I had to fix was the way "dodgeready" was changed to false. Originally I had it change to false whenever the timer wasn't at its 0 value. However this didn't actually work properly. So instead of having it control both aspects of the timer I now only have it control one. So "dodgeready" is set to false when the player hits spacebar instead. I also relocated the code from the previous post into the actual dodge script, which overall just makes more sense.


Here is the working script. Please ignore the labels by those numbers. The top number is "dodgetimer", and the second number is "dodgeready"
1 = True
0 = False

Tuesday, 7 June 2016

Class 71 - More Crashing

Post 152

More Crashing

So today I wanted to work on the dodge roll cool-down. This started off with a pretty simple idea.


This code basically has a number set to 0, when a value is added to this number a statement becomes false. But the value is constantly being reduced back to 0 over time. Another feature is the number never goes past 0 and doesn't keep removing numbers. The reason I go into the trouble of this is so the game doesn't constantly have to count numbers in the background.
However the code above absolutely failed and had no effect what so ever. So now I have to come up with a way to make it work.


This is my planned solution, adding a new variable "dodgeready". This will allow me to tell the game when its a good time to dodge and a bad time to dodge. Basically it gives me a gateway into other code, so this code can effect things that aren't in the same page, and sometimes not even necessarily in the same object.


so after even more mucking around I manged to screw it up even more.

Now the game just crashes at the "END" of the dodge roll, so it has something to do with the end of the timer, so when the number is reduced to 0 or maybe something else.
Tomorrow I will attempt to fix this problem and have this working.

Monday, 6 June 2016

Class 70 - More Dodge Stuff

Post 151

More Dodge Stuff

The last two posts are currently empty, this is because of Grad events such as, Dry Grad, Prom, and my actual graduation. So sorry for not having them filled out, I hope to post something there eventually in the future, whether i'm still in the class or not.

So today I will attempt to fix last weeks problems with the dodge roll, the main problem being the blood effect when you are hit, even though the damage isn't being applied.


So my first course of action was to add "(dodging = false)" to the end of everything, but that made the game implode. And as far as I can tell its due to the fact I didn't specify where there variable is coming from. When this happens the game has a melt down and just dies.

Sure enough that was the problem, the code now works perfectly. Just ignore the blood in the beginning of the GIF, I got hit because I couldn't tab into the game fast enough.
Next Class I will work on having a cool down, and possibly making the dodge roll in other directions so its more useful.

Tuesday, 31 May 2016

Class 66 - Oh Hey It Works... Never Mind.

Post 148

Oh Hey It Works... Never mind. 

So today I wanted to make the dodge roll effect the damage the player takes. The red text below shows what I had to make this possible. Clearly this wasn't that hard, thanks to my amazing organization of code. Another thing to note about this is its another simple use for my "dodging" variable.

if dodging = false
{

if (obj_player.blocking = false) and !(obj_player.armour > 0)
{
audio_play_sound(sou_player_attack_hit,1,false)
instance_create(x,y,obj_blood_1)
instance_destroy();
}

if (obj_player.blocking = false) and (obj_player.armour > 0)
{
audio_play_sound(sou_metal_clash,1,false)
    audio_sound_pitch(sou_metal_clash,random_range(0.8,1))
instance_create(x,y,obj_blood_1)
instance_destroy();
}

if (obj_player.blocking = true)
{
audio_play_sound(sou_player_shield_thud,1,false)
instance_destroy();
}

}

So the result of this code was little bit unexpected. Currently if you are dodging and are hit by an enemy the game will crash. This is probably just and easy fix and instead of having "if dodging = false" inside the hitbox object, I need it inside the player object. It completely slipped my mind that the process of being hit is actually inside the player object, and that this object only tells the player when to be hit so to speak. So the damage doesn't actually occur in the code above. Which I would have noticed if I read it first.


So now I have completely relocated the code into the correct section. As you can see below there is still blood being created, that is because the code that controls that is in the original place I put the code. So I will fix that. But the health is no longer effected when the player is rolling, sadly I didn't make my GIF big enough to show that, so your just going to have to trust me on this one.


Below is the changed code, green text is footnotes within the code, red is the new code, and black is everything else.

///Damage Changes (Armour,Blocking)

// NO ARMOUR, NOT BLOCKING
if dodging = false
{

if (blocking = false) and (dodge = false) and (armour = 0)
{
player1health -= random_range(10,20)
alarm[1] = 3;
image_blend = c_red;
obj_room_view.ashake = 20;
random_bleed = (random_range(5,30))
bleeding = true;
}

//HAS ARMOUR
if (blocking = false) and (dodge = false) and (armour > 0)
{

armour -= random_range(10,30)
player1health -= random_range(1,5)
alarm[1] = 3;
image_blend = c_red;
obj_room_view.ashake = 5;
}

//IS BLOCKING HAS NO ARMOUR
if (blocking = true) and (dodge = false) and (armour = 0)
player1health -= random_range(1,5)
{
if (blocking = true) and (dodge = false)
{image_blend = c_red}
alarm[1] = 3;
obj_room_view.ashake = 5;
}
//IS BLOCKING HAS ARMOUR
if (blocking = true) and (dodge = false) and (armour >0)
player1health -= random_range(1,1)
{
if (blocking = true) and (dodge = false)
{image_blend = c_red}
alarm[1] = 3;
obj_room_view.ashake = 5;
}

}

Tomorrow I will fix the blood appearing when the player isn't actually taking damage, and I will also attempt to make a cool-down for the dodge roll. 

Monday, 30 May 2016

Class 65 - Hard Choices

Post 147

Hard Choices 

So today's class I decided to plan out what I want to do with the dodge roll. I also tweaked some numbers with the roll making its a little faster, this helps it feel better and makes it more useful. So after some thinking I think I want to take my dodge roll in the direction of making you immune to damage when rolling. The problem with making the roll do this lies within the balancing of the game. Obviously I don't want it to be possible to roll back and forth forever never taking damage. So to combat this issue I will need to have a cool-down on the roll so the player can't spam roll all over the place invulnerable to damage. Another feature that might be interesting along with the cool-down, is when the player is recently hit (without blocking) the cool-down of the roll increases, this would reward good players who utilize the dodge and roll mechanic properly. And make the game harder and more punishing for novice players.
Along with this I would like to mention my thoughts on the art direction of my game.
Currently my game is a cross between 2D and Isometric as shown below.

Sadly I have grown to dislike this style, as it can be very limiting.
Originally my game was meant to be played without up down movement. This means the player would only move left to right. This would significantly change things if I moved back to that style. So now I am left with the choice of going back to a 2D side scroller. Or going full blown Isometric.

These are some choices I will be making in the near future, as for next class you can expect me to work on the dodge roll making the player immune to damage.

Saturday, 28 May 2016

Class 64 - Dodge Effects

Post 146

Dodge Effects

So today I fixed a lot of the problems with the dodge roll. The most important fix is stopping the character from rolling out of control without being able to stop. So to do this I set up an alarm that turns off the variable "dodging" after a certain amount of time. I don't intend to keep this alarm in the game forever, this is because you have a limited amount of alarms per object. So later I will need to replace it so it doesn't use up one of my alarms.

As you can see in the screenshot above I added in the "alarm[4]=20".

Another thing I added to the dodge roll was a effect to make it more obvious that your character is moving fast and is immune to damage. To do this I made another object that doesn't have a sprite. Then in the create code I have it set its "Sprite_index" and "image_index" to the players current sprite and image index. The next thing I did was make this object spawn every second the player is dodging. The last step was making the object slowly fade away and destroy itself.
The end result is below.
Next class I will work on improving the dodge mechanic and deciding whether or not it will make you immune to damage or reduce it.

Thursday, 26 May 2016

Class 63 - More Dodging

Post 145

More Dodging 

This class I am going to try and create a dodge roll for the player. My first step was adding the new control button inside my player controls. The reason I have this is in case I feel the need to change the controls for my game. This allows me to go through at any point in time and change it to what I want.


My next step is actually creating the script page for the dodge.


My next step was throwing in some directional detection. Basically what that means is I used a old variable that I haven't needed for a long time. This Variable is called "Idle" it determines what direction my character is facing. I use it to change the sprite to the correct direction when the player is moving in said direction. Obviously this makes the game feel way better.
After doing some testing I realized this wont be good enough because the movement code is constantly messing with the sprite index of the player, this makes it impossible to change the sprite index. After a little bit of tweaking I added in a new variable called "dodging". What this new variable will do is make it when the player is dodging the movement code is irrelevant. This helps on a lot of levels because now the player cant change the direction of their dodge half way into their dodge. It also gives me a variable that I can use to alter the damage effects on a dodging player.
There are still some major issues with this mechanic currently. The biggest issue being once the "dodging" variable is set to true there is no way to have it reset. So basically in the current state once you dodge you get stuck in a endless loop of rolling away. But there is a good side to all this. It looks cool.

Also after seeing what the dodge looks like on a moving character I think it should probably move a little bit faster.
Tomorrow I will further the code and possibly make the dodge animation faster to match the speed.


Wednesday, 25 May 2016

Class 62 - Dodge Roll

Post 144

Dodge Roll

Today I want to animate a new move for the player, this is something I have talked about in the past. And it is most certainly something I wanted to add to the game for awhile now. Currently the only way to counter an enemy attack is to block or slide up and down and hope the AI misses (Which it does a lot). So I want to add a new and improved way to dodge. The roll.
So to start off with any of my new animations I usually find my original idle sprite for reference. I do this because its very easy to become lost in what i'm doing and completely mess the animation up.

So the plan was to have the character leap forward a little bit and execute a fancy dodge roll. Obviously this can be challenging because my character is so small and showing rotational movement is difficult. However after some hard work I think I managed to make the dodge roll look pretty decent for a first pass.

Here is the slowed down version to show off each image a little better.

Here is what the dodge should look like in game. Next class I will begin actually implementing the mechanics behind the dodge roll.



Tuesday, 24 May 2016

Class 61 - Refinement

Post 143

Refinement 

So looking back I decided that I don't actually like the animation for picking up the health potion. I'm not exactly sure what I don't like about it. But it just doesn't feel right to me. So my plan today is to change it up a little bit.


So I decided to take out the little red pixel in the pickup animation. This means I can use the animation for other pickups in the future as well. The direction I decided to go with this new animation was a little more arcade like then the rest of my game, but I think it visualizes what your doing effectively. It also is a few frames longer then the original so it feels more impact-full. Changing the length of the animation required some minor code changes, like changing a few numbers to match the new frame count. In the end the result is much better then the original.


Friday, 20 May 2016

Class 60 - It Works

Post 142 

It Works

Today I wanted to fix the code from my last post, the code isn't necessarily broken, its just located in the wrong spot. So my plan today is to relocate the code from the health potion into the player object.


So all the code in the picture above that starts with a "//" has been moved into the player object. This should actually allow the code to work properly. Now when the player picks up the last health potion located in the room they wont get stuck in a never ending loop of picking up the potion.


Next class I will continue to improve my games mechanics.

Thursday, 19 May 2016

Class 59 - Problem Solved-ish

Post 141

Problem Solved-ish

Today I am going to hopefully fix picking up health potions. The first problem I noticed that I missed yesterday was the fact that my code was located weird, and it caused some problems. So the code that told the game when to stop standing still was under the same "If" statement that told the game when the player was touching the health potion. However this doesn't work because once the player hits the activation button to pick up the potion, it disappears along with the code inside of it. So what happens is this code becomes completely irrelevant.
So what I did this time around was take that section of code and moved it to the outside of that "If" Statement. This should allow the game to actually read the code I have written.


So once again I have run into a problem, but this time I know exactly what is wrong with it.


Basically my code works right up until the very last health potion is picked up, once it is picked up this code to tell it to stop is not found, because the potion has been destroyed and therefor the code is not in the game. The way to fix this would surely just transporting all the potion code into the player so this "Logic" stays within the game right up until your death.
Next class I will work on transplanting the code into the player.

Wednesday, 18 May 2016

Class 58 - Still Broken

Post 140

Still Broken

This class I want to focus on fixing my broken script from last class.
So to start this off I went back to the code I had changed and looked at it in a new light. And to my surprise I forgot to add the "Obj_player" to the script. This means the code had no actual effect on the player character and was simply just doing nothing. So I changed some things around and made it look like this instead.

if keyboard_check(ord(obj_player.button_activate))
    {
            obj_player.sprite_index = spr_player_1_drinking
            obj_player.busy = true;
    
                if image_index = -0 and obj_player.sprite_index = spr_player_1_drinking
            {
                 obj_player.busy = false;
            }
    }
The red text is the code I am currently working on, and the red, bold, underlined text is what I added today to hopefully fix my problems.

Now the animation triggers, but the busy variable, which pauses the player and stops them from moving attacking and blocking doesn't reset to false. This shows me exactly what part of the code is not working correctly.
      if image_index = -0 and obj_player.sprite_index = spr_player_1_drinking
            {
                 obj_player.busy = false;
            }

The section highlighted above is not being properly detected. This results in the player becoming stuck in this animation without the ability to move.
After another 10 minutes of attempting new ways to change the code around, I still can't figure out why it wont work. So next class I will continue to work with it. And I might even call to the Howie for some minor assistance, or possibly the internet. 

Tuesday, 17 May 2016

Class 57 - Cant Pickup Potions?

Post 139

Cant Pickup Potions?

This class I will be attempting to create an animation for picking up health pots. My first biggest struggle was trying to find the code that allows the player to pickup health pots, and I probably spent around 30 minutes looking through every line of script inside the player object and inside the player script pages. Sadly after all this I remembered that I put the code within the actual health potion object.

if (place_meeting(x,y,obj_player)) and obj_player.healthpots < 3
{
    image_index = 1;
    if keyboard_check(ord(obj_player.button_activate))
    {
            sprite_index = spr_player_1_drinking
            busy = true;
    
                if image_index > -0
            {
                 busy = false;
            }
         
        audio_play_sound(sou_potion_pickup,1,false)
        obj_player.healthpots += 1;
        instance_destroy();
    }
}

The red text is the added code to the game. So at the time of writing this I am unsure if this will work properly. So I guess I will find out in a minute.


And as you can see, this did not work in the slightest way. Not even a strange glitched version of what I wanted. And thanks to never finding where the code actually was until this late, I don't have time to fix my mistakes, so I will just have to do that next class.

Monday, 16 May 2016

Class 56 - Blog Makeover

Post 138

Blog Makeover

Today during this class we had an assembly that took up around 70% of our class time. So I didn't have a lot of time to do anything with my game. So I decided to work on making this blog look a little better. The reason I wanted to do this is because I just always thought the random layout it gave me sucked. Which lets be real, it doesn't really fit with what i'm doing. If you are reading this the old layout has obviously been replaced. So here is a screenshot.



The first thing I want to do with my new blog page is change that hideous lined paper background into something more plain maybe. Or my games sky background.
So I decided to make the background of the blog the sky from my game, but sadly the image from my game is a little small. So I remade the background using the same simple technique.
Here is a small sample of what that looks like. And if you really want to see what it looks like. LOOK TO THE LEFT OR RIGHT. Seriously why am I even putting a screenshot here. Just look at the blog.



Tomorrow I will continue on the usual stuff, like code n' crap.
Uh Whatever, blogs over. Bye.

I said goodbye.

Seriously its over. 
If you have any complaints please email my customer service department. 
Howardit12@hotmail.com         (Totally legit)