Arima's Forum Posts

  • They look completely aliased on my machine. Are you sure that the text is not between pixels? Try setting the position of the text object to round(.x), round(.y) and scroll to round(scrollx), round(scrolly). Also try a new.cap from scratch, insert a text object and preview.

  • Nice. This should go on the wiki, now that you're an editor!

    Edit: the objects from a different layout don't need to be global. All global means is the object won't be destroyed upon leaving the layout and it shows up in all event sheets in the editor.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Impressive stuff!

    As I am using construct for a commercial game as well, let me give you some advice and answer some of your questions.

    Making a map editor is completely possible.

    If you're going to have between 300-600 MB of graphics, you're probably going to have to roll your own image loading solution. Construct can take a while to compile if there's a lot of graphics in the .cap. Each time you edit the graphics and preview the application again with that many graphics, it's going to take an excruciatingly long time for it to compile. As such, if you put all of your graphics in a folder and load them from there, it will go much, much faster, as the game will only load the ones you need when you want them. As for encrypting them, lucid's plugin "s" has encryption capabilities.

    1. Attaching a shadow underneath characters is definitely possible, I'm doing it in my game right now. What you do is first, create the shadow object and give it a variable 'uid'.

    Then put every object that needs a shadow into a family, let's call it 'shadowfamily'.

    Give that family a variable 'shadow' via the family manager under the project tab.

    Have two events:

    if family's variable 'shadow' is equal to 0

    • create sprite "shadow"
    • set shadow's variable 'uid' to shadowfamily.uid
    • set shadowfamily's variable 'shadow' to 1

    event two

    for each shadowfamily

    if shadow's variable 'uid' is equal to shadowfamily.uid

    • set position of shadow to shadowfamily

    2. Yes, you can create objects from different layouts. The easiest way to get objects from different layouts to appear in all event sheets is to temporarily make the object global, then it will be accessible from every layout's event sheet. Remember to uncheck global when you're done!

    3. The system object has an action that frees up VRAM, "load/unload layout textures." However, in the application properties, there is a setting for "load textures" - if that is set to per layout, then it will automatically load all textures needed for the layout at the start of a layout, and unload the previous layout's textures. There are a few new tips up about memory management on the wiki section on VRAM: http://sourceforge.net/apps/mediawiki/c ... ation_tips

    4. I don't know of any way to do exclusively isometric pathfinding.

    5. Yes, using the image manipulator, you can load images from disk and copy and paste images to and from sprites. One limitation at the moment is you cannot create extra frames of animation at runtime. You'll need to make sure that the sprite has enough animation frames before you compile.

  • Please add me to the list of editors as well. I'm amirai there.

  • Are you using the latest unstable version? It contains a fix to something that sounds a lot like that.

    Edit: Bugs go on the bug tracker. http://sourceforge.net/tracker/?group_i ... id=1003219

  • I generally make a copy of an event by dragging it while holding control, then make the new condition, then delete the rest of the conditions and actions. It depends on the event, but this can be sometimes faster.

  • Awesome, thanks! Though even if you can't get the speed to stay constant, it would still be very useful, since at the moment we're limited to 4 points via cubic.

  • Great plug-in. One request I have is a different interpolation method for the path. Right now it's kind of angular, whereas the interpolation for cubic is extremely smooth. Is there any way you could get that smooth interpolation as an alternative 'curved' method?

  • Don't use system compare to pick objects, because it doesn't pick anything. To pick objects, use the compare height condition in the list of conditions for the object, not the system.

  • When setting animations, construct does not restart the animation. Basically it changes what animation is playing without changing the animation frame. That means if you're on frame five of your walk cycle and then switch over to your attack animation and your attack animation is only five frames long, it'll be like it barely played at all.

    What you want to do is put 'play animation' after an animation change when you want to play the animation from the beginning.

  • I asked about this a while ago and Ashley's response was that it's a part of directX that's coded incorrectly that he can't do anything about. That and font distribution problems are why I finally decided to use sprite-based text instead. I have an example and so does pixelrebirth, both accessible from this thread:

  • PLEASE don't remove else! There are a bunch of places in my RPG battle engine where I use it and I can't think of any other way to do the things I'm doing without it.

  • If you have construct set to 'per layout' then it dumps all the textures from the previous layout and loads the textures for all the objects in the next one. If you create an object from another layout and its textures aren't already loaded, construct then loads the textures for the created object and will have to wait until they are loaded to do anything else. As such you might want to create one of any objects that might show up in the layout at the start of the layout, when everything else is loading as well.

  • That is correct.

  • There seems to be some confusion about when to use for each, so I hope to clear that up here.

    What for each does

    For each will run a loop containing all of the conditions and actions after it for each instance of the object specified, picking only one of those instances each time.

    for each sprite

    • rotate 5 degrees

    Let's assume there are 10 instances of a sprite for this tutorial. What happens here is Construct picks one of the sprites, forgets the others, then runs the actions. Since there are 10 sprites, the actions are performed 10 times, but since construct picks only one of the sprites each time, all of the sprites are only rotated 5 degrees.

    The event above is an example of when NOT to use for each, because you would get the same effect as if you deleted the for each sprite condition, and it would be faster and more efficient as well because construct would rotate them all at once instead of one by one individually. Here's an example of when you would want to use for each.

    for each sprite

    • Create object "selectioncircle" at sprite.X, sprite.Y

    In this example, construct will run the actions once for each sprite. This way construct creates a selection circle for each sprite, and since only one sprite is on the selected object list when it runs the loop, it also knows where to place the selection circle when using sprite.X and sprite.Y. The result is 10 selection circles created, each at a sprite's location.

    If you did not use for each sprite in the example above, it would pick all of the sprites, create one selection circle and place it at one sprite.

    Construct not only runs the events for each sprite selected in the for each loop, but it also checks any conditions after the for each condition for each object. Here I show the number of times Construct runs each condition and action.

    For each sprite - 1

    if sprite is visible - 10

    • actions - 10

    In this example, construct checks if each sprite is visible one by one. This is less efficient than checking them all at once which construct does if you place the "if sprite is visible" condition before the for each condition like so.

    if sprite is visible - 1

    For each sprite - 1

    • actions - 10

    Another benefit of putting the if sprite is visible condition before the for each condition is it reduces the number of loops run by the for each condition to the minimum number required. If there are 5 visible sprites, then the event above would run this many times:

    if sprite is visible - 1

    For each sprite - 1

    • actions - 5

    For each is useful if you need to run the actions once each time for each object, but should not be used when you can do all of the actions at once.

    Another example when not to use it:

    for each sprite

    • set private variable to 1

    If you're setting a private variable, you generally don't need to use for each, even if the result will be different for each sprite. For example, setting the sprite's private variable to sprite.x will result in each sprite having its private variable set to its own x position.

    However in this example:

    for each sprite

    if selectioncircle value 'spriteuid' is equal to sprite.UID

    • set selection circle position to sprite.X, sprite.Y

    Construct will pick one sprite each loop, check all selection circles for if their private variable is set to the sprite's UID, then set the position of that selection circle. This would not work without for each.

    Also note that any subevents of an event with a for each condition will be run for each instance of the for each loop.

    In summary: for each will run all conditions, actions and subevents after it for the number of times equal to the number of instances picked, picking one of those instances each time.

    Edit: fixed grammar.