mindfaQ's Recent Forum Activity

  • Or you could use:

    bulletspeed = 100+floor(enemyhit/10)*10

  • system compare variable1 not equal to variable2:

    set variable2 to variable1

    do x

  • Easiest thing would be using the canvas plugin with "line to" and draw path.

    If you wanna draw every x traveled use something like (posx, posy = global vars, set them to sprite.x and sprite.y at the start of the layout):

    distance(sprite.x,sprite.y,posx,posy) greater of equal 10: call function "draw line"

    set posx = sprite.x

    set posy = sprite.y

    and function draw line contains the drawing on the canvas.

    This would prevent you from having to deal with a big number of objects.

    If you playing area is very big ofc it is better to just spawn those points and then delete them when offscreen or use multiple canvases.

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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

mindfaQ's avatar

mindfaQ

Member since 12 Oct, 2013

None one is following mindfaQ yet!

Trophy Case

  • 11-Year Club
  • Coach One of your tutorials has over 1,000 readers
  • Email Verified

Progress

13/44
How to earn trophies