Klaymen's Recent Forum Activity

  • newt

    I�m not sure I quite follow you

    And the line of sight, maybe I could just "shoot" an object towards the other units and check if its height-value when it travels over the heightmap gets higher than the shooting units stored value, then the sight is negative. Does that sounds slow? if the distance is long, I was thinking I could break it up over like 5 frames, reaction doesn�t have to be imminent, as the game will be slow paced.

    edit: Oh, and if I confuse you guys with anything, let me know, I�m typing fast and english isn�t my primary laungage :p

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Your slices idea was more or less what I meant with my less attractive solution. But I don�t understand why it would be that slow. It would only need to retrive the value when an object is moving, and let�s say there would be 20-30 objects moving at most which need to have their height checked, would that really make such a punch in performance? I could probably get away with checking a units height every 3rd or 4th frame or so, and, if using the slices-method, all it would do is a simple collision check "is unit touching height object x". If using the check-color-value I guess it would be similar, no?

    Or is collision checking in general slow? I haven�t really read that much about constructs performance, but to my understanding it is quite fast, no?

    And about smooth variations, no. I was thinking that if I have a layout of maybe at most 4096x4096, then I would stretch a 512x512 grayscale map over it. Making slices would complicate that idea, as I would have to stretch several objects, and make sure they all match up when stretched. Also, say I would make 16 slices, that would mean 512x512x16, not an attractive solution when I think about it.

    But let�s say that I go with the array idea. Basically I would, for say a 4096x4096 layot, load a greyscale map, read the values from like every 4th pixel or so and then put those value in a 512x512 array or something, right? Would this be a hugh performance sucker? I�m not familiar with how storing/reading large arrays affects performance.

    And also, just for confirmation, is it possible to retrive a value from a texture map? like "check RGB value at action point from -object-" or something.

  • Hello,

    First I just want to say a big thanks to the devs for making Construct (and for free, amazing). I�m currently learning it, and this program just makes programming make sense to me

    Anyhow, I�m thinking of some game designs and one of them is a kind of Close Combat clone, which I guess would be suitable with this engine. What I�m curious about is if it is possible to retrive values from texture maps, based on the pixel colors in the map.

    What I intend to do is have a grayscale map stretched over a layer to determain the height of hills and such, puting stuff like line of sight to interesting use. The map would not be visible in game of course, but would still have to be able to let objects fetch values from it. So, is this possible without using python scripting? And if not, is it at all possible even with python?

    Or can anyone think of an alternative way to create height for top down landscapes? As a less attractive solution I was thinking that I could generate a height map of maybe 8-16 colors, then create seperate objects of all the shades and then simply use the objects with ordinary collision checks to see what "height" an object is at. Do you think this would be a feasible solution?

    Btw, I was looking at the pixel shader entry in the wiki, thinking that they maybe could be put to use in a case like this, but it didn�t really tell me much.

    Thanks for answers

Klaymen's avatar

Klaymen

Member since 6 Oct, 2009

None one is following Klaymen yet!

Trophy Case

  • 15-Year Club

Progress

15/44
How to earn trophies