Colonel Justice's Recent Forum Activity

  • A better description of the glitch would help to sort it out, but arriving to the conclusion to first search in the forums makes it kinda up ;)

    I suggest you read and understand this first.

    Furthermore, keep in mind that the object having the shadowcaster behavior will not draw a shadow underneath it, only having the box (or custom shape) outlines as reference. Maybe that was the glitch you experienced.

    Good luck!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Cheerio! That was exactly what I needed, thx R0J0Hound! :)

    newt: Yep, it's going to be the distort map's color filter.

    Thanks

    the Colonel

  • I see.

    That is why

    sqrt((Sprite.VertexX(0, 0) - Light.X)^2 + (Sprite.VertexY(0,0) - Light.Y)^2 + (Sprite.VertexZ(0,0) - Light.ZElevation)^2)

    returns crap if nothing is displaced yet.

    That means in order to get the absolute coordinates of a given vertex, you have to revolve it let's say around the sprite's hot spot and translate the vertex coordinates, amiright?

    The reason for all this madness is that I'm trying if it's possible to code a per vertex shader, which would enable basic lighting techniques for displaced 3d sprites.

  • 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" />

  • 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

Colonel Justice's avatar

Colonel Justice

Member since 16 Mar, 2011

Twitter
Colonel Justice has 10 followers

Trophy Case

  • 13-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

18/44
How to earn trophies