aridale's Forum Posts

  • if your blocks are all square (like minecraft and terraria) then just place em every width/height of the block. If your blocks are 16x16 and the origin is the top left then x+16 would be to the right of the block y+16 would be below it. You dont need complicated formulas or anythin like that all you need is a starting position and a loop to fill any size space with any size blocks.

    If your placin em with a mouse or somethin then you take the mouse position multiply it by the grid size then divide it by the gridsize to force somethin to a grid. Really simple

  • I figured it out for my needs. What I did was make 1d array and when I created the blocks I put their x,y in as the value like Block.X&"|"&Block.Y then I For Each'd thru the blocks and checked if the array contained a value for the directions I needed to check. Works great

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Im creating a certain number of objects in randomized locations now I want to be able to loop thru all those instances and check for nearby instances in specific locations (above, below, upper left, etc) to perform specific actions

    How exactly would I go about checking in these directions around a given object (its picked via loopindex in a for each)?

  • I have the same problem but in the opposite direction. Its stretchin my game to the full width of the screen but not the height. Ive had to resort to fiddlin with the layout scale on startup to get it lookin semi decent. It takes up the whole width but only half of the height

  • that was my original thought... just adjust it based on screen size but then you could just resize your browser window and itll magically think its on a phone or somethin.

    I think the best answer would be a combo of checking the browser agent and resizing the layouts to fix the screen dimensions.

    The agent check mainly to enable touch controls/hud and the rest to fit the display.

    Is there any way to resize the client size (playable area) based on display size? I know you can use fullscreen scale mode but its actin kinda funny in portrait mode on my iphone

  • I want to have different HUDs for my games if their runnin on my iphone vs runnin in my browser. The problem is I cant see any way of tellin during runtime which it is. I tried enabling my iphone controls layer using the touch Device Motion and Device Orientation options but it doesnt work.