KeeghanM's Recent Forum Activity

  • Wow! This looks absolutely fantastic. Following this one closely for sure!

  • Hi Everyone!

    Recently I had an idea to work on a top down, survival game. It was something to test myself and try things I hadn't done before.

    One of those things was procedural generation.

    The vision in my head was to generate a random island, using a 3D array. The x,y coords of the array are the x,y coords of the physical game tiles and the z axis is the game data; tile type, object type, mob etc etc.

    After a bit of reading I came across the following article:

    http://noelberry.ca/2011/04/procedural- ... -the-caves

    Which focuses on caves.

    However a side on cave is really just the same as a top down island (If you use some imagination <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink"> <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink"> ).

    TL:DR of that article is it uses a Miner algorithm to generate the land.

      1: Set everything to wall 2: Spawn some miners at the center For each miner 3: Pick a random direction 4: If solid move there 5: Set location to clear 6: If completely surround, delete miner

    Which on the surface seemed simple. Two days later proved it was not!

    HOWEVER! I am happy to say I managed to implement the algorithm(or 90%, see below), and a demo of it can be found here: http://373737.co.nf/WorldGenerator/index.html

    Also view my other games on the home page <img src="{SMILIES_PATH}/icon_e_wink.gif" alt=";)" title="Wink">

    Here are some examples of different generations. As you can see some are more Cave like and others more island like, all depends on the parameters set by the user.

    Things still to do:

      1: Implement a Clean Up system (removes 1x1, 2x1, 3x1 and 2x2) 2: Add edge support (if near edge turn a different way)

    Then if I want to expand into my survival kind of game idea I need a way to generate multiple tile types. Implement a shoreline (sand tile) system. And then obviously actual game mechanics buts thats a whole other thing.

    Anyway, let me know your thoughts on it so far, and if anyone wants a CapX or even a tutorial please let me know!

    Will keep everyone updated with my progress.

    thanks!

    Keeghan

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hey man appreciate that! Definitely a place to start, will have a play and see what I find.

    Will post results here.

  • Still hoping for some help

  • Anyone have any ideas?

  • Just a wee bump, still stuck on this. I even took a break to implement a combat system, came back and no luck.

    My poor brain just isn't up to it.

  • Hi,

    I've spent the last few days working on a wee game, its going pretty well but I've hit a snag. I can get my enemies to go to the player using pathfind/line of sight, but they always end up at the middle of my player. Which is an issue for my combat which is done by selecting the enemy.

    I can get them to go to just off my character by pathfinding to Player.X-50 but that still means they all end up in the one spot.

    How can i make them fan out around me, I'm thinking some sort of pathfind to random angle. But I just don't know enough to implement it.

    Heres the code block Im focused on:

    Thanks for any and all help!

KeeghanM's avatar

KeeghanM

Member since 8 Jan, 2015

Twitter
KeeghanM has 1 followers

Connect with KeeghanM

Trophy Case

  • 9-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

11/44
How to earn trophies