Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 66 67 [68] 69 70 ... 72

Author Topic: The Roguelike Development Megathread  (Read 239896 times)

Neonivek

  • Bay Watcher
    • View Profile
Re: The Roguelike Development Megathread
« Reply #1005 on: August 19, 2014, 12:41:35 am »

The only problem with that is the potential for unwinnable situations.

That is why you need a few Catches.
Logged

Zireael

  • Bay Watcher
    • View Profile
Re: The Roguelike Development Megathread
« Reply #1006 on: August 19, 2014, 02:31:39 am »

XGamer, I've a similar algorithm for my worldmap, and sometimes the character will end up boxed in the starting loc.
Like this:
@#
##

Have you had the same problem?
Logged

Xgamer4

  • Bay Watcher
    • View Profile
Re: The Roguelike Development Megathread
« Reply #1007 on: August 19, 2014, 02:39:42 am »

Not yet, but that algorithm was purely a case of "well, why not try it just to see?", so I didn't actually expect it to work - let alone that well. Consequently, while i haven't seen the player get blocked, I've also only run it a few times and fully expect that to be a possibility I'll need to account for.

How I'll account for it I'm not actually sure - honestly, I'm not even sure if I'll keep the algorithm quite that simple (though I most likely won't change it much). I just thought it was cool how something so simple worked that well, so I posted it.
Logged
insert something mind-blowing/witty here*

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: The Roguelike Development Megathread
« Reply #1008 on: August 19, 2014, 03:35:21 am »

I'm considering making a simple text-based game to try out being data-driven. I wonder if unit tests (a la TDD) would be useful in game development if all.
Logged

bay12 lower boards IRC:irc.darkmyst.org @ #bay12lb
"Oh, they never lie. They dissemble, evade, prevaricate, confoud, confuse, distract, obscure, subtly misrepresent and willfully misunderstand with what often appears to be a positively gleeful relish ... but they never lie" -- Look To Windward

Antsan

  • Bay Watcher
    • View Profile
Re: The Roguelike Development Megathread
« Reply #1009 on: August 19, 2014, 05:12:39 am »

Not yet, but that algorithm was purely a case of "well, why not try it just to see?", so I didn't actually expect it to work - let alone that well. Consequently, while i haven't seen the player get blocked, I've also only run it a few times and fully expect that to be a possibility I'll need to account for.

How I'll account for it I'm not actually sure - honestly, I'm not even sure if I'll keep the algorithm quite that simple (though I most likely won't change it much). I just thought it was cool how something so simple worked that well, so I posted it.
Maybe something like this:
(1) generate the map
(2) detect the largest connected area
(3) check, whether that area meets some conditions (maybe it needs to be connected to the edge of the map or something?)
(3a) if yes, place the starting position in that area
(3b) if not, go back to (1)
(4) delete everything not in or adjacent to the connected area
Never tried this approach, but it's what I would try in your situation first.
Logged
Taste my Paci-Fist

EnigmaticHat

  • Bay Watcher
  • I vibrate, I die, I vibrate again
    • View Profile
Re: The Roguelike Development Megathread
« Reply #1010 on: August 19, 2014, 06:12:51 am »

There are two simple solutions:
1.  Place a down stair and an up stair, and then ensure there is a path between them.  The easiest way of doing this is to clear away trees in a straight line between the two, although that won't lead to a good level layout.
2.  Make it so the player can destroy trees.  Unfortunately there can be no limit on how many times they can do this, as if the player can ever be rendered unable to destroy trees then they could become boxed in.

There's also the middle ground, which would be having only some trees breakable and then randomly selecting trees to become breakable until the exit/whatever can be reached.
Logged
"T-take this non-euclidean geometry, h-humanity-baka. I m-made it, but not because I l-li-l-like you or anything! I just felt s-sorry for you, b-baka."
You misspelled seance.  Are possessing Draignean?  Are you actually a ghost in the shell? You have to tell us if you are, that's the rule

Antsan

  • Bay Watcher
    • View Profile
Re: The Roguelike Development Megathread
« Reply #1011 on: August 19, 2014, 07:17:04 am »

Another idea: Place entry and exit, then do an A*-search from entry to exit with cost for floor being 1 and cost for tree being 2. Remove all trees on the resulting path.
Logged
Taste my Paci-Fist

Xgamer4

  • Bay Watcher
    • View Profile
Re: The Roguelike Development Megathread
« Reply #1012 on: August 19, 2014, 11:47:27 am »

Hmm... Yeah, all good ideas. At the moment I'm not even sure how I intend to do transitions, exactly. The idea was to start out in a giant forest, with the goal to being to find some ancient ruins that lead into a more standard roguelike dungeon. (Thematically: Start in the Everfree Forest, looking for the Castle of the Two Sisters).

So giving the player the ability to chop down trees doesn't seem like a terrible idea. I'd just need to find some way to disincentivize mindlessly chopping your way through each segment (because that's just not that fun).

So I'd probably need some way to make sure all tiles are connected, anyway...

I dunno, complete map gen is a bit lower on my to-do list, so I still have time to think about it and figure it out. Now that I have something realistic-ish to test with I want to work on actually getting stats, abilities, level-up/progession mechanics, etc and enemies with basic AI in the game.
Logged
insert something mind-blowing/witty here*

BlindKitty

  • Bay Watcher
    • View Profile
Re: The Roguelike Development Megathread
« Reply #1013 on: August 19, 2014, 12:29:51 pm »

The simplest idea to limit tree-chopping would be to make it costly in some way - either in some form of energy/hunger, or whatever currency exists in-game (for example, by forcing player to use breakable, costly, always-accessible tools), or by releasing dryads from fallen trees which are non-trivial, scaling mobs hostile to whoever cut the tree down. Let them be dangerous enough to make player think twice before cutting the tree down, but beatable enough to avoid stopping him from cutting the tree at all.
Logged
My little roguelike craft-centered game thread. Check it out.

GENERATION 10: The first time you see this, copy it into your sig on any forum and add 1 to the generation. Social experiment.

Neonivek

  • Bay Watcher
    • View Profile
Re: The Roguelike Development Megathread
« Reply #1014 on: August 19, 2014, 12:31:39 pm »

The simplest idea to limit tree-chopping would be to make it costly in some way - either in some form of energy/hunger, or whatever currency exists in-game (for example, by forcing player to use breakable, costly, always-accessible tools), or by releasing dryads from fallen trees which are non-trivial, scaling mobs hostile to whoever cut the tree down. Let them be dangerous enough to make player think twice before cutting the tree down, but beatable enough to avoid stopping him from cutting the tree at all.

Lets not punish the player for thinking outside the box. Especially in a roguelike where skipping floors is suicide.
Logged

Xgamer4

  • Bay Watcher
    • View Profile
Re: The Roguelike Development Megathread
« Reply #1015 on: August 19, 2014, 01:41:44 pm »

Resource usage is an interesting idea, and something I might toy with, but the problem there is that there's still no guarantees that they can reach the exit, because the game could randomly generate more trees between the player and the exit than the player can cut down.

Scaling mobs is just a bad idea. Both for what Neonivek said, and because that's just not fun or nice if the player winds up in a situation where they have to cut down multiple trees.

Making it possible, though unlikely, to spawn a not-trivial but still easily beatable enemy each time a tree is cut could do the same thing, though... that might be something to try as well.
Logged
insert something mind-blowing/witty here*

Antsan

  • Bay Watcher
    • View Profile
Re: The Roguelike Development Megathread
« Reply #1016 on: August 19, 2014, 02:54:53 pm »

I think Timberwolfs might be fitting. Chopped down trees leave timber. A Timberwolf is made up of x pieces of timber. If that much is chopped, the pieces start moving to each other. When they all are at the same location in the end, a Timberwolf forms.
If you include some way to influence how the timber moves maybe there is a way to make this more interesting, so creative players can get away with chopping down trees via forcing timber to move in circles or at least take a longer route. Chopping down more trees makes it harder to manage all the timber logging around.
Logged
Taste my Paci-Fist

Retropunch

  • Bay Watcher
    • View Profile
Re: The Roguelike Development Megathread
« Reply #1017 on: August 20, 2014, 01:20:01 am »

The best way to make a maze in this case would be to do something node based. So you have a start, an exit, and a number of points scattered around the map (maybe make sure they're a distance away from each other). You then destroy trees along the line from the exit to point 1, then to point 2, and then to the player. This stops it being a straight line, and although sometimes you'll get a slightly awkward path or one which is pretty much a straight line, it'll create a basic maze which isn't just a diagonal line.

You can mess around with how many points you want, how far away they should be from each other and that kinda thing, but it should work pretty well in making sure you can get to the exit as well as not being just a straight line.
Logged
With enough work and polish, it could have been a forgettable flash game on Kongregate.

Skyrunner

  • Bay Watcher
  • ?!?!
    • View Profile
    • Portfolio
Re: The Roguelike Development Megathread
« Reply #1018 on: August 20, 2014, 01:29:38 am »

I wish the console was more capable... :P

Other than using ncurses there seems to be no way to have autocompletion from a list of defined things in Python, that is portable. :(
Logged

bay12 lower boards IRC:irc.darkmyst.org @ #bay12lb
"Oh, they never lie. They dissemble, evade, prevaricate, confoud, confuse, distract, obscure, subtly misrepresent and willfully misunderstand with what often appears to be a positively gleeful relish ... but they never lie" -- Look To Windward

alexandertnt

  • Bay Watcher
  • (map 'list (lambda (post) (+ post awesome)) posts)
    • View Profile
Re: The Roguelike Development Megathread
« Reply #1019 on: August 20, 2014, 07:12:54 am »

What you could also do is everytime you place a tree, check to see if it forms an L shape out of 3 trees. If it does then don't place the tree. and assuming you can move diagonally, that shouldn't block any paths

Code: (Check for these (T=tree)) [Select]
.T.
.TT
...

...
.TT
.T.

...
TT.
.T.

.T.
TT.
...
Logged
This is when I imagine the hilarity which may happen if certain things are glichy. Such as targeting your own body parts to eat.

You eat your own head
YOU HAVE BEEN STRUCK DOWN!
Pages: 1 ... 66 67 [68] 69 70 ... 72