Selling indie game source code (C++) at a fair price.
Will write code when needed, although some I already have prepared to rewrite to specifications.
Examples,
-Game inventory/bag space systems.
-Combat systems.
-Character customization systems.
-Game/Enemy AI systems.
-Etc.
I do not wish to be involved specifically in any project, I only wish to write simple game mechanics code. I will not write graphics engines.
Please contact me for more information!
Contact information:
NathanielDaleShellerE@gmail.com
Source code is written for hobby, not income.
Source code sample:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102
|
#include <string>
#include <iostream>
using namespace std;
int player_input; //The variable used to get input from the player
int player_class; //Initialize the variable in which the class is stored
int player_staminaD;//!!
int player_intellectD;//!!
int player_strengthD; //Default values for players stats
int player_accuracyD;//!!
int player_stamina; //Governs the players health
int player_intellect; //Governs the players magic ability
int player_strength; //Governs the players melee ability
int player_accuracy; //Governs the players ranged ability
int player_maxhealth, player_currenthealth; //Health variables
int player_level, player_xp, player_maxxp; //Variables used for toon progression
int player_armortype; //Indicated what type of armor the player can use
//Light = 1
//Medium = 2
//Heavy = 3
//Here are all of the initializations for item related variables
int resources; //Initializes the variable "resources" used for crafting.
int gold = 0; //Initializes the variable "gold"
//In the following function,
// the characters stats are set to
//a default based on the players clas
void init(){
//The player enters a number 1-3 defining the choosen class
cout << "Welcome, adventurer!!!" << endl << endl;
cout << "Please select your class (1-3):" << endl;
cout << "1 - Warrior" << endl;
cout << "2 - Mage" << endl;
cout << "3 - Archer" << endl;
cin >> player_class;
//Display the player's choosen class
//and set default stats
if (player_class == 1){
cout << endl << "Welcome, warrior!" << endl;
player_staminaD = 10;
player_intellectD = 2;
player_strengthD = 10;
player_accuracyD = 5;
player_stamina = player_staminaD;
player_intellect = player_intellectD;
player_strength = player_strengthD;
player_accuracy = player_accuracyD;
player_maxhealth = player_stamina * 10;
player_currenthealth = player_maxhealth;
player_armortype = 3;
}
if (player_class == 2){
cout << endl << "Welcome, mage!" << endl;
player_staminaD = 10;
player_intellectD = 20;
player_strengthD = 2;
player_accuracyD = 2;
player_stamina = player_staminaD;
player_intellect = player_intellectD;
player_strength = player_strengthD;
player_accuracy = player_accuracyD;
player_maxhealth = player_stamina * 10;
player_currenthealth = player_maxhealth;
player_armortype = 1;
}
if (player_class == 3){
cout << endl << "Welcome, archer" << endl;
player_staminaD = 10;
player_intellectD = 2;
player_strengthD = 5;
player_accuracyD = 15;
player_stamina = player_staminaD;
player_intellect = player_intellectD;
player_strength = player_strengthD;
player_accuracy = player_accuracyD;
player_maxhealth = player_stamina * 10;
player_currenthealth = player_maxhealth;
player_armortype = 2;
}
}
void character_sheet(){
cout << endl;
cout << "Health: " << player_currenthealth << "/" << player_maxhealth << endl;
cout << endl;
cout << "Stamina: " << player_stamina << endl;
cout << "Strength: " << player_strength << endl;
cout << "Intellect: " << player_intellect << endl;
cout << "Accuracy: " << player_accuracy << endl;
cout << endl;
cout << "Resources: " << resources << endl;
cout << "Gold: " << gold << endl;
}
| |
Although most with no programming knowledge will not understand the source code, it's just a sample of my work showing that I have experience programming.
The source code is to a console based game I wrote as a sample. This code sets the players default stats, does the math adding new pieces of gear to the players equipped set, and displays the character sheet.