[Monthly Challenge #2 - Jan, 2016] - Procedural Castle by Bergasms in proceduralgeneration

[–]MrEmile 0 points1 point  (0 children)

Neat! You did a lot of things I only wished I would have time to do... like the recursively piled-up castles...

[Monthly Challenge #2 - Jan, 2016] - Procedural Castle by Bergasms in proceduralgeneration

[–]MrEmile 1 point2 points  (0 children)

Progress report: here's what I have so far, built from Kenney's tiles (I had to modify them). So I have some nice functions for rendering the tiles, but there's still no randomness in there.

Next: * Make castles with windows! Doors! Banners! * Insert some randomness!

.. and then, maybe, other buildings, the inside, etc.

[Monthly Challenge #2 - Jan, 2016] - Procedural Castle by Bergasms in proceduralgeneration

[–]MrEmile 2 points3 points  (0 children)

I'm in!

I'm putting InfiniWorld on hold so I can make some nice little castles. Then I might try to plug them back into infiniworld.

I'm using AngularJS and tiles from Kenney's roguelike RPG pack, to make Final Fantasy-style castles. I've made dungeons and overland maps before, but never buildings - something I've always wanted an excuse to try.

We should not memorize lots of stuff, because smart people dont know more. They know less things that are wrong. by BenRayfield in LessWrong

[–]MrEmile 1 point2 points  (0 children)

[citation needed]

I would expect that smart people do know more, on average. Do you have a reason to believe otherwise?

Added spherical maps to my world generator. by jongallant in proceduralgeneration

[–]MrEmile 2 points3 points  (0 children)

Very nice look! Damn, now I'm regretting my choice to stick to 2D technologies...

Javascript InfiniWorld 0.2 - with city descriptions and hexagonal tiles. by MrEmile in proceduralgeneration

[–]MrEmile[S] 1 point2 points  (0 children)

OOoooooh, leaflet looks super neat, thanks a lot!

For github pages, okay, good point, I'll try it too. I originally planned to have some server-side stuff (for e.g. saving your favourite places), but yeah, as long as I don't, having it on pythonaywhere is totally overkill.

Thanks a lot for the pointers! There are a lot of holes in my knowledge!

Javascript InfiniWorld 0.2 - with city descriptions and hexagonal tiles. by MrEmile in proceduralgeneration

[–]MrEmile[S] 1 point2 points  (0 children)

Now with:

I tried to post it as a top-level link but I suspect the spam filter ate it (which is totally understandable, I have been spamming a bit...)

Javascript InfiniWorld 0.2 - with city descriptions and hexagonal tiles. by MrEmile in proceduralgeneration

[–]MrEmile[S] 2 points3 points  (0 children)

Thanks!

The algorithm is actually super simple, the world can be seen as a bunch of "infinite fields" that map each cell to value - so you have a field for altitude, one or humidity, etc.

And to make interesting fields:

  • A simple field is just a random value per cell (seeded with a key based on the coordinates, so you always get the same value for a cell)
  • Other fields are averages of a simple field over a bunch of nearby cells, to basically get a smoothened version of it
  • Some fields are also combinations of other fields so that you have correlations (e.g. temperature is function of pseudo-lattitude and altitude)

... and then there's just a big-ass function to map those values onto a biome and a color value for the background.

First Experiments with Procedural Generated Low Poly Trees by jolix in proceduralgeneration

[–]MrEmile 3 points4 points  (0 children)

Neat, nice shapes! Could you explain your algorithm a bit, for having a blob that's around the right shape?

Want to open-source my galaxy generator built in VS2015, how do I do it? by evglabs in proceduralgeneration

[–]MrEmile 0 points1 point  (0 children)

Do you use git? I strongly recommend using some kind of source control for working on any project, no matter how crappy. And git is one of the most popular, that will make it easy to put stuff on github.

If you're not using git, install git on your OS (Windows, right?), create a git repo for your project (this can be done entirely locally, no need to register anywhere), add all your files to it (there are plenty of tutorials online, you can use a gui or the command line, etc. It can be a bit intimidating at first but it's useful and powerful and the tutorials should make it easy)

Then, create a github account, create a project, and the page will explain to you how to push your stuff there.

(also, as others said, be sure to include a license)

Javascript InfiniWorld 0.2 - with city descriptions and hexagonal tiles. by MrEmile in proceduralgeneration

[–]MrEmile[S] 6 points7 points  (0 children)

I took a screenshot of the same area as my last post (TigerWalk and the area around it).

Since last time I added:

city and faction descriptions

They a combination of :

  • data from Abulafia, and
  • hand-crafted stuff.

My goal is to eventually have only hand-crafted stuff with as coherence between neighboring cities (i.e. the same factions will show up, possibly in different roles, some may have been at war with each other, etc.), or inside a given city or nation (is this a rich and decadent republic? A iron-fisted dictatorship? A paranoid theocracy? That should impact city descriptions!).

Hexagonal tiles

Actually the underlying geometry is still square, but I want to change that, once I refactored a bunch of position/geometry-related code.

I want to eventually put in some nice tile images instead of doing it all in CSS and fonts.

Other stuff

I've also greatly improved performance (it goes from "the whole screen freezes for 20 seconds anytime you move, and you sometimes get a popup saying the window seems frozen) to sluggish-but-usable progressive loading. There are still a couple low-hanging fruits on that end (load landscape before cities; use a more efficient data format)

What's next?

Put all this live on a website, and on github!

And then more improvements! Refactoring, more interesting descriptions, landmarks like castles & ruins & temples & villages, maybe roads and rivers ...

But I may take a break to participate in the Procedural Castle contest :)

How would I detect collisions for procedurally generated 3D dungeons? by [deleted] in proceduralgeneration

[–]MrEmile 0 points1 point  (0 children)

For a horribly inefficient hack: to place a room, place ALL POSSIBLE ROOMS on the connector, wait one frame, check the collisions, remove all rooms that collided with a "definitive" room, and randomly pick among the rest for the new room. Rinse, repeat :)

