As was foretold, we've added advertisements to the forums! If you have questions, or if you encounter any bugs, please visit this thread: https://forums.penny-arcade.com/discussion/240191/forum-advertisement-faq-and-reports-thread/
We're funding a new Acquisitions Incorporated series on Kickstarter right now! Check it out at https://www.kickstarter.com/projects/pennyarcade/acquisitions-incorporated-the-series-2

1st annual 'Shut Up and Make Us a Goddamn Videogame' BACK FROM THE GOD DANG DEAD

1151618202125

Posts

  • JasconiusJasconius sword criminal mad onlineRegistered User regular
    edited December 2009
    ffffffuck.

    So. Apparently.

    In Inform 7, you can't say "The player's [noun] is [whatever.]" You have to say "Your [noun]."

    SOOO when I said "The player's wrists are whole", I should have said "Your wrists are whole." As a declarative statement.

    Took me an hour to figure that shit out.

    thanks a lot, natural language

    that's what you get for using a heathen language

    Jasconius on
  • NotASenatorNotASenator Registered User regular
    edited December 2009
    oh

    that's a good question.

    NotASenator on
  • JasconiusJasconius sword criminal mad onlineRegistered User regular
    edited December 2009
    These NeHe tutorials are delicious.

    How much does standard OpenGL compare to OpenGL ES?

    Jasconius on
  • L|amaL|ama Registered User regular
    edited December 2009
    Defender wrote: »
    I love Inform 7.

    This is compilable code.
    "escape."

    A scene can be restricted or free. A person can be tied or unbound.

    Studio is a room. "[if Late Afternoon is happening]Golden light streams in through the skylight, coating everything in the middle of the room in a delicate amber hue.[otherwise if Sunset is happening]The sunset's colors, indigo and orange, flow over the studio.[otherwise if Twilight is happening]Dim light from the skylight illuminates the centre of the room, purple-grey in the twilight.[otherwise if Night is happening]The studio is dark, the night stars visible through the skylight. The room is illuminated only dimly - if you're going to find your way around you're going to have to find a light source.[otherwise]This text shouldn't be appearing.[end if]".



    A supporter called the metal chair is in the Studio. The description of the metal chair is "A simple metal chair, high-backed, not comfortable. [if the player is tied]You're tied to it.[otherwise]You can see the scrape marks where you were tied to it.[end if]". The player is on the metal chair. The player is tied.

    Understand "untie me" as exiting.

    Instead of getting off the metal chair: say "You try to get up, but almost tip the chair over. Better figure out how to untie these ropes, first.".

    Late Afternoon is a restricted scene. Late Afternoon begins when play begins. Late Afternoon ends when the player is unbound. When Late Afternoon ends: say "You look up and notice that the sun has sunk lower in the horizon, darkening the studio. If you're going to do what you came to do, you'd better find some source of light."



    Sunset is a free scene. Sunset begins when Late Afternoon ends.

    Twilight is a free scene. Twilight begins when Sunset ends.

    Night is a free scene. Night begins when Twilight ends.

    That compiles? Holy shit!

    yo you have your last name there and you just posted about being uncomfortable with having that on the internet so uh

    L|ama on
  • OrikaeshigitaeOrikaeshigitae Registered User, ClubPA regular
    edited December 2009
    it ain't about to show up in google though, which is what i'm worried about

    Orikaeshigitae on
  • L|amaL|ama Registered User regular
    edited December 2009
    oh okay just checking you didn't miss it by accident

    L|ama on
  • OrikaeshigitaeOrikaeshigitae Registered User, ClubPA regular
    edited December 2009
    thanks :D

    after three days of coding, i have now thoroughly implemented being tied to a chair.

    now to figure out how to get the player out of the chair.

    Orikaeshigitae on
  • DefenderDefender Registered User regular
    edited December 2009
    NotACrook wrote: »
    Defender wrote: »
    I love Inform 7.

    This is compilable code.
    "escape."

    A scene can be restricted or free. A person can be tied or unbound.

    Studio is a room. "[if Late Afternoon is happening]Golden light streams in through the skylight, coating everything in the middle of the room in a delicate amber hue.[otherwise if Sunset is happening]The sunset's colors, indigo and orange, flow over the studio.[otherwise if Twilight is happening]Dim light from the skylight illuminates the centre of the room, purple-grey in the twilight.[otherwise if Night is happening]The studio is dark, the night stars visible through the skylight. The room is illuminated only dimly - if you're going to find your way around you're going to have to find a light source.[otherwise]This text shouldn't be appearing.[end if]".



    A supporter called the metal chair is in the Studio. The description of the metal chair is "A simple metal chair, high-backed, not comfortable. [if the player is tied]You're tied to it.[otherwise]You can see the scrape marks where you were tied to it.[end if]". The player is on the metal chair. The player is tied.

    Understand "untie me" as exiting.

    Instead of getting off the metal chair: say "You try to get up, but almost tip the chair over. Better figure out how to untie these ropes, first.".

    Late Afternoon is a restricted scene. Late Afternoon begins when play begins. Late Afternoon ends when the player is unbound. When Late Afternoon ends: say "You look up and notice that the sun has sunk lower in the horizon, darkening the studio. If you're going to do what you came to do, you'd better find some source of light."



    Sunset is a free scene. Sunset begins when Late Afternoon ends.

    Twilight is a free scene. Twilight begins when Sunset ends.

    Night is a free scene. Night begins when Twilight ends.

    That compiles? Holy shit!
    escape-2.jpg

    That is so incredible. I love how easy to understand and write it is.

    And yet I had to read that last sentence like three goddamn times to parse it inside of my own headbrain.

    Defender on
  • OrikaeshigitaeOrikaeshigitae Registered User, ClubPA regular
    edited December 2009
    the indefinite it? yeah, i fixed that

    Orikaeshigitae on
  • DefenderDefender Registered User regular
    edited December 2009
    thanks :D

    after three days of coding, i have now thoroughly implemented being tied to a chair.

    now to figure out how to get the player out of the chair.

    Razorcock.

    Also, "three days of coding" sounds about right! It's funny that even with something that looks so awesome, it's still like, well, this shit's gonna take days.

    Defender on
  • DefenderDefender Registered User regular
    edited December 2009
    the indefinite it? yeah, i fixed that

    I meant the last sentence in NaC's post, actually.

    Defender on
  • OrikaeshigitaeOrikaeshigitae Registered User, ClubPA regular
    edited December 2009
    Defender wrote: »
    thanks :D

    after three days of coding, i have now thoroughly implemented being tied to a chair.

    now to figure out how to get the player out of the chair.

    Razorcock.

    Also, "three days of coding" sounds about right! It's funny that even with something that looks so awesome, it's still like, well, this shit's gonna take days.

    well, stopping the player moving take five seconds, it's handling all the unexpected cases that is bullshit. like, oh, what if he wants to look at his hands? time to modify all default messages that involve hands and write situation-appropriate text. what if he wants to tip over the chair? what if he wants to dance?

    Orikaeshigitae on
  • Kuribo's ShoeKuribo's Shoe Kuribo's Stocking North PoleRegistered User regular
    edited December 2009
    PUNCH RUMBLE. COMING SOON FROM _________________ GAMES.

    Kuribo's Shoe on
    xmassig2.gif
  • DefenderDefender Registered User regular
    edited December 2009
    Defender wrote: »
    thanks :D

    after three days of coding, i have now thoroughly implemented being tied to a chair.

    now to figure out how to get the player out of the chair.

    Razorcock.

    Also, "three days of coding" sounds about right! It's funny that even with something that looks so awesome, it's still like, well, this shit's gonna take days.

    well, stopping the player moving take five seconds, it's handling all the unexpected cases that is bullshit. like, oh, what if he wants to look at his hands? time to modify all default messages that involve hands and write situation-appropriate text. what if he wants to tip over the chair? what if he wants to dance?

    Get erection with razorcock.
    Use erection on ropes.

    Defender on
  • OrikaeshigitaeOrikaeshigitae Registered User, ClubPA regular
    edited December 2009
    Defender wrote: »
    Defender wrote: »
    thanks :D

    after three days of coding, i have now thoroughly implemented being tied to a chair.

    now to figure out how to get the player out of the chair.

    Razorcock.

    Also, "three days of coding" sounds about right! It's funny that even with something that looks so awesome, it's still like, well, this shit's gonna take days.

    well, stopping the player moving take five seconds, it's handling all the unexpected cases that is bullshit. like, oh, what if he wants to look at his hands? time to modify all default messages that involve hands and write situation-appropriate text. what if he wants to tip over the chair? what if he wants to dance?

    Get erection with razorcock.
    Use erection on ropes.

    You can't reach.

    Orikaeshigitae on
  • DefenderDefender Registered User regular
    edited December 2009
    You obviously haven't experienced my erection.

    Defender on
  • JasconiusJasconius sword criminal mad onlineRegistered User regular
    edited December 2009
    Yes! My first OpenGL animation. A feeling of great power.

    I am not sure if the Cocoa abstraction of OpenGL (albeit a very minor one) is helping or hurting me... there are some variances from NeHe's tutorials.

    Jasconius on
  • TenTen Registered User regular
    edited December 2009
    Ten on
  • KovakKovak did a lot of drugs married cher?Registered User regular
    edited December 2009
    a game where you play a low flying bat that has to navigate a jazz ensemble using sonar

    Kovak on
  • Kuribo's ShoeKuribo's Shoe Kuribo's Stocking North PoleRegistered User regular
    edited December 2009
    Ten wrote: »

    HELL YES. RUMBLE THAT PUNCH, YOU MOTHERFUCKER.

    Kuribo's Shoe on
    xmassig2.gif
  • ProjeckProjeck Registered User regular
    edited December 2009
    i am making the fuck out of a game right now

    Projeck on
  • JasconiusJasconius sword criminal mad onlineRegistered User regular
    edited December 2009
    So in OpenGL when you draw a series of triangles... there doesn't seem to be any z-sorting on them..? for example, if I render a pyramid with triangular sides of any given color, and I make a rectangular base that is white, I can see the rectangular base *through* the pyramid, even if it is facing directly away from my perspective.


    What is up with 'dat.

    *edit* and it looks like the tutorial screenshots I can find don't really show that problem.... grrr

    *edit2* viola! glEnable(GL_CULL_FACE);

    Jasconius on
  • FyreWulffFyreWulff YouRegistered User, ClubPA regular
    edited December 2009
    We'd have to (maybe) see the code. It might be an issue with how you're drawing it.

    You did make it so it drew all the polys in the same direction right?

    FyreWulff on
  • JasconiusJasconius sword criminal mad onlineRegistered User regular
    edited December 2009
    They are lined up appropriately, if that's what you mean.

    glEnable(GL_CULL_FACE);

    fixed it... not sure what it does, going to go hunt a good OpenGL book soon so I can pick some of this stuff up.

    Jasconius on
  • FyreWulffFyreWulff YouRegistered User, ClubPA regular
    edited December 2009
    I haven't done 3D in a while but from what I remember every face has to be drawn in the same direction

    IE a triangle like this

    /\

    I drew them all from the top to bottom right to bottom left.

    However drawing one in the other direction would make it so it's "facing" the other direction and would be interpreted incorrectly.


    edit: oh.. you didn't have backface culling on? Yeah, that's kinda required.

    FyreWulff on
  • TechnicalityTechnicality Registered User regular
    edited December 2009
    GL_CULL_FACE makes all your polys one sided so their backs aren't visible IIRC. You should probably also have something like this:

    glEnable(GL_DEPTH_TEST);
    glDepthFunc(GL_LEQUAL);

    which turns on depth testing on a per pixel level (the func thing says "if its further away that what I've drawn already don't draw it", and the other command turns it on).

    Technicality on
    handt.jpg tor.jpg

  • JasconiusJasconius sword criminal mad onlineRegistered User regular
    edited December 2009
    Isn't per-pixel more CPU intensive? The regular ol' culling seems to be working just fine.

    But Fyre, in GL_TRIANGLES, I don't see any way I could draw the faces incorrectly, all you do is plot vertices.

    Jasconius on
  • TechnicalityTechnicality Registered User regular
    edited December 2009
    Yeah, it probably uses up a bit of GPU power, but backface culling alone won't render things correctly unless you are just drawing convex depth sorted shapes that don't intersect. If you replace the pyramid with a torus for example, you will need it. Its much faster to depth test on the per pixel level than to sort polygons and render them in order too, which is why transparent objects are much more expensive to render than solid ones.

    The order you list the vertices in usually determines which way round they go, so if a triangle has 3 verts called A,B and C, triangle ABC faces the other way to triangle ACB.

    Technicality on
    handt.jpg tor.jpg

  • DefenderDefender Registered User regular
    edited December 2009
    Jasconius wrote: »
    Isn't per-pixel more CPU intensive? The regular ol' culling seems to be working just fine.

    As another note, it is cheaper to have something eliminated by depth testing than to draw it. So if you're drawing a scene and you have the ability to do so, always draw the close-up stuff first, then the further-away stuff. That's a little more advanced.

    For now, just understand that using the depth (or "Z") buffer is the default mode of operation for like every single engine in the universe. As soon as you start doing anything where objects get in front of other objects, you will basically need it. In fact, even pre-graphics-hardware games use it.
    Jasconius wrote: »
    But Fyre, in GL_TRIANGLES, I don't see any way I could draw the faces incorrectly, all you do is plot vertices.

    There is a setting called "Winding" in OpenGL that determines if the face winds around clockwise or counter-clockwise. If you take any given triangle and draw its vertices in order 1, 2, 3, and then draw that same triangle 3, 2, 1, the two triangles you drew will face opposite directions. This will be important with backface culling, and it will be important as soon as you start putting any kind of normal/lighting information on there.

    Defender on
  • JasconiusJasconius sword criminal mad onlineRegistered User regular
    edited December 2009
    OK so, if I have two quads, one with a Z of 0, and a Z of -1...

    If I render the Z = 0 quad first, and then the Z = -1 quad... with depth testing on, the Z = -1 quad will essentially not be drawn at all (as in, not even processed)?

    just making sure I understand.

    Jasconius on
  • DefenderDefender Registered User regular
    edited December 2009
    Z values are calculated in an interesting way. The final Z value is between 0.0 and 1.0. For now, that's as detailed as that needs to be. However, it's not linear.

    So if you have a near-clip of 1.0 (units from the camera) and a far-clip of 1024.0 (units from the camera), that distance will map to the range [0.0, 1.0]. But like I said, it's not linear. So the close-up stuff will take a much bigger chunk of the range. This is because it's more important to be precise on what's in front of what when you're close to the camera than when you're far away.

    So if a Z value were ever to come out to less than 0.0, it would be behind the camera and wouldn't render.

    Maybe you're asking something different.

    If you render a close-up quad and then a far-away quad, what will happen is that the individual pixels of the far-away quad will not be drawn. They will be rejected by the depth-test part of the pipeline, which is earlier than the actual drawing part (unless you have some advanced pixel shader shit going on, which you don't). You will therefore not be able to see the far-away quad, and it will be faster than drawing it and then drawing over it with the near quad.

    Defender on
  • JasconiusJasconius sword criminal mad onlineRegistered User regular
    edited December 2009
    The second part is what I meant yeah.

    I need to read up on cameras, perspective, etc. I know it's complicated, I don't understand it much at all.

    Jasconius on
  • DefenderDefender Registered User regular
    edited December 2009
    It's OK though. You really don't need to understand stuff like that to get started. All you really need is the basic understanding that depth-buffering can let you reject pixels based on distance from the camera, and that it's fast and also pretty much the only way to draw arbitrary polygons without having them overlap inappropriately.

    EDIT: By the way, I have been doing graphics/engine stuff using OpenGL for a long-ass time. I'm even doing it right now (compiling code). You can IM/PM me if you have questions, although I'm subject to a normal person's work and holiday schedule.

    Defender on
  • TechnicalityTechnicality Registered User regular
    edited December 2009
    You lucky bastard. I am doing stuff in papervision and XNA at the moment, and all this opengl talk has got me longing for that feeling of total control over the rendering side.

    Technicality on
    handt.jpg tor.jpg

  • DefenderDefender Registered User regular
    edited December 2009
    It's really nice. You can just be like "well hey we're gonna order the scene this way and then we're gonna render this part first and then that part and batch things this way and use these shaders." Determining the entire lighting and animation model and the file formats and everything else in between is some work, but I love that I know exactly how it renders and how to make it look better or go faster.

    Defender on
  • JasconiusJasconius sword criminal mad onlineRegistered User regular
    edited December 2009
    I'm trying to load in an PNG as a texture (64x64 resolution). It loads, but the colors are wrong
    glTexImage2D(
    				 GL_TEXTURE_2D,
    				 0,
    				 GL_RGBA,				 
    				 width,
    				 height,
    				 0,
    				 GL_RGBA,
    				 GL_UNSIGNED_BYTE,
    				 data);
    

    It's tinted red in the program.

    Thoughts? I tried GL_BGRA instead of GL_RGBA but that also made it the wrong tint (light blueish).

    If it makes a different I saved the PNG in GIMP.

    Jasconius on
  • DefenderDefender Registered User regular
    edited December 2009
    Here's that line from my current codebase:
    glTexImage2D(GL_TEXTURE_2D, 0, 4, m_width, m_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, pic);
    

    So my glFormat argument is "4" instead of "GL_RGBA." Other than that, the line itself is the same. Are you sure that you're loading the PNG correctly?

    EDIT: Changing my code to match yours does not make my stuff look bad. The fact that you can change the RGBA to BGRA and that makes it bluish implies that it's not a color setting or anything, either. I'd probably check the file itself in an image viewer other than your editor, and maybe make sure it's a supported format for your PNG reader.

    Defender on
  • JasconiusJasconius sword criminal mad onlineRegistered User regular
    edited December 2009
    that is correct. I fixed it. yay

    Jasconius on
  • nevilleneville The Worst Gay (Seriously. The Worst!)Registered User regular
    edited December 2009
    Defender did you see my video?
    Didja like it?
    If not, you're wrong.
    If yes, you win!

    neville on
    nevillexmassig1.png
  • DefenderDefender Registered User regular
    edited December 2009
    Well I always win, so yeah!

    It reminds me of an idea I had a few years ago, which is basically a Daredevil first-person game. I never acted on it, but the idea would be to use sound for visualization. A stealth element would be neat because you'd have to make noise to get imaging, but enemies do hear stuff, so there's a trade for that information.

    Defender on
Sign In or Register to comment.