Jump to content
MakeWebGames

a_bertrand

Members
  • Posts

    3,655
  • Joined

  • Last visited

  • Days Won

    12

Everything posted by a_bertrand

  1. Re: Serializing data All depends what you want. If you want fast serialization as well as deserialization using PHP serialize things are certainly faster than going recursively inside arrays or objects. Now, as Vali pointed out, you will not be able to search via the database things inside those structures. Another problem with serialization, is that normally it works only for a given language. Imagine you have a Java and a PHP code accessing the same objects, well will not work if you serialize using the PHP function, unless you code the same function inside Java. All that however is not here important.
  2. Re: MySQL Configuration Well I get this result: Query cache efficiency: 50.0% (39M cached / 79M selects) So it seems to be somehow useful, at least in my opinion. However honestly, I don't know if it produce any visible difference currently.
  3. Re: MySQL Configuration Well, I can tell you that I discovered a few errors in my own configuration, and even discovered a feature which I wasn't aware (query caching). So, for a little free perl script it did its job for me ;)
  4. Re: can Neab make game like this? I understood what you are saying, and we already tested it for our maps. Actually we use it for our "World Atlas" which does exactly this. However the world atlas is used only to have an overview, the maps are only part of the maps (as we don't show inside buildings, or dungeons), and we do update only once per day without showing the dynamic changing areas. - faster render speed? Well, due to the unique layer? Maybe... not sure - Smoother animation? Why? We can move the way we want too? In fact if you use smooth step mode in out game, you will see that we scroll pixel by pixel, and not tiles by tiles. Due to the fact we are in this DIV and then scroll the div. - faster loading time, yes, at least the first time. Later on, it doesn't take much time due to our caching. - having big map is not really limited by our rendering technique. The point is that we need anyhow to have the map information in memory to allow to check if a player can walk, or do some action on some cell. So that would anyhow require to load the map information as a grid to make the checks inside Javascript. - finally, last point, having something eating up a lot of server resource and bandwidth, is not really wise, as this is what cost most when you have a game. Instead having a distributed solution should be cheaper. Even if you have to live with some compromises.
  5. Re: can Neab make game like this? Again, as said, works while it uses a lot of network, and for things like google maps there is basically no other options. But doesn't work well if your map change basically for each player and on each map load (that's basically what happens on my game, due to plants harvested, object left on the map, holes and map part modified due to quests conditions). So it would require that the server render those maps each time. Now on my side, what I did is a quiet huge number of tricks mixed together: - To cache the images, I use first the old trick of the javascript preload, but only for the tiles needed on that map, and yet only if those have never been loaded. - To avoid to reload images, I do not close the frame containing the map, it's simply hidden when I need to display something else (like the inventory). So basically the map, with the script and all the tiles are still there. - To speed up access to the DOM objects (all the different tiles are accessed via their DOM ID), I cache the object reference into arrays. Dom is much slower than having a obj.src='xxx'; - To speed up the rendering, I do hide the objects layers when the objects are... not there. - To speed up the rendering, instead of changing the source of all the images, I draw them inside a HUGE IFRAME, with overflow: hidden. then scroll the iframe when I need to display something, and just move the last/first row/column to the missing location. And change the source of the images only for that particular row/column. This means instead of moving 100 tiles (your 10x10 grid example) I move only 10, and change those 10 .src property. Now just to give you an idea... as our game normally resize to use the whole browser window real estate, it may be a 20x16 grid... which would mean 320 tiles x 3 for the 3 layers (you somehow correctly saw). That would be way too much for any browser, beside maybe google chrome. Now... I said somehow, as we do have 2 real layers, plus some floating divs for life objects, and other players. So, yes, I would love to find better ways yet, even if now it takes about 4-10 milisec to draw a step on firefox 3.0 and about 10-30 milisec on internet explorer 7. So squash more speed here would not really make sense... what would make sense is add more effects... but we end up again in, either adding more images (which is... already too much), or add effect... but be blocked by gifs transparency... as PNG with alpha channel is not an option due to IE and of course that would not be animated...
  6. Re: can Neab make game like this? Yes we tried that, but sadly it was MUCH slower than what we currently have. Basically it would be faster for the browser, but would require to always load new map parts, and this was slow. At least for some players. As we tested with some players. Without talking about the network usage (both on our side and on the player side). You need to think that we have a 400 area world map (plus infinite maps linked to it), each of those maps are 100x100 tiles of 64x64 pixels... which would mean lots of maps to generate. Finally, our maps do change basically as soon as players interact with them, like picking up objects, dropping, or linked to quests. So no chance of caching them on the server. Also, I cannot estimate when a player will enter an area, as players change direction at any time. So I would either need to load a lot of those map part without any need, or simply not have them on time, and therefore having the players walking on... empty areas. You know, we are developing this game since more than 4 years now, so we tried already a lot of those techniques, searched a lot, and tested a lot. And we never stop doing it :-D. We currently have good performances, but it's by no way an easy code to make it work. If you want, I can explain more in details how we handle it.
  7. Re: can Neab make game like this? Vali: we do implement all those possible "smart" loading tricks we found, and we still have issues with browsers not caching all files as needed. Also, you still have HUGE limitations of the number of images you can change, before it is simply too slow to be usable. Specially on IE. Here again we use all sort of tricks to make it as fast as possible. But as isometric maps requires many overlaps, it would simply make all way too slow. BTW I would suggest you to test our demo or our own game, to see that indeed we do have a complete 2D map, with what we managed to squeeze out our beloved browsers.
  8. Re: can Neab make game like this? what you call fake 3D is instead 2D isometric: http://en.wikipedia.org/wiki/Isometric_projection To do it properly, you basically have tiles based on diamond shapes, and draw from the top to the bottom... or back to front if you prefer. Now each sprite can overlap completely or partially the previous sprites (or tiles). To do so you will need a lot more tiles than we currently use. Also movement on 2D isometric views tends to be yet a bit more difficult as you don't walk straight normally. Which tends to be a bit odd for players to handle your avatar. Now, to come back to your question: our 2D engine do not support isometric tiles. And as I said before, I doubt you can do good isometric rendering with plain Javascript. I would love to, even if I should change all, but sadly I believe it's not possible to make it working fast and right.
  9. Re: can Neab make game like this? BTW I tried street mobster. Beside it's not my kind of game, I do love this kind of "map" they have. However, as you see, when you click on an arrow to move around, the map will load all the images and place them... which is not as fast as it's needed for being able to have a 2D map, unless you do it page by page, and not like scrolling as we do have.
  10. Re: can Neab make game like this? Well, isometric views and more than 2 layers are in principle possible. But sadly our dear browsers, with simply HTML / Javascript are not yet fast enough to do it. Or at least, not with a good window size or speed. If you would need something like that then you need to go to Java, Flash, Silverlight or any other kind of plugin.
  11. Re: Phone Billing I also use DaoPay (support SMS and Phone billing) but honestly I don't make much sales though it. Main problem: it's really expensive as 50-70% of the money is taken away.
  12. Re: miniNEaB version 4.0 Well, there is a demo of some older version of the code (yes I need to update) on the website. And I'm not sure making a very long video would be really nice, as the number of features is... huge. Not kidding.
  13. Re: miniNEaB version 4.0 Yes, not only you see other players on the map, but you can chat with them and even participate on the same battles.
  14. Re: MySQL Version Well I should state that instead of upgrading and installing a package myself I tend to use what those server distribution offers, so that I'm sure I'm up to date with security patch without being subscribed to a huge amount of security lists. So, if Cent OS do offer MySQL 5, then fine I keep it :-D
  15. Re: MySQL Version Well I'm running on Cent OS 5 and it means MySQL 5.0.45 as default. I don't run after latest versions myself, more about stability and security ;)
  16. Re: Stop people from using IE on website If you would have talked about opera, safari or google chrome, I would have understood it. However cutting out IE is like saying your soft will work only on sun solaris. For sure you restrict your player base ;) Numbers varies and are not really that easy to calculate: http://marketshare.hitslink.com/report.aspx?qprid=0 But what remains is IE the most wildly used browser, with firefox coming afterward, with lot less users. As you see safari is not that bad either, so don't under estimate it either. On my own case I always test with IE and Firefox. Doing it work for both is normally not that much a work. Support for Safari could be improved simply by improving the support for Chrome, as the render engine is the same on both browsers. For the moment I don't support those browsers myself...
  17. In case you have access to my.cfg (the main MySQL configuration file), for example on your own PC / Server or on a VPS or dedicated server, you should try this little tool: http://mysqltuner.com/ It's a "simple" perl script which will check your MySQL status and tell you how to optimize your my.cfg file. Very handy.
  18. Re: Need a Windows Server!! Sponsor me. So I assume it's a new project, without any players, without any funds and you expect somebody to give you some space on a Windows server? Mmm... Beside the free hosting for windows, I don't see how you could get it.
  19. Re: Need a Windows Server!! Sponsor me. BTW just to talk about my own experiences (not VB.NET but C# which is also .NET): The best server/client solution offered by .NET 2.0 is Remoting which is then encapsulated in the Windows Communication Foundation or (WCF) in .NET 3.5 which is basically an improvement over Remoting. Now... problems arrives from the fact that most PC are connect to Internet via a NAT (Network Address Translation) router or are behind some sort of firewall. Most of those prevent communication for odd ports, and for sure will prevent calls from the server to the PC. So only a subset of the .NET remoting will work or even not work at all. SOAP as it uses HTTP is normally supported (as long as you use the default port 80) and will not be blocked by firewalls or other things. However you will have troubles to have callbacks, and will need to implement pooling loops.
  20. Re: Need a Windows Server!! Sponsor me. VB.NET can connect to PHP easily using a Web Service (SOAP).
  21. Re: [any V] Possible mod for prevention of SQL injections on DP's (item version) an easy way to convert your input in a number IN ANY CASE (which means if it fails you will get a 0 number not an odd string or empty): $a=$_GET['YOUR_INPUT']+0; which can be directly placed into an sql too: $sql="UPDATE PLAYER SET GOLD=GOLD+".($_GET["DIFF"]+0)." WHERE ID=".($userid+0);   For strings use the mysql_escape or mysql_real_escape_string
  22. Re: Can someone help me? Answer the questions. 1) PHP / MySQL (or any other Database) is an option if you want to code you own game, but you may replace PHP with other languages as well, Perl, Python, C, C++, C#, Java, Ruby etc... However you will have to code and therefore you need to pick one language (choosing the consequenses of it), and then start learning and / or using it. 2) On the browser side, you will need either Flash or Java or HTML / CSS / Javascript. Or an option for those which are really on the mad side: code your own browser plugin. 3) You can find on internet pre-made engines for a few kinds of game. I do offer one myself (http://www.nowhere-else.org/engine) and even a free version. However is you want to have your own unique game, you will soon need to code things by yourself. 4) Tutorials for a full game from the first row to the end, no I don't believe you will find one on internet, however there is some PHP books about writing your game. Anyhow those will not give you a complete engine code I believe, so you can use tutorials to solve some problems, but not to code all. Finally, I would say: first start by using one game engine, and start tweaking it. That way you don't start from scratch, and you can learn how the engine works. Also be prepared to spend a lot of time (unless you just upload the pre-made engine and do not change its code). To give you an idea, it took me more than 4 years to reach the current status of my own game. And if I would start from scratch (something I doubt I will do now), it would not take me less than 1 year full time. My game: http://www.nowhere-else.org However, my game is complex, and not the standard sort of web games you find out there, so you will certainly be able to code a first working, relatively simple game, in less than 6 month, if you have some knowledge, that's it. Further option for you, if you don't have enough knowledge yet, is to join a development team. However, you need to sell yourself in this case, so say what you can bring to the team which could be a well documented game play, with all the rules set down and / or a complete story.
  23. Re: Need a Windows Server!! Sponsor me. 1) You need absolutely a windows host? (if yes why? are you using ASPx and not PHP?) 2) What are your usage requirements ? (Memory, HD space, Windows version, software installed) 3) How many users do you have? How many new users per day? 4) Will you pay something or you expect a free hosting? If you check a bit on internet you can either find windows VPS: http://www.nocster.net/vps.shtml?c=3&kw=windows%20vps http://www.xlhost.com/virtualprivateser ... 3wodunnCaQ Or windows shared hosting: http://www.lunarpages.com/windows-hosting/ Or even free windows hosting: http://www.freewindowshosting.org/ Now again, you should think why you want windows as hosting as normally it's more expensive.
  24. a_bertrand

    IM GOD lols

    Re: IM GOD lols Not only it has some issues with SQL injections, but it has issues with the files too. $names is directly taken from the $_POST, which means sent by the user basically, and this is then used to compose a path... which could contain basically anything. Be careful to not do things like that on a live server, or you will end up with some odd files, or even worse some security issue... Like somebody uploading a new PHP on your server...
  25. Re: Apache is hard! Why use Apache rewrite rules instead of the PATH_INFO in the $_SERVER variable? a path like /yourphp.php/army/buy would run your yourphp.php file and you would get the /army/buy string in the $_SERVER["PATH_INFO"] variable.
×
×
  • Create New...