Half Pixels? Are you crazy?

reddotincreddotinc Member Posts: 653
edited November -1 in Working with GS (Mac)
Anyone have any clue why you are allowed to have half pixels in GS? Not only is it stupid but magical seeing as its impossible.

Doesn't really affect me as far as I know, but still it's crazy!

// Red Dot Inc

Comments

  • KhakionionKhakionion Member Posts: 48
    quoth reddotinc:
    Anyone have any clue why you are allowed to have half pixels in GS?
    What do you mean by half pixels?
  • reddotincreddotinc Member Posts: 653
    as in for the Position X and Y values of your actor/instance/..

    we have 320 x 480 to work with, so thats 1 for 1 pixel mapping, yet we are allowed to have .5 positions?
  • firemaplegamesfiremaplegames Member Posts: 3,211
    The pixel is the smallest element you can address.

    However, many graphics programs allow sub-pixel rendering. Flash has this, as does OpenGL (which is what Gamesalad uses) and this allows you to place graphics, both raster and vector, at floating point coordinates.

    Fonts use this technique extensively.

    It sort of acts like "dynamic antialiasing". The iPhone uses this everywhere. Although the final image is displayed on a pixel grid, the antialiasing in the text is the result of all the subpixel data.

    In Flash you are able to position things down to 1/20th of a pixel.
    I am not sure how exact you can position things in OpenGL.
  • KhakionionKhakionion Member Posts: 48
    The position values are not pure pixels. They are "game units." Imagine you have an actor that is one pixel wide. On an iPhone 3GS and below, placing it at the coordinates (480,320) would result in the actor being drawn in the far corner from the origin. Taking a screen capture, you'd see it at pixel (480,320). On the iPhone 4, that actor would still be in the far corner from the origin, but it is actually being drawn at pixel (960,640). When you work with position values in GS Creator, you are modifying the actor's position in the game world, not on the screen proper.

    TLDR version: game-world coordinates and screen-space coordinates are no longer one and the same. They are independent of one another, hence the feature name "Resolution Independence." :D
  • reddotincreddotinc Member Posts: 653
    Well I stand corrected then! That's my new thing learnt for today and its only 02:19AM :)

    Thank you very much for your explanation guys and excuse me for my slightly ill-knowledged thread, I'm a web developer and people talking about "half pixels" is something we laugh about :)

    // Red Dot Inc
  • KhakionionKhakionion Member Posts: 48
    No worries! GS game units and pixels are analogous to ems and pixels in the web design world. When DPI goes up, positioning is (ideally) the same.
  • synthesissynthesis Member Posts: 1,693
    It would be nice though if GS would snap to a whole pixel unit rather than the half pixel unit when placing an actor on a stage. It seems as though EVERY time I place an actor on the stage...I must open the actor and delete the sub-pixel decimal units from the position for the actor...which with the memory leaks we must endure when opening and closing actors...is cumbersome.
  • JCFordJCFord Member Posts: 785
    Agree, snap to 1 pixel would save slot of xtra work!
  • ChunkypixelsChunkypixels Member Posts: 1,114
    Yes please.... what Synthesis said, snap to a whole pixel unit by default... it'll make setting things up less painful. At the moment it can get really tedious going in and fixing half pixel positions all the time.

    And while weve got yellow eyes on the subject.... can we have a user defined grid snap. And make it so we can select/copy/paste/move multiple actors. It can get really tedious having to reposition everything one actor at a time.

    thanks!.... :)
  • design219design219 Member Posts: 2,273
    JCFord said:
    Agree, snap to 1 pixel would save a lot of extra work!

    YES, YOU CAN DO THIS. I've said this many times, but seems like nobody ever tries it. Just go into you actors attributes, under graphics and set both the Horizontal and Vertical Wrap to "fixed" instead of the default "stretch". This is the first thing I do with every actor when I create it.

    This allows you to use odd sized pixel actors without blurry as well.

    _________________________________

    HOLY NOSE JOB!: Nesen Probe: Is this the single most unappealing game in the history of GameSalad? I can't seem to give it away! Anywhere. But if anyone want's to try it out, codes are still available! http://gamesalad.com/forums/topic.php?id=8097
Sign In or Register to comment.