Jump to content
MakeWebGames

a_bertrand

Members
  • Posts

    3,655
  • Joined

  • Last visited

  • Days Won

    12

Everything posted by a_bertrand

  1. in a regular expression the [ and ] means any characters found inside those square brackets. So, if you have [uNION] it will indeed match any U or N or I etc... Certainly NOT what you want. Also a "catch all" filter like what you are trying to do is not smart and would block people from using words like select and union in a correct context. It's much smarter to use the mysql escape function and make sure your numbers are true number before saving them into a DB. Remains the HTML to be stripped, and a quick and dirty solution is str_replace(array("&","<",">"),array("&",">","<"),$source); That will simply show ALL the text, even if it's HTML and not show it as HTML. Problem solved.
  2. Certainly not a "free" business... If you are serious, that's it. However, as said, you can start with very small budgets, and just slowly re-invest the possible gains.
  3. Indeed you don't need to spend anything on advert at the beginning. I started myself without any budget (even for the hosting). And still, I was able to start and attract people. However if you are serious about advert, don't think about a budget like 200$ that's simply a mistake. Either you don't do it, and try alternative roads (like I explained on one article), or you decide to invest money and then we are talking about good numbers.
  4. 200$ for 4 days? Well yes if you put a daily limit. But 200$ or even more can be burned within the first day. Also youtube video are not going to advertise much your game. If you want really some effect you need to think at least 2000$ of advert if not more. Of course you can start by spending a lot less, but then don't expect much. The actual registration cost is between 40 cents up to 6$ a registration (depends on which network you use). So... think that your 200$ will generate in the best case 500 registrations, and I doubt you will keep more than 30% of those, so think about 150 actual players.
  5. You didn't talked about advert... which is one of the area which will cost you most, beside development if you don't do it by yourself
  6. 1) Make sure you don't use pconnect to not keep persistent connections (which tend to produce this kind of errors). 2) Increase the number of possible connection on your MySQL server (however more connections means lot more memory usage).
  7. You hidden field cannot be accessed as a variable. You must use some of the DOM commands. and a form field is access for example by: document.forms['myform'].myfield.value or document.getElementById('myfield_id').value
  8. And where is the problem?
  9. Moved topic...
  10. First of all, that's not AJAX. JS doesn't mean ajax automatically. Now what danny proposed it to pass directly the value inside your script. That certainly works (if done correctly). It would help a lot to see your page to see what you are doing wrongly. Another way (and that's how I do it normally) is to have a section where PHP writes the values of JS variables: <?PHP echo "<SCRIPT>\n"; echo "var currentUserGold={ $ir['money']};\n"; echo "</SCRIPT>\n"; ?> <SCRIPT SRC=my.js></SCRIPT>   Now why use a static js file? Well first, if you use a good editor, your JS syntax will be checked, and you may even have auto-complete inside JS code. Also, as this part don't change, it make sense to let the browser cache it. inside the my.js file: function checkGold(userInput) { var val=parseInt(userInput); // You need to convert to an int if you take the data from a text field. if(val > currentUserGold) // Check the local variable against the variable defined by PHP alert('You don't own enough money.'); }
  11. Color scheme is... hurting my eyes. Red / white on black is not what I would choose Your home page is not inviting... Think that people will decide to play or not to play based basically on that. Entering the game is yet more odd... it change colors and jump to gray. Seems yet another McCode game. Nothing special, and the look kills it. Overall sorry, I don't like the game, it doesn't appeal me, doesn't show anything special, and... lacks completely about background story.
  12. Mmm nothing to say beside there is much inside your "banner". A banner should be something which invite you to visit a site. Here... I see a text with some special effect. Not really something inviting. Sorry.
  13. Well, so far there was little interest to the engine, and therefore I didn't went much further. However, if somebody is interested to make a game with it, I'm ready to invest yet more time.
  14. no clues what META attacks could be XD
  15. a_bertrand

    HTML Test

    Bah... Browsers will need to keep compatibility with old sites, so if HTML 5 removes some tags, it doesn't mean you can't use them (unless you want to validate your site against HTML 5). I still use quick modes and not XHTML nor pure HTML 4 because it's the only way to make the browser render as I want it (at least some times).
  16. Mmm... don't you have something else to show? For me it seems just some image on top nothing special.
  17. Normally PHP 6 should not be such a big change beside for this magic_quotes which where more a trouble than anything else.
  18. That's just part of the issues Nicholas. This about, what tools the user can access, for example are you sure the user have the right to open this page? And even then, are you sure the user have access to this data? Let's take an example, I have a read_message.php which uses a id=xxx where xxx is the message_id. If I let the users put whatever number there, they could have access to messages for other people. So you should check in your queries that the user have access to the message he/she's asking. Other example, you have a admin_panel.php make sure the person is requesting do really have access to the file and it's not simply somebody trying url. All those are part of securing a game. Without yet talking about XSS (http://en.wikipedia.org/wiki/Cross-site_scripting) or SQL Injection (http://en.wikipedia.org/wiki/SQL_injection) And funny enough people forget to check those basic things.
  19. Thanks, but not sure if social networks are really what would boost my adverts. I still believe that showing my ads in other games (or game related sites) is the best way as it will be displayed to the right public (those which want to play).
  20. a_bertrand

    Game chat

    My own chat experience history: Since I own and run a game, my game contains a chat. I first did it as it was basically the only player interaction I was offering (plus the in game email system and a market place). But soon those chats started the be more and more used, and we had to offer a separated window screen to host a community chat which could be accessed independently from where you was in the game. At that point requests for more and more features started to flood, like handling whispers, actions (/me), multiple channels, chat bot, and more. Things never stopped... and the old poor chat wasn't really designed to be expanded that much. End of last year, I started from a suggestion of Kyle (from Ipocalypse) a prototype of a web IRC client (like mibbit), and you saw the results (http://www.wsirc.com). However I was still not really keen to move from my own chat to an IRC server. The main reasons where that due to the game design you could have multiple chat window open, and IRC normally don't accept multiple connections with a single nick name. Also, the common rules which make you owner and operator of a channel when you create a new channel are not acceptable for my game. So, for a while we stayed yet more with the our old chat. A couple of weeks ago, players started to express themselves saying that the old chat was starting to be hard to follow, too many discussions, whispers where starting to be hard to follow (as they where somehow mixed in to the channel), and they wanted to create their own channels (for example for clans or others). The move: At this point, I simply started to wonder what I could do, as I didn't wanted to replicate the work done on wsirc, and yet I didn't wanted those constraints from the IRC servers. I finally took the road to try to implement myself an IRC server (the code to make the IRC network run), and implement some special rules which would match my needs. Like having the player helpers (PH => our mods) being half-op of the channels, and admin being op of all channels. Allowing people to create channels but those channels would never belong to them. Being able to connect multiple times with the same nick, force usage of game accounts (until you identify yourself you will not be able to do anything), prevent the change of nick names, and more. This took me a whole week (plus a few days to squash the last bugs), and it consists of 2500 lines of C# code. This new service runs as any other Linux demon on my server, and accept both request from wsirc as well as from any other IRC clients. Results: Since we made our move, I can tell you that at first the players wasn't really happy, (as most of the big changes in the game), but after a while they started to appreciate the new features, like ability to script, faster feedback, multiple channels inside tabs, possibility to use an IRC client, and more. It was definitively an hard work, but was needed, and now chat is even more active than before. On the other side, it pushed me to improve wsirc, to include some missing pieces, and fix some bugs. So if you have experiences with chat yourself, please share / comment or ask any questions (pertinent).
  21. Ok, now that I spent quiet some money in different advert campaigns and checked the results / price for each, I decided to post here my results. You are welcome to put your own results / comments / questions: From the best to the worse: GAO (https://www.game-advertising-online.com/) Money goes down quickly if you don't put limits on the high impression sites. Also, don't put too much money on a single click. It doesn't matter how's the percent of display, it will already attract people with very low numbers. From my own experiences, this is the best network for advertisement, and I do pay generally about 40-45 cents a registration. Something to mind however is in which language is the site where your banner will run on. Don't put it on something which is not on the same language as yours, as new players will simply stop because they don't understand your game. Payment via paypal Adtoll (http://www.adtoll.com/) Use runs of the network, which tends to give better results and are easier to manage. Depending on which sites are currently on the network, your money can go down pretty quickly. The cost of a registration here is more expensive than GAO and it's about 70-80 cents per registration Payment via paypal Adbrite (http://www.adbrite.com) Bad tools, bad review process of your adverts (submitted twice the same advert, first time refused, second accepted... don't ask me why). It's slow, doesn't have many affiliate, and registrations are expensive. About 4-5$ per registration. Payment via credit card Google ad words Good tools, even if not really easy to use, you need some time to really dig into it. Need quiet some money to make it really work, and the registration price is about 5-6$ per registrations. So not really something I would use in long term unless you really have loads of money to burn. Payment via credit card I tried also other things, but honestly none gave out good results. Best ways are still blogs, forums and banner / link exchanges for free traffic.
  22. Seems a pseudo SQL to work with SOAP (web services). Not something I would really need.
  23. You are welcome. However I don't agree with you. I learned PHP just by reading the PHP manual (you may find it on php.net). Of course I must admit it wasn't the first programming language for me, so that could have made a difference. For the thread vs post, a different thread with a wisely choose title will be easier to find back for others. Also reviving a very old thread is not smart generally.
  24. Dayo made some MODS for McCode and others... And it pretty much depends on the chat you are trying to incorporate.
  25. That's certainly a wrong piece of code :D $i = 2; $k = rand(0,2); if ($k ==2) { $i++; } else { $i--; } while (1 <= $i && $i <= 9) { echo "The number is ". $i . " "; } - $i should be a number not a string here.... - srand(time) is not normally needed (http://php.net/manual/en/function.rand.php) - rand()%3 will return a number between 0 and 2 (inclusive) so your first if could be an == as it will never go above 2.... - Conditions cannot be "inside" a string (double or single quote) - There is no "in between" condition in PHP however you can merge multiple conditions with && (AND) and || (OR) So not much was correct... Sorry... Also, open a new thread for a new problem... Threads with 200 different posts are somewhat annoying.
×
×
  • Create New...