bladedpenguin's Forum Posts

  • Actually, encrypting the JSON files sounds like a really good solution. Seems that Kyatric was working on something a while back, but it looks like that never got off the ground. Still, there are a number of javascript cryptography libraries which might be turned into a plugin.

    Are you trying to prevent users from learning map secrets by reading map files? Or are you trying to make sure everyone is playing on the same map in a multiplayer game? If it's the latter, you can usually get away with a hash instead of full encryption.

    Understand that you can't be entirely secure. At some point, you have to accept that your game is running on someone else's hardware. You can however, make it a huge pain in the butt to cheat, and encryption will accomplish this.

    Ninja Edit:

  • Thanks for the reply. If I check for and delete the new copies (by IID), should the originals retain their data from the previous layout?

    Edit: Confirmed that all works as it should. Thank you for all that you do Ashley!

  • I've been using RexRainbow's Zsorter. It can sort everything on the layer every tick. I don't imagine it's the most efficient way to solve the problem, but it means that when the player is below an object, that object is behind of the object, and when the player is above, the object is in front. This allows the player to walk behind various objects.

    Is this what you were asking?

  • Anything you want to make an "infinitely moving animation" has to be tilable, at least in the direction you are moving it.

    Just make sure the last frame lines up with the first in a reasonable way.

  • How far apart are the links in the chain?

    Divide the distance between the links by the number of frames you want, and offset the chain by that many pixels for each frame. By the final frame, your chain should have almost moved forward one link, so when it loops back to the beginning, it looks like the beginning was the next frame.

  • There is admittedly a lack of polymorphism. I've been learning the underlying engine and extending with javascript where I need to, but I think this represents a limitation in the engine.

    C2 is not without limitations, but I think its darn good for the level of complexity it is designed for. It's definitely miles more usable and extensible than RPGmaker, but it's several steps less complex than, say, the unreal engine, for example. UE4 has a steep learning curve.

  • I'm still not quite sure what you are seeing, or what you are expecting. I put together a capx as an example.

    I two objects in a family. Each displays it's own IID. When the layout starts up, both objects have IID 0, because they are the first object of their type, even though one is the second object in the family. More objects are created with left and right click, and the IID is always the next highest number for that object. I also set up something to cycle through and pick everything in the family in order, and it does this correctly, despite the fact that there are two separate IID sequences in the Family. If you were to add a third object type to the family, it would also start counting it's IID from 0.

  • I'm working on an RPG, and I implemented a Touchable family, for things that can get picked by the action button. For cross platform compatibility, objects in this family always call thier action function when either touched by the sensor or tapped by touch or clicked on. I also have and Item Family, which should get picked up when touched. In order to avoid copying the touchable events, I want to add the Item Family to the Touchable family..... What is the best way to do this?

  • IID is calculated per object, not per family, So, if I understand correctly, you can have multiple instances in a family with the same IID. I just tested, and confirmed that when looking in the debugger by family, only the first instance of an object has the IID 0.

    If I understand correctly, You can still use the system action "pick by nth instance", and it will work for families. It should be possible to use this to set up an instance variable for Family Instance ID.

    I apologize if I have misunderstood.

  • You can right click in empty space on an event sheet and select "Include Event Sheet", which will add another event sheet. In my project, each layout has it's own event sheet, but each individual event sheet includes the Common Events sheet.

  • Sounds like you need new friends......

    Much of the info about C2 games seems to be in the various xml files. Alternately, open it up with Firebug, though the vast majority of what firebug shows you is the Engine's code.

  • >

    >

    > Every tick, move all the tiles down by ScrollRate * dt, or maybe give them all the bullet behavior, moving down.

    >

    > Pick the TIle with the lowest Y value. if that Y value is higher than zero, use a loop to create a new row of tiles at Yvalue-32 and randomly assign them the same way you already do.

    > when a tile has Y > layout height, destroy it.

    >

    Why should i give them a bullet behavior? Doesnt that mean that the tiles would move down all the time?

    How dould i pick the lowest value and create a loop? I know what you mean but cant figure out how to create this event.

    Ah I thought tiles moving down all the time was what you want?

    I thought there was a way to pick instances by the lowest/highest expression, but apparantly that's only for instance varialbes. What you can do is use the sprite Event Compare X or Compare Y to pick the tiles which are off the screen in a particular direction, and use pick nearest/furthest to see if the outermost is close enough for you to spawn a new row of tiles.

    If you do intend scrolling to be multidirectional and follow the player instead of constantly scrolling, it would be best if you kept using the array for not only level generation, but storage as well. RexRainbow has a plugin that handles grids rather well; I am using it for my RPG. Even though you won't have the player moving on the board, you might look into his LogicMask, which automatically restricts the set of active tiles to the ones on the screen.

  • I notice you are using the array object only for setting up the level. It's better to use a pair of named For loops, one for X, and one for Y.

    Every tick, move all the tiles down by ScrollRate * dt, or maybe give them all the bullet behavior, moving down.

    Pick the TIle with the lowest Y value. if that Y value is higher than zero, use a loop to create a new row of tiles at Yvalue-32 and randomly assign them the same way you already do.

    when a tile has Y > layout height, destroy it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I would suggest moving every object except for the player in order to get a scrolling effect. You can control the rate of movement with a global variable that you slowly increment.

  • I might suggest some kind of sensor sprite out in front of each car to help you pick out the car in front. Once you have the location of the nearest car in front, you can check the distance, and speed up if it gets too far away, slow down or reverse if it gets too close. You can compare the angle to the car in front to see if you need to turn left or right. You can get a number of interesting swarm behaviors with variations on this algorithm.

    Edit: http://en.wikipedia.org/wiki/Boids. I think there may be an implementation somewhere around here....