logo
Previous Thread
Next Thread
Print Thread
#268763 09/14/06 11:48 PM
Joined: May 2006
Posts: 4
niassne Offline OP
Newbie
OP Offline
Newbie
Joined: May 2006
Posts: 4
I'm new-ish to programming, especially for the web. I've taken a couple of college level courses in C++ as well as some VB. Mostly when I code it is in Assembly so objects aren't really an issue.

So now I'm trying to teach myself some PHP and MySQL and I have some of the fundamentals. I'm trying to create a game that will store values in a db and adjust those values when choices are made, on random events, etc. While laying it out I'm thinking "make this OOP" but I don't know WHY.

If I create a new object and fill its variables does that information reside in the server's cache until changed? If not then why would I use a session for instance and reload the object's variables every time?

Ungh. I feel like I'm close to being able to do something (though with a lot of Blood Sweat and Tears) but I'm missing ... SOMETHING. What?!

<img src="/images/graemlins/wall.gif" alt="" />

Help? At least a point in the right direction?

Thanks!

Sponsored Post Advertisement
#268764 09/15/06 04:53 AM
Joined: Apr 2003
Posts: 2,020
BellaOnline Editor
Koala
Offline
BellaOnline Editor
Koala
Joined: Apr 2003
Posts: 2,020
Programming games is a fun way to practice a new programming language but some of the programming required to create a game is a little involved. So I would suggest getting some books to help you. I have not read this book but, based on your description of what you are trying to do, it looks promishing. There is no mention of OOP in description

PHP Game Programming (Paperback) by Matt Rutledge
http://www.amazon.com/PHP-Game-Programming-Matt-Rutledge/dp/159200153X

#268765 11/24/06 04:24 AM
Joined: Nov 2006
Posts: 3
A
Newbie
Offline
Newbie
A
Joined: Nov 2006
Posts: 3
One of the main boosts I find from OOP is only needing to read once from the database without having a whole bunch of globals.
Do the DB call and load the data into a class variable.
Then you have it at your finger tips throughout the page.
Works for me <img src="/images/graemlins/smile.gif" alt="" />


Link Copied to Clipboard
Brand New Posts
Inspiration Quote
by Angie - 04/17/24 03:33 PM
Sew a Garden Flag
by Cheryl - Sewing Editor - 04/17/24 01:24 PM
Review - Notion for Pattern Designers: Plan, Organ
by Digital Art and Animation - 04/17/24 12:35 AM
Review - Create a Portfolio with Adobe Indesign
by Digital Art and Animation - 04/17/24 12:32 AM
Psalm for the day
by Angie - 04/16/24 09:30 PM
Check Out My New Website Selective Focus
by Angela - Drama Movies - 04/16/24 07:04 PM
Astro Women - Birthdays
by Mona - Astronomy - 04/12/24 06:23 PM
2024 - on this day in the past ...
by Mona - Astronomy - 04/12/24 06:03 PM
Useful Sewing Tips
by Cheryl - Sewing Editor - 04/10/24 04:55 PM
"Leave Me Alone" New Greta Garbo Documentary
by Angela - Drama Movies - 04/09/24 07:07 PM
Sponsor
Safety
We take forum safety very seriously here at BellaOnline. Please be sure to read through our Forum Guidelines. Let us know if you have any questions or comments!
Privacy
This forum uses cookies to ensure smooth navigation from page to page of a thread. If you choose to register and provide your email, that email is solely used to get your password to you and updates on any topics you choose to watch. Nothing else. Ask with any questions!


| About BellaOnline | Privacy Policy | Advertising | Become an Editor |
Website copyright © 2022 Minerva WebWorks LLC. All rights reserved.


Powered by UBB.threads™ PHP Forum Software 7.7.5