Kryllster Posted January 18, 2011 Share Posted January 18, 2011 Before I even try I would like to know if its possible to make a small game based on sessions? The idea is to create a character then put starting data into a session that is maintained till the browser is closed or they log off the game and the session destroyed. It sounds like it would work but I don't want to put in the effort unless its possible to do something like this. Quote Link to comment https://forums.phpfreaks.com/topic/224856-can-this-be-done/ Share on other sites More sharing options...
taquitosensei Posted January 18, 2011 Share Posted January 18, 2011 Yes it is. Personally I would have just tried it. If it didn't work I learned/unlearned something new. That's the best way to learn. Just Do It. Quote Link to comment https://forums.phpfreaks.com/topic/224856-can-this-be-done/#findComment-1161425 Share on other sites More sharing options...
Maq Posted January 18, 2011 Share Posted January 18, 2011 Sure, you can use sessions to store some things but I wouldn't base an entire game off of it. Why do you feel the need to use entirely sessions? Quote Link to comment https://forums.phpfreaks.com/topic/224856-can-this-be-done/#findComment-1161430 Share on other sites More sharing options...
Kryllster Posted January 18, 2011 Author Share Posted January 18, 2011 Well the need comes from all the work Id have to put in the game if I used mysql or the like. I have already created a text based game before and it was a lot of work and the end result wasn't what I expected. I was hoping with this new game to do the things I didn't do in the last one but I have so much to learn and I am already so far behind in what I see other games doing nowadays it makes me want to give up learning php but I want to learn as much as I can to do this in a short time to. I also thought it would be unique. Quote Link to comment https://forums.phpfreaks.com/topic/224856-can-this-be-done/#findComment-1161440 Share on other sites More sharing options...
Maq Posted January 18, 2011 Share Posted January 18, 2011 Well the need comes from all the work Id have to put in the game if I used mysql or the like. I have already created a text based game before and it was a lot of work and the end result wasn't what I expected. I was hoping with this new game to do the things I didn't do in the last one but I have so much to learn and I am already so far behind in what I see other games doing nowadays it makes me want to give up learning php but I want to learn as much as I can to do this in a short time to. I also thought it would be unique. I understand what you're saying (kind of) but I was looking for more of a technical answer as to why you want to use sessions. Quote Link to comment https://forums.phpfreaks.com/topic/224856-can-this-be-done/#findComment-1161446 Share on other sites More sharing options...
Kryllster Posted January 18, 2011 Author Share Posted January 18, 2011 The technical answer is I don't know how I can learn what I need to know and I'm not sure if I'm smart enough to understand what I need to know. I know a lot of things today are OOP and I'm having a hard time understanding how to use it I know some basics but that's it and that's from what I learned on this forum. Hope that answers your question. Thanks guys for the reply's. Quote Link to comment https://forums.phpfreaks.com/topic/224856-can-this-be-done/#findComment-1161450 Share on other sites More sharing options...
parino_esquilado Posted January 19, 2011 Share Posted January 19, 2011 Explain the game. I mean, you could make a noughts and crosses game using sessions, I don't really see anything much more complex emerging from a session-based game. Quote Link to comment https://forums.phpfreaks.com/topic/224856-can-this-be-done/#findComment-1161635 Share on other sites More sharing options...
Psycho Posted January 19, 2011 Share Posted January 19, 2011 The fact of the matter is you can store your data anywhere you choose: sessions, cookies, database, flatfile, etc. It all depends on how you want to use that data: how much data will there be, do you need multiple tables of data, does the data need to persist, etc. How you use the data will determine the best format of where it should be stored. In fact, I would say, it doesn't matter where you store the data for your game at all. If you di it right, you can change where it is stored at any time. Quote Link to comment https://forums.phpfreaks.com/topic/224856-can-this-be-done/#findComment-1161650 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.