crowtongue's Forum Posts

  • Don't really see anything constructive that could come out of this discussion. We'll take that as a good sign if you couldn't find one.

  • + some condition that indicates loading begins

    -> Array: Set size to File.FileCount(apppath & "/images") x 1 x 1

    -> System: Set global variable 'count' to 0

    ++ For Each File in apppath & "/images"

    --> System: Add 1 to global variable 'count'

    --> Array: Set index global('count') to File.CurFile

    ++ For each element

    --> Create Object Text on Layer 1 at ((Array.CurrentX % 10) * 30 + 20), (floor(Array.CurrentX / 10) * 30 + 20)

    I basically used this for creating text objects. There are 71 files in my images directory.

    ... 5042 text objects are created. This is where my troubleshooting has left me.

  • This is where I am as of now.

    <img src="https://dl.dropbox.com/u/69407974/textobject.jpg" border="0" />

    This is supposed to cycle through the array in the subevent and move each Text object, but currently it doesn't do anything. I haven't been able to find which part isn't working right now.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Some more observations and suggestions:

    The changes add to your game for the most part so good job.

    First of all there are a couple of bugs which effect the game quite a bit.

    1. If you are holding left or right when you switch to crouching your shots will go diagonal into the ground. This can be frustrating, especially during the boss fight.

    2. If you finish the game and decided to play again, you start with the same health as you finished the game with.

    -I don't entirely understand the boulder objects I have to admit. I think if you shoot one and it turns not solid, the ones on top of it should drop. There's nothing to immediately suggest anything is different about them after you shoot them otherwise (even though they turn dark blue.)

    Also there is a part with a large shaft where you jump up on platforms, and there are a bunch of boulders here. You can actually just jump on the boulders, you don't have to shoot them, which isn't what I think you intended. Perhaps if you made it so you could shoot them you could make boulders fall on top of the player and hurt them. It would make this part more exciting.

    You added a weird skull thing, I thought that was kind of cool.

    The room where you drop down into a bunch of enemies, it might be a good touch if it's completely dark at the sides until you kill the enemies. This way they stay hidden and when they move into the light it feels a bit more crowded and frantic.

    The boss fight feels better, I think you slowed the shots down or something which made it work better. It might be a nice touch as you destroy more turrets to either spawn more enemies or make the guns speed up a bit, just to give the encounter a sense of urgency.

    I like to see that you updated your game again, and would encourage you to keep working on it!

  • So the text objects are all created and they now have all the right file names in them... But they all overlap

    Which way do I change that? If I create an event based on text overlapping text, it effects everything.

    I think I could maybe set the UIDs of every text object to an array, then check each array value against the UID it represents and somehow the position... but I can't quite wrap my brain around this. Is there an easier way?

  • >

    > For Each File in apppath & "/images"

    > For Each Element

    >

    > Set Value Array.CurrentX, Array.CurrentY to File.CurFile

    > Create Object Text on Layer 1 at (Array.CurrentX * 30 + 20) (Array.CurrentY * 30 +20)

    > Maybe I don't understand what you are trying to do? This code can't work. 'For each file' loops through all the 100 images, and for each image found the array loops through all elements in the array.

    I thought you would want to store each name to one array cell?

    This makes sense to me now that you explain it that way, but at the time I thought that it would loop through the 100 images, and for each image it went through it would also go through the array, hence adding a file each time it did it.

    I find Construct makes programmy stuff easy because you don't have to worry about syntax, but sometimes that is only half of the equation. You have to have the understanding of the tools you are using and good old sound logic too. For me, it doesn't sink in to read the problem as much as when I come against it myself. Now I understand 'For Each' better.

    + some condition that indicates loading begins

    -> Array: Set size to File.FileCount(apppath & "/images") x 1 x 1

    -> System: Set global variable 'count' to 0

    ++ For Each File in apppath & "/images"

    --> System: Add 1 to global variable 'count'

    --> Array: Set index global('count') to File.CurFile

    ++ For each element

    --> Create Object Text on Layer 1 at ((Array.CurrentX % 10) * 30 + 20), (floor(Array.CurrentX / 10) * 30 + 20)

    (Last one assuming you want to place the text boxes on a 10x10 grid)

    This actually seems to be cleaner in a way, since with R0j0hound's example the global variable seemed to crash Construct if I tried to store more than 40 things in it, and I essentially had to duplicate that event. Thank you for your help and explanations, Tulamide!

  • This works in theory, just wanted to point out it somehow overloads Construct if there are more than (rough estimate) 40 files in the directory. I think it'll be pretty easy to make an event to split it up into multiple variables.

  • Inserting dummy frames... I hadn't actually thought of that. I'm not sure how that impacts VRAM or whether there is an obvious downside to that. Anyone else care to share? Thanks for the input though I think I may play around with that on my own.

    As an aside I still can't figure out how to use the File Object in tandem with my arrays like I was talking about in my previous post. It dawned on me while I was doing that last night even though I was just starting it for organizational purposes, it's probably a good feature to allow you to automatically load a tileset by setting a directory.

  • So I understand Texture Setter and it's pretty brilliant. The hard part of this whole thing isn't going to actually be importing textures or adding textures, it's going to be having the UI elements work how I want them too.

    For starters, I'm trying to import the names of all 100 images in my images folder into my array then display them all in seperate text objects

    For Each File in apppath & "/images"

    For Each Element

    Set Value Array.CurrentX, Array.CurrentY to File.CurFile

    Create Object Text on Layer 1 at (Array.CurrentX * 30 + 20) (Array.CurrentY * 30 +20)

    I then have text items set to display all of the names. For some reason this won't work. I get either all 0's, or nothing at all. I've got a "clear array with 0" event on layout start too.

    What am I doing wrong here?

  • OK this is good to know...

    But now this puts me in a tricky spot. On one hand your plugin (Method #3) seems to be the best decision with no obvious downside to it. But if I do that my editor revolves around using the private variables of a sprite in order to reuse tiles and stop from slowing to a crawl if I make a huge map.

    I have no idea how I would achieve the same thing if I switch to Tiled BG.

    On the other hand I could probably keep what I have intact if I use Method #2. But would updating a single tile in one big image be harder than rewriting the code if I switched to Tiled BG?

    *EDIT* I realize after going through the examples that this is irrelevant. Method 3 is a combination of sprites and Tiled BG. This will be how I go forward

  • So I've come a ways since starting my map editor, thanks to loads of help from this forum (mainly R0j0hound.)

    I can create a map of any size I choose. The bigger ones don't lag horribly thanks to the technique R0j0hound taught me of cycling through tiles using their private variables. I can put different tiles down and then save my map, and load my maps back. If maps are a different size, it will re size them automatically. If I have a huge map and I want to work on a part on the opposite side, I can teleport there with the mini-map by right clicking on it.

    The mini-map shows the tiles that are drawn on it (even if it is kind of glitchy.)

    These are all things I'm very proud of. So what's next?

    Tilesets!

    I want to be able to create custom tilesets inside the map editor during runtime. I have decided to do this using animation frames so I can continue to use the power of private variables, thus I won't be switching to the tiled background technique people talk about.

    So here's my current thinking...

    I have an array called "Tileset." It is 4 x 25 in size. There is a button where you can click "add tile." this will create a new animation frame with a user selected graphic (I believe this is possible with the image manipulator plugin.) I have a canvas and a scrollbar beside the canvas. For each tile added, there is an entry in the array. For each entry in the array there is a tile into the canvas. The canvas will fit 3 rows of 4 tiles each before scrolling.

    The scrollbar will work by an up and down button as well as dragging the middle part. The middle part will have a Y size determined by the size of the array. I believe I can get the scrollbar to work by combining the space between rows and the height of the tiles with the size of the array, and using the lerp function for the scrollbar. This is pretty vague right now but it seems possible.

    The tileset array will be saved along with each map. That way there is always something to point to which images each time a map loads. This way every map should be able to have a different tileset.

    I realize there are some shortcomings, I would ideally like the tiles to all be saved into each map so no one could screw with them, but right now I am just trying to get the basics down.

    Eventually there will also be a system to assign attributes to a given tile (or tile range) so events can be made on each map.

    I am making this thread to ask you for feedback and for advice:

    • Has anyone tried anything like this before? Is what I'm talking about possible?
    • Am I missing any long term considerations?
    • How do I start with this? Everything seems to be so intertwined that I'm not actually sure where to start and how to go about this.

    I appreciate any and all comments. I realize this is ambitious for my second Construct project, but I have a knack for sticking with it. I'd love to share this with the community when it's finished so others can work with it and learn from it as I have.

    Here's my current .cap if anyone wants to take a gander.

    *As a disclaimer it is quite messy and full of bugs. I promise I will clean it up after the basic functionality is intact.*

    dl.dropbox.com/u/69407974/Map%20Editor%203.cap

  • This is probably my favourite game from Construct Classic so far.

    It's a simple idea, but it manages to be elegant at it. There is strategy to it and it is just awesome to watch it unfold.

    I am interested to see where you take this, and am quite impressed at the AI. With a bit more variety I could see myself playing this from time to time. Great work!

  • So here's a few things I thought could use some work.

    • I couldn't play the game with sound, so it made it kind of difficult to know when I'd been hit. It would be a good idea to make the player flash red or something like that.
    • The difficulty is uneven. I feel like the aliens that shoot at you should also have the ability to crouch and shoot or be able to run at you and hurt you. They just feel too easy without a different ability.
    • The boss seems to be way harder than the level. While I found this fine I think a lot of people would feel frustrated. Maybe make a random chance for it's shots to miss completely?
    • There are a couple empty rooms at the beginning that seem to be completely meaningless. I would do one of two things.

           - Make them full of some sort of graphic that adds to the atmosphere of the game and leaves an impression on the player.

           - Turn them in to some sort of platforming puzzle.

    If you fix the gameplay up a bit I think you could actually have a foundation for a great game here. That would be awesome, there really isn't a whole lot of Construct games out there.

    Keep up the good work! I hope to see another version of this!

  • Funny you should mention solar flare nodes. I've stopped playing because my last play through I was doing amazing until I had to fight a ship in one of these nodes, and of course my ship burned completely before I could even finish the fight. Frustrating! Still a good game though.

  • It would be better if you would post your .cap so we could see what isn't working.

    I made an example based on what you've said. Type something inside the editbox and click the button to change the 'username' variable, and thus create another object.

    dl.dropbox.com/u/69407974/test.cap