1. Post #841
    SHADERS
    Legend286's Avatar
    October 2008
    10,024 Posts
    256 x 256 Shadowmap (GL_DEPTH_COMPONENT16), 0.006 bias. Don't know what you're doing there.

    edit
    1/4 scaled shadow overlay: http://i.cubeupload.com/QkY92e.png (work in progress shadow smoothing)
    Nice, abusing me in your picture. :)
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Programming King Programming King x 1 (list)

  2. Post #842
    Andrew McWatters
    Dennab
    March 2011
    4,658 Posts
    I'm wanting to stop using lua ( Its a good language, it just has limitations ) and move on to something better. Should I start learning C# or C++? (Or something completely different if you guys have any suggestions)
    C#

    Edited:

    I went on to learn C++, then dabble in C, but I wish I spent more time with C# - as I'd like to create desktop applications and not just APIs and libraries for other developers to use.

    It's not like I can't do that with C++ and the Windows API or make desktop applications with C++/CLI and .NET, but C# is much more friendly for these things, imo.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 2Dumb Dumb x 1Programming King Programming King x 1 (list)

  3. Post #843
    Map in a box's Avatar
    July 2009
    7,351 Posts
    I'm wanting to stop using lua ( Its a good language, it just has limitations ) and move on to something better. Should I start learning C# or C++? (Or something completely different if you guys have any suggestions)
    Love2D?

    Edited:

    (I'm assuming he wants to make games quickly and since he knows lua pretty well already..)
    Reply With Quote Edit / Delete Windows XP Professional x64 United States Show Events Programming King Programming King x 1 (list)

  4. Post #844
    Andrew McWatters
    Dennab
    March 2011
    4,658 Posts
    Love2D?

    Edited:

    (I'm assuming he wants to make games quickly and since he knows lua pretty well already..)
    I believe he's speaking of the language's lightweight philosophy, as well as being a scripting language in the first place being a limitation for his personal development, in which in many ways he is correct.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Programming King Programming King x 1 (list)

  5. Post #845
    Gold Member
    Bellmanator's Avatar
    August 2008
    1,622 Posts
    Love2D?

    Edited:

    (I'm assuming he wants to make games quickly and since he knows lua pretty well already..)
    That's actually how I got into lua/learned about the language. But making small 2D game projects over and over is kinda getting old.

    In fact if I'm gonna do anything with Love2D again it'll probably be to finish off my last project, which I used to post vids of in here quiet often.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Programming King Programming King x 1 (list)

  6. Post #846
    HQRSE FUCKER
    ief014's Avatar
    September 2009
    3,061 Posts


    Text boxes! :D
    Reply With Quote Edit / Delete Windows 7 Germany Show Events Winner Winner x 2Programming King Programming King x 2 (list)

  7. Post #847
    Gold Member
    thomasfn's Avatar
    July 2008
    2,964 Posts
    It's surprisingly difficult to have a simple console application with "start", "think" and "finish" events in C#.

    Code:
    class Program
        {
            private static Thread thdserver;
    
            private static bool bExit;
    
            public static void Main(string[] args)
            {
                SetConsoleCtrlHandler(new HandlerRoutine(ConsoleCtrlCheck), true);
    
                bExit = false;
                thdserver = new Thread(RunServer);
                thdserver.Start();
    
                while (!bExit)
                {
                    Thread.Sleep(0);
                }
    
                thdserver.Join();
                
            }
    
            private static void RunServer()
            {
                bool exit = false;
                while (!exit)
                {
    
                    ServerRoot.Create();
                    while (!ServerRoot.Instance.Finished)
                    {
                        lock (ServerRoot.Instance) ServerRoot.Instance.Think();
                        if (bExit) break;
                    }
                    lock (ServerRoot.Instance) ServerRoot.Instance.Shutdown();
                    exit = !ServerRoot.Instance.Restart;
                }
            }
    
            private static void HandleExit()
            {
                bExit = true;
                lock (ServerRoot.Instance) ServerRoot.Instance.Shutdown();
            }
    
    
            private static bool ConsoleCtrlCheck(CtrlTypes ctrlType)
            {
                switch (ctrlType)
                {
                    case CtrlTypes.CTRL_C_EVENT:
                        HandleExit();
                        break;
    
                    case CtrlTypes.CTRL_BREAK_EVENT:
                        HandleExit();
                        break;
    
                    case CtrlTypes.CTRL_CLOSE_EVENT:
                        HandleExit();
                        break;
    
                    case CtrlTypes.CTRL_LOGOFF_EVENT:
                    case CtrlTypes.CTRL_SHUTDOWN_EVENT:
                        HandleExit();
                        break;
    
                }
                return true;
            }
    
    
    
            #region unmanaged
            // Declare the SetConsoleCtrlHandler function
            // as external and receiving a delegate.
    
            [DllImport("Kernel32")]
            public static extern bool SetConsoleCtrlHandler(HandlerRoutine Handler, bool Add);
    
            // A delegate type to be used as the handler routine
            // for SetConsoleCtrlHandler.
            public delegate bool HandlerRoutine(CtrlTypes CtrlType);
    
            // An enumerated type for the control messages
            // sent to the handler routine.
            public enum CtrlTypes
            {
                CTRL_C_EVENT = 0,
                CTRL_BREAK_EVENT,
                CTRL_CLOSE_EVENT,
                CTRL_LOGOFF_EVENT = 5,
                CTRL_SHUTDOWN_EVENT
            }
    
            #endregion
        }
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Disagree Disagree x 9Dumb Dumb x 1Funny Funny x 1Programming King Programming King x 1 (list)

  8. Post #848
    Gold Member
    Bellmanator's Avatar
    August 2008
    1,622 Posts
    Does anyone know any good C# tutorials? I tried looking toward microsoft but they have a clusterfuck of information, and youtube has a bunch of people using a drag and drop interface, which I try to avoid.

    I got Visual Studio 2010 ultimate, and I have no clue what all this shit does.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Programming King Programming King x 1 (list)

  9. Post #849

    August 2007
    192 Posts
    It's surprisingly difficult to have a simple console application with "start", "think" and "finish" events in C#.

    Code:
    class Program
        {
            private static Thread thdserver;
    
            private static bool bExit;
    
            public static void Main(string[] args)
            {
                SetConsoleCtrlHandler(new HandlerRoutine(ConsoleCtrlCheck), true);
    
                bExit = false;
                thdserver = new Thread(RunServer);
                thdserver.Start();
    
                while (!bExit)
                {
                    Thread.Sleep(0);
                }
    
                thdserver.Join();
                
            }
    
            private static void RunServer()
            {
                bool exit = false;
                while (!exit)
                {
    
                    ServerRoot.Create();
                    while (!ServerRoot.Instance.Finished)
                    {
                        lock (ServerRoot.Instance) ServerRoot.Instance.Think();
                        if (bExit) break;
                    }
                    lock (ServerRoot.Instance) ServerRoot.Instance.Shutdown();
                    exit = !ServerRoot.Instance.Restart;
                }
            }
    
            private static void HandleExit()
            {
                bExit = true;
                lock (ServerRoot.Instance) ServerRoot.Instance.Shutdown();
            }
    
    
            private static bool ConsoleCtrlCheck(CtrlTypes ctrlType)
            {
                switch (ctrlType)
                {
                    case CtrlTypes.CTRL_C_EVENT:
                        HandleExit();
                        break;
    
                    case CtrlTypes.CTRL_BREAK_EVENT:
                        HandleExit();
                        break;
    
                    case CtrlTypes.CTRL_CLOSE_EVENT:
                        HandleExit();
                        break;
    
                    case CtrlTypes.CTRL_LOGOFF_EVENT:
                    case CtrlTypes.CTRL_SHUTDOWN_EVENT:
                        HandleExit();
                        break;
    
                }
                return true;
            }
    
    
    
            #region unmanaged
            // Declare the SetConsoleCtrlHandler function
            // as external and receiving a delegate.
    
            [DllImport("Kernel32")]
            public static extern bool SetConsoleCtrlHandler(HandlerRoutine Handler, bool Add);
    
            // A delegate type to be used as the handler routine
            // for SetConsoleCtrlHandler.
            public delegate bool HandlerRoutine(CtrlTypes CtrlType);
    
            // An enumerated type for the control messages
            // sent to the handler routine.
            public enum CtrlTypes
            {
                CTRL_C_EVENT = 0,
                CTRL_BREAK_EVENT,
                CTRL_CLOSE_EVENT,
                CTRL_LOGOFF_EVENT = 5,
                CTRL_SHUTDOWN_EVENT
            }
    
            #endregion
        }
    You can use a mutex for this, the locking you're doing there isn't really doing anything ;)
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Programming King Programming King x 1 (list)

  10. Post #850
    RUBY OVERLORD
    swift and shift's Avatar
    November 2011
    2,115 Posts
    Does anyone know any good C# tutorials? I tried looking toward microsoft but they have a clusterfuck of information, and youtube has a bunch of people using a drag and drop interface, which I try to avoid.

    I got Visual Studio 2010 ultimate, and I have no clue what all this shit does.
    the designer is fine for most cases
    Reply With Quote Edit / Delete Mac Australia Show Events Agree Agree x 8Disagree Disagree x 1Programming King Programming King x 1 (list)

  11. Post #851
    Andrew McWatters
    Dennab
    March 2011
    4,658 Posts
    Does anyone know any good C# tutorials? I tried looking toward microsoft but they have a clusterfuck of information, and youtube has a bunch of people using a drag and drop interface, which I try to avoid.

    I got Visual Studio 2010 ultimate, and I have no clue what all this shit does.
    If you're going to be writing WinForms stuff, it seems to be the best way to go about writing your applications, given you're smart enough to follow user experience guidelines.

    That "drag and drop" deal isn't really full on WYSIWYG, so much as it is a way of speeding up UI development. You'll still need to code all of the actions for all of the elements, and a general program flow for anything.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 4Programming King Programming King x 1 (list)

  12. Post #852
    Gold Member
    thomasfn's Avatar
    July 2008
    2,964 Posts
    You can use a mutex for this, the locking you're doing there isn't really doing anything ;)
    The locking is there because ConsoleCtrlCheck and hence HandleExit comes in from a different thread to the main one (and the one I'm creating). Locking the instance in HandleExit causes the thread to jump back to the one running Think on the instance so that it can shutdown properly - if I don't do this, windows will go ahead and terminate whatever thread it likes without telling me and everything gets messed up.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Programming King Programming King x 1 (list)

  13. Post #853

    August 2007
    192 Posts
    The locking is there because ConsoleCtrlCheck and hence HandleExit comes in from a different thread to the main one (and the one I'm creating). Locking the instance in HandleExit causes the thread to jump back to the one running Think on the instance so that it can shutdown properly - if I don't do this, windows will go ahead and terminate whatever thread it likes without telling me and everything gets messed up.
    Still locking an instance of an object isn't a good idea, what if in another thread somewhere in your system that instance gets added to a collection or spun out to another thread? Mutex and lock in c# are practically the same, Mutex is just cleaner for this particular use :D
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Programming King Programming King x 1 (list)

  14. Post #854
    Andrew McWatters
    Dennab
    March 2011
    4,658 Posts
    ohloh crawled my mod a while back it seems, though i didn't notice until i googled "hl2sb" due to laziness in finding my google code page

    http://www.ohloh.net/p/hl2sb-src:








    of course ohloh's project analysis projections for these sorts of things are generally always outrageously high
    Reply With Quote Edit / Delete Windows 7 United States Show Events Funny x 18Dumb x 3Winner x 1Disagree x 1Programming King x 1 (list)

  15. Post #855
    Gold Member

    March 2005
    3,028 Posts

    The beginnings of a Javascript (hopefully WebGL!) grapher.

    That's complex hyperbolic sine for x=[-1, 1] and y=[-1, 1], 16 steps on each axis. Of course, it has sinh z built-in, but that wouldn't show off the fancy parser I wrote :D.
    Reply With Quote Edit / Delete Windows 7 Show Events Programming King Programming King x 2Artistic Artistic x 1Winner Winner x 1 (list)

  16. Post #856
    Gold Member
    Ortzinator's Avatar
    May 2005
    1,648 Posts
    ohloh crawled my mod a while back it seems, though i didn't notice until i googled "hl2sb" due to laziness in finding my google code page

    http://www.ohloh.net/p/hl2sb-src:








    of course ohloh's project analysis projections for these sorts of things are generally always outrageously high


    Um, yeah.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Funny Funny x 19Zing Zing x 1Agree Agree x 1Programming King Programming King x 1 (list)

  17. Post #857
    Gold Member
    ZenX2's Avatar
    February 2009
    5,046 Posts
    Wow, yesterday I seriously got things done
    And today I've done nothing
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 5Informative Informative x 1Programming King Programming King x 1 (list)

  18. Post #858
    voodooattack's Avatar
    October 2009
    1,988 Posts
    I can't code shit and my deadline is tomorrow... it's 2° Celsius here and my finger tips are freezing.. fuck.

    In case you're wondering, I live in Egypt. What's next? fucking snow?
    Reply With Quote Edit / Delete Windows 7 Egypt Show Events Friendly Friendly x 5Funny Funny x 2Dumb Dumb x 2Programming King Programming King x 1 (list)

  19. Post #859
    RUBY OVERLORD
    swift and shift's Avatar
    November 2011
    2,115 Posts
    In case you're wondering, I live in Egypt. What's next? fucking snow?
    riots
    Reply With Quote Edit / Delete Mac Australia Show Events Funny Funny x 33Zing Zing x 5Programming King Programming King x 1 (list)

  20. Post #860
    hOnK :o)
    i300's Avatar
    December 2009
    3,987 Posts
    Work on the API is going great.

    GetForums is 100% working. Implementing it and authentication is pretty simple.

    Code:
    -(void)testFacepunchAPI {
    	FPAPI *apiInstance = [FPAPI sharedInstance];
    	[apiInstance authenticateWithUsername:@"i300" password:@"colbert2012" andCallbackDelegate:self];
    }
    
    // Called when Authentication is completed
    -(void)facepunchAPIAuthenticationComletedWithPayload:(NSDictionary *)payload {
    	FPAPI *apiInstance = [FPAPI sharedInstance];`
    	[apiInstance getForumsWithCurrentSessionAndCallbackDelegate:self];
    }
    
    // Called when GetForums is completed
    -(void)facepunchGetForumsCompletedWithForums:(NSArray *)forums {
    	FPCategory *firstCategory = [forums objectAtIndex:0];
    	NSLog(@"The first category returned by the API is: %@", firstCategory.name);
    
    	// Outputs
    	// The first category returned by the API is: General Discussion
    }
    (Highlighted Code)

    Edited:



    Woo!
    Reply With Quote Edit / Delete Mac United States Show Events Winner Winner x 4Programming King Programming King x 2 (list)

  21. Post #861
    voodooattack's Avatar
    October 2009
    1,988 Posts
    At least those keep you warm.
    Reply With Quote Edit / Delete Windows 7 Egypt Show Events Zing Zing x 9Funny Funny x 4Programming King Programming King x 1 (list)

  22. Post #862
    Gold Member
    BackwardSpy's Avatar
    May 2008
    6,538 Posts
    Or in C++11

    enum class Foo
    {
        Bar,
        Baz
    };
    What does this do differently from:
    enum Foo
    {
        Bar,
        Baz
    };
    ?
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Disagree Disagree x 1Programming King Programming King x 1 (list)

  23. Post #863
    Andrew McWatters
    Dennab
    March 2011
    4,658 Posts
    What does this do differently from:
    enum Foo
    {
        Bar,
        Baz
    };
    ?
    Strongly typed enumerations vs. just being "named" integers.

    Edited:



    I need to stop posting. :( The last few WAYWOs I've ended up being one of the most frequent posters and a good portion of my posts are jokes and some light progress here and there.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 4Friendly Friendly x 4Programming King Programming King x 1 (list)

  24. Post #864
    Gold Member
    BackwardSpy's Avatar
    May 2008
    6,538 Posts
    Strongly typed enumerations vs. just being "named" integers.
    Gotcha. Seems like quite a small, albeit useful feature... I wish Microsoft would hurry up and update VS2010 to use the rest of this new stuff. Unless it's changed very recently, they're not even supporting lambda functions yet, which makes me a very sad panda.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Agree Agree x 1Programming King Programming King x 1 (list)

  25. Post #865
    Gold Member
    Downsider's Avatar
    July 2007
    2,008 Posts
    ohloh crawled my mod a while back it seems, though i didn't notice until i googled "hl2sb" due to laziness in finding my google code page

    http://www.ohloh.net/p/hl2sb-src:








    of course ohloh's project analysis projections for these sorts of things are generally always outrageously high
    It bases it on LOC and the COCOMO algorithm, which is a great way to exploit people. Also, it probably is a considerable figure somewhere in the millions, you just didn't write all that code. Most of it's from the Source SDK, Lua, and any other libraries you used and committed.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 3Informative Informative x 1Programming King Programming King x 1 (list)

  26. Post #866
    Andrew McWatters
    Dennab
    March 2011
    4,658 Posts
    It bases it on LOC and the COCOMO algorithm, which is a great way to exploit people. Also, it probably is a considerable figure somewhere in the millions, you just didn't write all that code. Most of it's from the Source SDK, Lua, and any other libraries you used and committed.
    It was just a poke at the project, really. I was talking to turb about how I think HL2:SB is actually comprised of less code than his project Twostroke.

    Edited:

    There's multitudes more LOC for the Source Engine Lua API than the Lua C API inside of the repository.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Programming King Programming King x 1 (list)

  27. Post #867
    Gold Member
    Bluefire's Avatar
    August 2007
    323 Posts
    I wish Microsoft would hurry up and update VS2010 to use the rest of this new stuff.
    They don't even fully support C99 yet, let alone C++11; which is somewhat laughable considering the improvements C99 brings.
    Reply With Quote Edit / Delete Mac Canada Show Events Agree Agree x 3Programming King Programming King x 1 (list)

  28. Post #868
    Gold Member
    BackwardSpy's Avatar
    May 2008
    6,538 Posts
    They don't even fully support C99 yet, let alone C++11; which is somewhat laughable considering the improvements C99 brings.
    I'm not surprised, MSVC has always been pretty terrible compared to most (all?) other C compilers.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Agree Agree x 4Programming King Programming King x 1 (list)

  29. Post #869

    February 2007
    112 Posts
    I'm not surprised, MSVC has always been pretty terrible compared to most (all?) other C compilers.
    If only their debugger wasn't so god damned amazing.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 9Programming King Programming King x 1 (list)

  30. Post #870
    Team Hamster
    jalb's Avatar
    December 2009
    573 Posts
    Gotcha. Seems like quite a small, albeit useful feature... I wish Microsoft would hurry up and update VS2010 to use the rest of this new stuff. Unless it's changed very recently, they're not even supporting lambda functions yet, which makes me a very sad panda.
    My VS2010 supports lambdas. They don't have "complete" support for lambdas yet (whatever that means) but they're definitely in there. I've been using them for months now.

    Running VS2010 Ultimate.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 3Programming King Programming King x 1 (list)

  31. Post #871
    Gold Member
    BackwardSpy's Avatar
    May 2008
    6,538 Posts
    My VS2010 supports lambdas. They don't have "complete" support for lambdas yet (whatever that means) but they're definitely in there. I've been using them for months now.

    Running VS2010 Ultimate.
    Hm, maybe I missed one of the updates. I'll play with it tomorrow and see (it's 5:34am right now, I don't even know why I'm still up...)
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Programming King Programming King x 1 (list)

  32. Post #872
    mutated's Avatar
    October 2010
    1,536 Posts
    The first question went unanswered and it's an interesting problem.

    In the general case, yes, there's a way to create a random function with any non-uniform distribution. Simply calculate the inverse cumulative distribution function of your desired distribution function and give a uniformly distributed random number as its argument.

    Given any distribution function , where and for which you need to calculate the cumulative distribution function to transform uniform random distribution into some other distribution.

    With the same notation, this cumulative distribution function (CDF) is simply .

    For the transformation from a uniform distribution into your desired distribution, take a random number R and solve for t: . The CDF is strictly increasing and so limited that there is exactly one solution and it's always good. One could calculate the inverse function of the CDF or solve it numerically using e.g. Newton's method.


    Understanding this isn't necessary to come up with a solution that works. You were probably looking for a practical answer:

    /* untested code */
    float biasedrand(float minimum, float maximum)
    {
    	float r = randf();		// gives a random float between 0 and 1
    	float sc = 2.0f * r - 1.0f;	// scales the number between -1 and 1
    	float bi = sign(sc) * sc * sc;	// introduces bias towards 0, but keeps numbers between -1 and 1
    	float sw = sign(sc) - bi;	// swaps the bias away from 0 and towards -1 or 1
    	/* normalizes from -1..1 to the target range minimum..maximum and outputs the result */
    	return minimum + (maximum - minimum) * (sw + 1.0f) / 2.0f;
    }

    Optimizing that is possible (though likely unnecessary), but from these steps it's hopefully easier to understand why and how it should work.
    This is a wonderful resource, Puska. I'm trying desperately to understand the mathematical notation (with limited success), and trying to implement the code (with limited understanding). I'm assuming the sign() function is this sort of thing, I'll be the first to admit I am not proficient with the Cs.

    Once I have a bit more time I'm going to sit down with this and figure out what everything does, but thanks a ton for the help!
    Reply With Quote Edit / Delete Windows 7 United States Show Events Programming King Programming King x 1 (list)

  33. Post #873
    Gold Member
    Darwin226's Avatar
    January 2009
    4,145 Posts
    How would I handle events in my GUI thing?
    Currently the events are handled just on the element over the mouse, but once I add a child/parent system I don't know how I would do that.
    Depends on how you approach it but generally, children get to process them first, then they pass it on to the parent.
    If you want to check if a control was clicked you'll need to check if any of it's children are clicked.
    Reply With Quote Edit / Delete Croatia Show Events Programming King Programming King x 1 (list)

  34. Post #874
    Gold Member
    Chandler's Avatar
    February 2006
    1,406 Posts
    they're not even supporting lambda functions yet, which makes me a very sad panda.
    The only C++11 compiler out there right now that doesn't is clang, and that's a combination of Apple's blocks and ObjC being their priority on that front. Also no one wanted to work on it, but the next version of clang (3.1) should have them. Finally.

    They don't even fully support C99 yet, let alone C++11; which is somewhat laughable considering the improvements C99 brings.
    GCC doesn't implement the full C99 standard either: link. As for C99 features, you've got enough features in terms of the preprocessor etc. that it doesn't matter all that much. yeah declaring a int within a for loop is pretty swag but honestly if you're writing C99 and want to use the Win32 SDK you should just be using clang anyhow (NOTE: Clang uses C99 by default, so 'deal with it' )

    If anything, I wouldn't be surprised if there was some crazy stealth update to the C compiler with VS2011 that makes the compiler C11 compliant, considering VLAs are now optional, as are a bunch of stuff that other compilers never really got around to implementing properly, and was pretty much the number one issue with MSVC's basic C support. (I've got no idea why they would put a static_assert in there though, considering the new generics system is anything close to reasonable :/)
    Reply With Quote Edit / Delete Mac United States Show Events Programming King Programming King x 1 (list)

  35. Post #875
    Gold Member
    Darwin226's Avatar
    January 2009
    4,145 Posts
    This is a wonderful resource, Puska. I'm trying desperately to understand the mathematical notation (with limited success), and trying to implement the code (with limited understanding). I'm assuming the sign() function is this sort of thing, I'll be the first to admit I am not proficient with the Cs.

    Once I have a bit more time I'm going to sit down with this and figure out what everything does, but thanks a ton for the help!
    It works by getting a random number from -1 to 1. When you square it it gets closer to zero, proportionally to how small it already is. 0.5 for example gives 0.25 when 0.1 gives 0.01
    Then what it does is reverse it. Meaning that the smaller it got, the greater the result is (for the positive part that is. Works the same for negative).
    Then he just transforma it to the range you've given.
    Reply With Quote Edit / Delete Croatia Show Events Programming King Programming King x 1 (list)

  36. Post #876
    HQRSE FUCKER
    ief014's Avatar
    September 2009
    3,061 Posts
    Et voilą



    Added a number-only textbox (and a separator I guess) and now the edit box is complete!

    Actually, I think I need to come up with better colours for it.
    Reply With Quote Edit / Delete Windows 7 Germany Show Events Programming King Programming King x 3Optimistic Optimistic x 1 (list)

  37. Post #877
    HQRSE FUCKER
    ief014's Avatar
    September 2009
    3,061 Posts


    It's almost readable like a programming language
    Reply With Quote Edit / Delete Windows 7 Germany Show Events Programming King Programming King x 4Funny Funny x 3 (list)

  38. Post #878
    DatZach's Avatar
    May 2011
    139 Posts
    Merged the two compilers and linker into a single executable which takes a dictionary file instead of a bunch of random command line arguments. It's much cleaner and friendlier to work with now. :3

    Also, the engine's been fleshed out enough to so I can make simple games like this in it.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Informative Informative x 1Programming King Programming King x 1 (list)

  39. Post #879
    uint64's Avatar
    September 2011
    172 Posts
    Thread-per-client model for servers is not the best option. :/
    Runs out of memory when there are 1359 simultaneous clients.
    Shit.
    Reply With Quote Edit / Delete Windows 7 Latvia Show Events Dumb Dumb x 4Programming King Programming King x 1 (list)

  40. Post #880
    Gold Member
    synthiac's Avatar
    June 2007
    1,095 Posts
    Haha - which text in particular? The tabs and the bottom left?
    like, everything. not just the text ._.

    Edited:

    http://i.imgur.com/iJqV3.jpg bam
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 2Winner Winner x 1Programming King Programming King x 1 (list)