mindfaQ's Forum Posts

  • Maybe post the canvassnapshot-data to a webpage in ajax and the webpage then has to save that data to an image.

    But it seems really inefficient, better just capture your screen with a lossless algorithm (or near lossless) and convert that to gif.

  • Okay, I have found the problem and wanna tell you in case you stumble over this as well:

    I had my origin in bottom mid of the sprite and when loading the new image, it will be set at the bottom mid again. If you load an image with uneven width into an image with even width or the other way around, the image will start somewhere at xxx.5 pixels, leading to the blur.

    So if you wanna load images of different size into another image, either set up the origin at one of the corners of the sprite OR set pixel rounding to on OR always fix the position after some movement happened (not while the movement is happening obviously), something like:

    (sprite.imagepoint(0)-sprite.width/2)%1 not equal to 0: set sprite x to sprite.X-(sprite.ImagePointX(0)-sprite.Width/2)%1

    if your original image has even width and the origin point is at bottom middle.

  • Hmm guess this is a bug. Gonna report it.

  • TELLES0808: it is about distance along the path, not linear distance.

  • I probably use too many points with rising new_period. I think canvas.width*newperiod/4 or even /8 will be enough and stay fast enough if the new_period number gets large. Also what I called period in my example is the frequency instead of period in (sinwaves/360 pixel) as unit.

    and instead of adding sin to y, substract it, as it should point upwards when sin is 1, not downwards

  • Use the canvas plugin.

    Someone posted an example file here

    scirra.com/forum/split-screens_topic58769_page1.html

    basically each tick clear the canvas,move the canvas to the part that is not on the screen, paste all layers on it, move the canvas back to one half of the screen so the player can see it.

  • easy with the canvas plugin:

    <img src="http://i.imgur.com/3MvPTqe.png" border="0" />

    <img src="http://i.imgur.com/fNVeCj6.png" border="0" />

  • It still gets blured. (Fullscreen scaling is off btw, if you now think about that).

  • 255 makes working with 16,7 mio colors easier, no need for the user to deal with decimals

  • How do I prevent blur observed when loading images from URLs into sprites that have a different image size than the image that got loaded from URL?

  • I haven't loaded your example but if blackhornet copied from your event:??Doesn't Construct 2 use degree instead of radian in sin()???Also better use pi instead of 3.141516

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If you have your tiles saved in an array, you could work with that, identify adjacent tiles, add them to another array and check those adjacent tiles for objects.

    the other array could look like this:

    each x -> one tile

    y=0: x coordinate in tile-array

    y=1: y coordinate in tile-array

    y=2: status (0 = searched for object, 1 = searched for adjacent tiles)

    okay let's say you are at a junction at 5,5. You run your function.

    The function will return

    (4,5), (6,5), (5,4), (5,6). It didn't find an object, so it will look further. For each x in the array where at(curx,2) = 0 -> run the function again.

    The function should only add coordinates if they are not already in your array (to prevent from going back, searching fields twice). After every adjacent tile was checked for (4,5), its y2 is set to 1.

    The search/loops are stopped once an object was found or no new adjacent tile was added to the array. After that the array is cleaned up (set size to 1,1,1 I guess).

  • You can select your first line in the same fashion as you already know ("TileArray.CurY > 5") just use = 0 and curx

  • I gave you the answer in my first post.

    s000.tinyupload.com/index.php

  • And changing the image point back solves the problem?

    If it does, maybe just substitute player.x/y with (player.x/y+16) in every function, same for your enemies. This way the values should be the same if the new image point is in the upper left and was in the mid before.