Jump to content
MakeWebGames

Recommended Posts

Posted (edited)

Hello there,

 

c48Cv.jpg

 

I've created a manual (start of a series I will be doing) to help newcomers develop for the mccodes engine, for FREE!

Hopefully, this will help 'revive' a dying engine, which has been used for so many different games, and help people develop and teach them more about the engine!

View Manual* Hosted @ Pdfcast

* A download link is avaliable on pdfcast.

Contents

- Overview

- Installing Mccodes

- The Basics

- Creating Your First Modification

- Mccodes Cheat Sheet

- Useful Stuff

 

Comments and constructive critisim is welcome, but please, don't flame!

Thanks you

-sniko

Edited by sniko
Posted

Purely a suggestion - however it is often wise to use

UPDATE users SET gender = '{$newgender}', money = money - {$cost} WHERE userid = {$userid} AND money >= $cost}

rather than

UPDATE users SET gender = '{$newgender}', money = money - {$cost} WHERE userid = {$userid}

or worse

UPDATE users SET gender = '{$newgender}', money = $newmoney WHERE userid = {$userid}

Why? Well the extra condition does come at a cost certainly albeit a very small one as you have already limited the rowset to 1row via the primary key the cost is actually in ensuring that the second part of the condition holds.

More importantly, this technique helps especially on heavy multi-user platforms where the user's record may well be affected from multiple sources effectively simultaneously (user submitting multiple actions from multiple browser tab's, timed queries ie cronjobs or the scheduled [mysql] events, or perhaps ajax queries from other players).

There are other solutions, for example using modular cyclic fields that track last updates and ensure no changes have been brought about since the record was read, but in these days of NoSQL that's very much open to debate as to its effectiveness.

Row locking at engine level is out of the question unless you have had the foresight to convert to something akin to the InnoDB engine, however that brings it's own problems, something that is presumably above and beyond the capabilities of most starting out in this particular genre/platform.

Posted
Hello there,

 

c48Cv.jpg

 

I've created a manual (start of a series I will be doing) to help newcomers develop for the mccodes engine, for FREE!

Hopefully, this will help 'revive' a dying engine, which has been used for so many different games, and help people develop and teach them more about the engine!

View Manual* Hosted @ Pdfcast

* A download link is avaliable on pdfcast.

Contents

- Overview

- Installing Mccodes

- The Basics

- Creating Your First Modification

- Mccodes Cheat Sheet

- Useful Stuff

 

Comments and constructive critisim is welcome, but please, don't flame!

Thanks you

-sniko

Nice manual sniko. I also see something that could be useful for our games on the link you provided. http://www.solvemedia.com the captcha looks like an interesting way to generate more income for our games. How hard to you think it would be to incorporate it into our games?

Posted

I wouldn't say that hard, but then again, I haven't installed a capatcha before. If you want me to look at the code and try to implement it, PM me!

Thanks ChrisRowe and Mystical for the kind words

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...