nimos100's Forum Posts

  • Sweet room generation, man. Keep us posted on your progress. Keen to see how you go about populating these meaningfully, procedural level design ftw

    This is the latest version and the one ill do the tutorial based on, as its more complete and functional, as it uses line of sight and player can move around with WSAD.

    Demo of the dungeon generator version 2.2 - Alpha: Demo of the dungeon generator version 2.2

    I don't really plan on populating the dungeon in the sense you would see in a normal rogue style game, as the one I need for my game is more a zoomed out map. As combat is not actually taking place on this map, but in a separate one which is a tactical combat. So if the player encounter a group of monster they are taken to another layout to fight, so I don't need to populate it with things. But I don't think its a huge problem to do it, you could just copy/paste how the rooms are generate or how the player is placed and just make it work with monsters and items. Also think it would be fairly easy to expand the design so the room generator makes bigger rooms that are more like a normal rogue style game. But someone else will have to make that part

  • nimos100, that's seriously cool. It's times like this that I wish these forums had a +rep/thanks button.

    You've already been very informative, but is there any chance you'd be keen on writing a formal tutorial with a capx? Or perhaps two tutorials - one with the pathfinding and another with the node-based technique?

    I guess I could do it. But don't think ill make one for the first, it was my first attempt to make one and it contain to many bugs, which i see no reason to introduce into a tutorial

    But the node based technique I guess I could as it works pretty solid from what I can see, even though Im pretty sure its not optimized. But it could serve as a good starting point for someone else that can maybe improve it into something better.

  • Not sure I understand you correct. But a variable can only have one value at the time. But if what you mean is that you want this to be either 1 or 2. Then you have to use int(random(2)+1) or you can do choose(1,2) I think, I normally use the first one, due to old habit.

  • Im currently working on a dungeon generator, but im far from an expert on the subject.

    But I started out trying to make one with path finding.

    Demo of the dungeon generator - Alpha: Demo of the dungeon generator - using path finding

    1. Path finding

    The idea behind it was to add X amount of rooms at random locations with random sizes. Each room then get a minimum of 1 door and as far as I remember the larger the room the more doors. These doors then work as connection points, which are added to a list. When all the doors have been added, it take a random door and path find to another random door on the list. And it just keep doing that until there are no more doors. The path that the path finder find between the doors are then turned into halls, and when its done it create walls around all floor tiles. The problem with this one, was that I found it a bit slow, even though I could have optimized it. But it also was quite complex to make and it does contain some problems where certain rooms might end up not being reachable. So I dropped it due to these things and then because it didn't really fit what I wanted for my game when I thought about it.

    2. Node system

    So I took a different approach which is a node system, that is easier to make. The idea is that each tile only have so many possibilities when it comes to how you can actually place them.

    To start the dungeon I start a random place, and then expand the dungeon from there.

    And it will keep expanding that way.

    Then I added a functionality that will either force the dungeon to stop expanding or force it to keep growing, which is done so im able to create different sizes.

    Then when its done making the whole dungeon, there are actually a lot of tiles that are messed up, because you cant be sure how it expand, so I complete it by running a clean up that correct all tiles. And when this is done its pretty simply to pick random tiles and replace them with room tiles since I only need rooms that are one tile I don't need to worry about where the rooms are connected as they will always be connected correctly, compared to the one with path finding, where im not sure where the doors will actually be placed.

    Demo of the dungeon generator version 2.1 - Alpha: Demo of the dungeon generator version 2.1 - node system

    But for both types or any time I think, its pretty much about setting up restrictions and rules for how things should work. But a good idea I think, at least it helped me a lot, is to take a piece of paper and then try to draw how you imagine it should work or make the tiles and just add them manual on a tilemap while trying to figure out what rules should apply and how you want it to work. But personally I think its one of the most difficult things to do, because there are so many rules and when bugs happen it can be quite hard to figure out what wrong.

  • What settings do you use in C2 for the tilemap?

  • [quote:1k5q6yfv]This is my placeholder Tilemap:

    Is that the tilemap that you use in the game, or is it a scaled down version?

    I tried downloading it and load it into C2, but there are not really any setting that will work with that tilemap in regards to avoid seams. (If the white lines are the seams you are referring to.) What sizes tiles are you aiming for?

  • [quote:1fhsn6gj]nothing really seems to be working. I applied the capx but it doesn't change the animation frame still. I appreciate the help but I think I might just scrap the store idea because its just won't work

    What I meant was try to upload the Capx then ill take a look at it.

  • [quote:271o4v5v]Looks nice. Hope you can get some progress on it. Looks like a very ambitious project. If nothing else I can say, good luck.

    Thanks Its actually getting along a lot faster than expected as I were very concerned about the dungeon generator in particular. But since the hardest part of it is done, which is the generation it self, which I really feared could make me give up the project after failing it to many times. But it works pretty decent and are easy to maintain and update, so the rest of the things are fairly fast to make.

    Added player dummy and light control to it today and it seems to work very well for what I need. So hopefully I can soon get going with the fun part, which are the combat it self

    Updated version of my dungeon generator:

    Demo of the dungeon generator version 2.2 - Alpha: Demo of the dungeon generator version 2.2 - Player dummy and light control

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Try to apply Capx.

    Or you can store it in global variable and then as you switch layout read the value from this one during start of layout.

  • Here is a capx where you can recreate it.

    To test it, press the "Generate large dungeon" and while it is generating (The background is still white) press Pause in the debugger.

    In the left select the "List_dungeon_possible_tiles".

    Then minimize the window and maximize it again. And the items in the list have changed. If you keep minimizing and maximizing again you can see it actually drawing the dungeon each time.

  • [quote:2rh79edw]The reason I didn't continue that post was because I actually did switch the player as a global object. I read your response and it sounded like a perfect solution but when I tested it, it still didn't change the player's animation frame. I tried to change it with a button and then after that, I went to the other layout by clicking another button but it didn't work. I started this thread because I figured what I was trying to accomplish was impossible through the way I tried. I was going to reply but I got sidetracked Sorry

    Its ok just confusing when the issue gets separated over several posts, and people might start to answer in both of them.

    Anyway sounds weird that you couldn't get it to work, you must have done something wrong then, I made a very simple example of how to do it.

    If you notice layout 2 is completely empty, but as you switch it seems all the buttons and object appear there, and its because I made them all global, and they use the same event sheet, but you could just as well have made them use there own one.

  • yes, as you might turn it visible again, so the game still need to know where it is.

  • [quote:3f9cs1h4]I want to make a shop inside of my game where I can buy accessories like helmets and or clothing and equip them to my player. My original thought was to make animation frames with the accessories added in and then just switch the player's frames when I buy the clothing or gear but I realized that I can't change the animation frames of my player from a different layout. Help is greatly appreciated.

    Why don't you continue the old post?

    I think you misunderstood what I said in that post, you can do it, if you change the player to global. And its the easiest way you can do it. You just have to make you game work with the player as an global object. The reason I said that you might experience some weird problems, is if you have made some of the game already and then suddenly change the player to global, you might experience some unexpected things. But you should just be aware of it and fix them if they occur.

    If you plan on using your player object on different layouts its a good idea to do It, as you will most likely have to later on anyway.

  • [quote:3shuh69m]It's not that they are getting lost, it's that they just aren't getting replies.

    Also some of these questions are quite hard to answer, as they can be quite specific regarding a certain topic, and if you haven't worked with it, it will be difficult to answer them. So as the questions gets harder also fewer will be able to answer them logical enough.

    But I do agree with the OP, that there are a lot of the same questions in the forum, some where the answer can be found on the next page or a few post down. So if you have an question that are a more advanced you need to bump it, as you cant be sure that those that can actually answer it will check page 3+ if you don't do it, due to these questions flooding page 1.

  • It is not possible to assign it to another layout in the way I think you mean it. However if the player object is global, it will affect all layouts if you change the animation frame for the player.

    You can mark the player object as global in the properties panel in the top, that might be what you need. However that also mean that the player is available on all layouts, so might create some problems that you didn't expect