Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!

1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Member Since 04 May 2006
Offline Last Active Mar 02 2015 08:38 AM

#5211187 DirectX 11 UI Library

Posted by GuyWithBeard on 17 February 2015 - 09:00 AM

Some years ago I was in the same situation and I ended up writing my own system. That said, there are a few libs you can use. I have had all of the following integrated into my engine at one point or other:


https://github.com/garrynewman/GWEN - GWEN is a very simple UI layer with nothing extra. I don't think there is a DX11 renderer, but it should be farily simple to implement.


http://cegui.org.uk/ - CEGUI has been around for a long time, it is mature and diverse, but perhaps a little old-fashioned. Also it tends to bloat your project quite a bit.


http://www.awesomium.com/ - Awesomium is really an offscreen HTML5 renderer rather than a UI library, but it can very well be used to do UI. In fact, that is exactly what I did and I enjoyed it quite a bit. However, I cannot use it anymore since they don't provide any 64-bit windows binaries. Also it is not open source.

#5201724 Writing a game in Erlang, tips wanted!

Posted by GuyWithBeard on 04 January 2015 - 07:08 AM

Hey folks! The title says is all: I am thinking about writing a game (or a tech demo, or something) in Erlang and I'd like some tips. Before you dismiss me as crazy, let's start with some background:


I am a fairly experienced game programmer, having worked on and shipped games on various platforms, as well as written a number of game engines in my spare time. The games/software have almost always been real-time and they have been developed using well established tools, such as C++/C# and a bunch of well known middleware.


Lately, I have been getting more and more into the area of parallel programming (like most of us these days) and I have written a few systems for making parallel programming easier, such as job/task systems etc. However, I have been hearing about Erlang for a long time, especially when it comes to concurrency and I have always been a bit sceptical, perhaps because it still has not really been picked up by the game developers, a bunch who are REALLY into concurrent programming these days. And I would like to find out how good Erlang really is, while at the same time educating myself in functional programming.


So, I decided to look at Erlang myself, to see just how well it works as the main programming language of a small real-time game or tech demo. The thing I am thinking about writing is a small app with a height field fluid simulation that the user can interact with (ie. throw objects into the water and see nice looking waves and ripples appear). It should be farily easy to make the simulation code for the fluid simulation run concurrently on top of Erlang's concurrency model. (And before you say anything, I am quite aware that it can be done efficiently on the GPU, in fact I have done that. I want to see how well Erlang does it).


So, what I'd like you to do is throw any good internet articles, tips, stack overflow answers or book recommendations, covering Erlang and game programming, my way. I am talking about things like; how to set up the main loop in a way that is Erlang friendly, how to hook into OpenGL, how to handle input etc etc. I have a bunch of good books covering Erlang/OTP, but none of them (unsurprisingly) cover game programming.


I am hoping this might help other people interested in Erlang, functional programming and/or other niche technologies not really used within the games industry (except perhaps on the server side).



#5193077 Best Way to Learn 3D Computer Graphics? Help!

Posted by GuyWithBeard on 16 November 2014 - 04:03 AM


this book: http://d3dcoder.net/d3d11.htm and working your way through the examples


Luna's book is an excellent resource. Note, however, that his projects are based on the (deprecated) DX SDK (June 2010). It's certainly a private choice, but, IMHO, a D3D11 beginner may as well just use the Windows SDK, perhaps using the book as a reference. Luna's projects were created with VS2010, and they don't necessary upgrade well to later versions of VS.



Using the Effect Framework: http://blogs.msdn.com/b/chuckw/archive/2012/10/24/effects-for-direct3d-11-update.aspx, almost all chapters in the book can be compiled and run on the newest SDKs. Luna also has samples for creating windows store apps and using shaders without the effect framework on his web site, here: http://www.d3dcoder.net/resources.htm


I suggested the book because it covers a lot of the essential math topics needed for graphics programming, regardless of APIs and SDK versions.

#5192958 Best Way to Learn 3D Computer Graphics? Help!

