Sign in to follow this  
TrulyHeroic

web based text game

Recommended Posts

I am no designer graphic wise and right now I just want to start off with something pretty basic as I work on my understanding and knowledge of programing(coding) games.

I have started and made what I consider a great start at www.hnsclan.com/Game

The only 2 things that I have yet to code for that game is a win/loss and the cron job which I won't do a cron job until I know I am ready to users to use it, as no reason to waste space doing a job that isn't needed.

right now all I am using on that page is php, echoing html codes, and mysql for the database.

Also if you take a look it doesn't use user names or passwords instead works directly on your IP address cause I don't understand cookies and connection stuff just yet.

I am wanting to know if I can really code a game like this using just php/html/mysql I am in the process of converting my html 4.1 codes to the new standard 5.0 via finally learning css. After getting a basic understanding on how it works now when I look at other ones they don't seem so scary.

Anyways if anyone has any suggestions or could provide some help I am open.

also if you want to try the game, your welcome too, just don't cheat or you will get banned, 1 person already tried something, and it failed.

just like i said note that its not balanced, no extra income just yet, and no wins, and finally no protection / limitations to attacks. working more on updating a higher standard of code before going on to adding more stuff too it.

sorry I keep going on, but I also wanted to share that it uses much while{code} and if(code) functions in that math and anti cheat stuff. Surely there is an easier way.

Share this post


Link to post
Share on other sites
lots of games work with php/mysql.
You should never use the ip as user identifier, as multiple people can have the same ip or could even get a new ip due to a disconnect.
you should use sessions, take a look into it, it's really easy to use.
also cookies are just as easy useable if you need long term storage.

if you accept values from the browser, make sure they are properly escaped before using them with mysql.
even better, if you know what type it is cast it manually to that type. (for example if it's an integer, do $value = (int)$_POST['myvalue'];)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this