Results 1 to 10 of 12

Thread: Every story ends somewhere...

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    That is pretty nice idea.

    Have you already made a mapmaking algorithm? I could think of a few choices which you can use:

    Modified Perlin Noise Algorithm: http://freespace.virgin.net/hugo.eli...s/m_perlin.htm
    With Perlin Noise Algorithm you could easily generate sort of heightmap image
    First of all, thanks for an insightful post. Unfortunately perlin noise has no business here. This is text adventure game. It does have no graphics. It's not even an ascii art. It's something like this:

    Code:
    You are waking up on a cave floor. To your left there is a water pool. To the north there's a meadow. What do you do?
    >_
    So any kind of heightmap won't do a trick here, if anything it'll slow down generation. I'll use probably something like your second idea though heavily modified. And yes, in my idea there can be cells that don't have direct connection, but my algorithm makes sure there are always path. Also it generates cells only in direction room has exits (unless one is already generated like one player came from), so if room has only exit to the north, it'll only generate new room in that direction, of course making sure generated room has exit at the south, so player can go back if necessary.

    And no, I haven't start coding yet (just done interface, game's is LCL-based as I don't like DOS prompt which may or may not work on new Windows version some time in future and has very small font by default on higher resolutions.

    Getting back to the topic, I haven't started it because I first need to build big enough db of rooms so testing can be done properly. After I finish base code, it'll be just matter of adding new content to the db.

  2. #2
    Quote Originally Posted by Darkhog View Post
    Unfortunately perlin noise has no business here. This is text adventure game.
    I'm well aware that you are making text based game. The reason why I recomended usage of Pernlin Noise is becouse it can generate what you might need 2D array of disposition values which you can then further use in making of your map.

    Quote Originally Posted by Darkhog View Post
    So any kind of heightmap won't do a trick here, if anything it'll slow down generation.
    I wasn't thinking about implementing real heightmap into game. I was only refering to height map in order to help you understand how data from Perlin Noise might come in handy to you. I gues you didn't make a conection in your mind the way I expeted you to.
    What heightmap actually is is a 2D array of height values in your case it could be 2D array of disposition values. Each pixel represent one value.

    Quote Originally Posted by Darkhog View Post
    Also it generates cells only in direction room has exits (unless one is already generated like one player came from), so if room has only exit to the north, it'll only generate new room in that direction, of course making sure generated room has exit at the south, so player can go back if necessary.
    I can already see a potential flaw in your algorithm. Lets look at the next example:
    You have rooms A, B, C and D. Your algorithm started in A and created a room exit to East. Then it creates room B which is East of room A and has exits to West and South. So later it creates room C which is South of room B and has exits to North and West. Later the algorithm creates room D which is West from room C and it has exits to East and North.
    So if you visualize the room placment at this point it would look like this:
    AB
    DC
    The problem is that room D now has exit leading toward North, basically toward room A but room A does not have exit toward South.
    So what do you doo now? Do you remove Northen exit of room D? Do you add Southern exit to room A? Or do you simply disregard this situation and leave it as it is?
    I definitly don't recomend the last one. Why. Many pepole who play text based games also use pen and paper for drawing themself a map about the world they have explored and such scenario will definitly make them go crazy. Yes I have played a text game once which had that exact problem in it.

    Quote Originally Posted by Darkhog View Post
    game's is LCL-based as I don't like DOS prompt which may or may not work on new Windows version some time in future and has very small font by default on higher resolutions.
    Getting back to the topic, I haven't started it because I first need to build big enough db of rooms so testing can be done properly. After I finish base code, it'll be just matter of adding new content to the db.[/QUOTE]

    I seriously doubt that Microsoft will remove the command promt any time son from the Windows based on the fact that there are many microsofts own system managment programs which soley depend on command promt as they don't have any GUI.
    As for the commnad prompt font size I think you can change the size for current console in which your program is running programatically. I have to check if that is realy posible.
    But yes making a basic GUI even if it is only comprised of black Memo controll with wite text in it is a good idea since it will alow you to port your game to other platforms which might not have command prompt support.

    BTW In other thread you are asking for modified TEdit controll. Are you intending to use that TEdit for typing in commands? I belive you could do all this only by using TMemo. You would have to use it's OnKeyDown events to detect when user presses Enter. Also you would have to intercept Backspace key press in order to prevent user from deleting all the text in the memo itself.

  3. #3
    I think that special rooms could be controled using conditionals. You use perlin noise to generate your map while you drop rooms at random and set connections between them, then your generation algorithm drops a special and change a state, boolean is great for this. You need to have a little list of special rooms.

  4. #4
    I'm working on a text-based adventure game engine for my job. Actually it's being rewritten again due to bad design decisions (I was using an old BASIC program as guide). Also I'm writing it in Spanish.

    What I did was to read about existing game engines (i.e: Aetheria) then created an UML and start coding. Actually, our UML-Class diagram is very different than Aetheria's one, but it was a good guide to know what we would find. Also, our engine will be sript guided using a custom language, but theoretically it should be possible to create a game in plain Object Pascal.

    Our schema uses a grid-map, much like a tile-map, each cell is a room. You can stack maps to create floors. This way is easy to build maps.
    No signature provided yet.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •