Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 26 Oct 2005
Offline Last Active Aug 02 2013 05:55 PM

#5060357 OtterUI - Open Source UI Library

Posted by on 08 May 2013 - 11:25 AM

Yup - it's included in the repository, as part of the "SampleApp" project.  It demos not just the different controls, but also what a basic integration would look like.  Also, there's a plugin architecture in place that lets you define and build your controls, as well as the ability to animate them.

#5053275 Where are all the good GUI libraries?

Posted by on 14 April 2013 - 04:49 PM

Hi folks,


I'm the creator of OtterUI.  Thanks for pointing out the old-ass Word doc file - that's a remnant from a time gone by ;)   I've cleaned things up a tad more.  Let me know if you run into anything else.  And, of course, feel free to reach out if you have any questions.


Also, l0cal05t is correct - OtterUI does not provide its own built-in renderer.  I provide a rudimentary one just as a starting point, but after that it's up to you integrate it into your pipeline.  That's done on purpose - I got tired of UI libraries competing against my renderers for whatever reason.  Same goes for File IO, audio, and so on.



#5052013 OtterUI - Open Source UI Library

Posted by on 10 April 2013 - 09:49 PM

Hi folks,


Some may remember me from a few years back, but I put together a UI library & tool specifically aimed at game developers.  It's purpose was (and still is) to be cross-platform and engine-agnostic, by being developed in as vanilla C/C++ as possible, while offloading the engine-specifics to the developer.  All the actual rendering, sound, etc is handled by the developer - OtterUI just tells you what to render and when.  Same goes for file I/O, audio, and so on.


To show you what OtterUI can do, check out Skullgirls (http://skullgirls.com/)- its entire interface was built using the library & tool.


Fast forward a few years - after trying to build a company out of it, and not going very far, I've decided to make it Open Source and let the community benefit overall.  OtterUI source & latest distributables can be found on github at:  https://github.com/Grafalgar/OtterUI, and is distributed under the MIT License.


Let me know if anyone has any questions, otherwise, enjoy.



#5005858 Is C++ too complex?

Posted by on 30 November 2012 - 03:52 PM

For what its worth, compared to more recent languages, C++ does not strike me as overly complex right out of the box. C# and Java come with many more language features right out of the box, and the accompanying SDKs for both completely eclipse with what is considered "standard" for C++. Compare the SDK for Java against the STL for C++.

What makes C++ complex is what developers end up doing with it. What makes C++ tricky is memory and pointer management, which (imho) is the main reason most folks are hesitant to get well versed in the language. Exceptions? Meh. Classes? Meh. Templates? Meh. Pretty straightforward stuff.

To use an analogy - it's like saying a spoon is complex when you see someone using nothing but spoons to build a working zeppelin. Maybe that's a bit extreme, but yeah.

#4794521 GPA or Knowledge?

Posted by on 05 April 2011 - 01:03 AM

Your GPA doesn't mean anything if you're applying for a job in a field that has nothing to do with your GPA ;) Like having a 4.0 CS major apply for a job at a chem lab. Not gonna happen :P Well, highly unlikely at least. Point is, just rattling off an impressive GPA doesn't mean anything unless it's qualified with what the GPA was for.

But, on a related note, I've seen plenty of folks fall on either side of the good / bad grades scale. Once saw a guy hired with a piss-poor GPA once (ie, 2.3-ish) -- phenomenal engineer. Had a 2.3 because he spent all of his time making games instead of doing schoolwork - paid off for him! Conversely, saw a different guy hired with a GPA in the same ballpark - terrible programmer. His GPA was because he wasn't quite bright and had a terrible attitude.

At the end of the day GPA, schoolwork, side-projects, etc is all just extra stuff to use when evaluating the entire package. What matters most (imho) is how well you can work with others and with a particular team. That's why many companies look at people with the same-ish qualifications but then base their decisions on how well the person clicks with the team. This, also, is why many engineers have a hard time interviewing - they can smart as heck but if they lack the people skills they're going to have a hard time landing a good job. So .. while boosting your GPA make sure to play sports, engage in social clubs, etc. Get them people-skills up!

Also ...

The only time you list academic results on your resume is when you've got absolutely nothing else to say about yourself in order to fill a single page anyway.

As soon as you've got the slightest bit of experience, you're going to be wasting resume space by putting grades on there.

.. this. That's the damn truth right there ;)

#4787987 Storing 2 numbers in a byte

Posted by on 19 March 2011 - 11:13 AM

You can try something like this:

   unsigned char val;
   	unsigned int hi: 4;
  	unsigned int lo: 4;
   } parts;

Makes it a little easier and avoids bitshifting in favor slightly more readable code :)

#4365055 [SOLVED] LUA: How to redirect "require" to load from packed file

Posted by on 13 December 2008 - 07:59 PM

Well, that was pretty rough but I figured it out finally. Turns out that when you call "require" LUA accesses the global "package.loaders" table, which contains a list of functions which searches for and loads your particular lua file.

So, the trick is to add your own function at the end of package.loaders. If the file count not be loaded, push a new string onto the stack explaining why (or nil). If you could load it fine, just return the new buffer/file you loaded. That's all.


int MyLoader(lua_State* pState)
std::string module = lua_tostring(pState, 1);
module += ".lua";

const char* fullPath = module.c_str();
CMyFile file(fullPath);

int size = file.Size();
if(size > 0)
uint8* buffer = new uint8[size];
file.Read(buffer, size);
luaL_loadbuffer(pState, (const char*)buffer, size, fullPath);
std::string err = "\n\tError - MyLoader could not find ";
err += module;
err += ".";

lua_pushstring(err.c_str(), pState);

return 1;

void AddLoader()
lua_getfield(mLUAState, LUA_GLOBALSINDEX, "package"); // push "package"
lua_getfield(mLUAState, -1, "loaders"); // push "package.loaders"
lua_remove(mLUAState, -2); // remove "package"

// Count the number of entries in package.loaders.
// Table is now at index -2, since 'nil' is right on top of it.
// lua_next pushes a key and a value onto the stack.
int numLoaders = 0;
while (lua_next(mLUAState, -2) != 0)
lua_pop(mLUAState, 1);

lua_pushinteger(mLUAState, numLoaders + 1);
lua_pushcfunction(mLUAState, MyLoader);
lua_rawset(mLUAState, -3);

// Table is still on the stack. Get rid of it now.
lua_pop(mLUAState, 1);