I made a new game! Its like pong, but without graphics.
Download: http://www.mediafire.com/?jnzmdjyzymm
Showing posts with label Programming. Show all posts
Showing posts with label Programming. Show all posts
Saturday, 22 May 2010
Monday, 21 December 2009
AsciiMan Cave generation
To the left you can see a cave generated by the game, my method starts with a grid filled with random bools, I then apply the CA (cellular automaton), as of time of writing, 15 times. The CA is as follows:
If a square has less than 4 surrounding walls it becomes a floor, if it has 4 it stays the same, if it has more than 4 it becomes a wall.
If a square has less than 4 surrounding walls it becomes a floor, if it has 4 it stays the same, if it has more than 4 it becomes a wall.
Labels:
Ascii,
C++,
Cellular Automaton,
Computer,
PC,
Programming,
Roguelike
Saturday, 19 December 2009
AsciiMan 0.26
New in this release: it should crash LESS, you may sometimes get a crash but not as much. Also...Scrolling!
Download
Download
Saturday, 21 November 2009
Friday, 20 November 2009
Thursday, 5 November 2009
Tuesday, 3 November 2009
AsciiMan 0.011
A new version is out!
Changes:
Changed wall symbols
Wall detection
Duck can now die (with associated combat text)
http://www.mediafire.com/download.php?gnbwg5qndnn
Changes:
Changed wall symbols
Wall detection
Duck can now die (with associated combat text)
http://www.mediafire.com/download.php?gnbwg5qndnn
Monday, 2 November 2009
New project: AsciiMan
I have started a new project, follow me on twitter (username alfie275 all updates will be prefixed #rougelike) or follow this thread.
Here is 0.01: http://www.mediafire.com/download.php?jmn2ymtdmlz
Here is 0.01: http://www.mediafire.com/download.php?jmn2ymtdmlz
Saturday, 24 October 2009
Source code give: Treasure Hunt
I am giving the following code for free and you may use it wherever but I do ask you give credit where credit is due.
#include <iostream>
using namespace std;
#include <ctime> // For time()
#include <cstdlib> // For srand() and rand()
int random (int Range)
{
int num;
num = rand() % (Range + 1);
return num;
}
int main ()
{
srand(time(0)); // Initialize random number generator.
cout << "Welcome to treasure Hunt! A game by Alfie275!\n You have to guess the position of the treasure on the following grid:\n0 1 2 3 4 5 6 7 8 9\n1\n2\n3\n4\n5\n6\n7\n8\n9";
bool Guessed = false;
int Guesses = 0;
int pX;
int pY;
int X = random(9);
int Y = random(9);
while (!Guessed){
cout << "\n\n Enter your guess:\nX:";
cin >> pX;
cout <<"\nY:";
cin >> pY;
Guesses ++;
if (pX != X pY != Y){
cout << "\n Incorrect! The treasure was to the ";
if (pY < Y){
cout << "south";
}
if (pY > Y){
cout << "north";
}
if (pX < X){
cout << "east";
}
if (pX > X){
cout << "west";
}
cout << ".";
}
if (pX == X && pY == Y){
cout << "\n\nYou got it right ";
if (Guesses == 1){
cout << "first time!";
}
else {
cout << "in " << Guesses << " guesses.";
}
Guessed = true;
}
}
while (1);
}
#include <iostream>
using namespace std;
#include <ctime> // For time()
#include <cstdlib> // For srand() and rand()
int random (int Range)
{
int num;
num = rand() % (Range + 1);
return num;
}
int main ()
{
srand(time(0)); // Initialize random number generator.
cout << "Welcome to treasure Hunt! A game by Alfie275!\n You have to guess the position of the treasure on the following grid:\n0 1 2 3 4 5 6 7 8 9\n1\n2\n3\n4\n5\n6\n7\n8\n9";
bool Guessed = false;
int Guesses = 0;
int pX;
int pY;
int X = random(9);
int Y = random(9);
while (!Guessed){
cout << "\n\n Enter your guess:\nX:";
cin >> pX;
cout <<"\nY:";
cin >> pY;
Guesses ++;
if (pX != X pY != Y){
cout << "\n Incorrect! The treasure was to the ";
if (pY < Y){
cout << "south";
}
if (pY > Y){
cout << "north";
}
if (pX < X){
cout << "east";
}
if (pX > X){
cout << "west";
}
cout << ".";
}
if (pX == X && pY == Y){
cout << "\n\nYou got it right ";
if (Guesses == 1){
cout << "first time!";
}
else {
cout << "in " << Guesses << " guesses.";
}
Guessed = true;
}
}
while (1);
}
Subscribe to:
Posts (Atom)