Tag Info

Hot answers tagged

28

In a game which is controlled by a gamepad, where control inputs directly change GUI focus from one GUI button to another, those GUI buttons should be activated when a controller button is pressed. In a game which is controlled by a mouse (or if a gamepad is used to move a virtual mouse cursor around the screen), on-screen buttons should be activated when ...


22

I haven't yet tried it myself, but this looks very interesting: librocket EDIT: Since you'll need a context to render to, I would recommend either SFML or SDL 1.3.


20

I don't know of any particular icons, but I think the most important thing to keep in mind is that players associate the colour blue with magic. Thus, I don't think the icon actually matters, as long as you follow the basic convention of red for health, blue for magic and green (or the less-used yellow) for a third metric (usually stamina, but can be other ...


19

Most answers have addressed the feasibility of using heart container systems, I'd like to present a reason why you would want to use them over a health bar. Here's a word for you: Subitizing. People can make near-immediate judgments about the number of items in a group if you keep that number round about 4. Once you go above that point confidence and ...


17

If the health can grow significantly over the course of the game, I think that health bars are more appropriate. For example, in my current mmo game, the characters starts with 300 health, but that health can grow to over 3000 as the player levels. If this were implemented as hearts, it means you might start with one heart but have 10 or more hearts ...


15

Both solutions (drawing on your canvas VS. traditional HTML/CSS) are totally valid and will work just fine. Some things to consider: If you're already using a canvas-based library, your code may be cleaner/more organized by continuing to use canvas instead of having additional (DOM-based) methods for UI. If your UI is extremely text-heavy (with dialogs ...


14

Why not do both? You can have a health bar divided on discrete intervals. That has a lot of the advantages of both systems: You can make health increases be always an extra block. After you get hit, you know how much of a block an attack takes and it's easier to measure how many hits you can take. You can choose whether to make the bar longer or the blocks ...


13

You seem to have conflicting styles. Have a look at these UI's from Peggle, Ultima Underworld, Diablo 3, Starcraft 2, and Gran Turismo 5. Notice how each UI is consistent within its theme. Peggle is pin-ball like in all its UI elements. Everything's a meter, a lever, a nozzle, a springboard. Ultima Underworld has UI elements are iron/steel, potions, ...


12

Chances are you'll be iterating over your collection a lot more than inserting/deleting screens, so vector is probably the best choice. Sure, inserting and removing things from the middle of vectors is "slow" if you just look at "Big O", but in practice it's actually really fast simply because your elements are contiguous in memory. It's highly unlikely ...


11

In fact, Qt widgets can be integrated with OpenGL and OpenGL can be easily integrated with Qt (QGLWidget). Of course, the platform native looking widgets might not be exactly what you are looking for, but do not worry, there are ways to customize them, create your own or use something else which would better suit your needs, such as Qt Quick (which you ...


11

GUI isn't an easy or simple problem, especially when you get into games and their desire to have dynamic, interesting menus. One "easy" thing you can do is try to use middleware. There's a question on that here. If you're going to roll it yourself, there are a few things I would suggest. GUI elements generally have a "parent", either another GUI element ...


11

This is usually done using a stack of game states. For example, each item listed above would be pushed onto a stack as follows: Gameplay Select Save Single Player Main Menu Where each state on the stack references its sub-items. When a button is clicked, it's corresponding state is pushed onto the stack, and becomes the top-most item which is drawn and ...


11

This is from an old OpenGL-based game engine I was trying to write about seven years ago written in C++ so bare with me as I try to explain how I handled 3D world and 2D GUI rendering operations within it. I used four primary methods within my OpenGL renderer class (OGLRender) of which are: ready3D() for preparing OpenGL to render the 3D world scene. ...


11

Nay. I've done paid gamedev work on an awful 'retained mode' GUI and on an awful 'immediate mode' GUI and although both made me want to tear my eyes out, the retained mode approach is still clearly the better one. The downsides of immediate mode are many: they don't make it easy for artists and designers to configure the layout; they make you mix logic ...


10

After you've rendered the world, reset the camera position to something more useful for UIs. Then render the UI. Next frame, put it back to the world position before rendering the world. And so forth. By "camera position" I really mean "transformation matrix". Nobody says all rendering has to go through the world transformation.


10

You can do several things: -Make your GUI resolution indepentent, scale and position everything based on relative screen positions, this is often a lot of work. -Render your GUI to render target A of a fixed resolution (720P is often chosen), render your game to the screen, get the texture from render target A and render it upscaled/downscaled over the ...


9

As someone with five or six years of actual experience with IMGUI on the desktop, I feel obligated to defend it. All of the responses (and the question itself) are based on a very restricted definition of IMGUI, and there seem to be a lot of questionable claims being made. A lot of it originates from the assumption that an IMGUI library can't retain any ...


9

Magic and stuff. Orbs, staffs, scepters and green/purples came to my mind. Here's Some of it: A basic orb : Some Zelda style rupee (You could modify it to a suitable color) Basic staffs and scepters : Some potion : And also green and purple fire.


8

I don't think you should write your own, the task of creating a game engine is so huge by itself, if you around there are many many libraries with good licenses that you could use, and modify to your liking. For a game engine I would go for an Immediate mode GUI. More informations here: http://www.mollyrocket.com/forums/viewtopic.php?t=134 The key idea is ...


8

I recently stumbled across Gwen. It's a GUI library written by the author of Gary's Mod. It's MIT licensed as any good game library should be. The library has several things going for it. Large widget set Gwen has been under development for a few years and it shows. Easy backend renderer customization This is a big one. The library comes with an OpenGL ...


8

Unfortunately, there are no real interface design standards in the game industry, which makes it difficult to find accurate information this topic. If game interface design is something you're seriously interested in, I would take the following steps: Learn as much as you can about interaction design patterns - A lot of the research done on design patterns ...


8

Besides the vector/polygon approach, another way to do this is to use a bitmap. If each "color" in the bitmap represents a territory (France, Belgium etc.), then it's simply a matter of figuring out which pixel in the bitmap was clicked, looking up the color and determining if that color represents the territory of interest. You can even represent ...


8

One thing I'm starting to realize is very important: proper use of contrast. Look at that first picture. It's contrasty all over the place! The sky is bright, the horizon is dark, then the far grass is bright, then the bottom is dark. The tiled background wildly varies between extremely bright and extremely dark. All of this is non-information. Visual ...


8

If that is your first project, use Unity. It is easy to learn and will get your project done much faster. Compared to Unity, XNA is little more than a managed wrapper for DirectX. With XNA you have to do everything yourself, what Unity already implements seamlessly, there are of course libraries for almost everything specifically targeting XNA, but ...


8

There are pros and cons to both, but the decision is ultimately yours. You'll have to decide based on the style of your game and the type of game. Static position: Always in the same place, predictable. This means the user will always know where the indicator will be and allows them to avoid covering it up on their own. Kind of boring and requires some ...


7

Personally, I would recommend CEGUI. It's open source and pretty good. However, what you have to keep in mind is that it can be very, very verbose if you write out everything by hand. But, on the plus side, it has renderers for both OpenGL and DirectX. I managed to put it on top of the template I normally use, which writes to a texture directly using a VBO ...


7

If your resolutions are similar to each other, you can just use the same art across all of them with maybe some downscaling at runtime for the smaller screens. If they differ by more than say a factor of 2x, you're going to need to author (or at least have an artist tweak) separate assets for the different resolutions. With 2D, resolution has a huge affect ...



Only top voted, non community-wiki answers of a minimum length are eligible