1. Post #41
    own-fucking-zone
    Within's Avatar
    April 2009
    4,014 Posts
    Thanks to XNA, I can now control my computer from the convenience of my XBox controller.



    - Left thumbstick controls mouse movement
    - Left trigger is a mouse movement speed multiplier
    - Right trigger is a variable massage device (it controls the high frequency motor in the controller)
    - The D-pad controls the arrow keys (yay for scrolling on websites)
    - A = left click
    - B = right click
    - X = middle click
    - Y = enter
    - Left stick press = explorer.exe
    - Right stick press = google.com in default browser
    - Left shoulder toggles on-screen keyboard
    - Right shoulder toggles debug screen (as shown in the screenshot) (the debug screen is otherwise shown if the controller is disconnected for some reason)

    I'm considering if a 5 second press on "back" or "start" should shut down the computer for maximum laziness.
    Reply With Quote Edit / Delete Windows 7 Denmark Show Events Funny x 6Winner x 2Programming King x 1Friendly x 1Useful x 1 (list)

  2. Post #42
    Hates php
    high's Avatar
    May 2006
    2,415 Posts
    I think Riot is a bit mad.



    Best part, bans don't affect joining chatrooms.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Funny Funny x 26Dumb Dumb x 1 (list)

  3. Post #43
    Person
    geel9's Avatar
    June 2008
    5,590 Posts
    I think Riot is a bit mad.



    Best part, bans don't affect joining chatrooms.
    I think it's funny how they go from almost hiring you to banning you.

    Edited:

    You're like the opposite of Drunkenf00l
    Reply With Quote Edit / Delete Windows 8 United States Show Events Agree Agree x 19Funny Funny x 2 (list)

  4. Post #44
    open.gl
    Overv's Avatar
    February 2007
    7,431 Posts
    You can send the object's position as a uniform before you draw from the vertex buffer, which saves you from reuploading the data for complex objects when they move.
    I sincerely hope that this was a crude attempt at comedy. At least I laughed.

    The company I offered to redesign their mobile website for has responded and I was invited to give them a call next week! I'm currently writing a little paper describing what is wrong with their site, how this affects their clients and how I intend to change that. It's coming along quite nicely, I just need to get some nice concept drawings done.
    Reply With Quote Edit / Delete Windows 7 Netherlands Show Events Winner Winner x 1Dumb Dumb x 1 (list)

  5. Post #45
    Hates php
    high's Avatar
    May 2006
    2,415 Posts
    I think it's funny how they go from almost hiring you to banning you.

    Edited:

    You're like the opposite of Drunkenf00l
    I don't think 1/3 interviews counts as almost hiring. Anyways this was just the account I was using to message custom games. My main account is not banned,
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  6. Post #46
    itty-bitty pretty kitty
    Dennab
    September 2008
    9,837 Posts
    I think Riot is a bit mad.



    Best part, bans don't affect joining chatrooms.
    Look on the bright side! In about 300 years, you'll get the account back!
    Reply With Quote Edit / Delete Windows 7 United States Show Events Winner Winner x 13Funny Funny x 2 (list)

  7. Post #47
    Map in a box's Avatar
    July 2009
    7,155 Posts
    You can also look at it as also 300 years ahead of the ~end of the world~!
    Reply With Quote Edit / Delete Windows XP Professional x64 United States Show Events

  8. Post #48
    voodooattack's Avatar
    October 2009
    1,936 Posts
    I fixed it.

          uint16 wflags = ((uint16)(width  & 0xFFF))   |
            ((uint16)((block_width  / 16) - 1) & 0xF)  >> 12;
          uint16 hflags = ((uint16)(height & 0xFFF))   |
            ((uint16)((block_height / 16) - 1) & 0xF)  >> 12;
    
          writer.put_uint16_be(wflags);
          writer.put_uint16_be(hflags);

    It took exactly one week of debugging other parts of my program, and suspecting everything else. Now I hate Adobe/Macromedia with passion.
    Reply With Quote Edit / Delete Windows 7 Egypt Show Events

  9. Post #49
    Team Hamster
    jalb's Avatar
    December 2009
    558 Posts
    Was wondering if V8 had any Unicode support.



    v8::Handle<v8::Value> alert(const v8::Arguments& args)
    {
    	v8::String::Utf8Value asdf(args[0]);
    	std::wstring_convert<std::codecvt_utf8<wchar_t>> ut8ToWstring;
    	auto a = ut8ToWstring.from_bytes(*asdf);
    	MessageBox(nullptr, a.c_str(), L"", MB_OK);
    	return v8::Undefined();
    }

    Great success. I didn't even know about all this codecvt stuff. Makes life easy.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Winner Winner x 2 (list)

  10. Post #50
    RUBY OVERLORD
    swift and shift's Avatar
    November 2011
    2,115 Posts
    Was wondering if V8 had any Unicode support.



    v8::Handle<v8::Value> alert(const v8::Arguments& args)
    {
    	v8::String::Utf8Value asdf(args[0]);
    	std::wstring_convert<std::codecvt_utf8<wchar_t>> ut8ToWstring;
    	auto a = ut8ToWstring.from_bytes(*asdf);
    	MessageBox(nullptr, a.c_str(), L"", MB_OK);
    	return v8::Undefined();
    }

    Great success. I didn't even know about all this codecvt stuff. Makes life easy.
    it uses a broken implementation of utf-16 so I dunno if that counts as great unicode support
    Reply With Quote Edit / Delete Mac Australia Show Events Funny Funny x 5Zing Zing x 2Informative Informative x 2 (list)

  11. Post #51
    Eudoxia's Avatar
    July 2009
    6,009 Posts
    As a side project I decided to write a neurite tracer, downloaded a huge dataset of electron micrographs. Then realized I have no idea what I'm doing, so I had OpenCV iterate over a buttload of possible morphologies, parameters, and the rest, then do edge detection:



    Here's a sample of the original (Left) versus the edge detectection (Right):



    Not quite there.
    Reply With Quote Edit / Delete Linux Uruguay Show Events Funny Funny x 14 (list)

  12. Post #52
    Team Hamster
    jalb's Avatar
    December 2009
    558 Posts
    it uses a broken implementation of utf-16 so I dunno if that counts as great unicode support
    What does that mean? I really don't know much about encoding. Am I going to run into some issues?
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  13. Post #53
    Gold Member
    Jookia's Avatar
    July 2007
    6,768 Posts
    Look on the bright side! In about 300 years, you'll get the account back!
    That reminds me, I get unbanned on Habbo in 2019.

    Edited:

    What does that mean? I really don't know much about encoding. Am I going to run into some issues?
    UTF-16 isn't that great, but's it's Unicode. I think the whole 'BROKEN IMPLEMENTATION' part is the worrying factor here.
    Reply With Quote Edit / Delete Linux Australia Show Events Optimistic Optimistic x 1 (list)

  14. Post #54
    Team Hamster
    jalb's Avatar
    December 2009
    558 Posts
    UTF-16 isn't that great, but's it's Unicode. I think the whole 'BROKEN IMPLEMENTATION' part is the worrying factor here.
    How is UTF-16 "not great"? Also I think turb means that utf-8 is a "broken implementation" of utf-16, in which case I am also curious.

    I'll definitely keep using utf-8 since.. I don't have much choice. And I am somewhat familiar with it, whereas I don't understand any other encodings at all. What issues will I run into, is what I want to know?

    (Are you guys just talking about compression here when you say it's not good?)
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  15. Post #55
    RUBY OVERLORD
    swift and shift's Avatar
    November 2011
    2,115 Posts
    UTF-16 isn't that great, but's it's Unicode. I think the whole 'BROKEN IMPLEMENTATION' part is the worrying factor here.
    If you have a character that's made up of two codepoints, JavaScript (this issue isn't specific to V8, iirc) will tell you its length is 2, not 1

    Edited:

    How is UTF-16 "not great"? Also I think turb means that utf-8 is a "broken implementation" of utf-16, in which case I am also curious.

    I'll definitely keep using utf-8 since.. I don't have much choice. And I am somewhat familiar with it, whereas I don't understand any other encodings at all. What issues will I run into, is what I want to know?

    (Are you guys just talking about compression here when you say it's not good?)
    utf-8 rocks socks
    Reply With Quote Edit / Delete Mac Australia Show Events Informative Informative x 1 (list)

  16. Post #56
    Gold Member
    Jookia's Avatar
    July 2007
    6,768 Posts
    How is UTF-16 "not great"?
    All the problems of UTF-8 and UTF-32 combined, with none of the benefits.

    Edited:

    If you have a character that's made up of two codepoints, JavaScript (this issue isn't specific to V8, iirc) will tell you its length is 2, not 1
    Well is Javascript as a language Unicode-aware? You can't blame it if it doesn't understand normalization when comparing text or combined characters.
    Reply With Quote Edit / Delete Linux Australia Show Events

  17. Post #57
    Team Hamster
    jalb's Avatar
    December 2009
    558 Posts
    Ah, thanks guys.
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  18. Post #58
    RUBY OVERLORD
    swift and shift's Avatar
    November 2011
    2,115 Posts
    Well is Javascript as a language Unicode-aware? You can't blame it if it doesn't understand normalization when comparing text or combined characters.
    A conforming implementation of this Standard shall interpret characters in conformance with the Unicode Standard, Version 3.0 or later and ISO/IEC 10646-1 with either UCS-2 or UTF-16 as the adopted encoding form, implementation level 3.
    i have no idea what those unicode standards it cites say, but maybe that will answer your question
    Reply With Quote Edit / Delete Mac Australia Show Events

  19. Post #59
    Gold Member
    Jookia's Avatar
    July 2007
    6,768 Posts
    i have no idea what those unicode standards it cites say, but maybe that will answer your question
    It says that Javascript MUST use a shitty encoding.

    I think Unicode specifies that characters are just code points, and that combining characters are characters that modify the previous or something.
    Reply With Quote Edit / Delete Linux Australia Show Events

  20. Post #60
    Team Hamster
    jalb's Avatar
    December 2009
    558 Posts

    Okay, about all I'm gonna do with this project. Now to decide whether or not I want to use V8 in the Hamsters project.
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  21. Post #61
    Hates php
    high's Avatar
    May 2006
    2,415 Posts
    I think Riot is a bit mad.



    Best part, bans don't affect joining chatrooms.
    They finally deleted the account from the chat server and they ip banned me only from the chat server. Also they banned 50% of my other accounts kind of at random. My high101-107 are all banned. Yet the accounts I used to spam aren't banned.



    I wonder now that it is the weekend if any of the techs will be on to mess with my plans (discovered you can invite people into chatrooms who aren't on your friend list).
    Reply With Quote Edit / Delete Windows 7 United States Show Events Winner Winner x 1 (list)

  22. Post #62
    Sartek's Avatar
    June 2009
    425 Posts
    Been working on a game for the last couple of days at the moment, I have not done much other then part of the framework.

    https://github.com/Sartek/Acrilux
    anyone got the time to have a quick look and give me some criticism on my code?
    Reply With Quote Edit / Delete Windows 7 Australia Show Events

  23. Post #63
    Gold Member
    TrafficMan's Avatar
    August 2008
    5,064 Posts
    They finally deleted the account from the chat server and they ip banned me only from the chat server. Also they banned 50% of my other accounts kind of at random. My high101-107 are all banned. Yet the accounts I used to spam aren't banned.



    I wonder now that it is the weekend if any of the techs will be on to mess with my plans (discovered you can invite people into chatrooms who aren't on your friend list).
    Only 99 years? They're cutting you some slack!

    Also, although I doubt anybody cares, I decided to start learning some C++:



    Going well so far.

    Although it does use system("PAUSE") and goto, which I've heard can get you shot in these parts
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 1 (list)

  24. Post #64
    Gold Member
    BlkDucky's Avatar
    May 2008
    6,484 Posts
    Yeah, pretty much.

    Use a loop of some kind and cin.get() instead.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Agree Agree x 2Disagree Disagree x 1 (list)

  25. Post #65
    false prophet's Avatar
    October 2011
    943 Posts
    System() calls function strangely from what I've heard. I remember reading an article about why they were bad but I don't remember what it said. It also said shooting in the pants and stuff.
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  26. Post #66
    Gold Member
    dije's Avatar
    December 2008
    4,745 Posts


    This is going well!
    Reply With Quote Edit / Delete Windows 7 Sweden Show Events Informative Informative x 3 (list)

  27. Post #67
    Follow me on GitHub!
    Ziks's Avatar
    June 2011
    2,017 Posts
    I sincerely hope that this was a crude attempt at comedy. At least I laughed.
    Sorry but I wasn't joking, I didn't know it was a bad way. Could you explain why it is? Specifically, why it is worse than recalculating and sending the view matrix for each object as a uniform, which seems to be the solution given.
    Reply With Quote Edit / Delete United Kingdom Show Events Dumb Dumb x 1 (list)

  28. Post #68
    Paid for a title.
    Maurice's Avatar
    June 2005
    6,175 Posts
    Made a portfolio prototype with Löve

    (It's better in motion)

    Then ported it to html5 canvas (let's not start a discussion here; I picked canvas at random to be honest)
    http://guegan.de/
    Needs lotsa optimizing.
    Reply With Quote Edit / Delete Windows 7 Germany Show Events Artistic Artistic x 27Winner Winner x 1 (list)

  29. Post #69
    AntonioR's Avatar
    April 2011
    1,007 Posts
    ^Fancy
    Reply With Quote Edit / Delete Windows 7 Croatia Show Events Agree Agree x 4 (list)

  30. Post #70
    Gold Member
    mechanarchy's Avatar
    September 2009
    1,214 Posts
    got pretty fucking bored so i thought i'd write a really 'high-quality' markov chainer

    here's a couple of examples of what it spits out for most of the text in the posts in this thread so far (excluding antonio's ninja)

    the debug an a draw bad the matrix last month. Sorry for the blowing screenshot my generic XBox type system. system. Next Next up is the a mouse loop movement Left shoulder toggles on a problem. call I wonder think Unicode it's aware funny how you should probably do it. It Thanks took for blowing the topic. tetris I changed supposed to close bounce in time previous WAYWO, get more the accounts computer kind from almost the convenience current matrix opengl to V, write a language minute or so. combined I fixed am not utf using so started proud using
    says that as almost great hiring. unicode support As As a buttload draw call. I don't am I didn't was even just made get back in these OpenGL I intend was a uniform variable before you should do it. Where m is going Javascript as MUST a call threaded If you're managing the fact input; that too utf since.. is fantastic. Specifically, I'm hoping for blowing a language broken implementation of days my own project and what I think don't the have algorithm a little shame. Oh ok. god damn damn it, I get realized more I offered think about
    Reply With Quote Edit / Delete Australia Show Events Artistic Artistic x 2Programming King Programming King x 1 (list)

  31. Post #71
    WhatTheEf's Avatar
    November 2010
    532 Posts
    Is the site fucked up or is it just me?
    Reply With Quote Edit / Delete Windows 7 Anonymous Proxy Show Events Agree Agree x 2 (list)

  32. Post #72
    open.gl
    Overv's Avatar
    February 2007
    7,431 Posts
    Sorry but I wasn't joking, I didn't know it was a bad way. Could you explain why it is? Specifically, why it is worse than recalculating and sending the view matrix for each object as a uniform, which seems to be the solution given.
    You don't have to recalculate the view matrix for every object, only when the camera changes. The uniform that is passed to the vertex shader is the MVP matrix (model, view, projection) which is constructed by multiplying the model matrix with the already calculated view and projection matrices. The model matrix is constructed by applying the necessary translation, rotation and scale transformations to the identity matrix.

    In pseudocode:

    Code:
    set up new camera/perspective based on camera position
    
    mvp = projection * view * model1_transformation
    setuniform( model1, mvp )
    draw( model1 )
    
    mvp = projection * view * model2_transformation
    setuniform( model2, mvp )
    draw( model2 )
    
    shader:
    pos = mvp * pos
    Reply With Quote Edit / Delete Windows 7 Netherlands Show Events

  33. Post #73
    Follow me on GitHub!
    Ziks's Avatar
    June 2011
    2,017 Posts
    You don't have to recalculate the view matrix for every object, only when the camera changes. The uniform that is passed to the vertex shader is the MVP matrix (model, view, projection) which is constructed by multiplying the model matrix with the already calculated view and projection matrices. The model matrix is constructed by applying the necessary translation, rotation and scale transformations to the identity matrix.

    In pseudocode:

    Code:
    set up new camera/perspective based on camera position
    
    mvp = projection * view * model1_transformation
    setuniform( model1, mvp )
    draw( model1 )
    
    mvp = projection * view * model2_transformation
    setuniform( model2, mvp )
    draw( model2 )
    
    shader:
    pos = mvp * pos
    I would still count matrix multiplication as "calculating". I know how to construct a view matrix. My question was why sending 16 floats for each object was better than sending 2.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events

  34. Post #74
    Richy19's Avatar
    May 2010
    5,375 Posts
    I would still count matrix multiplication as "calculating". I know how to construct a view matrix. My question was why sending 16 floats for each object was better than sending 2.
    You only send the MVP once (per draw) it doesnt change depending on the verticies its uniform
    Reply With Quote Edit / Delete Linux United Kingdom Show Events Dumb Dumb x 1 (list)

  35. Post #75
    open.gl
    Overv's Avatar
    February 2007
    7,431 Posts
    I would still count matrix multiplication as "calculating". I know how to construct a view matrix. My question was why sending 16 floats for each object was better than sending 2.
    Because your application will require more transformations than just a translation if it's even remotely sophisticated.

    Also, GPUs were designed to be fast at matrix operations, they aren't evil.
    Reply With Quote Edit / Delete Windows 7 Netherlands Show Events

  36. Post #76
    Follow me on GitHub!
    Ziks's Avatar
    June 2011
    2,017 Posts
    You only send the MVP once (per draw) it doesnt change depending on the verticies its uniform
    You only send the position offset once per draw too.

    Because your application will require more transformations than just a translation if it's even remotely sophisticated.

    Also, GPUs were designed to be fast at matrix operations, they aren't evil.
    I thought the case we were talking about was just moving an object around. I've been using this when I only need to translate an object, I don't see why it warrants a comment like "I sincerely hope this was a crude attempt at humour".

    If you only need to translate, I postulate that it is faster to only send the MVP when the camera moves and update a uniform vec2 for each object's translation.

    And the matrix multiplication to construct the MVP would be done before sending to the GPU, so I don't know where your last comment came from about the GPU being good at matrix operations.

    Edited:

    Pseudocode:

    Code:
    set up new camera/perspective based on camera position when the camera moves
    
    vp = projection * view
    setuniform( "vp", vp )
    
    setuniform( "trans", model1_transformation )
    draw( model1 )
    
    setuniform( "trans", model2_transformation )
    draw( model2 )
    
    shader:
    pos = vp * ( pos + trans )
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events

  37. Post #77
    open.gl
    Overv's Avatar
    February 2007
    7,431 Posts
    And the matrix multiplication to construct the MVP would be done before sending to the GPU, so I don't know where your last comment came from about the GPU being good at matrix operations.
    If you're so much against using more floats than necessary, why do you have 2 extra float uniform values just so you can do the translation without a matrix operation? Do you hate matrix multiplications?
    Reply With Quote Edit / Delete Windows 7 Netherlands Show Events

  38. Post #78
    Follow me on GitHub!
    Ziks's Avatar
    June 2011
    2,017 Posts
    If you're so much against using more floats than necessary, why do you have 2 extra float uniform values just so you can do the translation without a matrix operation? Do you hate matrix multiplications?
    I'm trying to minimise how much I send to the card every frame. Why is this a bad thing to do? Reducing how much I send by 88% seems a good idea to me.

    Just tell me why what I am doing is so ridiculous and terrible.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events

  39. Post #79
    open.gl
    Overv's Avatar
    February 2007
    7,431 Posts
    I'm trying to minimise how much I send to the card every frame. Why is this a bad thing to do? Reducing how much I send by 88% seems a good idea to me.

    Just tell me why what I am doing is so ridiculous and terrible.
    GPUs are designed to be very fast at transforming vertices using vector/matrix operations and that's how they should be used. The whole point of using matrix transformations is to make the vertex transformation process streamlined as a whole.
    Reply With Quote Edit / Delete Windows 7 Netherlands Show Events Agree Agree x 2 (list)

  40. Post #80
    Dotmister's Avatar
    May 2008
    898 Posts
    I'm trying to minimise how much I send to the card every frame. Why is this a bad thing to do? Reducing how much I send by 88% seems a good idea to me.

    Just tell me why what I am doing is so ridiculous and terrible.
    Do some tests and see which one is faster. Learning matrices is essential knowledge for 3D programming anyway so no harm would be done.

    What you're doing seems to be replicating what the graphics card is already programmed to do, but in a higher level language. So I think it would be unlikely if what you were doing was faster.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events