Browsing 'Programming': Posts from Game Design and 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

HUD

I veckan hade jag som uppgift att göra en grundläggande ”heads up display” för vår alpha deadline. Jag insåg snabbt att man inte kan omvandla en integer till en string bara sådär. Det var lätt nog att bara skriva ut en string med sf::Text klassen, men problemet kom när jag skulle skriva ut poängen och livsmätaren som inte bara var integer variabler men som också skulle uppdateras varje frame.
Så det första problemet var att göra om integer variablerna till string […]

/ Comments Off on HUD
Program: Programming

HUD

I veckan hade jag som uppgift att göra en grundläggande ”heads up display” för vår alpha deadline. Jag insåg snabbt att man inte kan omvandla en integer till en string bara sådär. Det var lätt nog att bara skriva ut en string med sf::Text klassen, men problemet kom när jag skulle skriva ut poängen och livsmätaren som inte bara var integer variabler men som också skulle uppdateras varje frame.
Så det första problemet var att göra om integer variablerna till string […]

/ Comments Off on HUD
Program: Programming

RandomGenerator

Hejsan! Mitt namn är Stam, jag ingår i grupp 1 som gör sin variation av konceptetet Planet Suburbia. En av de uppgifterna jag hade att jobba med första veckan var att programmera fiendernas skapelseplats. Fienderna är rymdskepp som rör sig uppifrån och ner, fienderna ska alltid börja längst upp på skärmen men de ska ha en slumpmässig skapelseplats vågrätt längst skärmen. För att lycka med det här så behövde jag skapa en slumpgenerator. Jag visste inte riktigt exakt hur jag […]

/ Comments Off on RandomGenerator
Program: Programming

RandomGenerator

Hejsan! Mitt namn är Stam, jag ingår i grupp 1 som gör sin variation av konceptetet Planet Suburbia. En av de uppgifterna jag hade att jobba med första veckan var att programmera fiendernas skapelseplats. Fienderna är rymdskepp som rör sig uppifrån och ner, fienderna ska alltid börja längst upp på skärmen men de ska ha en slumpmässig skapelseplats vågrätt längst skärmen. För att lycka med det här så behövde jag skapa en slumpgenerator. Jag visste inte riktigt exakt hur jag […]

/ Comments Off on RandomGenerator
Program: Programming

Player Bullets

This week I have made player bullets. Player bullets are the bullets that fire towards where the player is aiming with the mouse. First I decieded what I needed to make the bullets. I would need mouse input to see where the mouse is and to be able to fire by clicking the left mouse button. I would also need a function to tell where the bullets should shoot. And lastly I would need a texture to draw the bullets […]

/ Comments Off on Player Bullets
Program: Programming

Player Bullets

This week I have made player bullets. Player bullets are the bullets that fire towards where the player is aiming with the mouse. First I decieded what I needed to make the bullets. I would need mouse input to see where the mouse is and to be able to fire by clicking the left mouse button. I would also need a function to tell where the bullets should shoot. And lastly I would need a texture to draw the bullets […]

/ Comments Off on Player Bullets
Program: Programming

First GameDesign Blog Post

I have just finished doing a projectile to the player, in our case the giraffe. The projectile fires from the antlers of the giraff and works almost perfectly of what I estimated it would be, and look like.
After I was done with that I started doing a power-up which was kind of hard to do when it comes to my programming experience. I started by doing pick up files because we needed something to control everything that you can pick […]

/ Comments Off on First GameDesign Blog Post
Program: Programming

First GameDesign Blog Post

I have just finished doing a projectile to the player, in our case the giraffe. The projectile fires from the antlers of the giraff and works almost perfectly of what I estimated it would be, and look like.
After I was done with that I started doing a power-up which was kind of hard to do when it comes to my programming experience. I started by doing pick up files because we needed something to control everything that you can pick […]

/ Comments Off on First GameDesign Blog Post
Program: Programming

Moving in circles

If you want to move around a 2D planet while still being able to loop around, you have a few options. You could have the ground be flat like any other 2D game and loop one edge to the other, having your characters move just like any other 2D game. Or you could make the ground an actual circle and make your characters orbit around it using basic trigonometrics. We (or, well, I) decided to do the latter.

/ Comments Off on Moving in circles
Program: Programming

Moving in circles

If you want to move around a 2D planet while still being able to loop around, you have a few options. You could have the ground be flat like any other 2D game and loop one edge to the other, having your characters move just like any other 2D game. Or you could make the ground an actual circle and make your characters orbit around it using basic trigonometrics. We (or, well, I) decided to do the latter.

/ Comments Off on Moving in circles
Program: Programming

Moving in circles

If you want to move around a 2D planet while still being able to loop around, you have a few options. You could have the ground be flat like any other 2D game and loop one edge to the other, having your characters move just like any other 2D game. Or you could make the ground an actual circle and make your characters orbit around it using basic trigonometrics. We (or, well, I) decided to do the latter.

/ Comments Off on Moving in circles
Program: Programming

Moving in circles

If you want to move around a 2D planet while still being able to loop around, you have a few options. You could have the ground be flat like any other 2D game and loop one edge to the other, having your characters move just like any other 2D game. Or you could make the ground an actual circle and make your characters orbit around it using basic trigonometrics. We (or, well, I) decided to do the latter.

