Tag Info

Hot answers tagged

29

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 ...


25

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.


21

There's a super simple way to change events: EDIT See my other answer for the quick and easy way to add an event for the OnClick event only. For other events, like OnDrag see below. Additionally, if you need more than just the events provided by default, I'd suggest instead attaching a EventTrigger to your game object. This gives us access to the ...


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

Okay, you're going to have to forgive me for not giving you specific XNA code, because I'm not knowledgeable in that platform, but what I'm going to tell you should work on any game engine that lets you draw sprites. Fonts is not your only problem, so I'm going to give you a piece of advice, and then I'm going to answer your question. With these two things, ...


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 ...


16

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 ...


16

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 ...


15

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 ...


14

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 ...


14

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, ...


13

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. ...


12

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.


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 ...


12

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 ...


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

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 ...


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

The GUI library consists of one-shot "RenderButton", "RenderLabel", "RenderTextBox"... functions that you can call to "immediately" render a control (doesn't have to be immediately written to the GPU. Usually its remembered for the current frame and sorted into appropiate batches later). I would go so far as to say that this doesn't constitute a GUI ...


9

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 ...


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

There have been some really interesting breakthroughs in mainstream UI toolkits over the past few years. Game UIs have been evolving too, but at a somewhat slower pace. This is likely because developing a full-featured UI subsystem is a significant undertaking in itself, and it's difficult to justify the resource investment. My personal favorite UI system ...


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

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

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

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 ...



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