Jump to content
MakeWebGames

Zeggy

Members
  • Posts

    401
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Zeggy

  1. Yeah, spud is right, I edited my post (it was wrong). You can check the http x forwarded for header, which is sent by many proxy servers. It's a list of IP addresses starting with the original, then any subsequent proxy ips used. The problem is that this header is not a standard part of http/ip, meaning the header can be changed, and false or malicious data sent.   You should ask yourself the reason why you want to get the ip behind a proxy though. For logging purposes then fine (albeit not very useful), but if you simply want to stop people from hiding their ip, anybody with a little determination can use an anonymous proxy server and you will never know the difference.
  2. An anonymous proxy will never reveal that it's actually a proxy, or the ip of the user behind it.
  3. In that case you only really need somebody to write a vbulletin plugin. The problem is that not many people have vbulletin as it requires a license.
  4. Ah, okay, my bad. Still, there are many ways of integrating a website with a forum, you don't necessarily need to use the same encryption for the passwords if you keep the game and forum tables separate. I think best solution here is for somebody to write a vbulletin plugin that hooks into the registration, which will insert a copy of the user into the game database. Then edit the mccodes register page to insert a copy of the user into the forum database. This is not 'full' integration but I think it's better to not mix the game with the forum too much, otherwise you'll have a huge mess of a database.
  5. This shouldn't be surprising, especially with a script like vbulletin. Most professional scripts would not have a simple flow like mccodes... Spudinski is right, there should be some kind of api you can use without having to modify any vbulletin files, otherwise you'll make your forum incompatible with any forum updates/upgrades.
  6. I use gvim too, and gvim has regex search/replace, doesn't it?
  7. Zeggy

    xampp

    What's the problem? The website for xampp answers all your questions: http://www.apachefriends.org/en/xampp.html
  8. He means it should be the very first line, before you even check the string length.
  9. Zeggy

    A question

    What are the 600 lines of coding? PHP? HTML? Are your 250 locations really going to be unique? Or could you abstract them out of the database and only store the parts that are different in each location?   That's like saying you want to keep your game as small as you can. The best way I find to do that is to not allow people to register. Your database will surely be very manageable then ;) But really, if you restrict yourself to a small number of tables, then your game either doesn't have many features, or you are stuffing too much data into each table, possibly data that shouldn't belong there. If it's the former, then your game might be boring. If it's the latter, then your database still won't be manageable. Think of it like a closet. If you have a big closet, you can manage your clothes more easily. If you have a small closet, you'll be stuffing too much into the closet and won't have space to organise them properly. Looking for clothes will be messy and will take a lot of time. Tables are containers, just like closets. A game with 1000 players will produce a certain amount of data, regardless of whether you are using 5 tables or 50 tables. There really isn't a huge difference in either scenario, so you shouldn't limit your tables based on this idea, you should base your tables on what you need.
  10. Zeggy

    A question

    Databases are designed to contain large amounts of data... Don't hesitate to use a database if it seems appropriate for your kind of data. Storing purely data, a database has several advantages over a file system - selecting specific columns/rows, ordering, joins with other tables, caching, indexes etc. However, if you know you're not going to need any of those features, and you don't need to do any searching when selecting your data (ie. you know exactly which file to include/read when you need it), then simply using files would work just as well if you prefer to work with files.
  11. Some bugs I found: You add slashes on previewing a post, and it gets added to the reply box as well. The preview button doesn't preview when you edit a post. Does report post work? It doesn't show any confirmation message, just a blank page. Posting a lot of images takes a looong time to load. Possibly because you're using getimagesize to validate images?
  12. echo limit_str("Bla", 5); Returns <a hre... and then your page is broken depending on the browser because a tag is left unclosed. I would suggest using strip_tags first, then never cut off a string in the middle of a word, only at the start/end of a word.
  13. I think you missed the point of my post. But that's still bad coding practice. Why would you need to stop the script if a variable isn't an integer? Surely you would want to let the script handle the error, and display its own error message or handle it some other way. All your function does is check if a variable is an integer, in very few situations will you ever want the entire page to stop working just because a variable is a wrong type. I would suggest returning true or false, if you extend the function in a useful way. At the moment it's just a slower alias of ctype_digit().
  14. If you take your code and put it into pseudo-code, here's what it is: function check_int: if (not a number) exit; if (not a number or not a number) exit; You're using a lot of redundant code. There is no need for both conditionals, both perform (almost) the same tests. In your second conditional, if the variable passes the ctype_digit test, then it will pass the is_numeric test for sure (since ctype_digit is a stricter test than is_numeric), making the second part of the if also redundant.   Your function will give the same results as this: function check_int($check){ if(!ctype_digit($check) ){ echo 'Error text here.'; exit; } }   Also, you don't want to be using exit in a function, use return, otherwise you are breaking the flow of the page.
  15. That's certainly true, but it's only acceptable if mccodes had been a learning tool, or FREE. If you're selling a commercial product then it's your responsibility to provide support and a solid product. (That's just my opinion)
  16. Well, he gets money for each click, and every topic he's made so far has been a download, so I'm guessing he's not going to do that any time soon :P
  17. Zeggy

    Html 5

    http://www.freeciv.net/ Port of civilization game to browser. Last time I played (several months ago) it was pretty buggy though. http://ptdef.com/ Tower defense game, simple graphics. http://www.kesiev.com/akihabara/demo/game-tlol.html Zelda-like RPG http://www.pixastic.com/labs/digg_attack/ More impressive graphics with special effects. (Uses flash for music)   I viewed these in chrome. There are also several canvas game engines popping up and they seem okay. I tried canvas myself and it seemed to run pretty smoothly. I only tried simple graphics though, but from the above examples it seems to do okay with a bit more processing going on at the same time.
  18. Zeggy

    Html 5

    Thats a good point. Although, part of html5 is the new dom apis for javascript. Some of it may have a big impact on the way javascripts are written, like what ajax did years ago, such as being able to push messages to the browser, and web sockets.
  19. Zeggy

    Html 5

    Quake live is flash with its own plugin, it's been around for longer than html5 has been in browsers. a_bertrand: There are already some html5 games that run pretty smoothly in chrome. I don't know about IE though.
  20. No offence, but I don't think you read my reply either. I didn't argue against your statement ("You will have to register, however, if you wish to bring a lawsuit for infringments of a U.S work."). I quote myself:   And now to quote you: I agree.
  21. If it were pointless then why would the copyright office say it's optional? Copyright enforcement in the courtroom depends on your evidence, and is up to the judge/jury. If you can prove your copyright without having registered in the co, then that works just as well. I'm not saying that registering has no benefits - it's just not necessary unless you're intending to sue somebody.
  22. Zeggy

    Html 5

    I just thought I'd share this link, it's a pretty cool interactive demo of lots of html 5 features: http://apirocks.com/html5/html5.html
  23. Zeggy

    Html 5

    Modern browsers already support part of html5 so it is okay to start developing with supported html5 tags in general. As for game dev in particular, more ways of directly and dynamically drawing straight to the browser, without needing plugins! There are so many creative uses for it for web games. I wouldn't recommend converting your games to use html5 at this time though.   Edit: Here's what I think html5 could be used for: Canvas tag or svg (already supported) - display maps, minimaps, customized character images with equips Local storage (already supported) - cache game data on the local side, possibly huge loading time speedups Drag and drop - many uses, use imagination Most of that can already be done with javascript right now though, so I don't really see too many people taking advantage of the features in html5.
  24. That's a trademark, not copyright. You can't copyright names. You don't need to apply for copyrights... Quotes from copyright office: "Copyright is secured automatically when the work is created, and a work is “created” when it is fixed in a copy or phonorecord for the first time." "No publication or registration or other action in the Copyright Office is required to secure copyright." "registration is not a condition of copyright protection"   I'm not a lawyer and I doubt anybody else here is one either, but everybody should just read the FAQ before they start arguing about copyrights.
  25. Zeggy

    A function...

    On the file that you include header.php, above the include add this: define('IN_GAME', true); On top of header.php, add this: if (!defined('IN_GAME')) { header('Location: error.php'); exit; }
×
×
  • Create New...