Sponsored by NuSphere - PHP Software for PHP Application Developers - On Sale This Week for $100



Go Back   PHP-Editors > General > PHP Games

PHP Games Like Games?, Like PHP?...

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 2006-01-09, 07:29 PM
Junior Member
 
Join Date: Jan 2006
Posts: 1
tamat
Default

Hi People:

I have been programming crappy C++ games for years and now I want to try to create my own php strategy game but I'm having problems with the code organization.

The main problem is how to deal with the OOP using PHP. I know everything about the sintax but I dont know how to organize the source, ¿which is the best way to instantiate diferent objects to avoid making the same querys to the database on every user action?.

I know how to use sessions but is it a great idea to store the objects in the session?
Can I create static instances that shares the content between users? or I need to use the DB?

And what about the concurrency? If I store lots of data on the user session then If another user makes something maybe the user session gets deprecated and I need to update it just querying the DB, how to deal with that? maybe a events pool?

Any suggestion will be apreciated.
Reply With Quote
Must read Review for Serious PHP Developers


NuSphere PhpED 5.0 : The Staff of php-editors.com recently spent a few days working with NuSphere PhpED 5.0 (a popular PHP IDE) and NuCoder 1.4 (a PHP Encoding Utility), read up on all the details.

Sponsored Links
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:39 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0
© Copyright 2003-2008 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.