LukeW's Forum Posts

  • Heya

    Been trying to think of the best ways to do the following. I wanted a top down project where an npc can be clicked and ordered to move to a position if that gridspace is free. movement and everything is easy enough to set up with the pathfinding tool, but the area check is what's giving me pause.

    Was wondering if, rather than having the npc move to mouse.x, mouse.y, instead I should spawn an invisible sprite that spawns in that grid space and acts as a beacon, remaining in that area until the npc either dies or moves to another area. that way, when you click to move an npc to an area, the beacon won't spawn in that area if there's already one in the space, and so the next npc can't move.

    It seems a bit convoluted though, and I don't like that I'm effectively doubling the number of instances in the level by doing this.

    It might also be better than the second npc can move in the general area of the first, and instead fill an empty space adjacent to the targeted area.

    Is there a better way to handle this?

    Cheers

  • Heya

    Trying to make a little RTS and I want the troops to be able to move freely through each other, but only have one standing in each tile once they get to their location. Best example of this I could think of are the troops from the original Command & Conquer, where they could walk freely through a group of standing soldiers, but there could only ever be a limit to how many occupy one tile (in that game 5).

    Tried looking around the web for best practise with no luck. Even the RTS template on C2 doesn't address this issue as the tanks can occupy each other's space.

    So basically, I want troops to be able to walk past each other (so no blocking in terms of pathfinding) but I don't want them to be able to stand in the same tile once they come to rest.

    Cheers

  • Thank you.

  • How's this:

    https://dl.dropboxusercontent.com/u/542 ... lemap.capx

    If you want tiles you placed in the editor to autotile you'll have to call "bitwise update" for each tile at the start of the layout.

    R0J0hound I know it's old now, but I don't suppose you still have this lying about? The link's dead and I was hoping to have a lookie <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

    Cheers

  • How do you plan to extend/shorten its length? looks like that gif is one single lazer with a clear start and finish, which means that if you keep it that way, you'll be stretching it out and it will looks weird.

    What I think would be best is to have a modular lazer beam that can be short or as long as it needs to be and the system adds in the segments to match the length. That would require breaking up them beam into parts, and each segment would need to start and finish in the same spot in the sprite sheet so the beam looks continuous as it animates.

    Someone else might have a better idea than me though.

  • It looks like that beam is split up into separate sprites. If you look carefully, you can see repeated sections, some mirrored.

    I reckon a simple way would be to have a bunch of beam segment sprites that get called in randomly and placed along a path. As long as the sprites all have the same start and end point there shouldn't be any visible seams. Hell, you could even animate them if you had the time to spend on it.

  • Okay, had a look at this. The problem is that you have the condition of mouse click on the envelop as a sub group of the condition when the player is NOT in the dining room. If you take the mouse click on letter condition out of this subgroup, it works. So it's just a matter of putting the condition in a different spot.

    I would actually suggest you stop at this point and take a bit of time to start using groups, as it's going to make tracking this sort of stuff a lot easier, especially as your project gets bigger.

  • Are you saying you want to max the variable out at 100 (so a player can't have 101, 102, etc...)?

    If so, just have an event setup like so:

    Condition: variable health greater than 100

    Action: variable health set to 100

    If that's not what you mean then sorry, having a hard time understanding what you're trying to say

  • Heya

    Had an idea rumbling around in my head for a few years without ever touching it as I felt it was above my skills, though as I get more experienced with game design, it's something I think about more and more, and now that I've discovered C2, I ask myself if it's an engine that would fit this type of idea.

    Anyway, got a hypothetical question regarding this idea. I wanted to create a game that potentially has a lot of characters on screen at once, thinking up to 30, and have the potential for each character to be visually different.

    With Spriter, I could see this working well as I can rig up my animations once and set the sprites to switch out to change things like hair, weapons, skin tone and clothing without too much trouble. This would give a nice amount of variation to the characters on screen, and would also allow additions later on to increase the variance if I wanted. If I went with sprites, I'm pretty sure the system could handle this if all the characters are being loaded off the same sheet, but spritesheets can be pretty limited as you can't really make little adjustments to characters without redrawing the whole sheet. And even if I did have a bunch of different sheets (say 10 all up), I wonder what the impact on the performance would be by having so many loaded in at once.

    My question is about performance. If each character has 16 bones, and there's 30 characters, that's going to equate to 480 bones on screen at once. Seems like a lot, and I'm wondering if C2 can even handle something like that.

    Has anyone worked with Spriter in C2 and can give feedback on performance with large numbers of bones on screen at once?

  • Sounds like you want separate global variables for life and regeneration stored as a number value.

    When you level up, you can add to the variable by however much you wish it to be.

  • remove the https:// from the link and try posting again. I know, it's annoying.

  • probably lots of ways. One way I could think of is to have an idle timer set in a variable which activates when the character stops moving and increases by 1 every second, then compare that in an event. If it reaches a certain number (thinking in seconds and however long you want it to wait), then set animation to the sleeping loop.

    when the character moves, that variable just needs to be set back to zero.

  • Hey CreativeMind, sounds like fisholith has this covered. just thought I'd add to it though in case you decide to go with the tiled background method.

    I've been working on a game for a couple of years called Wildfire. It's a GameMaker game, so we're not concerned about mobile performance, but one of the ways we handled snow was by creating tiling sprites that are largely empty aside from the snow. By having several of these layers, and working within the current layer order of your game, you can add a greater sense of depth. this can be achieved by having the closest layer with larger drops, scaling down as you go further back. for you it might be dependent on how far you want to push the hardware whether you go multi-layered. You can also change the fall angle for each page to add further differentiation.

    One thing I would suggest, if you go this way, is to download a program called Pyxel Edit and create the image to the size you want it, by having a bunch of tiles to display (so, for example, start a new doc, you might want to set it to 20 x 20 tiles, with a pixel resolution of 32x32). You can then assign each tile to be the same, so when you draw on one, all of them get drawn on. This is massively helpful for making tiled backgrounds as you'll be able to see it in a live update as you draw inside the tile.

    It's what I used when I did the snow, which looks like this:

  • I haven't been using C2 for that long, so not sure on best method for this. But my suggestion would be, you have an event there for the key press already, so use the action 'set animation' in there. Have it mirrored in the opposite direction for the other key press event.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • How's this?

    dropbox.com/s/9k2722k6x3rmdc1/escalator.capx?dl=0

    I used platform behaviour on the box as I had no idea how you planned on getting them to move around.