galdikas Posted March 16, 2011 Posted March 16, 2011 Hello everyone, Just started coding my own text based game. Have few unique (i think unique) concepts. So will try to implement them. I am new to PHP, this is basically the first thing i am trying to put together since my first "Hello world" application lol. You can see it at www.galdikasproject.com (haven't even came up with the name yet lol). There isnt much that I have created yet (slots game, mail system, gym system, some user stats, mail system, almost complete city visitors system (that is one of my unique concepts, i will not elaborate any more on this at the moment , but you will probably know what I mean when you see what ive done so far.) To be honest, my main aim isnt even to create a game, but to learn PHP, and if I create a good game.. well I suppose could be a good bonus. I know all the interface/graphics is basic. But that is what I am aiming for.. A clean tidy environment, that doesn't cause your eyes go red lol. Well anyway... I know it is an early stage yet, but if anyone would like to register and give any feedback would appreciate a lot! If you don't want to register you can use test account username:Test password:test. Basically feel free to do abuse/exploit it in anyway you like lol My ingame id is 1, so we can have a chat there, or leave any comments in this forum. Thanks in advance! galdikas Quote
Danny.W Posted March 16, 2011 Posted March 16, 2011 Looking good, Hope it goes well for you :).. Quote
galdikas Posted March 16, 2011 Author Posted March 16, 2011 Oh thanks.. :) Was expecting to get flamed lol So am i allowed to update this thread with any new stuff that I add so people can try it/give me feedback? :) Quote
Danny.W Posted March 16, 2011 Posted March 16, 2011 Oh thanks.. :) Was expecting to get flamed lol So am i allowed to update this thread with any new stuff that I add so people can try it/give me feedback? :) Your welcome, Hah.. Yes of course you are, It's your thread ;) Quote
War_Hero Posted March 16, 2011 Posted March 16, 2011 Why am I not surprised that you thought you were going to get flamed? Oh, because a lot of people in this community just flame others for trying their hardest. I guess they have their reasons. Anyway...it's looking good. The visitors in the city is a good idea. Come the time when players want to attack each other, it'll be a quick way of finding out who's in the same city as they are. It's great that you're using a game to develop your PHP skills. You're not using McCodes, are you? If you are, I will advise you not to use it until the new version comes out. I made the mistake of developing my PHP skills through McCodes. I'm slowly coming out of my bad habits! haha I hope the development goes well. Believe it or not, there are some nice people in this community. Those of us who don't flame and actually respect other's work will probably be more than happy to assist you if you have any problems, questions or issues. :) Welcome to the community. Quote
galdikas Posted March 16, 2011 Author Posted March 16, 2011 Nope I do not use MC codes... Well I used the in a way, I have downloaded the free lite package, and examined it, just to see what kind of logic is behind the code. But all the code for what I've done so far is written by me from scratch :) No offence to MC codes, but I think if you want to either learn PHP or code a good game, 'from scratch' is the way to go.. Because if you design yourself everything from scratch, you know very well what does what, and in later stages it will be a lot easier to update/modify your game. Meanwhile if using system written by someone else, if you modify it you might not be aware of all the things that modification affects, and so get unexpected results. Well I at the moment have few problems that I have ran into, but will try and solve the myself.. If i get really stuck ill post here :) And you misunderstood the concept of city visitors. There is going to be just one city (well maybe travel destination later on). But the point is, that every time player goes to city, he will be deemed as he is in the city (as opposed to being home) for a certain amount of time. And during that time people will be able to perform various actions on him, lets say pick pocket him. You will only be able to pickopet someone while he is in the city. As well there could be cron running every so minutes to perform various action on people currently in city (item finds, money finds.. well unlimited really. Well i hope you get my drift. Quote
DreamCoder Posted March 16, 2011 Posted March 16, 2011 Good luck m8 will be looking forward to see some nice work Quote
sniko Posted March 16, 2011 Posted March 16, 2011 Hope it all goes well for you :) - Looking good so far :) -sniko Quote
Diesl Posted March 17, 2011 Posted March 17, 2011 Good luck to you. Sounds like you have a good understanding of what you want and how you want to do it. Quote
Maniak Posted March 17, 2011 Posted March 17, 2011 Looks good so far, however I have found 1 problem! When I went onto your profile.. It changed my info to yours (money & name).. Quote
galdikas Posted March 17, 2011 Author Posted March 17, 2011 Oh crap.. I think know the problem :) I must have used the same name name twice for a variable... It happened to me before when I would to mailbox, it would show me the userpane of the last person that sent me mail lol Thank you guys so much for good feedback! Really motivates me! By the way you can use this thread to suggest ideas if you want to! Best time to suggest something when game is in development start stages, cause later something might simply be impossibe to do due things like DB structure etc.. lol Quote
galdikas Posted March 17, 2011 Author Posted March 17, 2011 Added pickpocketing... You may now pickpocket users that have visited city :P It is not complete yet... You dont receive any events and stuff... But if you got City-->Users in the city, you will see a list of visitors, and you can have a go at pickpocketing them. So will stop adding new features now, and instead will work on perfecting what I have coded so far.. Because its pretty chaotic lol :D Quote
Dayo Posted March 17, 2011 Posted March 17, 2011 Looking very good mate ;) if you ever need any help just ask ... I won't just throw you the awnser but Ild put you onthe right track so that you learn what you were doing wrong :) Quote
galdikas Posted March 17, 2011 Author Posted March 17, 2011 Thanks :) Well talking about help.. Could you point me to a good tutorial about useing timestamps??? Cause I want to change the city visitors table.. Because at the moment there is just a cron deleting it every 15minutes lol I would like to have something a bit more dynamic.. But still can really use the bloody timestamps lol Quote
galdikas Posted March 17, 2011 Author Posted March 17, 2011 I hate php manual... I know that it should be like my bible as starter php dev... But its just so hard for me to understand lol well i try reading it lol Thanks for that! Quote
Dominion Posted March 17, 2011 Posted March 17, 2011 Could you point me to a good tutorial about useing timestamps? Timestamps - Tutorial Quote
galdikas Posted March 17, 2011 Author Posted March 17, 2011 Yeah thats much better than PHP manual.. cause actually talks about timestamps in the context that i need! :) Thanks a lot again!!! Quote
Dayo Posted March 17, 2011 Posted March 17, 2011 I'm a time traveler I made that post specifically for you :P jks Quote
galdikas Posted March 18, 2011 Author Posted March 18, 2011 Time traveler or not... But that tutorial really will come in handy :P Thanks ;) Tidied up some 'behind the scenes stuff' that nobody will even notice lol Aswell some cosmetic changes that people will notice.. Did not add anything new yet, cause as i said i will work for couple days on tidying up everything I coded so far lol Ok.. Im now off to my real job lol :D Will keep yous updates! :) Quote
galdikas Posted March 20, 2011 Author Posted March 20, 2011 Hello everyone.. SO I ran into some trouble with outbox... elseif($_GET['outbox']) { $sent=mysql_query("SELECT * FROM mail WHERE from_id='$userid' ORDER BY datetime DESC"); $i=1; echo "<table style='width:760px'>"; echo"<tr><th>To:</th><th class='subj'>Subject:</th><th>Date:</th></th><th>Time:</th>"; while($row=mysql_fetch_assoc($sent)) { extract($row); $get_name=mysql_query("SELECT userid,username FROM users WHERE userid='$to_id'"); $get_name=mysql_fetch_assoc($get_name); extract($get_name); if($i%2==0){ echo "<tr class='alt'>"; echo"<td style='width:100px'>[url='profile.php?ID=$userid']$username[/url]</td><td>[url='mail.php?action=read&ID=$id']$prefix $subject $sufix[/url]</td><td style='width:100px'>$date</td><td style='width:100px'>$time</td>"; echo "</tr>"; unset($userid); } else { echo "<tr class='alt2'>"; echo"<td style='width:100px'>[url='profile.php?ID=$userid']$username[/url]</td><td>[url='mail.php?action=read&ID=$id']$prefix $subject $sufix[/url]</td><td style='width:100px'>$date</td><td style='width:100px'>$time</td>"; echo "</tr>"; unset($userid); } } So where i extract the $get_name.. I get a warning: Warning: extract() [function.extract]: First argument should be an array in /home/galdika1/public_html/mail.php on line 157 The exact same logic works perfect in Inbox.. Here the only different thing is the mysql query selects to_id instead of from id... Any ideas anyone?To:Subject:Date:Time:$username$prefix $subject $sufix$date$time$username$prefix $subject $sufix$date$time Quote
galdikas Posted March 20, 2011 Author Posted March 20, 2011 for some reason all indentation in the text got lost... Is that because I just copy/paste from my editor? By the way.. it works fine.. it produces the list of sent messages and everything.. its just that it produces that damn warning Quote
Dayo Posted March 20, 2011 Posted March 20, 2011 remove the extract($row); as $row is not an array Quote
galdikas Posted March 21, 2011 Author Posted March 21, 2011 extract($row) doesn't cause problems... it's this bit: $get_name=mysql_query("SELECT userid,username FROM users WHERE userid='$to_id'"); $get_name=mysql_fetch_assoc($get_name); extract($get_name); Without this code.. outbox doesnt display the name of the person to whom the mail was sent/ Quote
galdikas Posted March 22, 2011 Author Posted March 22, 2011 UPDATE: Events added. Whenever you get pick pocketed you now receive an event! +some other behind scenes tidying up! :) Check it out! ;] Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.