shinkan's Forum Posts

  • Link to .capx file (required! If link is blocked remove the http and www parts):

    bumpmap with tilemaps.capx

    Steps to reproduce:

    1. Move mouse around over tilemaps on the left and sprites on the right

    2.

    3.

    Observed result:

    No idea what's going on here :D

    Comparing to sprites, bumpmapping effects acts like crazy on tilemaps and Tiled Background.

    First of all Bumpmapping acts different on these object having various size and position.

    and second - more important, bumpmapping is inverted on Y axis - but only with Y position. "Illumination" follows mouse properly.

    I mean if you follow mouse from bottom of tilemap in up direction you can see that edges of bricks on texture are brighter - but actual light comes from upper direction. Same opposite moving mouse top to bottom. Upper edge of bricks is brighter while light comes from down.

    Y axis on bumpmapping texture is set correctly, because I've been testing it with sprites at first and then moved to Tiled Background and Tilemap.

    Expected result:

    Bumpmapping working exactly the same way on all objects.

    Browsers affected:

    Chrome: yes

    Firefox: -

    Internet Explorer: yes

    Operating system & service pack:

    Win 7 64bit sp1

    Construct 2 version:

    r161

  • Katala That's a nice start! If you aiming for "realism" you will need to have 32 frames for directions. Or maybe 16 would be enough? games don't need to be real after all ;)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ok then, I was only answering your original question about memory - was thinking about 30-40 units with few animations and frames.

    But in that case I' would put them on separate objects and control them all using family - regarding to movement and variables.

  • Katala bare in mind that if Sprite is present in layout it will be loaded completely into memory. All animations and all frames.

    If you want to have 30-40 different units I propose to make them as a separate objects. Or group them in few sprites.

  • Yes

  • lennaert Thank You! :)

  • soldier sprite is something like a "demo" where all directions and animations are presented in interactive way.

    I made this soldier for sale, demo was created just to show sprites and game example to show how they behave in action :)

  • Yeah, true. But it's fun as hell playing that.

  • Did you try using instance vatiable to set Y value for current sprite and then sort Z order? something like that

    create instance variable "z" for family Boxes

    then

    every tick -> Sprite | Set "z" to self.Y

    System: For each Boxes order by Boxes.Z ascending > Boxes | move to top of layer

    this way you can specify Z order for every single object using

    every tick -> Sprite | Set "z" to self.Y+15

    or

    every tick -> Sprite | Set "z" to self.Y-150

    or whatever you like.

    Even if sprites image point will have Y=50 you can set this Sprites Z to let say 150 using Set "z" to self.Y+100

  • To be honest with you, I'v been studying your previous file version about making rooms xD. I'm dumb as hell with procedural level generation hehe

    For your question. Not really, Tilemap is one object and all tiles in it are just different parts of image - every part have own id number. So you can't set variables for each tile.

    However your file is ready for tilemap with your current array setup.

    In event nr 31 for Map| Value at (x,y) = X you just need to change "create object" to Tilemap | Set tile (x,y) to tile X and its done.

    And then you can use array to store all values for tiles (like variables for sprites) and use this values when something is happening to specific tile.

  • Like LittleStain said, and it's probably the easiest method around.

    Add Fade to object and then spawn it every X seconds.

  • Yeah it's possible

    Take a look a this

    on layout sized 8192x8192 in my setup i have less then 90 object.

    You could get only one tilemap for all tiles.

  • Yup, that's why I post my question ;)

    Bumpmaping acts very differently on Tilemaps compared to Sprites or TiledBackground. And that's the part I can't understand.

  • don't forget about delta time

    You can do: Sprite | set bullet speed to: sprite.bullet.speed+10*dt

    this way sprite will accelerate by 10 every second.