Citnarf's Forum Posts

  • Come to think of it somebody could make something like that for Construct in a plugin form.

    Imagine instead of wavs you simply generate the sound on the fly.

    Now THIS would be awesome.... who wants to do it?

  • Okay, heres an updated cap, i implemented your ideas Silent Cacophony, and i have to say its 100x better now.

    -The No. Of Rooms box now works

    -There is no longer a freeze at the end, as it removes all the walls as it goes! (well actually, it just doesn't create them in the first place )

    -There are no more blocked of areas

    http://dl.dropbox.com/u/6660860/DungeonGenV2.cap

    Also i couldn't get your idea of checking to see if the space is occupied before placing the tile to work exactly as you had it written down for some reason, so its slightly different now:

    if (wall tile):
        if (family blue does not overlap drawing location):
            draw wall tile <-- This is the same
    if (ground tile):
        if (ground tile does not overlap drawing location):
            create ground tile
    [/code:1ic5pi12]
    This way it doesn't stack ground tiles, however it still can create a ground tile over a wall tile. I tried to fix this but it started leaving gaping holes in the walls or ground.
    
    A 300 room dungeon uses about 13,000 total tiles now, a bit better than the 15,300 100 room dungeon before.
  • A couple of notes about this come to mind. I noticed that you had trouble with setting a global variable to the user-input room number, and just set it to a static 99 instead. This can be done by coercing the string value into a numerical value by using the system expression int() or float().

    Thanks! I feel like an idiot now, i really should have known this as i did do some java in school, and we did exactly this to convert ints to strings, or strings to ints.

    Also, I noted that a 100-room dungeon ends up creating around 5,200 wall tiles and 15,300 ground tiles, then reduces the number of wall tiles to 400-700 or so after destroying the ones that overlap ground tiles. This leaves a lot of 'stacked' ground tiles that are unnecessary. It also may need two passes to remove all of the extra walls, since it's doing all of that in a single tick, and Construct only updates such changes at the end of the tick.

    Again, i have no idea how i didn't think of all those excess ground tiles stacking up .

    I would probably avoid creating all of the extra tiles by using the system condition object overlaps point to test of a tile already exists at the current drawing location. Putting the wall and ground tile objects together into a family (say, 'blue') would simplify things. Then the drawing part could be done something like so (in pseudocode):

    if (wall tile):
        if (family blue does not overlap drawing location):
            draw wall tile
    if (ground tile):
        if (wall tile overlaps drawing location):
            destroy wall tile
        if (family blue does not overlap drawing location):
            draw ground tile[/code:1n57v74v]
    
    That assumes that the wall tiles will be destroyed instantly, and the next check will not see a 'blue' there afterward. I'm not sure if that's the case, but otherwise one could add another 'draw ground tile' after the 'destroy wall tile', I guess.
    
    

    I really like this idea, a lot, but i wonder if it would make the dungeon a lot slower to generate? Since it will be checking for an overlap every time it tries to create an object? I'm probably totally wrong, and I'm going to give this a try right now .

    Also, just for fun i decided to change the second function, instead of setting the room pos to a random wall tile, i set it to a random ground tile and it seems to work much better this way.

  • Ok, here is the .cap

    http://dl.dropbox.com/u/6660860/DungeonGen.cap

    A few things i should mention, this is my first time using arrays, ever, so i might not have used them perfectly, but hey it works. Also, I'm really bad at explaining things so some of the comments might make no sense .

    And finally, yes i know i could have just used 1 function for the whole thing, but i couldn't be bothered changing it now.

    Also, you should be able to quite easily adapt this to use tiles bigger than 16*16 by simply changing the size of the wall and ground, to 32x32 for example and simply changing the "GridSize" variable to 32. Although i haven't tested this.

  • So today i decided to make a random dungeon generator, it didn't really turn out as i would have liked so it actually really just generates large randomly shaped rooms. I had originally planned on it creating rooms all attached to each other with corridors but it was quite complicated and so this is just what i ended up with.

    Here are two "dungeons" i generated with it:

    <img src="http://dl.dropbox.com/u/6660860/Dungeon1.png">

    <img src="http://dl.dropbox.com/u/6660860/Dungeon2.png">

    As you can see, there are some areas that are blocked off, i can't figure out how to fix this.

    And heres the exe:

    http://dl.dropbox.com/u/6660860/DungeonGen.exe

    The No. Of rooms box does not work right now either, which is due to a bug in construct i think, which you will see when i upload the cap later. Also, after the dungeon is done creating itself, it might appear to freeze for a moment, this is where it "hollows" itself out and is checking for ALOT of collisions at once.

    After the dungeon is created you can zoom in and out with your mouse wheel and scroll around the map with WASD

    I will also upload the cap later, after i finish commenting it all .

  • This is how i would do it, however, I'm sure there is a better way so you might want to wait for more replies .

    Anyway, your going to need 3 variables, the players Current Level, his current XP and the amount of XP required to gain the next level.

    So obviously, when the player does something that grants XP, you just add whatever amount he gets to the current XP variable, then when the current XP variable is equal or greater than the required XP, increase the players level by 1 and reset the current XP back down to 0.

    As for working out how much XP will be needed for each level without having a set pattern, i think you will need to work out a formula that will work for you. For example you might go:

    Required XP = Current Level * 10 + 100

    This would mean at level 4 you would need 140 XP to get level 5. Or at level 20 you would need 300.

    You will obviously want to work out your own formula however.

  • I think I should make this a new stable build to replace 0.99.62, even if 0.99.91 isn't perfect, it's probably still way ahead.

    General agreement?

    Do it

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 1:38 - 1:44, i want to eat it.

  • I much prefer the look of style 2

  • The IF statement in construct is actually called a "Compare" your looking for System -> Compare Global Variable

  • Oooh that rather nice Zotged. I take it thats using the new 3d object?

    Not a screenshot but an output of something I've been playing with in construct.

    *awesome stuff*

    It takes a 32x32 graphic and outputs the BBCODE for you to use on forums.

    That is quite impressive!!!

    What is the first one a picture of though? I can't figure it out .

    EDIT: OH is it sonic?

  • You guys are just too awesome!

    Thanks for the build, some really nice changes and fixes here .

  • Constant 60fps

    i7 930

    6gb DDR3 ram

    XFX 5870 1gb

    Win 7 64bit

  • Woah.... out of all the bugs i have come across this is the most bizarre bug ever...

    I wonder what causes it.