Posted by GuyWithBeard on 15 November 2014 - 03:30 AM

May I suggest getting this book: http://d3dcoder.net/d3d11.htm and working your way through the examples as you read it? Be sure to understand everything before moving to the next chapter. It will teach you the necessary math while focusing on the "fun stuff" ie. programming.

#5171460 Where should I start? (2D Game Programming)

Posted by GuyWithBeard on 04 August 2014 - 12:53 PM

That's also another broad statement. I have been able to code anything I've ever wanted in Java without ever touching a doc, thanks to the great community support and millions of working examples on websites such as YouTube that will teach you how to do things correctly. However with C++ there seems to be much less resources like those I found for Java, and it's much more complicated. That's why I'm trying to get help.  


It's not a broad statement at all. The fact is, if you think that reading the docs takes too much time, then you need to adjust your attitude. And just because you have supposedly "been able to code anything you have ever wanted" without reading any docs, it does not mean that you can keep doing that. You have been lucky (not that I consider it unlucky to have to read the docs).


Now, if you would have read the docs for the connector you would have found the line that says "As of MySQL Connector/C++ 1.1.0, the Boost C++ libraries 1.34.0 or newer must be installed.". In other words, the errors you are getting are because you are missing the boost library (or the IDE cannot find it because of incorrect include paths or something).


You can find the whole thing here: http://downloads.mysql.com/docs/connector-cpp-en.pdf


Seriously, next time check the docs (or at least do a google search). Also, remember that we all really want to help you. GD.net is an awesome community, so try not to get offended when someone more experienced gives you a gentle nudge. Good luck with your project!

#5171234 Where should I start? (2D Game Programming)

Posted by GuyWithBeard on 03 August 2014 - 02:26 AM


The easiest way to use MySQL from C++ is probably through the connector


I've tried the connector countless times in the past, all I get is errors. Then when I ask for help, people just point to the documentation, and tell me to read it. I don't have time to read the documentation. I read it anyways, and it was still a waste of time because I never got my problem solved.



Okay, well I have used the connector successfully in multiple projects, so I can tell you it works. I did ask you what problems you are having, but you did not answer me.


Also, you don't have time to read the docs? Seriously, with that attitude you won't get far with game programming. It takes time, lots of it.


Now, what was the exact problem?

#5171087 Where should I start? (2D Game Programming)

Posted by GuyWithBeard on 02 August 2014 - 07:27 AM

Especially since in order to use MySQL in C++ you have to use a windows form application. You cannot use MySQL in a normal "empty project". :/ any help on that would be appreciated.


That's not true. You can use MySQL from any sort of C++ program you wish, from Win32 console applications to graphical applications. What sort of problem are you having?


The easiest way to use MySQL from C++ is probably through the connector: http://dev.mysql.com/downloads/connector/cpp/

#5160832 getting a job with sdl?

Posted by GuyWithBeard on 16 June 2014 - 07:00 AM

Your game will not be "made in SDL". It might use SDL for a certain task, such as capturing input or managing threads. Now, both of those things are easy to do with SDL and they both require quite a bit of work without SDL, but they are still only a very small part of all the code that goes into making a game.


As for getting a job with the knowledge of SDL, not really sure what you mean. Knowing JUST SDL will not get your far. Does knowing SDL help? Sure. A lot of companies use it. Eg. Valve uses it for their cross platform stuff. Actually, IIRC, the original author of SDL works for Valve.

#5159295 Starting game making help

Posted by GuyWithBeard on 09 June 2014 - 11:15 AM

Okay i'm gonna learn java now, start small and just grow.
Is this a better idea?


Yes, good luck!

#5156666 How do I change the rotation mode in Maya (LT) to world space?

Posted by GuyWithBeard on 29 May 2014 - 03:38 AM

The docs for Maya says that the rotation tool can operate in different spaces:




Currently I can rotate my model in local space, but I would like to rotate it in world space, and I cannot figure out how and where to change the rotation mode.