/ Comments Off on Moving in circles
Program: Programming

Moving in circles

If you want to move around a 2D planet while still being able to loop around, you have a few options. You could have the ground be flat like any other 2D game and loop one edge to the other, having your characters move just like any other 2D game. Or you could make the ground an actual circle and make your characters orbit around it using basic trigonometrics. We (or, well, I) decided to do the latter.

The reasoning behind […]

/ Comments Off on Moving in circles
Program: Programming

Moving in circles

If you want to move around a 2D planet while still being able to loop around, you have a few options. You could have the ground be flat like any other 2D game and loop one edge to the other, having your characters move just like any other 2D game. Or you could make the ground an actual circle and make your characters orbit around it using basic trigonometrics. We (or, well, I) decided to do the latter.

The reasoning behind […]

/ Comments Off on Moving in circles
Program: Programming

Blogginlägg nr 1

Hittills den här veckan har jag jobbat med att få färdigt de sista prototyperna, ”turrets” och ”power-up EMP” dvs. Utöver det har jag även implementerat lite olika texturer här och där som grafikerna ändrat eller blivit klara med och justerat en del saker rent allmänt. I detta blogginlägget tänkte jag endast skriva om turrets:en dock.
När jag började och skulle koda turrets:en så hade jag gjort sen innan en klass som heter ”TurretSlot” så jag hade redan positionerna för var man skulle kunna […]

/ Comments Off on Blogginlägg nr 1
Program: Programming

Blogginlägg nr 1

Hittills den här veckan har jag jobbat med att få färdigt de sista prototyperna, ”turrets” och ”power-up EMP” dvs. Utöver det har jag även implementerat lite olika texturer här och där som grafikerna ändrat eller blivit klara med och justerat en del saker rent allmänt. I detta blogginlägget tänkte jag endast skriva om turrets:en dock.
När jag började och skulle koda turrets:en så hade jag gjort sen innan en klass som heter ”TurretSlot” så jag hade redan positionerna för var man skulle kunna […]

/ Comments Off on Blogginlägg nr 1
Program: Programming

Week 2 & 3 of creating the game

This week’s main focus has been on the full completion of the game design document as well as creating/writing the foundation for the narrative and story. As usual the week started of quite slow but the pace has gradually increased since monday with the amount of work requiring to get done quickly blooming.
First objective  that needed to get done was the regulations/rules part for the game design document. Deciding how the player wins the game, how they lose the game, if there’s any score-system, how the player […]

/ Comments Off on Week 2 & 3 of creating the game
Program: Programming

Week 2 & 3 of creating the game

This week’s main focus has been on the full completion of the game design document as well as creating/writing the foundation for the narrative and story. As usual the week started of quite slow but the pace has gradually increased since monday with the amount of work requiring to get done quickly blooming.
First objective  that needed to get done was the regulations/rules part for the game design document. Deciding how the player wins the game, how they lose the game, if there’s any score-system, how the player […]

/ Comments Off on Week 2 & 3 of creating the game
Program: Programming

[5SD033] Plane AI, States and Behaviour

Above; flowchart describing briefly how the AI moves between states according to conditions.
This week has been dedicated to the planning and structuring of a simple AI and the various behaviours necessary to facilitate a basic enemy plane.
The underlying structure is a finite state machine, a set of coded behaviours that are switched when specified conditions are met.
The desired behaviour of the plane is based on the stealth elements of the game, requiring it to patrol certain routes until it finds […]

/ Comments Off on [5SD033] Plane AI, States and Behaviour
Program: Programming

[5SD033] Plane AI, States and Behaviour

Above; flowchart describing briefly how the AI moves between states according to conditions.
This week has been dedicated to the planning and structuring of a simple AI and the various behaviours necessary to facilitate a basic enemy plane.
The underlying structure is a finite state machine, a set of coded behaviours that are switched when specified conditions are met.
The desired behaviour of the plane is based on the stealth elements of the game, requiring it to patrol certain routes until it finds […]

/ Comments Off on [5SD033] Plane AI, States and Behaviour
Program: Programming

Game Development Week 3

Förra veckan jobbade jag mycket med kodning i bakgrunden till spelet. Jag jobbade med ScreenManager, HoverCraftTurret, InputManager, LightManager, PlayerShip, de olika menyerna som main menu, pause menu och spelfönstret och jag gjorde en soundmanager.
ScreenManager gick bra att skriva, jag kollade upp en tutorial på github som gick igenom bra hur man gjorde. Det tog ungefär en timme att bli klar med. Sedan gjorde jag även de olika fönsterna som man ser när man startar spelet och när man spelar. Det […]

/ Comments Off on Game Development Week 3
Program: Programming

Game Development Week 3

Förra veckan jobbade jag mycket med kodning i bakgrunden till spelet. Jag jobbade med ScreenManager, HoverCraftTurret, InputManager, LightManager, PlayerShip, de olika menyerna som main menu, pause menu och spelfönstret och jag gjorde en soundmanager.
ScreenManager gick bra att skriva, jag kollade upp en tutorial på github som gick igenom bra hur man gjorde. Det tog ungefär en timme att bli klar med. Sedan gjorde jag även de olika fönsterna som man ser när man startar spelet och när man spelar. Det […]

/ Comments Off on Game Development Week 3
Program: Programming