Author Archives: Oscar Eriksson
Better colliders. Artifact 3
I repaired the CollisionManager. It was broke. I dont want to talk about it.
From yesterday though:
When the player fish and an enemy collides, two things will happen in this game right now:
1. The player receives experience points. These are what will make the Player grow and level up though out the game.
2. The enemy will be eaten. In other words both the enemy collider and the enemy object, carrying a sprite and some functions get deleted.
(Enemy object are not discussed in […]
Better colliders. Artifact 3
I repaired the CollisionManager. It was broke. I dont want to talk about it.
From yesterday though:
When the player fish and an enemy collides, two things will happen in this game right now:
1. The player receives experience points. These are what will make the Player grow and level up though out the game.
2. The enemy will be eaten. In other words both the enemy collider and the enemy object, carrying a sprite and some functions get deleted.
(Enemy object are not discussed in […]
ID- OMG Artifact blog 2
I have been working on ID for colliders. The thing is, whenever an enemy is deleted, its collider will need to be deleted as well. Because I have used containers of colliders that check each other for overlaps, I was thinking that there must be some way to identify them so that the correct collider is deleted. What I have done so far is I have managed to get rid of the correct collider in my testing project. But it […]
ID- OMG Artifact blog 2
I have been working on ID for colliders. The thing is, whenever an enemy is deleted, its collider will need to be deleted as well. Because I have used containers of colliders that check each other for overlaps, I was thinking that there must be some way to identify them so that the correct collider is deleted. What I have done so far is I have managed to get rid of the correct collider in my testing project. But it […]
ID- OMG Artifact blog 2
I have been working on ID for colliders. The thing is, whenever an enemy is deleted, its collider will need to be deleted as well. Because I have used containers of colliders that check each other for overlaps, I was thinking that there must be some way to identify them so that the correct collider is deleted. What I have done so far is I have managed to get rid of the correct collider in my testing project. But it […]
ID- OMG Artifact blog 2
I have been working on ID for colliders. The thing is, whenever an enemy is deleted, its collider will need to be deleted as well. Because I have used containers of colliders that check each other for overlaps, I was thinking that there must be some way to identify them so that the correct collider is deleted. What I have done so far is I have managed to get rid of the correct collider in my testing project. But it […]
Hopefully the last blog about collisions. Artifact blog
I have been updating my progress about the collisions and the most difficult part for me was to do the rectangle vs circle overlapping.
The things I have tried are to get the point on the line between two corners of the rectangle that is the closest to the circle using the dot product and a normalized vector and another method using different zones around the rectangle and check if the circle is inside of one of the zones to […]
Hopefully the last blog about collisions. Artifact blog
I have been updating my progress about the collisions and the most difficult part for me was to do the rectangle vs circle overlapping.
The things I have tried are to get the point on the line between two corners of the rectangle that is the closest to the circle using the dot product and a normalized vector and another method using different zones around the rectangle and check if the circle is inside of one of the zones to […]
Hopefully the last blog about collisions. Artifact blog
I have been updating my progress about the collisions and the most difficult part for me was to do the rectangle vs circle overlapping.
The things I have tried are to get the point on the line between two corners of the rectangle that is the closest to the circle using the dot product and a normalized vector and another method using different zones around the rectangle and check if the circle is inside of one of the zones to […]
Hopefully the last blog about collisions. Artifact blog
I have been updating my progress about the collisions and the most difficult part for me was to do the rectangle vs circle overlapping.
The things I have tried are to get the point on the line between two corners of the rectangle that is the closest to the circle using the dot product and a normalized vector and another method using different zones around the rectangle and check if the circle is inside of one of the zones to […]
Circles, check
2014 02 10 03:28.
I wanted to fix the circles as well. I wanted to make solid circles, just like I did the rectangles. This was acually mainly for my own sake. Two of the circles push each other around and the third stays where it is.
I thought I would just have to do it exactly like I did with the rectangles, but it didn’t quite work out that way.
I first checked if the distance between the circles centres where lesser […]
Circles, check
2014 02 10 03:28.
I wanted to fix the circles as well. I wanted to make solid circles, just like I did the rectangles. This was acually mainly for my own sake. Two of the circles push each other around and the third stays where it is.
I thought I would just have to do it exactly like I did with the rectangles, but it didn’t quite work out that way.
I first checked if the distance between the circles centres where lesser […]
Rectangles, check.
2014 02 08
Ok, now I have covered the rectangle collisions. Now I can have them behaving as they should. I made two of the Three rectangles able to push each other and the third one just stands its ground like a wall.
I only had some issues with the rectangles jumping around the other and one time I made rectangle nr 1 move when nr 2 and nr 3 collided. Which was quite ammusing. Sorry, the code for that one is […]
Rectangles, check.
2014 02 08
Ok, now I have covered the rectangle collisions. Now I can have them behaving as they should. I made two of the Three rectangles able to push each other and the third one just stands its ground like a wall.
I only had some issues with the rectangles jumping around the other and one time I made rectangle nr 1 move when nr 2 and nr 3 collided. Which was quite ammusing. Sorry, the code for that one is […]
Colliding some more
Ok, today was a scrum meeting. Sprint planning.
I had almost colmpeted the circle circle and rect vs rect. I sat down Before the meeting and tommi was there. I had overthought my check collision functions. I had a bool function to iterate through the elements of the collider arrays and compare them with each other, and every time an overlap was true, the checkcollision function was returned true.
That means every time two object collided, the funktion stopped because it was […]
Colliding some more
Ok, today was a scrum meeting. Sprint planning.
I had almost colmpeted the circle circle and rect vs rect. I sat down Before the meeting and tommi was there. I had overthought my check collision functions. I had a bool function to iterate through the elements of the collider arrays and compare them with each other, and every time an overlap was true, the checkcollision function was returned true.
That means every time two object collided, the funktion stopped because it was […]
more collisions
2014 02 06
I’ve been doing the collisions again.. The circle works fine, sort of. I have Three circles drawn. Two of them collide like they are supposed to. The third circle will not collide with any of the two colliding circles.
I also have Three rectangles. Same thing there, only two of the rectangles will collide.
I Think this has something to do with how I check for collisions. I now have two different std::vectors containing colliders, one for rectangle colliders and […]
more collisions
2014 02 06
I’ve been doing the collisions again.. The circle works fine, sort of. I have Three circles drawn. Two of them collide like they are supposed to. The third circle will not collide with any of the two colliding circles.
I also have Three rectangles. Same thing there, only two of the rectangles will collide.
I Think this has something to do with how I check for collisions. I now have two different std::vectors containing colliders, one for rectangle colliders and […]
More collision management
2014 02 04
Today I wanted to try my circle vs circle overlap function.
In our Game state, I made two test colliders and two circles using sf::CircleShape. The colliders were allocated and initiated via the overloaded constructor that take in a position vector and a radius float (I added a position to it). then I added a function to the CollisionManager. CheckCollisionCircleVsCircle, I called it. It is a bool function. I then pushed the colliders into my std::vector for colliders.
CheckCollisionCircleVsCircle():
This […]
More collision management
2014 02 04
Today I wanted to try my circle vs circle overlap function.
In our Game state, I made two test colliders and two circles using sf::CircleShape. The colliders were allocated and initiated via the overloaded constructor that take in a position vector and a radius float (I added a position to it). then I added a function to the CollisionManager. CheckCollisionCircleVsCircle, I called it. It is a bool function. I then pushed the colliders into my std::vector for colliders.
CheckCollisionCircleVsCircle():
This […]
Doing Collision management
I have made a Collider class.
It has Three overlap bool functions for rectangle vs rectangle overlaping, rectangle vs circle overlaping and circle vs circle overlapping.
The mathematics is not that difficult when you have the seperating axis theorem and the basic knowlage of a simple circle and a rectangle.
The rectangle vs rectangle one checks to see if there is overlapping by the x-axis of the rectangle’s extension, width and height. Then it checks if it is ovelapping the y-axis. (seperating axes […]
Doing Collision management
I have made a Collider class.
It has Three overlap bool functions for rectangle vs rectangle overlaping, rectangle vs circle overlaping and circle vs circle overlapping.
The mathematics is not that difficult when you have the seperating axis theorem and the basic knowlage of a simple circle and a rectangle.
The rectangle vs rectangle one checks to see if there is overlapping by the x-axis of the rectangle’s extension, width and height. Then it checks if it is ovelapping the y-axis. (seperating axes […]
Developing the game using SCRUM
This Post was created -2014 02 02
Last wednesday, we thought we’d try to get some basic stuff to our Project up and running by the Sprint Review/planning on (last) friday.
We initiated the Game states StartState, the first screen containing quit, play and options button, GameState, in which the acctual gameplay is, optionState, change volume and such.
By “initiated” I mean just made the hpp and cpp files with some empty methods. We also made a StateManager to go with that […]
Developing the game using SCRUM
This Post was created -2014 02 02
Last wednesday, we thought we’d try to get some basic stuff to our Project up and running by the Sprint Review/planning on (last) friday.
We initiated the Game states StartState, the first screen containing quit, play and options button, GameState, in which the acctual gameplay is, optionState, change volume and such.
By “initiated” I mean just made the hpp and cpp files with some empty methods. We also made a StateManager to go with that […]