December 19
Late post, only explanation is that i simply forgot.
The project is going forward but slowly. I have my game window and my Player class but I have not yet created or rendered my sprite in the window.
December 26
The project is going a little bit better now and i have my Sprite rendered on the screen but it is only 16x15 pixles and that is way too small. I tried to make it bigger with a function but after some time I just made the spritesheet larger. Now I am struggling whit the keyboard and figuring out how to make the sprite move. It is getting closer too the end of the project but I will make it. My Zelda game will not be as large as the original but it will be functional.
fredag 26 december 2014
söndag 14 december 2014
Project. Zelda. 5SD022 . Andreas Ludnmark
This is a little late blog about my project.
I have started coding the window and will soon implement a player that can move.
My project game that i will clone is Zelda1 and I will use Visualstudio C++ to do it.
More information will be presented at the next post.
Thanks for reading.
I have started coding the window and will soon implement a player that can move.
My project game that i will clone is Zelda1 and I will use Visualstudio C++ to do it.
More information will be presented at the next post.
Thanks for reading.
söndag 23 november 2014
Week 2 gameprogramming I
The second week of the course and I am starting to understand the C++ programming structure. I have a long way to go but this week I got one step closer to creating a game!
The focus on my side is to learn "for" loops and how to get functions outside main to work and in what order i should code the functions. I have also learned how to get random values and sort them, how to make a small random map and much more.
I have not done all the program exercises but I will get to it later this evening.
So a little bit of code then.
__________________________________________________________
#include <iostream>
#include <time.h>
// My random function below named random.
int random(int min, int max)
{
return min + (rand() % (max - min + 1)); //int min and int max will be used later
}
int main(int argv, char* argc[])
{
int array1[5];
int swap = -1;
int end = 4;
int count = 5;
srand((unsigned int)time(0));
for (int i = 0; i < 5; i++)
{
array1[i] = random(0, 100); // 0 = int min and 100 = int max.
std::cout << array1[i] << " "; // print out the array
}
std::cout << std::endl; // just some space :D
std::cout << std::endl;
std::cout << "sortera" << std::endl;
std::cout << std::endl;
// run the "for" loop until we have cheeked all the array values.
for (int counter = count - 1; counter > 0; counter--)
{
.
for (int i = 0; i < end; i++)
{
// look what value is bigger and swap them.
if (array1[i] > array1[i + 1])
{
swap = array1[i + 1];
array1[i + 1] = array1[i];
array1[i] = swap;
}
}
end--;
}
for (int i = 0; i < 5; i++)
{
std::cout << array1[i] << " "; // print out the array again but this time it is sorted.
}
std::cin.ignore(1024, '\n');
std::cin.get();
return 0;
}
The focus on my side is to learn "for" loops and how to get functions outside main to work and in what order i should code the functions. I have also learned how to get random values and sort them, how to make a small random map and much more.
I have not done all the program exercises but I will get to it later this evening.
So a little bit of code then.
__________________________________________________________
#include <iostream>
#include <time.h>
// My random function below named random.
int random(int min, int max)
{
return min + (rand() % (max - min + 1)); //int min and int max will be used later
}
int main(int argv, char* argc[])
{
int array1[5];
int swap = -1;
int end = 4;
int count = 5;
srand((unsigned int)time(0));
for (int i = 0; i < 5; i++)
{
array1[i] = random(0, 100); // 0 = int min and 100 = int max.
std::cout << array1[i] << " "; // print out the array
}
std::cout << std::endl; // just some space :D
std::cout << std::endl;
std::cout << "sortera" << std::endl;
std::cout << std::endl;
// run the "for" loop until we have cheeked all the array values.
for (int counter = count - 1; counter > 0; counter--)
{
.
for (int i = 0; i < end; i++)
{
// look what value is bigger and swap them.
if (array1[i] > array1[i + 1])
{
swap = array1[i + 1];
array1[i + 1] = array1[i];
array1[i] = swap;
}
}
end--;
}
for (int i = 0; i < 5; i++)
{
std::cout << array1[i] << " "; // print out the array again but this time it is sorted.
}
std::cin.ignore(1024, '\n');
std::cin.get();
return 0;
}
lördag 15 november 2014
Week 1 gameprogramming I
Starting a new course that i think will be fun.
I am programming C++ in Visual studios and started to learn the coding language that resembles flash actionscript and Csharp. It was some years ago i coded so a introduction to coding in C++ is good for my learning process. This week we tested to build simpler programs to get started, some of them was challenging for me.
One of the programs that was challenging for me was this program that I show below. I am not the best at coding and before this course I usually made small applications and nothing fancy.
Program 24
-Write a program that calculates the N!
All of the explanations in the code is in Swedish.
_________________________________________________________________________________
#include <iostream>
int main(int argv, char* argc[])
{
// deklarera variabel a,b och initierar b.
int a;
int b = 1;
// skriv ut sträng och ta emot variabel "a" av användaren.
std::cout << "program24: räkna ut fakultet av ett positivt värde." << std::endl;
std::cin >> a;
// om "a" är större eller lika med 1 kör koden. Koden körs inte om ett negativt värde är inmatat.
if (a >= 1)
{
// kör koden till a=1.
while (a >= 1)
{
// b *=a , b=b*a. b gånger a och tilldelar det värdet tillbaka till b.
b *= a;
// a--, a=a-1. gör värdet mindre varje gång delen körs.
a--;
}
// skriv ut svaret "b".
std::cout << "Svar: " << b << std::endl;
}
// unik regel då fakulteten av 0 blir 1.
else if (a == 0)
{
std::cout << "Svar: 1" << std::endl;
}
// om felinmatning ges går den vidare till "else".
else
{
std::cout << "värdet kan inte vara negativt." << std::endl;
}
// säg åt programmet att vänta på input.
std::cin.ignore(1024, '\n');
std::cin.get();
return 0;
}
_________________________________________________________________________________
The code without explanations.
#include <iostream>
int main(int argv, char* argc[])
{
int a;
int b = 1;
std::cout << "program24: räkna ut fakultet av ett positivt värde." << std::endl;
std::cin >> a;
if (a >= 1)
{
while (a >= 1)
{
b *= a;
a--;
}
std::cout << "Svar: " << b << std::endl;
}
else if (a == 0)
{
std::cout << "Svar: 1" << std::endl;
}
else
{
std::cout << "värdet kan inte vara negativt." << std::endl;
}
std::cin.ignore(1024, '\n');
std::cin.get();
return 0;
}
I am programming C++ in Visual studios and started to learn the coding language that resembles flash actionscript and Csharp. It was some years ago i coded so a introduction to coding in C++ is good for my learning process. This week we tested to build simpler programs to get started, some of them was challenging for me.
One of the programs that was challenging for me was this program that I show below. I am not the best at coding and before this course I usually made small applications and nothing fancy.
Program 24
-Write a program that calculates the N!
All of the explanations in the code is in Swedish.
_________________________________________________________________________________
#include <iostream>
int main(int argv, char* argc[])
{
// deklarera variabel a,b och initierar b.
int a;
int b = 1;
// skriv ut sträng och ta emot variabel "a" av användaren.
std::cout << "program24: räkna ut fakultet av ett positivt värde." << std::endl;
std::cin >> a;
// om "a" är större eller lika med 1 kör koden. Koden körs inte om ett negativt värde är inmatat.
if (a >= 1)
{
// kör koden till a=1.
while (a >= 1)
{
// b *=a , b=b*a. b gånger a och tilldelar det värdet tillbaka till b.
b *= a;
// a--, a=a-1. gör värdet mindre varje gång delen körs.
a--;
}
// skriv ut svaret "b".
std::cout << "Svar: " << b << std::endl;
}
// unik regel då fakulteten av 0 blir 1.
else if (a == 0)
{
std::cout << "Svar: 1" << std::endl;
}
// om felinmatning ges går den vidare till "else".
else
{
std::cout << "värdet kan inte vara negativt." << std::endl;
}
// säg åt programmet att vänta på input.
std::cin.ignore(1024, '\n');
std::cin.get();
return 0;
}
_________________________________________________________________________________
The code without explanations.
#include <iostream>
int main(int argv, char* argc[])
{
int a;
int b = 1;
std::cout << "program24: räkna ut fakultet av ett positivt värde." << std::endl;
std::cin >> a;
if (a >= 1)
{
while (a >= 1)
{
b *= a;
a--;
}
std::cout << "Svar: " << b << std::endl;
}
else if (a == 0)
{
std::cout << "Svar: 1" << std::endl;
}
else
{
std::cout << "värdet kan inte vara negativt." << std::endl;
}
std::cin.ignore(1024, '\n');
std::cin.get();
return 0;
}
onsdag 24 september 2014
Impending doom 2014-09-24
This is my Impending doom document.
Impending
doom – The forest
Introduction:
The
Impending Doom scenario is about holding the wolves at bay. The
game starts with
you
standing in the middle of the forest and you
can
see wolves closing in from every direction. The tool you use to keep
them away is one torch made of a piece of wood and you shirt. Beside
you is a campfire where you can relight the torch.
Every
wolf comes closer at different speed and your campfire beside you
will run out at some point. Even if you get one wolf to back up, it
will soon move towards you again. You can hear the wolves around you
and as the wolves come closer, then the sound from them also get
louder.
When
the campfire is no more than a pile of coal. Now you have to use
matches in order to relight the torch. When there is no fire of any
sort the wolves will start to move faster and attack. You will be
able to hit them as they come close but at some point they will
attack more than one at a time.
You
need to survive until the sun comes up. There is a colored-meter that
show the player when the sun comes up. The time on that meter will
move very slowly.
Mechanics
and dynamics:
Rotate:
The player can rotate in both directions. The 360° rotation is
implemented because then you will be forced to rotate in order to see
the wolves but you can´t see the wolves at all times. This will
create more difficulties as the game progresses. It will also create
a stress and panic moment when the player will be able to hear the
wolves closing in on them from all directions. They can not hold them
all away at the same time.
Wind:
The
wind
can
blow out the torch so that the player has no fire
to
keep the wolves away. This
wind will come in waves and the player will be alerted with a symbol
on the screen telling where the wind will strike.
The wind will also get more like a storm after some time playing the
game.
Relight
torch: You have one
torch that can be blown out by the wind, after that you will
be able to relight it by the campfire that you have beside you.
Fireplace/campfire:
The campfire is where the player can relight his torch but it
will at some point burn out and then the player has only matches in
order to relight the torch. The fireplace also keeps one more wolf
away from the player. When the fire burns out there will be one more
wolf to look out for at the path where the fire was.
Wolves:
Wolves are moving closer
and you will lose when they bite you. The speed off the wolves is
getting faster after each minute. When the player points the torch at
them, then they will stop or back up a little. The player wants to
stop the wolves but cannot keep them all away at all times. There can
be different types of wolves that move in different speeds and sound
different.
Matches:
The player will at some point in the game loose the campfire
besides him and have to use the matches to light the torch. It will
be much harder than relighting the torch at the campfire and take 1-3
tries before it lightening again. This will only be an option when
the campfire has died.
Conclusion:
The
player will be closed in by wolves and have to keep them away in
order to survive. It will be harder after some time and the player
will feel pressure when the speed of the wolves are getting faster.
Also the player will have a hard time keeping the fire going because
of different elements in the game will try put out the fire.
fredag 12 september 2014
Starting the blog!
Hi and welcome to my blog!
My name is Andreas Lundmark and I am a freshman student at Uppsala university - Campus Gotland. Game design and programming is what i will study and I am eager to learn it. My earlier experiences with the game designing is mainly 3d modelling in 3dsmax, Zbrush and I also had a few sessions of coding games.
I was born in Boden ,1992, now i live in Visby. I moved here to study because I have always been fascinated by games and curious how the industry make games. I chose Campus Gotland because of the reputation and of the previous experiences I have from studying at the university. Before i moved here I took a distance course in Zbrush modelling and thought the feedback was good and the course fun, so when I got a spot at a larger program here at Campus Gotland, I was thrilled to start making games.
In this blog I will upload what i have achieved and ideas I have under these years at Campus Gotland.
My name is Andreas Lundmark and I am a freshman student at Uppsala university - Campus Gotland. Game design and programming is what i will study and I am eager to learn it. My earlier experiences with the game designing is mainly 3d modelling in 3dsmax, Zbrush and I also had a few sessions of coding games.
I was born in Boden ,1992, now i live in Visby. I moved here to study because I have always been fascinated by games and curious how the industry make games. I chose Campus Gotland because of the reputation and of the previous experiences I have from studying at the university. Before i moved here I took a distance course in Zbrush modelling and thought the feedback was good and the course fun, so when I got a spot at a larger program here at Campus Gotland, I was thrilled to start making games.
In this blog I will upload what i have achieved and ideas I have under these years at Campus Gotland.
Prenumerera på:
Inlägg (Atom)