1. Post #121
    Andrew McWatters
    Dennab
    March 2011
    4,658 Posts
    Ugh. I have no idea what to do.

    Reply With Quote Edit / Delete Windows 7 United States Show Events Programming King Programming King x 2 (list)

  2. Post #122
    Gold Member

    March 2005
    3,028 Posts
    That's not a real quine.
    Reply With Quote Edit / Delete Windows 7 Show Events Agree Agree x 8Programming King Programming King x 1 (list)

  3. Post #123
    NovembrDobby's Avatar
    April 2007
    1,147 Posts
    What?! If I enable vsync and set the fps limit to 60 in my SFML game, it stutters quite visibly - but if I add a sf::Sleep(sf::Milliseconds(1)); to the main loop, it runs fine.

    This only happens in Windows, it's smooth in Linux already
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Programming King Programming King x 1 (list)

  4. Post #124
    Gold Member
    vexx21322's Avatar
    December 2008
    10,577 Posts
    What?! If I enable vsync and set the fps limit to 60 in my SFML game, it stutters quite visibly - but if I add a sf::Sleep(sf::Milliseconds(1)); to the main loop, it runs fine.

    This only happens in Windows, it's smooth in Linux already
    VSync AND limit the fps?
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 8Programming King Programming King x 1 (list)

  5. Post #125
    Gold Member

    March 2005
    3,028 Posts
    Yeah, don't do both.
    Reply With Quote Edit / Delete Windows 7 Show Events Agree Agree x 1Programming King Programming King x 1 (list)

  6. Post #126
    Gold Member
    Night-Eagle's Avatar
    January 2005
    815 Posts
    NovembrDobby:
    Are you busy waiting between frames? Rendering frames to a buffer that doesn't get presented could be considered busy waiting, as well...if so, your process may be considered generally non-interactive (as well as potentially starving other processes) and be demoted by the OS's CPU scheduler...and if you don't have the CPU in time to render the next frame, you could get stuttering. This can be solved by a sleep call.

    ...or is SFML a framework with a draw method you fill in?
    Reply With Quote Edit / Delete Windows 7 Show Events Programming King Programming King x 1 (list)

  7. Post #127
    Andrew McWatters
    Dennab
    March 2011
    4,658 Posts
    That's not a real quine.
    It outputs the source.

    Here's a fuck-you compliant quine:

    quine.lua


    Edited:

    oh "input" is considered reading anything, and not just stdin

    okay, well fuck me then
    Reply With Quote Edit / Delete Windows 7 United States Show Events Friendly Friendly x 1Funny Funny x 1Programming King Programming King x 1 (list)

  8. Post #128
    garry's Avatar
    September 2001
    12,377 Posts
    Edited:

    I did a quick test, turned off the compositing by switching to basic themes (Windows switches to XP and prior rendering methods on Windows Basic themes), and confirmed the issue. This seems to be related to how his window is updated, but in almost any case, this should never happen:

    Thanks - I fixed it - was passing 'SWP_NOREDRAW' to SetWindowPos that was fucking it up.
    Reply With Quote Edit / Delete Windows 7 Show Events Friendly Friendly x 6Programming King Programming King x 1 (list)

  9. Post #129
    Cup of Joe's Avatar
    July 2011
    20 Posts
    I'd be interested in seeing some example syntax



    <Error>
    <Code>AccessDenied</Code>
    <Message>Request has expired</Message>
    <RequestId>BA90AFD56513C043</RequestId>
    <Expires>2012-02-02T07:10:16Z</Expires>
    <HostId>
    o4DOMUNtJzh02POeknrg4tJc2sd5QGpICbzxSIwPsjTWFY/dY30OK4IciIloGpNg
    </HostId>
    <ServerTime>2012-02-02T07:21:51Z</ServerTime>
    </Error>
    Fixed the picture. I'm sure Zach will be on later today to post some pictures and examples of the syntax. He has a ton of stuff. There's also a very old YouTube video that sort of shows it in action here. This is from October, and he's since rewritten the compiler and is a lot further ahead in general. I believe that in this demonstration, he was pretty limited in what he can do, and if I understand correctly, today he's actually at the point where you could make somewhat complex games with his language. That'll be my job, I think, to make some games to showcase what CB is capable of.
    Reply With Quote Edit / Delete Mac United States Show Events Programming King Programming King x 1 (list)

  10. Post #130
    SK17a
    garychencool's Avatar
    October 2010
    13,395 Posts
    working on an animation on Turing

    making a sunset
    Reply With Quote Edit / Delete Windows XP Canada Show Events Programming King Programming King x 1 (list)

  11. Post #131
    Gold Member

    October 2008
    3,838 Posts
    God damn I love ReSharper. It can automatically turn this...



    into this...



    Doesn't really help readability, though...
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree x 10Optimistic x 2Disagree x 1Funny x 1Programming King x 1 (list)

  12. Post #132
    NovembrDobby's Avatar
    April 2007
    1,147 Posts
    VSync AND limit the fps?
    If I turn off vsync, the fps goes all over the place (set to 60, but goes as low as 50 and as high as 100). None of my code is framerate-independant (yeah yeah).

    NovembrDobby:
    Are you busy waiting between frames? Rendering frames to a buffer that doesn't get presented could be considered busy waiting, as well...if so, your process may be considered generally non-interactive (as well as potentially starving other processes) and be demoted by the OS's CPU scheduler...and if you don't have the CPU in time to render the next frame, you could get stuttering. This can be solved by a sleep call.

    ...or is SFML a framework with a draw method you fill in?
    You make your own draw/update stuff. SFML used to have a getframetime method but that's gone now, I expect you have to do it manually over frames.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Programming King Programming King x 1 (list)

  13. Post #133
    Andrew McWatters
    Dennab
    March 2011
    4,658 Posts
    I had some developer accounts registered in a number of places a while back to assist with the development of an experimental artificial intelligence agent. Something along the lines of Siri, but far more naive by nature of limited speech recognition and natural language detection.

    Some time ago, one of the core components, lsapi, I had taken down due to not being content with the polish of the small project. After looking at it today, I realized it was fine, and I should have kept it up, so it's back up.

    I'd like to continue development on this project, but she needs a name. WAYWO, could you name my agent? Something clever.

    The good ol' boys at Web Development named her Anna for Artificial neural network agent some time ago, but she's not a true neural network. Just an agent which works with services such as Wolfram Alpha, Google, Wikipedia, and other knowledge databases, search engines, and general information sites.

    Could you please name my child?
    Reply With Quote Edit / Delete Windows 7 United States Show Events Informative Informative x 1Programming King Programming King x 1 (list)

  14. Post #134
    Gold Member
    raBBish's Avatar
    March 2007
    2,667 Posts
    God damn I love ReSharper. It can automatically turn this...

    I've used it so much that I wanted to click those green dotted lines in the picture...
    Reply With Quote Edit / Delete Windows 7 Finland Show Events Agree Agree x 4Funny Funny x 1Programming King Programming King x 1 (list)

  15. Post #135
    Andrew McWatters
    Dennab
    March 2011
    4,658 Posts
    Also, she'll be plugin based, so developers can contribute to her growth on their own clone of her, or the master codebase. I suppose if you wanted, you could think of the plugins as cores. Hurr hurr.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Programming King Programming King x 1 (list)

  16. Post #136
    Team Hamster
    jalb's Avatar
    December 2009
    559 Posts
    Visualizing the separating axis theorem.


    I said a long while back that I was going to upload my entire 3D collision detection library somewhere. However there were some complications with this, mainly because I also had an entire physics engine to develop alongside it that I did not want to distribute. I'm working on a new collision library, this time 2D. As well as a 2D physics engine which I'm more likely to give the source to (since this time it'll be for my purposes and not for the purposes of another game).

    It'll be a while before I have anything worth sharing though.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Artistic Artistic x 10Winner Winner x 3Useful Useful x 3Programming King Programming King x 2 (list)

  17. Post #137

    August 2011
    192 Posts

    awww yeah

    and the best part:
    Code:
                KeyboardState ks = Keyboard.GetState();
                if (ks.IsKeyDown(Keys.C) && !PressedKeys.Contains(Keys.C)) {
                    CharInventory.Visible = !CharInventory.Visible;
                }
                if (ks.IsKeyDown(Keys.I) && !PressedKeys.Contains(Keys.I)) {
                    Inventory.Visible = !Inventory.Visible;
                }
                PressedKeys = ks.GetPressedKeys();
    could this be any more beautiful, I doubt it ;p

    Design and position are just random so far, it's all about implementation right now!
    Reply With Quote Edit / Delete Windows 7 Switzerland Show Events Winner Winner x 4Programming King Programming King x 3Artistic Artistic x 1 (list)

  18. Post #138
    Follow me on GitHub!
    Ziks's Avatar
    June 2011
    2,024 Posts
    It outputs the source.

    Here's a fuck-you compliant quine:

    quine.lua


    Edited:

    oh "input" is considered reading anything, and not just stdin

    okay, well fuck me then
    I can almost do a quine in lua:

    local x = [[print( "local x = [[" .. x .. "]]\n" .. x )]]
    print( "local x = [[" .. x .. "]]\n" .. x )

    But I'm not aloud to do nested [[s for some reason without doing [=[
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Programming King Programming King x 1 (list)

  19. Post #139
    Richy19's Avatar
    May 2010
    5,382 Posts
    Is anyone here any good with mandelbrot creation? I am having trouble with the zooming in and out with mandelbrots
    Reply With Quote Edit / Delete Linux United Kingdom Show Events Programming King Programming King x 1 (list)

  20. Post #140
    Andrew McWatters
    Dennab
    March 2011
    4,658 Posts
    I can almost do a quine in lua:

    local x = [[print( "local x = [[" .. x .. "]]\n" .. x )]]
    print( "local x = [[" .. x .. "]]\n" .. x )

    But I'm not aloud to do nested [[s for some reason without doing [=[
    Don't bother with nested [[s or [[]] at all. Utilize single and double quotes, and make sure you're using them in the right places, otherwise your recursion won't come out properly if you're attempting to escape characters whilst they're not escaped on-screen.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 1Programming King Programming King x 1 (list)

  21. Post #141
    Frugle's Avatar
    June 2010
    485 Posts
    Visualizing the separating axis theorem.
    It's awesome how a single gif/video can make you understand something complicated.

    Just like this gif made me instantly understand bezier curves.

    Reply With Quote Edit / Delete Windows 7 Finland Show Events Agree Agree x 25Informative Informative x 4Useful Useful x 3Programming King Programming King x 1 (list)

  22. Post #142
    Gold Member

    July 2006
    1,951 Posts
    The art style looks really nice.
    Reply With Quote Edit / Delete Windows 7 Finland Show Events Agree Agree x 11Friendly Friendly x 2Programming King Programming King x 1 (list)

  23. Post #143

    August 2011
    192 Posts
    The art style looks really nice.
    really? I always thought that I'm horrible at art ;p at least that's what my art teacher always told me back when I was young and innocent ;p
    Reply With Quote Edit / Delete Windows 7 Switzerland Show Events Friendly Friendly x 2Programming King Programming King x 1 (list)

  24. Post #144
    Gold Member

    July 2006
    1,951 Posts
    Yeah, it really does look nice. Maybe the road should be a bit more curvy though.
    Reply With Quote Edit / Delete Windows 7 Finland Show Events Programming King Programming King x 1 (list)

  25. Post #145

    August 2011
    192 Posts
    Yeah, it really does look nice. Maybe the road should be a bit more curvy though.
    yeah the road is still part of my todo list I already have an idea how to make them look more realistic. the moment I finished the inventory system I'll be right at it.
    Reply With Quote Edit / Delete Windows 7 Switzerland Show Events Programming King Programming King x 1 (list)

  26. Post #146
    uint64's Avatar
    September 2011
    172 Posts
    God damn I love ReSharper. It can automatically turn this...



    into this...



    Doesn't really help readability, though...
    I don't understand how one can use bloat, that is R#.
    Hate it -_-
    Reply With Quote Edit / Delete Windows 7 Latvia Show Events Disagree Disagree x 3Dumb Dumb x 2Programming King Programming King x 1 (list)

  27. Post #147
    Gold Member
    Socram's Avatar
    June 2006
    1,835 Posts
    I don't understand how one can use bloat, that is R#.
    Hate it -_-
    Can you explain what you mean? Since I've installed it I've only gotten positive results/increased productivity in my coding. What do you mean by bloat?
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 1Programming King Programming King x 1 (list)

  28. Post #148
    Team Hamster
    jalb's Avatar
    December 2009
    559 Posts
    Oh wow. Looks like I just got a free expo pass to GDC in San Fran this March.

    In a few weeks I'll be hopping on another project with a professor of mine. If all goes well I'll get a "free all inclusive pass" to GDC Austin in October and likely present on stage a part of this technology.

    I am both excited and terrified.

    Anyone else going to either of these?
    Reply With Quote Edit / Delete Windows 7 United States Show Events Winner Winner x 10Programming King Programming King x 1 (list)

  29. Post #149
    Follow me on GitHub!
    Ziks's Avatar
    June 2011
    2,024 Posts
    local x = [[print( "local x = [=[" .. x .. "]=]\n" .. x:sub( 1, 19 ) .. x:sub( 21, 33 ) .. x:sub( 35 ) )]]
    print( "local x = [[" .. x .. "]]\n" .. x:sub( 1, 19 ) .. x:sub( 21, 33 ) .. x:sub( 35 ) )

    Quine motherfucker
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Zing Zing x 3Winner Winner x 1Funny Funny x 1Programming King Programming King x 1 (list)

  30. Post #150
    Gold Member

    October 2008
    3,838 Posts
    Can you explain what you mean? Since I've installed it I've only gotten positive results/increased productivity in my coding. What do you mean by bloat?
    It's true that it uses a lot of memory (at the moment it's using 115 MB) and that it starts very slowly but once the stuff is all running it's amazing.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Programming King Programming King x 1 (list)

  31. Post #151
    Follow me on GitHub!
    Ziks's Avatar
    June 2011
    2,024 Posts
    128 char version:

    x=[[print("x=[=["..x.."]=]"..x:sub(1,10)..x:sub(12,20)..x:sub(22))]]print("x=[["..x.."]]"..x:sub(1,10)..x:sub(12,20)..x:sub(22))
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Programming King Programming King x 7Artistic Artistic x 1 (list)

  32. Post #152
    Gold Member
    ZenX2's Avatar
    February 2009
    4,965 Posts
    Ooooooh yeaaaaaah

    Reply With Quote Edit / Delete Windows 7 United States Show Events Artistic Artistic x 5Optimistic Optimistic x 1Dumb Dumb x 1Programming King Programming King x 1 (list)

  33. Post #153
    This title has been removed due to a copyright claim from Viacom Inc.
    neos300's Avatar
    July 2008
    3,484 Posts
    Crap.
    I've lost the ability to put a GWEN gui ingame.
    All of my game's stuff is being put into a SFML RenderTexture, and when I have no GWEN stuff on the screen it works fine.
    However, as soon as I try to put some stuff in a ingame gui, then my render texture isn't rendered (or atleast it fills everything with black and then draws it's stuff over)
    Reply With Quote Edit / Delete Windows 7 United States Show Events Programming King Programming King x 1 (list)

  34. Post #154
    Gold Member
    ZenX2's Avatar
    February 2009
    4,965 Posts
    Roguelike in the nearish future

    Edited:

    That automerge break

    Edited:

    Reply With Quote Edit / Delete Windows 7 United States Show Events Artistic Artistic x 9Dumb Dumb x 1Programming King Programming King x 1 (list)

  35. Post #155
    Hates php
    high's Avatar
    May 2006
    2,415 Posts
    God damn I love ReSharper. It can automatically turn this...



    into this...



    Doesn't really help readability, though...
    You should never really use the LINQ quick fix. If you couldn't come up with the LINQ it uses then you are just making it harder for yourself to read for no reason.

    Also you can make a bit less confusing LINQ statement using FirstOrDefault (my favorite).

    var entity = _entityList.FirstOrDefault(entity => entity.Has<ComponentPhysics>() && entity.Get<ComponentPhysics>().Body == body);
    if (entity != null)
        return entity;
    Reply With Quote Edit / Delete Windows 7 United States Show Events Programming King Programming King x 1 (list)

  36. Post #156
    Gold Member
    Jookia's Avatar
    July 2007
    6,768 Posts
    C++0x quine go

    #include<cstdio>
    const char*c=R"(#include<cstdio>
    const char*c=R"(%s)%c;
    main(){printf(c,c,'"');})";
    main(){printf(c,c,'"');}
    Reply With Quote Edit / Delete Linux Australia Show Events Funny Funny x 6Programming King Programming King x 1 (list)

  37. Post #157
    Gold Member
    Darwin226's Avatar
    January 2009
    4,073 Posts
    You should never really use the LINQ quick fix. If you couldn't come up with the LINQ it uses then you are just making it harder for yourself to read for no reason.

    Also you can make it a bit less confusing using FirstOrDefault (my favorite).

    var entity = _entityList.FirstOrDefault(entity => entity.Has<ComponentPhysics>() && entity.Get<ComponentPhysics>().Body == body);
    if (entity != null)
        return entity;
    I don't really think the LINQ it got replaced with is that unreadable.
    It's nice that you can just follow the arrows and read what kind of transformations each step does to the list.
    Reply With Quote Edit / Delete Windows 7 Croatia Show Events Programming King Programming King x 1 (list)

  38. Post #158
    ASK ME ABOUT MY PLAYBOOK INSTEAD OF COLLEGE
    icantread49's Avatar
    April 2011
    1,616 Posts
    God damn I love ReSharper. It can automatically turn this...



    into this...



    Doesn't really help readability, though...
    probably doesn't help performance either

    (chained .Where() calls)

    Edited:

    I've considered that but I'm trying to be careful to keep it as portable as possible
    .exe

    -automerge fail-

    i think it'd be worth it to try the transparent window trick if available, otherwise fall back to your current method
    Reply With Quote Edit / Delete Windows XP United States Show Events Programming King Programming King x 1 (list)

  39. Post #159
    Nigey Nige's Avatar
    June 2010
    1,338 Posts


    l'm making a TBS set in space, entitled: 'Hey, that's MY planet!' Players take planets close to them, build up resources and attack their opponents.

    Currently trying to solve a problem where the players can destroy all planets between them, thus cutting off their route to the opponent and making the game unwinnable. Anyone got a creative solution? I'd rather not just increase each planet's range, since I'm trying to learn good game design principles and want to keep the rules consistent.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Artistic Artistic x 2Winner Winner x 1Programming King Programming King x 1 (list)

  40. Post #160
    ASK ME ABOUT MY PLAYBOOK INSTEAD OF COLLEGE
    icantread49's Avatar
    April 2011
    1,616 Posts
    -automerge fail-
    Reply With Quote Edit / Delete Windows XP United States Show Events Dumb Dumb x 1Programming King Programming King x 1 (list)