Jump to content
MakeWebGames

a_bertrand

Members
  • Posts

    3,655
  • Joined

  • Last visited

  • Days Won

    12

Everything posted by a_bertrand

  1. Most of those site never actually pay. So go away from such things.
  2. indeed myisam doesn't have foreign key, but are you REALLY sure you need them? Foreign keys means slower updates / inserts as the DB must check the validity of the data. On my own game I never used them (as I'm mainly working with myisam and some memory table), and never really missed the functionality they could provide. The worse case scenario is that you delete the master record and you leave some parent less child. Not such a big deal.
  3. Questions: - why using innodb? Are you sure it's the right DB engine for you? - why having foreign key "without actions". Seems a bit odd. Normally either you want to prevent the deletion if there is still some child, or you delete all the childs if you delete the mater record.
  4. Happy bday old man.... (me is running just behind)
  5. a_bertrand

    Signature

    I find it... messy. Also the image you used, is copyrighted... so not really safe to use it ;)
  6. If you are coding your own engine, I don't see how we can help as we don't know your code. Moreover, sorry to say, but what you want to do is not really clear to me neither.
  7. Which game engine are you using? McCode? then post in McCode, if not please specify...
  8. For this you don't even need to put a copyright watermark as I doubt many will steal it. It's way to basic, only some shaped border and a color. Try to add some textures, some images (not copyrighted) etc... The best thing is to check a template website and see what you like, then try to reproduce pieces of it. Don't worry that will not violate any copyright as, as long you don't make the same thing, you will not actually be against any law.
  9. - Very good marketing - Unique features - Not the old text game with some art to make it better - Not the old McGame or crime game - Very good story - Good updates - Ways to let players interact - Good chat (and not a shout box) - Helpful admin - A strong rules against bad players.
  10. You may post something about yourself here: http://makewebgames.io/board290-chit-chat/
  11. Well, I tend to have a politic which could be seen as "anti-flaming". So any "freely" given bad critics is for me a bit of a flame. I personally didn't checked the code nor I think it would make sense. PHP codes are generally messy (due partially to the language itself), or at least more messy than things written in Java or in C# for example. That said, I would judge an engine based on what it offers. I didn't saw many engine offering Travian like experiences, specially free one (actually I think it's the only one out there), and those web games tend to be all text only games, so for once we see a game which is not pure text I would say it's already an achievement. Finally, don't say something like "well nothing special, it's just another XYZ game", because I need yet to find games produced in the last 5-10 years which are not re-make of older games. Sure the new one may look better, or add a few twists, but all games are simply yet another XYZ game. On another subject, as you are new, can you show us what you did? Then maybe my opinion will be less critical to your critics 8)
  12. You seems really negative, when actually it's one of the rare web game / engine which you can find which does something better than McCode or other text based web games. So even if it's not 100% professional as coding (and which code is?) I would still not spit on them.
  13. You don't need to re-sign up. You can really integrate it and your players will not even see it's a different site. For the IFRAME again could be invisible ;-) and theme... well most forums allow you to change the theme... so I don't see it as a problem.
  14. So far not bad, but honestly seems a lot of work for something you could have solved with a common username / password and an IFRAME.
  15. - Due to its odd syntax and quiet old base I would not use Perl, unless you already know it and / or you have some library you want to use. - C / C++ are great if you need lot of speed, but be prepared to invest lot of time, specially if you want a cross platform tool / app. - I used python quiet a lot (some years ago), and I must say it's a good language, and will certainly be portable across Linux and Windows. However GUI development with python is nothing more odd, and I would personally use it for system administration tasks or small utility but not for a full project. - Java is currently the language of choice if you want a multiple platform development, and speed as well as accessing low level resources is not a problem. Honestly I don't like it due to multiple reasons and I would personally not use it, however it is still one thing you may consider depending what your project is. - C# with Mono / .NET is my personal choice, however the GUI support on Linux is not as good as on Windows even if most of the features are there (if you use WinForms). For Console / Services, Web app and Web services, it really shines on both Windows and Linux. For GUI, 3D or others, on windows it's really good, on Linux a bit less so. So, my 2 cents: choose the language you are the most comfortable with, think that you will need about 6 month to start to master a new language, and really check what you want to do, as depending on that the language of choice may vary.
  16. Sorry don't know what you are talking about...
  17. You basically need to make alternative pages which display less information and placed in such way it avoid as much as possible scrolling. Beside that, there is no magic.
  18. why would you need an id? And what's really the end goal of it?
  19. I would personally say that the problem starts with the table design. If you want 4 stats (or more even maybe later on), and then check which stat is the higher, that design may work but is certainly not the smartest. Why not have like 1 row for each: [mysql] CREATE TABLE test ( ID int(11) NOT NULL AUTO_INCREMENT, STAT CHAR(1) NOT NULL, VALUE int(11) NOT NULL, PRIMARY KEY (`ID`) ); [/mysql] Of course now this table is somewhat stupid as it lack the possibility to link it to something else. However with such design you can have a lot more stats and add them when you want. You may change STAT CHAR(1) to INT and have then yet more stats if needed. Question is now, how would you query the higher stat? [mysql] SELECT ID,STAT,VALUE ORDER BY VALUE DESC LIMIT 0,1 [/mysql] Or Higher per stat? [mysql] SELECT ID,STAT,MAX(VALUE) GROUP BY ID,STAT [/mysql] Of course this design is slower than yours, as the table will contains lot more rows, but it will add a lot of flexibility and possibility (as you saw) to make more queries.
  20. a_bertrand

    Traffic

    Check my post here: Advert experiences and feeback
  21. a_bertrand

    Traffic

    PPC are not as good as you may think. Even if, in theory, you would get people which are interested by your product (based on the advertisement you do), in practice it doesn't. From my own experience Google advert is extremely expensive compared to other networks. And most search engine or general purpose network give the same kind of results. Also, if you pay per impressions instead of clicks, there is some hidden effect which is the fact your site get known, even if people don't click on the banner. On the issue of "forced" people, indeed you may have some traffic which is not initially interested, but they may discover something new, and that will produce actually, maybe, better results than the traditional system.
  22. Either you use strip_tags to remove ALL, or you should not use it at all. Why? Because strip tags will keep all parameters of your allowed tags, which means, an imagine can be displayed as a link (via JS / CSS) or have effect with on mouse over and more. It's really not safe. If you need to be on the safe side, I can help you with, but please DO NOT use strip_tags for that purpose.
  23. ...as been answered thousand times already... Anyhow, this makes sure the value is a int and is positive. How this is secure? Well, it prevents SQL injections in case you use the parameter directly into a SQL query. Beside that nothing. For example, it will still allow people to access data they should not (for example, by reading a private message if this is used there, you could read a private message of somebody else, unless you check you really have access to that). So this is a very first step. Now, I honestly don't see the need to use abs as it will not hurt the DB to read negative ids. If there isn't, it will say so ;) Then fails as well the intval which could be transformed into a +0 so you can easily write it like that (much shorter, and faster): $_GET["reply"]+=0   If your PHP setup will warn in case the "reply" parameter is not set you could do so:   $_GET["reply"]=(isset($_GET["reply"])?$_GET["reply"]+0:0);   or if you want it over multiple lines: if (isset($_GET["reply"]) $_GET["reply"]+=0; else $_GET["reply"]=0;
  24. You can simply do: $_GET["reply"]+=0; in the page where you use it, and that will make sure it's a number and not some odd string. Seems to easy but it's really not more complex than that.
  25. Honestly I don't use much PHP classes and tend to use a more procedural approach (beside for a few specific issues). Why? Because it simply miss all the needed features you would need as soon as you code in object oriented ways. Part of the issue come from the fact PHP don't check the type of a variable, and you can store anything anywhere, part of the problem is the lack of clear cut between references and data copy of a variable / object, and part of the problem is simply the lack of support for things supported by other languages. Said that, this one of the code where I do have classes: $terrainNames=array("G"=>"Grass","W"=>"Watter","F"=>"Fire","I"=>"Ice"); Class Card { var $select_other_on_place=false; var $select_placed_on_use=false; var $select_pool_on_use=false; var $select_other_on_use=false; var $can_defense=false; var $id=-1; var $userid=-1; var $other_id=-1; var $attack=0; var $defense=0; var $nbterrain=array("G"=>0,"W"=>0,"F"=>0,"I"=>0); var $hand; var $game; var $needToBeRemoved=false; var $cardName=""; var $roundUsed=false; function on_place() { return "$this->cardName as been placed. "; } function on_use() { return "$this->cardName as been used. "; } function on_defense($hp) { return ""; } function can_place() { return false; } function after_other_select($id) { return ""; } function after_select_placed($id) { return ""; } function attack($hp) { return "Attack for $hp"; } function description() { return $this->cardName." {$this->id}\n"; } } Class AttackCard extends Card { function on_place() { $this->can_defense=true; $this->hand->place($this); return "$cardName as been placed. "; } function on_defense($hp) { if($this->defense > $hp) { $this->defense-=$hp; return "$this->cardName absorbed $hp damage."; } else { $this->hand->hp-=$hp-$this->defense; $this->hand->remove($this); return $this->cardName." has been destroyed during the defense and made ".($hp-$this->defense)." to your health."; } } function on_use() { return attack($this->attack); } function can_place() { if($this->hand->terrains[$this->terrain] >= $this->nbterrain) return true; else return false; } function description() { return "Attack: {$this->attack}\nDeffence: {$this->defense}"; } } Class TerrainCard extends Card { function can_place() { return true; } function on_place() { foreach($this->nbterrain as $k => $v) { $this->hand->terrains[$k]+=$v; } $this->hand->remove($this); } function description() { global $terrainNames; $res=parent::description(); foreach($this->nbterrain as $k => $v) { if($v > 0) $res.="Terrain ".$terrainNames[$k]." $v\n"; } return $res; } }   With such construct, I can use a card and don't care too much about what kind of card it is... (it's for an in game card game).
×
×
  • Create New...