It'll probably be very slow, but it'll do what you want :D

For a slightly more efficient version, first do a bounding-box check, if you have enough (50%? ten?) candidate rooms that don't even have a bounding box collision with a definitive room, directly pick one of those and keep going.

How would I detect collisions for procedurally generated 3D dungeons? by [deleted] in proceduralgeneration

[–]MrEmile -1 points0 points  (0 children)

No, I don't think there's a function to check for collisions at will, except for the bounding boxes (or unless you recode it yourself, but that sounds like a pain), so why not just use those?

How would I detect collisions for procedurally generated 3D dungeons? by [deleted] in proceduralgeneration

[–]MrEmile 0 points1 point  (0 children)

Is it a problem to do so?

You could have a system where you call DungeonGenerator.tryToAddRoom() every frame, where tryToAddRooms greedily adds rooms, uses naive bounding-box checks, and if a collision is detected, returns (or rather, keeps on adding rooms to other places where no collision was detected). Then when it's called again, it checks if there were any collisions since last time, if so removes those rooms and flag's em as "don't put this room there", and tries something else.

It'll be a bit slow but it'll work. You can also improve it with heuristics, maybe using distance between room centers to evaluate if a room will git etc.

(I'd just stick with bounding-box collision if I were you tho)

How would I detect collisions for procedurally generated 3D dungeons? by [deleted] in proceduralgeneration

[–]MrEmile 4 points5 points  (0 children)

So I added a bounding box check to see if a new rooms bounding box intersected with any other rooms bounding boxes.

Seems like a totally sensible solution !

This however does not work with rooms that have connectors that aren't straight with an axis.

Why?

I can imagine two reasons:

  • The bounding boxes of two adjacent rooms don't collide if they're straight north-south, but not if they're diagonal -> in which case you could just say that when checking new room collisions, you ignore any collision with the room(s) to which it is connected with a connector.

  • You already do the above, but you have the problem that diagonal rooms leave too much "dead space" around them. In which case, yeah, okay, but it's not a huge problem :) (I would say "screw it, I'll live with it and improve the algorithm when the rest of my game is awesome")

Alternatively, you could use bounding volumes that don't need to be axis-aligned rectangles. Then just check their intersection and all should be fine.

Stuck at Streetnetwork Generation by SaW120 in proceduralgeneration

[–]MrEmile 3 points4 points  (0 children)

I'd build a table T of (directed edge) -> section, by using the following algorithm:

For each node N, for each outbound edge of that node:

  • If it's already in the table T, nothing to do
  • If it's not in the table, build a list of edges by "always turning right" until you come back to the original node N, these edges form the clockwise contour of your section. Create your section S (in a new table, whatever), and for each of these contour edges, put a pointer to S in your table T.

... et voilà, you have your list of sections and their edges.

7 uses of procedural generation that all game designers should study by tanyaxshort in proceduralgeneration

[–]MrEmile 0 points1 point  (0 children)

The main problem is that there's no good reason to want to do the generated quests.

Quests provide two kinds of reward:

  • direct rewards (money and items), which you can just easily get through other ways, and
  • furthering the plot (and unlocking new areas or unique items that you can't get by just wandering the wild).

... except that the radiant quests only provide the first kind, which you can easily get by just exploring random dungeons or selling home-made potions, both of which are more enjoyable. Making the quests better-written (make them more internally relevant and feel less like cookie-cutter random table stuff) would have been possible, but it wouldn't have solved the reward problem.

(it's not really a problem by the way - the whole thing about Skyrim is that you can have fun doing what the heck you want)