Colonel Justice's Forum Posts

  • Hi there,

    for some reason, I get 0 when retrieving vertex coordinates from a distortion map.

    Here's the deal:

    System: Start of layout

    -> Sprite: Set distort map size to 2, 2

    And then for testing:

    + System: Always (every tick)

    -> Text: Set text to str(Sprite.VertexX(1, 1))

    Resulting in 0. Writing the vertex coord to a global variable makes no difference, neither does VertexY or VertexZ.

    What could that mean (apart from the routine being broken)?

    Cheers,

    the Colonel

  • <img src="http://www.schade-blog.de/schade-studios/the_rotten/screen1.png" border="0" />

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi there,

    I've sent you a PM.

    Cheers,

    the Colonel

  • Hi there,

    I recently stumbled across a memory issue in my coding logic.

    Here's the deal:

    The map format for my game is like using tiled backgrounds for walls / floors (2d topdown here) and loading their textures from file.

    The procedure:

    -Get no. of backgrounds to load

    -Execute loop "load walls / floors" X times

    -On loop "load wall / floors"

    -->Create tiled background with dimensions X,Y at PosX, PosY

    -->load image file apppath + "Textures\" + $texturename +".png"

    This results in inefficient memory usage since every time I create a background I load the file from disk, no matter if the same png file has been loaded before, e.g. I have 20 walls that use the texture "concrete.png", "concrete.png" will be dumped 20 times into memory, unnecessarily growing the memory usage.

    I thought I would do something clever and tried Image Manipulator so far, abusing a dummy sprite as texture buffer, iterating through the map file and count the number of different textures to load, load them into the frames of the dummy sprite, then in the loading loop switching to the relevant frame number, copy the frame with Image Manipulator, creating the background and the using Image Manipulator again to drop the texture on the background.

    This didn't work :/

    Is there a way around it without giving up the feature of dynamically loading textures from disk?

  • What about using a sprite anyway? You could have a sprite animation with several hundred dummy frames, then iterating through the number of maximum frames you want to import / the number of maximum "slots" a.k.a. sprite frames.

    Depending on your content structure, you could handle different animations per sprite style, eg. wall tile, floor, etc.

    On object creation, you determine the animation name (wall, floor, etc.) + sprite skin, which is the given frame number.

    Loading huge tilesets this way would also result in a bloated V-Ram, but I think that the bargain between tiled bg and sprite is not in your favor

  • Hi there,

    I'm experiencing the same problem since I switched to a Geforce GTX 460 (1GB RAM). Unfortunately I'm working on a project and was importing countless images before my old card broke. The real pain is causing the Picture Editor while trying to set an action point. When you touch an image and move on to the next, the image before gets distorted and additionally stored like that! This results in sprite animations being impossible to be set up with action points.

    I've tried different driver versions of the card, all resulting in the same. Photoshop and other image manipulation programs work fine though.

    Maybe somebody of the Construct dev team could have a look into that?

    Cheers,

    the Colonel