ranma's Forum Posts

  • i created a playfield with lots of instances of the same sprite. sprite is a 32x32 one color square for now, and it is created on start of layout 300x50 times. i thought this should be no problem, it takes 0.01mb vram, but spikes processor use up to 100% and it's not enough, cos game gets choppy framerate (there's a 1x1 car behavior sprite on the playfield, but I can swear it's not its fault ;)

    anyway, tried making sprites invisible when off screen, but it didn't change the processor usage nor framerate. also i'd like to have my playfield bigger than that, say 1000x200 32x32 sprites.

    dear constructors, what do? i believe the problem is that construct checks all the events against every single instance of the sprite, if it's possible and this is the problem, how too disable events for sprites that are off screen?

  • Running at 60 FPS, framerate mode Unlimited: 80 ?C

    first things first, what did you do to run a game in unlimited mode and have only 60fps?

    now, my 9600gt produced some strange high frequency sound when I run construct game in unlimited. i believe the unlimited mode stresses graphic card to its maximum, so I believe these kinds of behavior are normal and nothing to worry about. all in all, unlimited mode should be used only for testing time delta i believe, every released game should use v-sync for best results.

    cheers!

  • Summary: When destroying a particle in a collision event, all instances of the particle is destroyed. I wish to be able to control this, but how?

    that should be simple... you can't. you must make your own particle simulation. you can create a sprite, give it a ball movement behavior, uncheck the "rotate object" (something strange happens if you don't, actually) and when you want it to go boom, you must:

    on somethingsomething:

    repeat (100)

    -> create sprite somewhere

    -> set ball angle of motion to random(359)

    -> set ball movement speed 50+random(50).

    -> set ball movement acceleration to -50

    on sprite collision with somethingsomething:

    -> sprite: destroy

    above is just an example, but try it, you should be fine

  • Is it possible to resize the window of a direct X game without the image interpolation / blurriness? It's ruining my graphics! I'm using the window object btw, not dragging the window.

    application properties -> scroll down to runtime properties if you have to -> sampling -> change to "point" and there you go!

    edit: also you might wanna consider changing the text rendering to aliased. cheers!

  • wtf moonspeak

  • You need to replace the NULL bytes (which automatically terminates a string) with something else.

    For example:

    f = open("python_error.jpg", "rb")

    text = f.read().replace('\x00','\x32')

    f.close()

    EditBox.SetText(text)

    Example .cap: http://www.box.net/shared/rkknb1p4uk

    you, dear sir, just won one free internet. big love!

  • well, how do I?

    i thought i'm fairly familiar with python, until my simple

    f = open("new.jpg", "r")
    text = f.read()
    f.close()
    EditBox.SetText(text)[/code:3fsqu5d5]
    
    did return some bull:!:hit. again, i'd like to read jpeg into editbox JUST LIKE windows' notepad does, halp plox  
    
    edit: "rb" mode also does not work
    
    edit2: of course .txt file are read with no problems :/
  • well, I'm trying to read a string from a jpeg file. the thing is, some image editors save a lot of useful data in the file (exif) which i'd like to read from my app. i was trying to open jpeg with editbox's load file action, no go. also i'm afraid this would be not so efficient. so is there any way to accomplish this one? the best way i'd like to do it is somehow read jpegs like windows' notepad does when you opens them. thanks in advance.

  • ...You could always find out by reading the wiki

    i lol'd

  • 0-255 r,g, and b

    System expression RGB(Red, Green, Blue)

    well, yeah. I was wondering how more more these kind of hidden things were there

  • well I just discovered this myself and thought I share.

    you CAN USE mousex("layer 2") to retrieve mouse position on "layer 2" LAYER!

    thinking about layer zoom now?

    anyway, I wonder how many features there are that people don't know about (like right clicking the color square when making an event to change color filter, where you can enter numeric values even from private/global variables) can I get a list of them?

  • The 120fps was just something I left it at, it works without lag at 60fps, 20fps, 900fps too.

    well, it does not, when i set the fixed framerate to 60 it behaves exactly as when i turn the v-synced mode.

    also,

    V-Synced: [...] The best quality and smoothest display. Games should all use this option.

    The point was, turning v-synch off solves the problem

    I'm confused

    Thank you Madster for explaining, but i don't think the lag is 2 frames, if my monitor draws 60 frames per second, the lag seems more like about 10 frames (well, now, after fiddling with the nvidia control panel). please also don't jump to conclusions that it's bad lcd, because the hardware mouse cursor does not lag whatsoever.

    Any ideas how to lower the lag even more, to the twoframes from the Madster explanation?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Turn v-synch off though and either using unlimited (not recommended obviously) or fixed, removes any lag. So it's obviously down to the v-synch in some way. Just a shame things look bad without it heh.

    well, you set the fixed framerate to 120fps. when someone has 85hz monitor, ther will be visible choppy display. also, when I set fixed framerate to 60 fps (my screen refresh rate), the lag is still there. (i believe in 120fps, it is there also, but half as visible)

    Edit: Ok more testing and yup. Turn v-synch off and there's absolutely no lag whatsoever.

    nope. i set the vsync to "force off" in nvidia control panel - no difference sadly so for me to minimise the lag, the settings are "max pre rendered frames - 0, tripple buffer - off, vertical synchrtonization - use application setting/off/on - does not make a difference)

    i'm still using the v-synced display in construct, as using fixed or unlimited is bad - the way you see it, setting the app to fixed 120 lowers the lag, you can set it to 240 and lower it more, this is not the way to do things here also i'm not saying this is a construct problem, but still i'd like to know how to overcome it.

  • > well, i think turning off the triple buffering AND setting the "max frames to pre-render" to 0 (default was 3 for some reason) lowers the lag A LOT.

    >

    Out of interest, where were those settings? Are they in your graphics card driver options? What make is your graphics card?

    in the freaking "nvidia control panel". this said, my graphic card is nvidia geforce 9600gt. i was on 6600gt earlier and there was no lag, but i don't think this is the problem, i'd still bet on the triple buffering and th pre-rendered frames thing.

  • I'm not sure why this happens. I guess it would be useful to narrow it down to a single setting.

    I can't see how Construct could cause more than two or three frames latency given double buffering, which should appear almost instant. It might be something to do with graphics cards settings, VSync, mouse settings, or a combination. I don't know of anything I could do to rectify this at all; as far as my code does, it gets the mouse position and draws it, all in the same frame, so I can't see where such a large delay would come from!

    well, i think turning off the triple buffering AND setting the "max frames to pre-render" to 0 (default was 3 for some reason) lowers the lag A LOT. it's still noticeable, but very little. as you all stated, little lag is "normal", i'm at the point you all are, so for this thanks but it would be great, if there was some way to get rid of the lag completely.