Jump to content
MakeWebGames

wrux

Members
  • Posts

    166
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by wrux

  1. Yea saturday nights are not for programming
  2. It's cool man, I like your game & I know resets are guaranteed because it's in development
  3. Aww I was lvl 12 an you deleted my account :(
  4. Cheers man, there should be a ton of updates in the next month. The nerve and that are fast just because it's good for testing. Theres also a link to refill it too but only for testing
  5. No I get all my domains through uniteddomains
  6. Cheers dude. I got crimefoundation.com too so if anyone forgets then it will just redirect anyway :p
  7. Alright so the other day I got a domain i've been waiting on for a while: crime.foundation. I'm working on a game in Python and I've got it to a good point where I can show it off and get some feedback. It's not really feature rich like a lot of these mccodes games, but i've been developing it myself which quite a daunting task. I am over the coming few months get the game to release but from now and then I may need ideas and feedback. Like I said, theres a load of features yet to add and theres not much in the way of items and shops and crimes etc but it's only in development. crime.foundation I have a blog which I will use to log the updates to the game and any development tips. I hope to post regularly as I roll out updates frequently, big or small. I have some screenshots below as an example.
  8. wrux

    Survive

    Seems cool and and Android one would be decent.
  9. I don't know about too many people but I have occurrences in my game where you need the username, for example; A user profile (/profile/wrux for example) uses the player's username as apposed to an id. It makes perfect sense to write unobtrusive code. If you are doing hacks like this, what other things are you doing further down the line? Data should be stored as data and outputted in a certain manner.
  10. Find & replace isn't hard to do. Parsing the data by serial is a bit of a hack in this case, more of an afterthought and if you wanted to use the raw username field it's then not available. Sure you could use your example and store something like $r['formatted_username'] but then your first argument is then invalid. Anyway, if you have the time to go through every file and add doFormatUsername($r); then are you too lazy to just change the name output to incorporate a format function. Your argument saying that it would still need style is irrelevant because you clearly don't understand the purpose of HTML. Tip: it's not for styling data.
  11. The CSS needs tweaking, text shadows are supposed to be subtle
  12. Super simple way:   echo '<span class="player-'. $r['user_level'] .'">'. $r['username'] .'</span>';   More complex, but generally better way:   <?php function format_username($user) { if(in_array($user['user_level'], array(2,3)) { // staff? $return = 'staff type-'. $user['user_level']; } else { // regular player $return = ($user['donator']) ? 'player donator' : 'player'; } return '<span class="'. $return .'">'. $user['username'] .'</span>'; } // to use it.. echo format_username($ir);   It would make it easier to format staff and regular player usernames slightly different using this method. You would just need to setup the CSS classes after adding this
  13. Yes if fish roe counts?   Have you ever eaten sashimi (raw fish but not sushi)
  14. If it's slow then just do it differently.... SELECT MAX(`id`) as `max_id` FROM `lottery`; Use that to generate three numbers.... (self explanatory) and then just select them IDs. SELECT * FROM `lottery` WHERE `id` IN (X1, X2, X3); X1 X2 & X3 of course being the three random ID's. This way no iterations are being done, just two queries with not much going on, just logic.
  15.   What MySQL's RAND is CPU intensive and iterating through potentially millions of records isn't? Also, wouldn't shuffle give a random order? Theres no reason to then do some sort of awkward split; $first[0], $second[1] and $third[2] is fine. Theres no need to over-complicate things.
  16. Well I was looking for something similar to this but the only 'seamless gun patterns' I could find wernt feee and on them stock image websites
  17. For my game i've created a tiled background image and in the testing I tried with a number of combinations & I thought it would be nice to give one of the backgrounds away on here. I drew out the guns on Adobe Illustrator, then created the tile pattern using Photoshop. I will be using one slightly different in my game, and this one will not be of any use to me so i'm giving it out. I'm sure somebody will find it useful. I sill have the PSD so if anybody would like some custom colours then i'd be happy to help. This would work great for the website background on a mafia game :cool:
  18. Then players would have the exact same chance despite how many tickets they have? Without putting too much thought into it, this is how i'd do it.. I would just make a table with 1 field; userid. Each person can buy one ticket at a time and it adds another record to the lottery table. Once a week run the lottery event using Mysql Event Scheduler. Select someone at random, update their money, add an event and truncate the table (this could probably be done using a stored procedure too).
  19. Lotterys are always completely random. Random is the most fair way of doing it, everyone with 1 ticket has an equal chance
  20. What is being overlooked here is the ordering. If numerous players have the same level there will be some ambiguity, therefore it would require ordering multiple fields maybe? I'm not gonna post any PHP but this query would give the top three without any same-level ambiguity: SELECT `username`, `level` FROM `users` ORDER BY `level` DESC, `exp` DESC LIMIT 0,3
  21. Not tested it but this in theory should work (just place it in your header.php somewhere I guess): <?php // ID of the property that gives the crystals $property_id = X; if($ir['house'] === $property_id) { // User has the property that has random drops // generate two random numbers and check if they match $chance1 = mt_rand(1,10); $chance2 = mt_rand(1,10); $crystal_gain = 3; if($chance1 === $chance2) { // got the crystals so update user reccord $sql = sprintf("UPDATE `users` SET `crystals` = `crystals` + %u WHERE `userid` = %u;", $crystal_gain, $userid); $db->query($sql); } } ?>
  22. You need to use some more subtle colours. When I logged in all you see backgrounds with white borders. Why not use off white for borders so they are much more subtle
  23. Check out webfaction, they offer more than digitalocean
  24. You need them two on your server. Make sure jQuery and the javascript file I posted are loaded. After that you then need open up header.php and wrap all the numbers to update in a corresponding span tag. An example: <span class="label" data-value="energypercent">{$enperc}</span> the data-value tag needs to be set to the variable to update it to. Another example (sets the mail notifications if the player has any): <span class="label" data-value="new_mail">{$ir['new_mail']}</span>
  25. Yea I make might make a revision for that another day. It was really just an attempt to show people that things can be done differently
×
×
  • Create New...