Hi, I'm new here... Please help me fix it, if I posted at the wrong section, this is about Python but also game development... So I'm not sure? :) anyway:
I need some guide lines to the way of coding? or the use of things within the code...
Here I have a project I'm working on, at the same time learning more about Python and Python-Networking along with MySQL stuff... All I want, is the pro's here to "review" my code and tell me what I'm doing wrong and what will be better. No! need to complete my code only Judge it.
PS. I'm learning by myself.
I thank in advance! :)
#######
#
## THIS IS THE NOTHINGNESS ###
### by *****.
#### version 0.01
##### License Free / Open source
######
#####
####
###
##
#######
## MAIN IMPORTS
import sys
#import csv
import MySQLdb # This is here because i used it to test something. and i got it to save in my mysql server :)
## Character creation
class character_Create:
def __init__(self):
# Get player information
print "Welcome to The Nothingness. \n\nThis is a text based RPG game derived in a mistical age of random fantasy.\nNext you will be asked to enter the details about your character please\nfollow the directions."
print "--------------------------------------------------------"
print
player_name = raw_input("Your character name:\n -> ")
print
player_race = input("Please pick your Race:\n 1: Humans\n 2: Spirit\n 3: Hellborn.\n -> ")
print
player_class = input("Please pick you Class:\n 1: Warrior\n 2: Priest\n 3: Mage\n 4: Ranger.\n -> ")
print
player_bio = raw_input("Your character Bio:\n -> ")
print
## RACE STATS
class Race_Stats(character_Create):
def __init__(self):
# About player character
self.health = 100
self.mana = 100
self.gold = 0.0
self.XP = 0.0
def human_Race(self):
self.info_human = '''
Derived from the gods them self these beings have
roamed the earth for many years, they are the more
commonly known folk roaming the lands of Pracnna.
'''
def hellborn_Race(self):
self.info_hellborn = '''These demonic creatures have been around all the years, dwelling
the earth with their misleading and destructive tung. These creatures
are dark and misterious, the roam around mostly at night.'''
def spirit_Race(self):
pass
## CLASS STATS
class pClass_Stats(Race_Stats):
def Warrior(self):
self.strength = 5
self.intelect = 2
self.agility = 3
self.attack = 4
self.spellpower = 1
def Priest(self):
self.strength = 3
self.intelect = 5
self.agility = 2
self.attack = 3
self.spellpower = 3
def Mage(self):
self.strength = 1
self.intelect = 3
self.agility = 2
self.attack = 2
self.spellpower = 5
def Ranger(self):
self.strength = 2
self.intelect = 3
self.agility = 5
self.attack = 4
self.spellpower = 2
#############################
#############################
## ##
## MAIN FUNCTION HERE!! ##
## ##
#############################
class main(Race_Stats):
# Running the game main
played_check = raw_input("Have you played this shit yet? 'y' or 'n': \n--> ")
print
print
print
print Race_Stats()
while played_check != 'y':
character_Create()
else:
print "START THE GAME MAIN???"
if __name__ == '__main__':
main()
*Sorry I'm using Geany on linux(ubuntu) and the line spacing is weird...
I made a project hosting page as well to get the idea please visit http://code.google.com/p/the-nothingness/wiki/ProjectPlaning