Author Archives: Bengt Hagnelius

About Bengt Hagnelius

2015 Programming

[5SD037] “It’s all JavaScript to me” or “How to find grid positions within a cone”

After a few pretty hectic weeks we have finally reached a relatively quiet period in our project so I have some time to write some blog posts. This means that some posts will be written quite some time after the implementation of the feature they will be about. I already have some posts backed up so they will come out in a rather quick succession next week.
Since this is the first blog-post for the project I will begin by giving […]

/ Comments Off on [5SD037] “It’s all JavaScript to me” or “How to find grid positions within a cone”
Program: Programming

[5SD037] “It’s all JavaScript to me” or “How to find grid positions within a cone”

After a few pretty hectic weeks we have finally reached a relatively quiet period in our project so I have some time to write some blog posts. This means that some posts will be written quite some time after the implementation of the feature they will be about. I already have some posts backed up so they will come out in a rather quick succession next week.
Since this is the first blog-post for the project I will begin by giving […]

/ Comments Off on [5SD037] “It’s all JavaScript to me” or “How to find grid positions within a cone”
Program: Programming

[5SD033]”That’s a wrap” or “I should really learn how to explain things better”

So this is my final blogpost of this project. I want to say sorry for the extremely long post. Basically everything is done now and nothing really big was done this week. It was mostly reiterating or changing around in some menues. Re-positioning buttons, changing textures and that kind of thing.
Early Potatodrop menu
I guess the biggest thing I did was the new Potatodrop menu, the menu that pops up when the player flies close to a distillery to allow the […]

/ Comments Off on [5SD033]”That’s a wrap” or “I should really learn how to explain things better”
Program: Programming

[5SD033]”That’s a wrap” or “I should really learn how to explain things better”

So this is my final blogpost of this project. I want to say sorry for the extremely long post. Basically everything is done now and nothing really big was done this week. It was mostly reiterating or changing around in some menues. Re-positioning buttons, changing textures and that kind of thing.
Early Potatodrop menu
I guess the biggest thing I did was the new Potatodrop menu, the menu that pops up when the player flies close to a distillery to allow the […]

/ Comments Off on [5SD033]”That’s a wrap” or “I should really learn how to explain things better”
Program: Programming

[5SD033] “Score!” or “How to read from and write to a .txt”

So as we finished our last week on a high note, with Markus seemingly enjoying our game during the beta presentations, we started drawing up the last tasks that had to be done.
I took it upon myself to make a highscore-list that will display the players and previous players scores. Since we would like the game to keep scores even when the game is closed and later restarted the scores had to be written to a .txt(text) file. I thought it […]

/ Comments Off on [5SD033] “Score!” or “How to read from and write to a .txt”
Program: Programming

[5SD033] “Score!” or “How to read from and write to a .txt”

So as we finished our last week on a high note, with Markus seemingly enjoying our game during the beta presentations, we started drawing up the last tasks that had to be done.
I took it upon myself to make a highscore-list that will display the players and previous players scores. Since we would like the game to keep scores even when the game is closed and later restarted the scores had to be written to a .txt(text) file. I thought it […]

/ Comments Off on [5SD033] “Score!” or “How to read from and write to a .txt”
Program: Programming

[5SD023]Project report och review of a player class

This week we were tasked to write a report on our project and an review on anothers group player class. The latter having focus on coupling and decoupling, which I am still not sure if I have fully grasped, resulting in a rather short review.  The rest of the post will be in swedish.
 
Projektstatus
När projektet började var vi mer engagerade i att skapa en motor istället för att börja prototypa de olika delarna av spelet såsom stealth, flygande och fiender. Hade […]

/ Comments Off on [5SD023]Project report och review of a player class
Program: Programming

[5SD023]Project report och review of a player class

This week we were tasked to write a report on our project and an review on anothers group player class. The latter having focus on coupling and decoupling, which I am still not sure if I have fully grasped, resulting in a rather short review.  The rest of the post will be in swedish.
 
Projektstatus
När projektet började var vi mer engagerade i att skapa en motor istället för att börja prototypa de olika delarna av spelet såsom stealth, flygande och fiender. Hade […]

