Arima's Recent Forum Activity

  • That bug is a constant problem. You're correct, it's a memory leak that has to do with redrawing those icons and it particularly affects games with lots of objects in a layout. Basically, the more objects you have in a layout, the faster it'll crash. Obviously, working with an event sheet is even worse because that lists all of the objects for the entire game. I can open the expression editor maybe five times in an event sheet before construct crashes. The picture editor also contributes to the memory leak, and so does editing events in the event sheet without opening expression editor (though much less). I think it's been posted to the tracker three times. I mentioned it to one of the devs and they said that section of the code was a mess.

    Regardless, I think this bug is the most important one that needs to be fixed. I've had to resort to finding ways to avoid opening the expression editor - I search for some other event that has a similar condition or action, copy and paste it and edit it, but that doesn't work if I have to change what variable it affects or such. Lately I've been trying to use a blank layout and paste the few objects I need into it and code there, then copy the code back into other event sheets, but deleting objects from a layout of a game the size of the one I'm working on takes a long time. Like seriously, I might as well go watch a TV show while it's doing it.

    PLEASE scirra people, please fix this bug!! Even if that section of the code is a mess, is there some way that we could just not display those icons? I know most of the commands and don't use that section to retrieve them very much at all anymore, and if I need to, I can check it in another layout.

  • [quote:3vh4nomb][quote:3vh4nomb][quote:3vh4nomb]we can't use several image in a single sprite object ?

    No.

    k, a good feature request, so .

    I use this feature a lot with Gm, and it's very usefull to have a unique Object that can draw several image, for a lot of things (characters with different parts, UI...).

    There's no real reason for a feature like that. You can achieve the same effect using multiple sprites. That's exactly what containers are made for. How else would you tell the multiple images what to do? I don't know how GM does it, but since a sprite is basically an image anyway...

  • The example was quicker to make than I thought. It's a lot faster to make when you already know how to do it!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Here is an example showing how to 'hack' isometric/node based path finding into construct. It's not a true solution, so there are times when it acts a little funny and sometimes requires fiddling with the settings a bit, but it works for most situations. Made with 99.84.

    http://69.24.73.172/scirra/forum/download/file.php?id=622&sid=62dd6e82b7f3327279be9db2e70b7747

  • [quote:3qlawz3p]

    What I'm looking is the ability to change the frame of a unique sprite Object, but not for all the instance of this Object

    Ah. I'm not sure if there is a way to do that.

    [quote:3qlawz3p]I try to understand, but if you would have an example, it will be more easy for me .

    It took me a month to figure out how to do it for my game, and I'm very busy. I might give it a shot, though.

    [quote:3qlawz3p]perhap's with a plug ins, like with GM.

    Unless the "s" plug-in has some sort of feature like that, there aren't any others that have memory management. You'd have to create your own.

    [quote:3qlawz3p]we can't use several image in a single sprite object ?

    No.

  • It should be just that simple to batch export, resize, and crop, as well.

    As I mentioned, holding alt and clicking crop will crop all of the frames in an animation.

  • YEs, for the moment, I use the "load animation frame from file" feature to change my sprite, to avoid to have a too big time for compiling.

    I don't know if there is another feature.

    Can we load any file at the begining of the layout (with the image list or image manipulator, perhap's), and change the image sprite object when we desire ?

    I'm confused. The feature you're asking for is load animation frame from file, which you said you're already using?

    [quote:2u8rz71j]The RTS will not work fine good in this case (not square case, but "iso" (diamond ?)).

    quote:2u8rz71j]Is there another technic ? (simple if possible ).

    It might be possible to hack together a system where you place node sprites all over the map (automatically via an event at runtime, of course!) arranged how you want isometrically, have a pathfinding sprite with RTS behavior that goes ahead of the player, keep track of which nodes it overlaps or it gets closest to, then have your character walk towards those node sprites in order. I don't know if that'll work, but I'm using a sort of hacked system like that in my game for node-based pathfinding.

    [quote:2u8rz71j]ok. For Vram it's a good things to know. I use the "load textures per layout" settings in my game.

    IS it a way to free up the RAM ?

    My game with GM use only 5 - 10 Mo in ram, but with Construct, the same game use 80 Mo in ram.

    How can I change that (if it's possible) ?

    Oops, sorry, I thought you were talking about VRAM. As far as I know, there's no way to control how much RAM construct is using.

    [quote:2u8rz71j]ok. it's great. Can we use several image on a single sprite object ?

    For example :

    • 1 image for the character
    • 1 image for his shadow
    • 1 image for his sword

    ..

    On the same sprite object ?

    Yes, using multiple sprites and containers. http://sourceforge.net/apps/mediawiki/c ... Containers

  • You can use a canvas and image manipulator to do most of that automatically.

    Resize the sprite to whatever you want in the layout editor or at runtime and put a canvas over the sprite. Have an event:

    for 1 to 150 (number of frames)

    Trigger once

    • Sprite: set animation frame to loopindex
    • canvas: clear to transparent
    • paste sprite to canvas
    • send canvas's image to image manipulator using copy from Sprite (works with canvases)
    • save as PNG "animation" & loopindex & ".png"

    That will save all of the frames to PNGs automatically. Reimport to construct using the import frames feature so you can import them all at once, then open the animation to edit it, alt-click with the hotspot tool to set the hotspot for all the animation frames at once and alt-click crop to crop all the frames at once. Much faster.

    While trying to get it right, you might even be able to load all the frames from disk at runtime as well, by for 1 to 150, setting the animation frame of the sprite then loading animation frame from file "animation" & loopindex & ".png", though construct sometimes crashes when using this feature. Also, you need to make sure that a sprite has the number of frames you'd need before trying this at runtime, because you can't create animation frames at runtime.

  • 2.5D stuff:

  • 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.

  • 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.

Arima's avatar

Arima

Member since 11 Jun, 2007

None one is following Arima yet!

Connect with Arima

Trophy Case

  • Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Email Verified

Progress

19/44
How to earn trophies