blendman's Recent Forum Activity

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

    n fact, it's not the same function as "load animation frame from file" I look for.

    Because this function replace an animation frame of a sprite by a new picture. But all the instance using this sprite object are changing.

    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 : Only by example for the instance which private value"type" = 3.

    Like in this example :

    • I create 20 Objects named "sprite" have different private variable value (1 to 5).

    I would like that for the instance with Private variable Type = 1, they have the image 01.png. For the instance which have the private variable type = 2, they have the image 02.png, etc..

    + Sprite.value('type') = 1
    -> load animation frame from file "data\01.png"
    +else
    + Sprite.value('type') = 2
    -> load animation frame from file "data\02.png"
    etc...[/code:2vnp95m7]
    But, in my file, it doesn't work. I don't know if we can do that, and how.
    
    I have made a little example (.cap with 4 images) :
    [url]http://blendman.free.fr/construct/spriteImage.zip[/url]
    
    [quote:2vnp95m7][quote:2vnp95m7]The RTS will not work fine good in this case (not square case, but "iso" (diamond ?)).
    quote:2vnp95m7]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.
      try to understand, but if you would have an example, it will be more easy for me  .
    
    [quote[quote:2vnp95m7]]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.erhap's with a plug ins, like with GM.
    
    [quote:2vnp95m7][quote:2vnp95m7]ok. it's great. Can we use several image on a single sprite object ?
    For example :
    [ul]
    	[li]1 image for the character[/li]
    	[li]1 image for his shadow[/li]
    	[li]1 image for his sword[/li]
    [/ul]..
    On the same sprite object ?
    
    Yes, using multiple sprites and containers. [url=http://sourceforge.net/apps/mediawiki/construct/index.php?title=Containers]http://sourceforge.net/apps/mediawiki/c ... Containers[/url]
    ut we need to create several object Spirte, we can't use several image in a single sprite object ?
    
    
    [quote:2vnp95m7]I have tried it, but it doesn't in my example :
    
    Actually, you don't even need a for each here, just use "Always" instead.
    You will need to add an event to change its z to "place behind object" since the shadow was added to the layout after the shadow caster.
    h, yes, sorry, I have forgotten the always event to actualise the shadow 's position. Thanks.
  • Hi

    Thank you very much for the answer, it will help me a lot .

    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.

    Es, 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 ?

    [quote:3ec11ake]As for encrypting them, lucid's plugin "s" has encryption capabilities.

    hank for the information .

    I have find the "S" plugins from Lucid, and I will tried it.

    So I'm trying to create the same level editor as I have created with GM.

    But, I don't find a good pathfinding system (like A*).

    The RTS will not work fine good in this case (not square case, but "iso" (diamond ?)).

    [quote:3ec11ake]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

    hank you very much for this tips, I will tried it .

    For the moment, I use the family to create the shadows for the non-animated object, and the turret for animated characters.

    Your technic seems to be better than the turret technic .

    [quote:3ec11ake]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!

    es, I have discover this feature (global), it's veru usefull.

    [quote:3ec11ake]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

    k. 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) ?

    [quote:3ec11ake]4. I don't know of any way to do exclusively isometric pathfinding.

    nd for a normal pathfinding like A* with squarre cell ?

    The RTS behavior seems not working pretty well in some case.

    Is there another technic ? (simple if possible ).

    [quote:3ec11ake]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.

    k. 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 ?

    [quote:3ec11ake]Welcome to the board.

    On the drop shadow I would suggest placing it into a container with the desired object, and placing that object into a family, rather than using a private variable.

    Code: Select all

    For each shadow

    -> shadow set position to family.character

    When its in a container with the object, its paired object is already picked./

    have tried it, but it doesn't in my example :

    shadow.cap

    [quote:3ec11ake]Also the Sprite object has a built in function to load an image directly to the desired frame, called "Load animation frame from file". You just have to make sure the animation is set to the frame number you want it to load to.

    es, I have seen that feature. Thanks .

  • hi

    thank you for your answers .

    why not use the conditions for creating an object as the conditions for whatever action it is you have in mind?

    think:

    instead of having a condition create an object and this creation of the object being another condition for yet another action

    why not:

    have the conditions that would create an object produce the actions you desire

    Yes, in most of case, I think it will be good in a lot of case.

    In fact, there is a sort of "create" event thanks to that feature : properties (for object), private and global variable too can be usefull in this case .

    Sorry no there is no specific function to do that, but fortunately Construct allows you to create just about any condition you can think of via private variables, globals, the Function object, and many other finite state objects.

    To do this with a private variable simply change the objects variable when its created, or destroyed. Then add a condition that always compares that variable, and does something when it changes.

    have made that and it works fine, thank you .

    [quote:26uasvwe]Even simpler is the Function object. With it you can call your own function when the object is created/ destroyed. Then you just make up your own function as:

    On function "myfunction"

    -> Do this

    have tried to create a function, and it work very weel, thank.

    If you have some examples of functions utility, I'm interested too.

    Thanks again

  • hI

    This engine is interesting. I have tried it, but I don't have the shadows, and the engine is not pretty ccol than the layers editor of Construct.

    I think it could be really great to have this system of shadows and multi-textures in an object in Construct.

    A multi-textures/image for a sprite is good to others things like customisation for a character (to equip himself with sword, clothes..), or other interestings things ("static" shadows).

    Perhap's a shadow systeme could be "faked" by a filter like dropshadow but in isometric view, with an option like moving the top of the shadow, and give to the SizeY of transformation (/3 for example), we could fake a shadow system.

    Not the same, but another shadow system .

    The source of this engine seems to be here :

    http://ethanon.svn.sourceforge.net/

    or an old link here :

    http://sourceforge.net/projects/ethanon ... p/download

    Edit :

    One of my test :

    <img src="http://blendman.free.fr/ark/construct/ethanon_Scene.jpg">

    If you want to test the Sprite , and if you do the same in construct, you can post .cap :

    <img src="http://blendman.free.fr/ark/construct/barrel.png">

    <img src="http://blendman.free.fr/ark/construct/barrelN2.png">

  • It's interesting, thanks.

    Daize : thank for this technics too.

    Arima : thank you for the informations about global .

  • Hi

    I would like to modify this effect to create anew effet named :

    "Drop Isometric Shadow".

    The effect will be :

    Normal Dropshadow :

    <img src="http://blendman.free.fr/ark/construct/dropShadowNormal.jpg">

    IsoDropShadow :

    <img src="http://blendman.free.fr/ark/construct/dropShadowIso.jpg">

    Modification of the shadow :

    In fact, it seems to be easy : just to have a parameter which allow you to change the size of the shadow (in X, and Y).

    In my example, I have just change the size of Y of the shadow :

    normal 1:1

    iso 1:3 (1/3)

    So how can I do that with your code ? I have tried to do that , but it doesn't work.

    Here is the test I have made (buggued). I have add 2 news parameters :

    Size Y : it should change the Y size of the shadow, but in my code, it's buggued.

    Alpha-effect (of the original image, not for the shadow, which has opacity) : this effect allow you to change the alpha or add some effect to the image (not the sahdow)

        // Dropshadow isometric blurred
        // David Clark (edited by Louis Ferina, Jorge Fuente-Alba,)
        // PS 2.0
    
        //#CROSS-SAMPLING : reads pixels it may be writing.
        //#BORDER-MODE : samples pixels outside bounding box
        //#PARAM float offsetX 5.0 : X Offset: X offset of dropshadow.
        //#PARAM float offsetY 5.0 : Y Offset: Y offset of dropshadow.
    	//#PARAM float sizeY 5.0 : Y Size: Ysize of dropshadow.
    	//#PARAM float alpha 1.0 : alpha - effect: alpha effect of dropshadow.
        //#PARAM float blur 2.5 : Blur : Blur amount of dropshadow.
        //#PARAM float opacity 0.5 : Opacity : Opacity of dropshadow.
    
        // Foreground texture
        texture ForegroundTexture;
    
        // Foreground sampler
        sampler2D foreground = sampler_state {
            Texture = (ForegroundTexture);
            MinFilter = Point;
            MagFilter = Point;
            MipFilter = Point;
        };
    
        // Parameter variables
        float offsetX;
        float offsetY;
    	float sizeY;
    	float alpha;
        float pixelWidth;
        float pixelHeight;
        float blur;
        float opacity;
    
        // Effect function
        float4 EffectProcess( float2 Tex : TEXCOORD0 ) : COLOR0
        {
            // Add the front and back pixels
            float2 Tex2 = Tex;
    		float2 Tex3 = Tex2;
            Tex2.x -= offsetX * pixelWidth;
    		Tex2.y -= offsetY * pixelHeight;
    		float4 here = tex2D(foreground, Tex2.xy)*0.25;
            float4 left = tex2D(foreground, float2(Tex2.x - (pixelWidth*blur), Tex2.y*sizeY))*0.1875;
            float4 right = tex2D(foreground, float2(Tex2.x + (pixelWidth*blur), Tex2.y*sizeY))*0.1875;
    		float4 top = tex2D(foreground, float2(Tex2.x, Tex2.y*sizeY - (pixelHeight*blur)))*0.1875;
            float4 bottom = tex2D(foreground, float2(Tex2.x, Tex2.y*sizeY + (pixelHeight*blur)))*0.1875;
    
            float4 result = (here + left + right + top + bottom)* opacity;
            float4 src = tex2D(foreground, Tex.xy)*alpha;
    				
            result.rgb = 0;
           
            return result * (1-src.a) + src;
    
        }
    
        // ConstructEffect
        technique ConstructEffect
        {
            pass p0
            {
                VertexShader = null;
                PixelShader = compile ps_2_0 EffectProcess();
            }
        }
    
    [/code:3jw42yfp]
    
    Thank you for help
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I want to try it though, but first I have to do the 2.5d behavior.

    i what is this 2.5D behavior please ?

    I'm interested

  • Hi

    I would like to know if there is a simple function to do that :

    "At the creation of an object" or "at the destruction of an object"

    -> do actions

    Like the feature in GM :

    • create event
    • destroy event

    Thank you for your answer .

  • Thank you very much .

    I will study your file.

  • hi

    Thank you for this exemple, it's interesting.

    I would like to create a level-map editor for the game I work on, so I will study your example, and the example of gammabeam for the save\load technics, even if I prefer to have map separated (not in a big file).

    Have you plain to add other things, like color change ?Can we change the RGB value of a sprite ? I have don't find that.

    Another thing : I would like to know what is the "string" saved when we save a map made with your editor ?

    Thank you

  • Hi

    I'm new on Construct (I have downloaded it saturday, the 8 may 2010).

    I'm an advanced user of GameMaker since 2006, and I work in a professionnal game enterprise since 2000 (we made 3D games, or 2D games). I'm infographist 2D-3D, and art director on my projects.

    So I have to say that Construct is a very great open-source software, with a lot of very interesting features .

    I was really surprised with the power of construct. Of course, I have compared it with Game Maker and other tools I know, because I have used a lot GM, and make some "little big" games with it (demos in fact).

    So, I would like to thank all the developpers for this very great soft .

    My Game

    Name : 3 arks

    Genre : Adventure with a storyline, RPG. I hope to create an online mode, but I don't know if it's possible and easy as with 39dll .

    Style : sprites are Rendering with Blender. The style is cartoonish, colored and lightened.

    Screenshots and Videos

    Construct Version (only made in 2 days):

    GM version :

    With GM, I have made a Level (map) editor. I hope to do the same with Construct, but I don't know if it's possible to load some external map that I will create with this editor.

    For the moment, I try to see if we can use Construct in a professionnal porduction (for a 2D isometric game), but we need a lot of graphics, and we have to use some external ressources (between 300 and 600 Mo of graphics perhap's) . But I don't find how to use external encrypted ressources (without python).

    Some questions

    1. Is there a way to attach an image/somes images to the instances of the same object :

    ex : the shadow under the character. The shadow will be the same for all the different characters, which could be randomised (I hope). For the moment I use a Turret behavior, but I think it's not a good solution. But I haven't find another way to do that (because drop shadow isn't made for isometric game).

    2. Is it possible to use an object in differents layouts ? How can we do that ? (I don't talk about the inheritance fonction of the layer, because, we can't move the elements).

    For example : I have a tree and I would like to use this sprite in differents layout, move it, change his colour, size... on these layout, but with a unique sprite.

    [edit]OK, I think I need to make a global object (common settings).[/edit]

    3. is it possible to "free" the memory which is no more use, because, for the moment, the game use 80 Mo of ram, (with GM it's only 10 mo with more graphics and features (fx..)). A sort of plug ins like "free memory" of GM would be great .

    4. Is there a sort of A* pathfinding (following an iso grid and avoid the obstacle, and go to the waypoint)? I have found the RTS behavior, but it's not that I'm looking for (the way is direction free for example, because it's made for top-down game and not iso game.).

    5. Can I load different image on an object (not the same methode as add image in different frames of an animation (in the animator editor)), and how ?

    Thank you for answers, and sorry for my bad English .

blendman's avatar

blendman

Member since 8 May, 2010

None one is following blendman yet!

Trophy Case

  • 14-Year Club

Progress

14/44
How to earn trophies