Arima's Forum Posts

  • I've been working on a major game in construct for about a year and a half. It currently has about 5000 events and the game is about a hundred megabytes of data. Here's what I can tell you:

    Construct is very, very close to ready for a major game, but what's holding it back from ready status is stuff that can be worked around. There are two things standing in the way:

    1. Copying and pasting between .caps is an unfinished feature, and will mess up whatever .cap you paste to (copying and pasting within the same .cap is fine). Therefore, construct is currently only suitable for a game made by one programmer. If one person is coding the whole game, or at the very least only one person is working on it at a time, that's not an issue.

    2. There's a memory leak involving the expression/picture editors and how many objects are in a layout. Every time the expression and picture editors are opened, construct will use more memory. Eventually, it will cause construct to crash. The length of time that it takes for construct to crash depends on how many objects are in a layout. This bug is probably going to go mostly unnoticed until you have about 100-200 objects in a layout. Then it gets really annoying. I've had to find ways around opening the expression editor in layouts with lots of objects whenever possible. If this one bug were fixed, then construct would be ready for a major game.

    One way to combat this is to make objects be multipurpose when possible by defining different behaviors for the objects based upon variables, so one object can perform multiple tasks. This obviously doesn't work in all circumstances, but it does work for quite a few.

    As for the speed of the editor, when you have lots of graphics, it takes longer to save, load and preview, but from what I've noticed, large background images seem to effect the saving/loading/previewing speed the most. I got around this by loading backgrounds at runtime instead of including them in the .cap. It makes it MUCH faster. Doing this reduced the amount of time it took to save, load and preview by about half, maybe more.

    Having lots of events mainly makes opening the event editor and previewing take longer, it doesn't seem to affect saving speed much. My battle event sheet is about 2000 events and it takes about 30 seconds to open the first time, and about 10-15 seconds subsequent times.

    Even with the issues I've mentioned, it's still doable. It just gets a little awkward trying to avoid opening the expression editor.

  • DUDE... awesome.

    Hmm... I wonder if there's some way to automate this a bit more. What exactly does the event exporter do? Could it be made to export to java code that could then use that engine to plug in to?

    Or... is there some way that upon exporting, the java engine could be used like the directx engine at runtime, merely using the java one instead? And does it matter if he's basically creating a new runtime?

  • Same answer as before. If you want the runtime to use anything other than the current version of DirectX nine, you'll have to code it yourself. I can't help you any more than that, otherwise I would've tried to have written a direct X 8 runtime myself!

    You can get the source on sourceforge. http://construct.svn.sourceforge.net/viewvc/construct/

  • The only ways to get it to run without DirectX nine is either use the application runtime (which isn't really an option for games, as it has no graphics engine) or code a new runtime that uses something different like OpenGL, DirectX 8 or a software renderer.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Wow, that is a LOT of sprites. Be careful to watch your VRAM usage!

  • You can use the 'move at angle' action for this. Basically, find out what angle and what distance to move the created object when the base object is at angle zero, then add the main object's angle to the angle to move the created object.

    Create sprite2 at sprite.x, sprite.y

    move sprite2 at angle: initalamount+sprite.angle

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

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