I tried googling but with little success. Can you help a poor guy out? Thanks!


EDIT: Nevermind, found that double clicking on the tool icon opens up the tool options menu.

#5131572 Keeping my water simulation in sync over the network.

Posted by GuyWithBeard on 15 February 2014 - 11:05 AM



I am implementing height field water simulation in my multiplayer game engine. The system I am using is roughly the one described in this paper:




In a nutshell, you have a height field where each element in the field represents a vertex on the water surface mesh. The water surface interacts with the rigid bodies of the physics engine, and they in turn affect the water. The server runs the physics at 10 FPS with the clients at 60 FPS. To cope with small differences in the physics engine on every machine, the server sends the updated transforms to the clients every so often and the clients correct themselves accordingly (with some smoothing and prediction added so all looks nice and smooth).


My question is, how should I propagate the water surface height values from the server to the clients? We are talking about something along the lines of 128x128 floats, so sending them all every tick is not an option. I was thinking I might put every element in a randomly selected "update bucket". Every tick (the server is normally ticking at 10 FPS) a bucket would be sent across the network to the clients. Since the vertices would be randomly selected you would never see an "area" of the water suddenly get updated.


The water tends to affect other objects slowly so the update does not have to be immediate, but somehow I have to prevent the whole sea from going out of sync with the server over time. What do you think of my proposed solution? Any other ideas?



#5130996 Uniting real programming with a game engine.

Posted by GuyWithBeard on 13 February 2014 - 03:20 AM

A few points:


1. How do you define "real" programming? C++? Native code? Low-level code? Writing gameplay logic in UnrealScript is just as "real" as writing the logic of a multithreaded rendering back-end in C++. So, when using UDK, the real programming is done in UnrealScript, with Unity it's C# etc.

2. If you wanted to do low-level programming (eg. C++ and DirectX like you mentioned) why are you using a game engine at all? The point of most game engines is that you don't have to do that sort of thing. They allow you to concentrate on the game itself.

3. Like Hodgman mentioned, access to the engine source code is sometimes a licensing question. But more importantly, most engines are designed so that you would have to touch the engine code as little as possible, even if you were fully qualified to do so. Even if you were writing your own engine, you would probably layer it so that you don't have to touch areas such as threading and memory management when doing gameplay logic. This, of course, varies with every codebase.

#5127692 Question about OS for server hosting

Posted by GuyWithBeard on 31 January 2014 - 04:54 AM

I pretty much agree with what frob said. However, one big plus regarding Linux is that getting your hands on a (virtual?) Linux-based server with a public static IP is usually a lot cheaper than the Windows counterpart. Winsock is largely compatible with the Berkeley sockets used in Unix, so that should not be a big issue.


If you are not using a lot of Windows-specific code in your server, and you are interested in porting to Linux, I'd say go for it!

#5034122 Shadow mapping and high-up objects

Posted by GuyWithBeard on 19 February 2013 - 06:40 AM



I have cascaded shadow maps setup and working pretty well in my engine. I have large outdoor scenes and currently only one light (the sun) casting shadows. The problem is that when objects are high up, eg. right above the camera, it is outside the closest, highest detail cascade, and thus does not cast any shadows. My camera usually looks a bit down, since it's a third-person game I am making. How should I go about fixing this? Should I just make the cascades big enough to contain all objects in the scene? This, of course, would mean that the resolution of the cascades goes down.


The high-up objects are mostly static. Should I look into doing some sort of offline precalculated shadow data for these objects?

#5021791 Source Control - Perforce

Posted by GuyWithBeard on 15 January 2013 - 07:22 AM

Perforce works very well with VS2012. Though, as far as I know you can only use the VS plugins with the paid professional versions of VS. Does not make much difference though, since the P4V client works well. So, if you plan to use the express edition of VS be prepared to do most of your version control work outside of VS.


I am not sure how much work it is to set up, but it should not be more complicated than any other typical network service. If you are looking for something really easy, Mercurial seems to be a real breeze to set up. http://hgbook.red-bean.com/