Horrendous Games's Forum Posts

  • I don't think anything has that feature built in. There is a tool that R0J0hound built here-

    Although I don't have to use that to build the levels in that editor. I use it more for arrays that need inputs like a spreadsheet, like my animations list for my animation engine.

    Don't worry too much about scrolling. What I do for mine is I always set the array size to round(layoutWidth/32), round(layoutHeight/32), whatever z, and 32 is substituted for the size of your tiles, that way, anytime the size of the layout changes, it changes the size of the array.

    If you refer back to the article I posted, it should let you know how to do most of the basics. Like I said, it was written for MMF2, but it's basically the same structure as Construct (the wording on some of the commands is a bit different)

    Most of the time with arrays, it's just getting your head wrapped around the concept. I'm sure by now you've read plenty on them, as well as the information we've provided you with here, eventually it's going to go BOOM and you'll be on track. If it's too difficult to muster at this point, try putting together something else and then come back to it.

  • It makes sense. I haven't been using the canvas in the editor, and with leaving them as sprites I haven't witnessed any slowdown, although I have been restricting the size of the levels to 640x2-3 by 480x2-3, but we'll see as I make more progress into the game itself.

  • How did VengeEdit work? Was it too slow? Because they uses separate objects. The other trick to loading levels for use in play is to use the "canvas" object. Basically, it takes whatever object you tell it to and pastes it to the canvas as it's own image. So rather than having multiple sprites, you have one large backdrop, which I may be wrong but it's a little less for the cpu to deal with. Someone else might be able to elaborate.

    And thanks, I'm glad you like it.

  • http://dl.dropbox.com/u/16909290/VengeEdit.zip

    This is a build of the level editor I'm currently designing. I'm not entirely comfortable posting the source code at this stage, but I can work on a lite version as an example for everyone when I get a chance.

    The two boxes on the left with the X control the size of the layout, the one below that controls the scroll speed. The List next to that has all of the objects in the currently selected group that you can select to place. Next to that there are the 4 categories to choose from, foreground which is the collision type play area tiles, background which is the non collision type backing tiles, object which are all the placeable objects and items for the background, and misc which currently contains nothing yet (that's reserved for player starts, enemy spawns, level changes, ect.) The red box will hide the foreground when clicked. The colored boxes will change the tint of the object being placed, and you can fine tune it by changing the values at the bottom or click on the preview box to open the color picker. The list above the colors changes the backdrop, and the two boxes beside it change it's offset. And of course, the last 3 buttons save, load and erase the level. I've included an example level with the .zip.

  • It can be a bit daunting at first but after a bit of work, it gets pretty easy. I don't have the time right now to make a .cap for you, but I'll try to explain a few things as best I can.

    If you don't know already, an array is basically a grid, like any other grid, except on each point it can store a value. For instance, 1,1 would be a value (1X and 1Y) and 4,3 could have a different value. Most arrays can be 3 Dimensional, it helps to think of it like a spreadsheet in Microsoft Excel or OpenOffice Calc, most are set up on a grid for your X and Y and each sheet would be like a Z.

    With that said, once you create an array, it's completely blank. From here you can choose to load a file (and no, I'm sorry, you can't exactly load straight from a .txt file, hopefully C2 will have that feature), or input a value.

    To input a value, simply pick the command "set value at X" or "X,Y" or "X,Y,Z". From there you are able to select the address for the value you want to store. Be forewarned, if you select an address that is outside the bounds of the array (for instance, if you set the X size to 10, and you pick the number 11, it won't show, but any number from 1-10 is fine, also remember that the arrays are always 1-based so 0 is also out of bounds).

    After you have set a few values, you can save the array. Chose the save command, and pick the name of a file to save it to. If you aren't using a common dialog object to allow the user to choose a save location, it always helps to save the file as [AppPath+"yourarray.extention"]. You can save the file as anything you want, even make up an extension, heck call it, "yourarray.lol", it doesn't matter, the data will still be the same and construct will recognize it if you load it.

    To load it, it's the exact same thing, except this time click the load command instead of save.

    In calling a value from an array during an expression, all you need to do is say [yourarray(x,y,z)] then input the coordinates you wish.

    Arrays have 4 conditions that can be used. 3 of them are for referencing coordinates either as a 1D 2D or 3D coordinate. The last one, for each, is a loop. Basically it will run through each element and perform actions based on the events and the conditions. For instance, you can say [for Each element - set value at yourarray.currentX,yourarray.currentY,yourarray.currentZ to "Ziggy like Chicken"] and every coordinate on that array will say "Ziggy like Chicken".

    For level editors, it's a good idea to learn how to use values correctly to access a part of an array. For instance, the .CurrentXYZ will access the current section during a for each loop, but in your case you probably want it set to a grid. So, say you have your condition to when mouse left is clicked, instead of just saying "write value to 1,1,3", you'll probably want it to pick the coordinate that your mouse is pointing at, so say "write value to round(mouseX/32)*32, round(mouseY/32)*32, 1" and it will set the index to where ever your mouse is pointing on a 32x32 grid size. and of couse, also in this condition you can tell it to create a tile at that specific location, and all that fun stuff.

    Now that you can place tiles, you'll probably want to load them too. All you need to to to load them is whenever the load is triggered run a loop, call it "load" one time. as a sub event in that load loop, do a for each element on your array loop. As a sub event to that, you're going to compare a value on your array. [if value at currentX,currentY,currentZ is equal to "tile" (or whatever value you indicated to be a tile in the placement event) then create a tile at currentX*32, currentY*32, currentZ*32]

    And that's the basics, there are many more things you can do with a tile based editor, for instance, fringe tiling (which makes it so your tile changes based on the tiles around it), which I've got a fairly decent article on the subject here,

    http://www.create-games.com/article.asp?id=1869

    although that was written to be used in MMF2, construct uses the same logic.

    Hope this helped a little bit, and if you're still stuck I'm sure someone will help you further.

  • So essentially build a database that reads the OID reguardless of what it is, not a bad idea. Sure beats the hell out of having a separate set of events that do the same thing.

  • Is there something that determines what the Object ID is? Using a level editor that places an object based on it's ID works great, however, the number changes as I add objects, but only certain ones. This causes issues in terms of loading objects, as the incorrect objects will not load. Is there a way I can pick the OID? If not, any chance of seeing this as a feature in the near future?

  • For some reason, that doesn't work for me (it still copied itself even if they weren't in a container), although I managed to come up with a work-around. I'll check out the object pairer.

  • I have an event that creates an object, which is a container. when the container is created, it checks for each of them, creates the two objects in the container and sets a few values then destroys itself. For some reason, to construct this apparently means "container, copy yourself and keep doing it." There are no other events that cause it to copy, and when I delete the for each loop, it creates and doesn't copy itself. Am I doing something wrong or is it just broken?

  • Sorry to bump this, but this is just plain retarded. 1 based does not equal more intuitive, it does for some people, but a few people does not mean everybody. The logical choice is to let the user choose to use a 0 based or 1 based array, as certain situations arise where you WILL need a 0 based array, otherwise you will need use complex unnecessary math in order to get the desired result.

  • Nevermind, I've got it. It was a matter of creating a separate object to hold the values, then out of the loop if that object was colliding with one of them, it set it the values to the created object and destroys the temp object.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ugh, rapidshare, filefront and mediafire. Dropbox exists, might as well start using it.

    http://db.tt/disf1X1

    Use that link and you'll get an extra 250 gigs (a total of 2.25 gigs) and no upload limit, plus you don't have to log in to anything to use it.

    As far as the game itself is concerned, of course it could use some work (I'm sure you already know that) but I definitely think you should do those suggestions that Bartosh mentioned.

    On top of that, a few quick ideas you should be able to figure out easily

    1) reset the point on the gun so the bullets don't fire from his head. Just choose the image point in the image editor and make sure the bullet spawns from that image point, not just the center of the character.

    2) create a spawn point for the zombies. put some cracks in the wall and have them waddle out from there. It could be something simple, like create a sprite that is just a flatshaded box outside the play area. Create a variable for a timer, call it timer or something. When that timer reaches 0, then create a zombie and set the timer to some number + a random number, such as 50+Random(100). When that timer number is greater than 0, subtract 1 from it to make sure it counts down (but does not go passed zero). If you want to make things really interesting, when the timer resets, set the value to "ValueA+Random(ValueB)". Add a condition to the spawn event to say if Value A is greater than a certain number (whatever you want, this is just to prevent the spawn points from spawning instantly), then copy the event and change the greater than to lower or equal to. On the greater than event, subtract a certain number from valueA and valueB, then just initialize them both to whatever you like, this way as time goes on, the zombies start spawning much quicker.

    3) Make some scenery, maybe some walls, whatever. You can also make some crates or other objects and give them the "physics" behavior so they can be pushed around, just make sure that you give the physics behavior to the character and zombies as well.

    4) Don't make the zombies so fast. I'd settle for slower tougher zombies any day.

    Good luck

  • You know, you could probably get this to read 3D arrays. It's just a matter of making a + and - key to swap between the different sheets. The size of the z array would be determined on the largest z page with a value on it. Don't know if this is plausible or not.

  • I've got an object that I create based on a value from an array, it's also supposed to set the objects angle and filter. Rather than creating a different event for each different objects or tiles, I figured it would be easier to just grab the Object ID and create one event to handle all the different objects. It creates the right object, the only problem is that there is no way to use that same expression to change the angle and filter value. I would set a private variable to change the values from there, but the only issue is I won't be able to access that correct item on the array. Any ideas?

  • That's a great solution, although I'm not sure how that would work for edit boxes, I have a few assumptions, but I think I'm just going to let it be and stick with what I've got. It only happens during the level editor so as long as it doesn't happen in game I'll be just happy.