Click to See Complete Forum and Search --> : Game Creation
LoganK
06-14-2005, 07:31 PM
I'm trying to create a game in PHP, but I can't use a SQL server. What examples, if any, can someone give me of games I can try to make? I don't want to make a simple Craps or Roulette game if I don't have to.
Thanks!
leatherback
06-14-2005, 08:36 PM
Sorry, this forum is to help people in their coding issues. Not really to help you think how to spent your time.
J.
TimTimTimma
06-15-2005, 12:20 AM
if ur still around...I made a game a year ago known as Dragons Blood, however I had MySQL....If you don't have a database like mysql..ummm :-S I can't say youring going to have alot of luck if you want registered members, if you want it to be a simple game like chess? You won't need mysql or any database, just some good old fashion PHP, and alot of patience.
planetsim
06-15-2005, 12:31 AM
Originally posted by LoganK
Ok, this is really getting me angry. This is the second time I've posted on this board; the first time no one even REPLIED. Next, there is a "CODING" forum for people who need help coding. I put this in the "GENERAL HELP" forum, leatherback. If it was a CODING problem, I would have put it in the CODING forum. Recognize what forum you're in next time BEFORE you post. Secondly, this is not a way for me to "spend my time". I am taking a class in PHP and one of our assignments is to make a game. I'm NOT asking for coding help. I'm asking for someone (who might have done something like this before) to possibly give me an idea of how I can about doing. You know - actual help. NOT a post stating how it's in the wrong forum, blah blah blah, spend my time, blah blah blah. I think I explained it *extremely* clearly - I need to make a game but I CANNOT use a SQL server. If I could, I wouldn't be here, flaming you right now. But I can't. So I thought, "why don't I post a question in a forum? How about PHPBuilder? They already send me 5 e-mails a week about new articles. They must have *some* friendly people". So I posted. And I get a stupid, smug reply from someone who thinks too much of himself. I don't even care anymore - I've found a better forum with members who actually HELP me instead of sitting around complaining about how people don't post in the right forum.
Consider this a flame, retards.
If thats the case cya we dont need users here to act like smartasses
However when u've been hear a long time you get quite annoyed with posts in the wrong forum, also learn how to ask a question one thats specific to programming, your question seems more like you want someone to think for you, sorry that isnt going to happen.
leatherback
06-15-2005, 04:11 AM
Sorry if you got offended.
But if I read your post, to me it lkooks like:
I want to create a game.
I do not know what game I want to create
Let me know what I can create
And this is hardly the sort of forum.
So let me rephrase: PhPbuilder forum is a place for trouble with PHP. Not with generating an idea.
As for giving actual help.. Feel free to search my posts. And you will see that in 99.9% of the cases I do give the people help./ Sometimes I urge them to be a biot more sapecific. In other cases I show them how to help themselves.
You say that the first post nobody replied? THat is a very rare occasion. SO either you had a problem nobody knew how to solve -very rare- or your post was off-topic (You would have been notified) or very poorly stated, and nobody wanted to waste time on it. -most common-. Take your pick.
But from your reply to my post.. I got some idea. Will have a look at your first post here.
J.
bradgrafelman
06-15-2005, 04:36 AM
And this is hardly the sort of forum.
Well, there's always the Echo Lounge (http://www.phpbuilder.com/board/forumdisplay.php?s=&forumid=11) !
Weedpacket
06-15-2005, 04:47 AM
Originally posted by LoganK
I think I explained it *extremely* clearly - I need to make a game but I CANNOT use a SQL server. Well, that's a bit of a non sequiter isn't it?
Okay, so you want us to tell you what you want to do, is that it? Have you tried Sudoku?
Originally posted by bradgrafelman
Well, there's always the Echo Lounge !
Weedpacket waves his staff with the knob on the end and....
bradgrafelman
06-15-2005, 04:48 AM
....
Shrike
06-15-2005, 10:20 AM
Originally posted by Weedpacket
Weedpacket waves his staff with the knob on the end and....
Strangely puts my in mind of Willy Wonka. Do you own a chocolate factory Weedpacket? Or look like Johnny Depp and/or Gene Wilder.
*Shrike realises he has lost the thread*
leatherback
06-15-2005, 11:31 AM
I am sure you can (read: it is possible to) build a new version of SimCity without using sql server.
J.
goldbug
06-15-2005, 02:31 PM
Originally posted by Shrike
Strangely puts my in mind of Willy Wonka. Do you own a chocolate factory Weedpacket? Or look like Johnny Depp and/or Gene Wilder.
It's the "and" that disturbs me. SOmething just doesn't resolve in my mind when I try to visually union the two.
Elizabeth
06-15-2005, 03:09 PM
// begin inappropriate comment
Depp can Willy my Wonka any day.
// end inappropriate comment
leatherback
06-15-2005, 04:27 PM
Originally posted by Elizabeth
// begin inappropriate comment
Depp can Willy my Wonka any day.
// end inappropriate comment
Don't do that! Now I have to clean my keyboard again. Coffee went flying here!
J.
BuzzLY
06-15-2005, 04:39 PM
Originally posted by Elizabeth
Depp can Willy my Wonka any day. That is a definite nose-fountain inducer... especially when you look at your avatar and see that silly grin. LOL
Do you realize you could say that in reverse and it becomes appropriate (although a tad non-hetero) from the male perspective?
Fascinating stuff.
Oh... and Logan? You can Wonka my Willy. Enjoy your stay at your new forum. I understand your frustration, but your flame was completely unwarranted.
Elizabeth
06-15-2005, 04:55 PM
...come to think of it, he can Jack my Sparrow too.
("Gilberting my Grape" and "Edwarding my Scissorhands" just don't quite have the same ring to them, do they?)
BuzzLY
06-15-2005, 05:40 PM
Can he Tom your Hanson too? Ed your Wood (oh... I suppose not)? Donnie your Brasco? Hmm.... Ichabod your Crane? Don Juan your DeMarco?
Ok, ok, I'll stop.
LoganK
06-15-2005, 06:30 PM
Yesterday when I wrote my "flame" I was bit aggravated at a lot of things, and I guess I took my anger out on you guys. Let me say to all of you - sorry about that.
Now for individual replies:
TimTimTimma - Chess is a good idea. I'm also thinking of Monopoly or Scrabble. For everyone else, this was what my original question was. I just wanted some ideas. If I mis-stated it or it was confusing, again, I apologize.
planetsim - Again, I'm sorry. See above message.
leatherback - I could understand your annoyance with me and my question. Sorry. But I'm not asking people to think of a game for me. I'm asking people if they know of some way I can approach creating a game, specifically with PHP. Some people might have had experience with this - I was looking for someone like that; maybe they could tell me how they started out. The suggestion for SimCity - I have no idea how to go about that. There would be no way to "save" the game - unless I store everything in session variables and when the user "saves" I tokenize everything and put it in a cookie or downloadable file for the user.
bradgrafelman and BuzzLY - You both could be right. Possibly the Echo Lounge is better for this discussion.
Weedpacket - That's an interesting idea. I don't know what Sudoku is, but I'll do some research on it.
Elizabeth - The "Depp can Willy my Wonka" comment was priceless. Thanks for making my laugh for the first time since I've first seen this site.
Everyone else - The discussion got off-topic. I can't really comment on that.
Allright all, thanks for at least trying to help me. Leatherback, if you feel like it, you can post back and let me know some feedback about my idea for approaching SimCity in PHP w/o MySQL.
Thanks all!
leatherback
06-15-2005, 07:17 PM
/me takes a bow:
It takes a big person to respond like this.
=> Apol. Accepted.
As for the simcity.. It was a bit of a lame response. Anyway.
Even without an sql engine, you can still store a lot of info on your server. You can for instance store all the settings, and states in variables on the server (So you do not depend on cookies).
PhP is a real programming language, and can do just about anything you want it to do. It doesn't need a database in the background.
If this is for a course, and part of the requirementrs to pass the tests: Go for something plain and simple. Don't waste time on a lot of variable storage (Unless you are an A-type student ;) ).
Guess minesweep would be sort of cool, if you are aloowed to store information in a file? Play it against someone else? Safe the game variables on the server in a file called game_user1_user2.txt
and have a file with current users.txt, wherew you match them? and have them both combat?
All you would need is a form where they can enter the location of their ships, and a form to place mines. Match these against eachother..
Let us know how you go.
And do stop by again. We really are not a bad bunch of people. (well, most of us. Be wary of elizabeth with big fat ;) )
Also, check the echo lounch for my thread: When is helping not helping, and you may understand our mood a bit more.
J.
LoganK
06-15-2005, 08:18 PM
I guess you and I have a different definition of Minsweep...I think of the Windows game Minesweeper, while I think you're referring to the popular board game Battleship (or some derivative thereof). In either case, I think I'm going to go with Battleship. But I think I'll have it play against the computer right now, not anyone else. Yes, we can use file manipulation, so I might store data in a flat-file database. Or I'll do what I said earlier - at the end of each execution, tokenize everything, store it in the file (on the server), and at the start (of execution), read the file into a variable (or arry) and de-tokenize (or untokenize, whatever you prefer) the data.
As of right now I'm going with this idea. If anyone has any other game ideas, or suggestions on how to approach the Battleship game, let me know. I'll be monitoring this post until I start the game, at which point I might make a new post for coding help (that doesn't mean I'll ask people to code for me :-)).
leatherback
06-15-2005, 08:27 PM
Yeah, I suppose it is called battleship. Just too many languages and translations flowing in my head :-/
Good luck coding, and if you get stuck: Post your code / errors / problem, and i'd be happy to help you, if somebody doesn't beat me to it ;)
J.
PS: Really.. Make it a challenge, and a 2 person game. Wanna play!?
:D
leatherback
06-15-2005, 08:29 PM
Just an idea..
Use arrays to create the field-layout:
$Field_player[colum][row][value]
$Ships[id][col][row]
-> function change_status($colum, $row, $actrion)
{
}
Elizabeth
06-15-2005, 11:01 PM
Originally posted by leatherback
Be wary of elizabeth with big fat ;) ) Um, please do not use me in the same sentence as "big" and "fat".
Signed,
The Management.
:D
leatherback
06-15-2005, 11:06 PM
Dear Management,
When I was posting a message where I used the words BIG and FAT in one sentences with your name, it was all respectfully, and pointing to the big wink after it!
I hope we can solved this little dispute in a civil manner, so we do not have to go higher up the chain, and get the overseers involved.
Yours respectfully
Pink grazy ele-scientist
/me => sleep($time) = true
Elizabeth
06-15-2005, 11:08 PM
Originally posted by leatherback
I hope we can solved this little dispute in a civil manner, so we do not have to go higher up the chain, and get the overseers involved. Yes, well I suppose we can let that slide this time... but let that be a lesson to ya! :)
BuzzLY
06-16-2005, 11:49 AM
Elizabeth: Chill out -- maybe you need to go smoke a BIG FAT doobie :D
LoganK: How about Yahtzee? I started to program a yahtzee game a while back, but gave up after accidentally overwriting it. You can not only program the game logic, but you can use PHP's GD library to draw your dice and game board.
The cool thing about it is that there is no need for a back-end database.
If you need help, I'd use the Coding forum. Once you are done, and want feedback, you can use the Code Critique forum.
Good Luck!
Elizabeth
06-16-2005, 12:25 PM
Originally posted by BuzzLY
Elizabeth: Chill out -- maybe you need to go smoke a BIG FAT doobie :D Actually, I'd rather have a BIG FAT BEER. But thanks anyway Buzz.
Logan- you could also do a jigsaw puzzle or one of those puzzles where there is one hole open and you slide the pieces around to make the design complete (do you know what I mean?)
BuzzLY
06-16-2005, 12:37 PM
Huh huh. She said hole.
guess[$beer]=="Killians";
Elizabeth
06-16-2005, 12:48 PM
Buzz, that's what I love about you... you're so cerebral.
BuzzLY
06-16-2005, 02:56 PM
Yeah. That's why I talk so good.
LoganK
06-16-2005, 09:17 PM
I was thinking more about how to approach the game, and I thought that maybe Minesweeper would be easier. Unfortunately, I have never played Yahtzee so I don't even know the rules! I'd like to make a game that I already know :-)
As for the sliding puzzle game - it's a good idea, but how do I let PHP know which puzzle piece to move? How about the user clicks once on a piece, the page refreshes with the piece in the url (eg. some_page.php?piece=a1), then the user clicks the empty spot. Or I could do some fancy footwork with JavaScript. Or I could just have the user click the piece and PHP determines where the empty space is.
Minesweeper, Battleship, sliding puzzles - all these "grid" games are going to wreck havoc with my variables! ;-)
I'm going to think more about these choices and I'm hoping to get a solid game idea by Saturday.
Elizabeth
06-17-2005, 12:57 AM
If you didn't want to do a grid-based game, perhaps you could do something like hangman or 20 questions or something like that?
LoganK
06-25-2005, 03:43 PM
Allright I finished my game...I finally decided to go with Minesweeper because it's the easiest and I had limited time...if you want you can check it out at http://beta.logansrunonline.com/; username "Minesweeper" (case-sensitive) and password "preview"...thanks for all that helped me, and if you want to see the code, tell me and I'll post/pm/e-mail it to you (whichever you prefer).
--Edit--
Apparently, the automatic URL parser on this bulletin board thinks that semicolons are valid URL characters, so it linked to "http://beta.logansrunonline.com/;". ;-)
Weedpacket
06-26-2005, 02:30 AM
Oooo, I like! Just two suggestions, one cosmetic, one coding.
1) No doubt you're still fiddling with the look of the thing, so you probably have this in hand: the link borders around the squares are the default blue-unvisited/purple-visited (where "visited" refers to previous games).
2) In the original Minesweeper, if you were lucky enough to clear a square with 0 neighbours, then its neighbours would be cleared as well - if any of them had 0 neighbours, then their neighbours would be cleared as well, and so on recursively. If you're clearing squares with a clear(x,y) method, then it should be feasible to put into it code like if($neighbours==0) {clear(x-1,y); clear(x+1,y); clear....}. For that to work of course clear(x,y) would have to check that x and y are still in the playing field, and that the square hasn't been cleared already.
phpn00bf4life
06-26-2005, 03:51 AM
hmmm... a battleship game would be cool, and probaly something to try in a lil bit. Altho i'm going to use mysql :D
LoganK
06-26-2005, 11:42 AM
Weedpacket -
1) I noticed that too and a few others let me know, but I don't know how to get around that. Can CSS change the colors of visited links? I thought it was a browser-only option.
2) I tried to implement that, as well as a right-click "flag" function. Both became imensly complex and because of time restraints, I finished it as-is. The current way I'm determining the number of bombs around the selected location is like this:
// $rows is an array; first key is the row, second is the column, value is either "s" (safe), "b" (bomb), or a number (which means it was previously clicked on).
if ($rows[$row-1][$col-1] == "b")
$bombCount++;
...
// and so on and so forth
So that first if() statement checks for the location one row above, and one column above the current row/column. I'm not sure how I'd implement doing it again and again unless I put it into a recursive function.
Phpn00b - I would've used a MySQL database too, but I didn't have access to one for this assignment. The school wouldn't let me use theirs, and I didn't want to make a slow app by connecting to mine across the internet.
leatherback
06-26-2005, 02:08 PM
Hi Logan:
a {
color: #005860;
font-weight: +1;
text-decoration: none;
}
a:link {
}
a:visited
{
color: #555860;
}
a:hover {
background-color: #ffddff;
}
LoganK
07-09-2005, 12:22 PM
I'll give it a try; in the meantime, I have another post you might want to check out.
Edit:
http://www.phpbuilder.com/board/showthread.php?p=10637541#post10637541
PHP Builder
Copyright Internet.com Inc. All Rights Reserved.