Jump to content

codenature

Members
  • Posts

    25
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

codenature's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Great thanks again. This is fun now that I have the plan. Yay!
  2. Thank you very much for that insight. I will use random monster die roll generation for the monsters, and then I will direct them to the places like cave, castle, or town. I think I will do this by making "mountain walls" like you said, made up of long lines that say when you hit one let's say the north mountain points in between x-500 and y500, so that will be my long mountain wall, then it says "you have found the north mountain wall, you can go west or east from here" Then if they go east, they will eventually hit the "zone" for the "castle" place with a narrative story. The zone to the castle will be a vertical line from points on the mountain end wall points. does that sound decent?
  3. OOPS I guess I didn't realize what you said. The random encounter is GREAT. But I still can't use that for encountering places like towns, caves, castles, etc for a story plot.
  4. i realize what you are saying. I am making a field, where I want to player to be able to roam, and when they roam to a certain x y coordinate that I put in the database where a monster exists, they have a monster encounter. so if monster is x100,y100 player hits on that coordinate fight begins, problem is there is a very small chance in the whole map of it hitting that spot. the submit direction form checks for known monster points, and monsters show up as the points are landed on Any better suggestion would be great though. please
  5. Hi, I am making a game and I want the player to use a coordinate system using North, South, East, and West form buttons to navigate the virtual X Y coordinates. The only problem is, if I want to put a monster at location x=100 y=100 The player would have to move to that particular tiny dot on the grid, so the likelihood of them coming in contact with the monster is almost nonexistent. Please, if anyone could please show me a proper way to put into a monster in the database using a coordinate system and then the php check in the form please for the monster coordinates for one example. I can repeat the rest. It seems like I would need to check for a range of points from a virtual square, but that is a lot of numbers!! Thank you.
  6. Ok thank you!. I will read it. Also, I decided to ditch the linear "story board" method, to a simpler x,y location method. It is more like the real world, and can be just as descriptive as linear narratives. But the article should be interesting. Thank you. By the way I like your signature. LOL. If you don't succeed, or while you are not succeeding, try again(). haha.
  7. Nevermind, I just drew it out, and the growth of the scenes grows to a power of 2 if 2 scenes are added to each subsequent scene. My problem is not the database, the problem is my linear design that would create an insanely large database in just a few rooms. room 1 | | 2 3 4|5|6|7 etc etc first room 2 options room 2 , 2 options, room 3, 2 options, so that makes four options. next rooms, are 8 options. next rooms are 16 options. So unless I am wrong, the problem is the linear way I am doing to story, or something else. I don't know anymore.
  8. I am having a database structure problem. If I have scene Forest->options to go to [house] [tree] [road], then each of those 3 needs more links, so that if fI have 2 keywords for new scenes for house, tree and road, that immediately turns into 6 different scenes I have to account for in the database, here is my problem. Database ID|Story|Scene| Description|Keyword1|Keyword2| (keywords=actions the user types to display a new scene) 1 Mike | Forest | You see a..| House | Road 2 Mike | House |You see.. | Chair | Hermit how to do Road??? Now I have a problem. I am able to make the new information for the House keyword, but I cannot make an entry for the Road Keyword.
  9. Great! Thank you. Also, do you know how I would have the description for each scene in the database? Like if for Forest, I had " You see a beautiful forest with the sun shining through the trees." Please. Thank you so much for the code. Also, do those aliases in your SQL run like that? like s... for "scene"?
  10. Hi, I want to make people be able to make their own choose your own adventure game for other people. I want the database to hold each "scene" that the writer makes, then let the user put in a choice. For example here is one scene with a choice. "You are in a forest. You see a castle, a house, and a road before you. Which will you choose?" Then in the text field the user submits the keyword of either "castle", "house", or "road", and it goes to the appropriate next scene. The problem is, when the game writer is typing in his adventure, I have no clue how I should make up the User interface creating the game or linking up the "scenes". It is kind of like a tree format. Like this. Forest | | House Road Castle | | | hermit fence dragon I know I want the user to type in each scene like "forest" into the text field and submit it to the database, but I have no idea how to link lets say "House" to "Forest" or "Hermit" to House text. Or how I would echo out the next appropriate scene from the Database when the user enters the name of a new scene like "House". Ideally the page would not reload when the user types a new scene, maybe ajax for that? I have no clue, Thank you in advance for any ideas.
  11. cool thank you! I just have one last question. I don't know how to create the table "matching_interests " in relation to the other tables. It seems like it is by itself and not mentioned in the code which confuses me. that is pretty much all I don't understand now. Thank you so much!
  12. with the alter table, like this? CREATE TABLE users { id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, username VARCHAR(255) NOT NULL } ENGINE=InnoDB; CREATE TABLE user_interests { id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, user_id INT UNSIGNED NOT NULL REFERENCES users(id), interest VARCHAR(255) NOT NULL } ENGINE=InnoDB; ALTER TABLE user_interests ADD INDEX (interest);
  13. Thank you. Is this correct below in long hand? Please. $sql = "SELECT users.*, GROUP_CONCAT(user_interests.interest) AS matching_interests FROM users AS users INNER JOIN user_interests AS user_interests ON user_interests.user_id = users.id WHERE user_interests.interest IN ({$interests}) GROUP BY users.id; I also still don't know where "matching_interest" is created or used ALTER TABLE user_interests ADD INDEX (interest); What is a CREATE DDL? please. sorry for my newbiness. I do understand most of it though. thank you! Also, that concatenation is interesting. I don't think I have ever seen that used in SQL. I could be wrong though.
  14. Thank you!!! Wow. thank you so much for your time again. You really know what you are doing....I am not worthy. There are some things I don't understand in your code. Here they are. $sql = "SELECT u.*, GROUP_CONCAT(ui.interest) AS matching_interests // I don't understand u.*, or ui.interest or where "matching_interest" comes from. Like where does the u and ui come from? FROM users AS u INNER JOIN user_interests AS ui ON ui.user_id = u.id WHERE ui.interest IN ({$interests}) GROUP BY u.id; ALTER TABLE user_interests ADD INDEX (interest);// I don't know where to add this in the code. do I add this to the first code you replied with? If you can help that would be great again. You are pretty advanced.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.