/ Comments Off on [5SD023]Project report och review of a player class
Program: Programming

[5SD033] Clouds, bugs and yet more clouds

This week I spent most of the time fixng bugs or patching things in response to the feedback from the playtest this past monday. So now the potato dropping menu appears right as you fly over the destillery and you are also able to control the menu with keyboard instead of the mouse. I had to remove mouse input in the menu because it made it possible for two buttons to display that they were pushed down at the same time […]

/ Comments Off on [5SD033] Clouds, bugs and yet more clouds
Program: Programming

[5SD033] Clouds, bugs and yet more clouds

This week I spent most of the time fixng bugs or patching things in response to the feedback from the playtest this past monday. So now the potato dropping menu appears right as you fly over the destillery and you are also able to control the menu with keyboard instead of the mouse. I had to remove mouse input in the menu because it made it possible for two buttons to display that they were pushed down at the same time […]

/ Comments Off on [5SD033] Clouds, bugs and yet more clouds
Program: Programming

[5SD033]Potato Pirates, Week Three – Potato GUI

This week I have been working on one of the integral parts of our game, namely dropping potatoes for the distilleries to make into booze. When the player is within a certain area of the distillery the player can press “Enter” to open up the potato drop menu. Here the player can press different buttons to increase or decrease the amount of potatoes to be dropped. Dropping a larger amount of potatoes will result in a larger amount of points but […]

/ Comments Off on [5SD033]Potato Pirates, Week Three – Potato GUI
Program: Programming

[5SD033]Potato Pirates, Week Three – Potato GUI

This week I have been working on one of the integral parts of our game, namely dropping potatoes for the distilleries to make into booze. When the player is within a certain area of the distillery the player can press “Enter” to open up the potato drop menu. Here the player can press different buttons to increase or decrease the amount of potatoes to be dropped. Dropping a larger amount of potatoes will result in a larger amount of points but […]

/ Comments Off on [5SD033]Potato Pirates, Week Three – Potato GUI
Program: Programming

[5SD033]Potato Pirates, Week Two – How to code an AI

So this past week I spent most of the time having a cold while also trying to wrap my head around a trigonometric problem of mine. As the AI  needed to turn to fly towards the player, I took it upon myself to write the code that would let it do just that. I let the player plane be my guinea pig while trying this.
The function used to find the angle between the player and mouse pointer
I had gotten it […]

/ Comments Off on [5SD033]Potato Pirates, Week Two – How to code an AI
Program: Programming

[5SD033]Potato Pirates, Week Two – How to code an AI

So this past week I spent most of the time having a cold while also trying to wrap my head around a trigonometric problem of mine. As the AI  needed to turn to fly towards the player, I took it upon myself to write the code that would let it do just that. I let the player plane be my guinea pig while trying this.
The function used to find the angle between the player and mouse pointer
I had gotten it […]

/ Comments Off on [5SD033]Potato Pirates, Week Two – How to code an AI
Program: Programming

[5SD033]Potato Pirates, Week One – The beginnings of an AI

The first few days of this week was spent planning how our AI should behave. We started by outlining the different states of the enemy:

Patrol State – The default state of the enemy plane. When in this state the enemy will patrol a certain area. It will do this by randomizing a waypoint within its area which it will then travel towards, when the waypoint is reached it will randomize a new waypoint and so on.
Chase State – When the enemy has found […]

/ Comments Off on [5SD033]Potato Pirates, Week One – The beginnings of an AI
Program: Programming

[5SD033]Potato Pirates, Week One – The beginnings of an AI

The first few days of this week was spent planning how our AI should behave. We started by outlining the different states of the enemy:

Patrol State – The default state of the enemy plane. When in this state the enemy will patrol a certain area. It will do this by randomizing a waypoint within its area which it will then travel towards, when the waypoint is reached it will randomize a new waypoint and so on.
Chase State – When the enemy has found […]

/ Comments Off on [5SD033]Potato Pirates, Week One – The beginnings of an AI
Program: Programming