Hot answers tagged

80

I'd argue that HUDs are graphical user interfaces: they're ways to present information back to the user graphically. In contrast to what some other answers say, the term GUI doesn't require that every element be directly interactive - the label next to a control on a form is still part of the GUI, guiding the player in how to interact with the system, even ...


26

Interactivity. A HUD is not interactive: it displays information only, it cannot be clicked, dragged, closed, etc. A GUI in a game is like any other UI: it is interactive. It has menus, buttons, scrollbars and other UI elements. The term Head Up Display refers to fighter jets: displaying information on a canopy means that the pilot does not need to look ...


7

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


6

Is a HUD part of the GUI and just displaying information? Yes. Head Up Display (as the name suggests) is just to display information while you are in-game. However in some scenarios HUD may be intractable. For example in a mobile based game there are on screen buttons to perform different actions while you are in-game.


5

There's no clearly "most common" position beside one the four corners. If you an information band/ribbon/... you typically want to embed it in your information ribbon, and leave the viewport as clean as possible. Since it's usually one of the biggest and more visual element to display in a HUD, you often want to push it to the corner to avoid it to be too ...


5

GUI and HUD are inexact terms, meaning people will know what they mean, unless they require specifics. The specific meanings attached to the terms depend on subculture, company, the current project, or the team within that project you're working on. Proof: divergent answers on this very question. The term HUD in terms of graphics often reminds of Terminator ...


4

You'll have to set the score position relative to the view position every update event. Some basic pseudo code from what I remember of GML. score.x = view[0].x + 15; score.y = view[0].y + 15; You can do something similar with the drag and drop interface, but I haven't touched GameMaker for years so I can't help you with that.


3

Considering you have a while(true) loop in your code, you're not going to allow the game loop to move to the next frame. You'll need to move to the next frame to update the screen and gather new input. You can use the void Update() method to check for stuff like keyboard input every frame. void Update() { if(Input.GetKeyDown(KeyCode.W) | Input....


3

As Byte56 said, the decision is yours. But my personal opinion is that an floating HUD game is better. I think something like this: is better if you don't need the extra space around the user's finger that's occupied by the GUI. Then you can make it adapt depending on some variables, like it becoming smaller when an enemy is hit, ...


3

The term HUD comes from fighter planes where information to be relayed to the pilot is projected onto the cockpit screen rather than displayed on instruments within the cockpit. The point being that the pilot does not need to look away from the world outside to gather relevant information. It is used by analogy in computer games so it does not have a clear, ...


2

Going to throw another thought out there; how about a ripple circle outwards? Have a circle s that its orgin begins at the point that user touches. Have the radius of the circle expand outwards to indicate that it is "growing" and gaining more power. This will allow the user to see their power gauge immediately as their eyes are already following the mouse - ...


2

The values in gl_Position must still be in NDC range: [-1,+1]. If your input position is supposed to be pixels, you need to properly adjust such that position 0,0 maps to -1,-1 and position WIDTH,HEIGHT maps to +1,+1 which is what the matrix from glOrtho does. Without a matrix, take any x,y and scale down by 2/width,2/height then subtract 1,1 to transform ...


2

I added this to event draw, of the object Score and it worked for me x= view_xview[0] + 320; y= view_yview[0]; draw_set_font(fnt_score); draw_set_color(c_white); draw_text(x, y, (score));


2

This is most often done with your second option, the event system. When something happens, send out an event describing what happened. Anything the HUD cares about it will listen for. It will potentially need to keep copies of some data (like health), but this is often beneficial for a variety of reasons. One example of why the copy is useful is that you ...


2

GL.Ortho creates a screen that is as wide and tall as you specified it. In your case both the width and height is 1 unit. Because your screen is wider than taller, a width unit is bigger than a height unit, and thus the square becomes stretched. You need to get the screen's sizes, calculate it's aspect ratio (width / height), then you need to set the left ...


1

The GUI is what the user interacts with. The HUD is what the game is displaying to the player. I'd say everything in the image is the HUD. If you open the menu, that would be the GUI.


1

First of all, make sure you are drawing your button in the Draw GUI event, since you want it to be drawn relative to the display coordinates instead of world coordinates: this is for you may want to have different viewport size and GUI size (respectively modifiable via the view_wview[] and view_hview[] variables, and the display_set_gui_size() function. ...


1

draw_sprite() ignores image_xscale and image_yscale. Use draw_sprite_ext() instead. P.S. Are you really need so high resolutions? It's very bad for memory. It won't work on most part of mobile devices, it won't work (or will work very slow) on big part of old desktops and laptops. the game maker gets much higher than a resized in image editors like GIMP ...


1

The DirectX 12 state model is that you create distinct Pipeline State Objects (PSOs) for every combination of state, render target configuration, and shaders you use in your application. You can share root signatures or change them as well. While creating PSOs and root signatures is expensive, setting them is very fast. Generally for HUDs you draw the ...


1

The simplest way to achieve this, is probably the ID3DXSprite interface. The ID3DXSprite interface provides a set of methods that simplify the process of drawing sprites using Microsoft Direct3D. The ID3DXSprite interface is obtained by calling the D3DXCreateSprite(...) function This call requires a valid pointer to an IDirect3DDevice9 object. To ...


1

You could try something like this int hp = 15; for(int i = 0; i < hp/2; i++) System.out.println("Heart"); if(hp % 2 == 1) System.out.println("Half Heart"); Just replace the print calls with your graphics calls.


1

Instead of creating a regular game object, create a UI Image ( New >> UI >> Image/slider/etc.). The new Unity UI system has specifics that aren't available to normal game objects, so when you make them public they need an exact type to be dragged onto them. This has been my experience at least, hope it helps.


1

LibGDX has Viewport, which helps you do exactly what you are trying to achieve. You use the Viewport to specify where the Stage should be drawn and how big it is. The Viewport does not change the local coordinate system of the Stage itself, so you don't have to add an x offset to everything you want to include in the right hand stage (everything starts at (0,...


1

Adding another Stage as a HUD(I couldn't Access the lower stage anymore or the other way around) It's the solution i'm using, and for me it's working fine. Assuming that by "couldn't access" you meant you couldn't handle input, you have to know there is a solution for this : InputMultiplexer. It allows you to handle event for multiples scenes and/or ...


1

After moving the opening curly brace onto the next line, the code worked as intended. I'm not sure why it has to be on a separate line here in particular, but it solved the problem.


1

GUI system is THE annoying aspect of Unity3D. What missing is anchoring to camera's bound (thus anchoring to different screen size automatically) or automatic stretching according to some kind of 'panel' Here are some possible alternatives : Use GUITexture/GUIText game object since the position property of that object is special : it uses 0~1 scale mapped ...


1

It seems to me that you're mixing the visual representation with the logical representation of what you're trying to create. Lets discuss your two scenarios. Equipment Screen In this situation, I would simply have the Equipment UI be capable of querying the inventory system for the current player. This allows the inventory system and it's management to ...


1

Personally i have created a secondary GUI Layer and have a single class (c#) that handles all draw calls to this layer information is passed in text format along with the sending object and the class organises the data before drawing it to screen here is an exmple of the output http://i.imgur.com/YeUWujS.png


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