Questions tagged [text]

You're reading text right now. Characters representing primarily letters and numbers, usually arranged to present a message.

Filter by
Sorted by
Tagged with
17
votes
5answers
19k views

Preferred way to render text in OpenGL [closed]

I'm about to pick up computer graphics once again for an university project. For a previous project I used a library called FTGL that didn't leave me quite satisfied as it felt kind of heavy (I tried ...
11
votes
4answers
1k views

Rendering Resolution Independent Text

I need a way to draw resolution independent text in my game. That is, I need to be able to zoom in on text and never see pixel artifacts. Can anyone make any suggestions on how I could go about it?
8
votes
3answers
26k views

How to dynamically create an UI text Object in Unity 5?

I have been searching for something that should be simple, but Unity 5's documentation on that is fairly outdated. What I want to achieve is to be able to create UI Text totally from script, i.e. ...
8
votes
2answers
5k views

How do games handle rendering Asian unicode text?

I'm currently in the process of implementing text rendering in my game engine, and I decided to utilize AngelCode's BMfont to generate font textures, and then have OpenGL render textured quads for ...
7
votes
5answers
7k views

How to clip cut-off text in a textbox?

I'm writing a textbox class for my XNA game and I'm using SpriteFont to draw the text. It's only a single line textbox so when the text width exceeds the size of the rectangle box, it currently just ...
7
votes
3answers
2k views

Displaying text on a 3D plane

I am busy with a pet project where I am trying to create a Collectible Card Game in 3D. These cards have Hp and Damage etc. but I cannot find a way to neatly display these values. I tried to use a ...
6
votes
4answers
9k views

Should NPC dialog be stored in XML or in a script?

I'm developing an action RPG with some friends. I would like to know the differences and pros/cons of making NPC's dialogue using a file in XMLformat instead of using a script. I see that script ...
6
votes
1answer
439 views

Text on a model

I am trying to put some text on a Model and I want it to be dynamic. Did some research and came up with drawing the text on the texture and then set it on the model....
5
votes
2answers
2k views

How can I render text above a mesh in DirectX 9?

I want to render some text over a mesh in my DirectX app. It will have a similar application to health bars for units in games, just as text rather than a bar. I'm looking for the simplest way to do ...
5
votes
3answers
4k views

UI Text Won't Change Color in Unity 5

In Unity 5 on Windows 10, I try to change the text color from the Inspector and in scripts, but the color won't change. Here are some screenshots of my Text objects open in the inspector, with there ...
5
votes
1answer
262 views

Should Chinese text be grid aligned in game dialogs?

Title says it all, should I have my text using a variable width font, or fixed width. I didn't know if it is easier to read if its aligned on a grid?
5
votes
4answers
3k views

How can I implement a real-time game loop in a text-based game?

I am trying to make a short text game with c++ to help me learn the language. I have made a version that basically displays texts, waits for an input, once the input is received it displays text, and ...
4
votes
5answers
5k views

Working with multiple language text files in multilingual games

What kind of tools and practices are used for maintaining text for multilingual games? By "text" I mean literally any piece of text you see in the game: dialog, menu options, tutorials, etc. I want ...
4
votes
1answer
1k views

Completely Pixelated Font in JavaScript Canvas?

I'm making a game with a canvas scaled up such that each pixel is pretty big. I want to display some pixelated text without anti-aliasing but I have idea how I would accomplish this. Is there I way ...
4
votes
1answer
3k views

In MonoGame, how can I disable font anti-aliasing?

I am building a game with a "low resolution" aesthetic, so I would like to disable the default font anti-aliasing. The text is drawn using the built-in SpriteFont and SpriteBatch classes. Here is ...
4
votes
1answer
3k views

MonoGame "couldn't find a default importer" for .txt file?

I'm trying a solution in MonoGame to create levels from a .txt file, but the pipeline tool fails when trying to build the Content.mgcb correctly: ❌ Skipping HighResolutionContent\Backgrounds\Layer1_0....
4
votes
4answers
2k views

Optimizing Texture Text Rendering?

I have an implementation currently that stores each letter as it's own separate texture, usually only a couple pixels in width and height. So this has some problems as i am unable to do a batch render,...
4
votes
1answer
155 views

Need help with making a journal system

My game uses a system similar to Metroid Prime's logbook, in that it logs things the player encounters and discovers on their journey, categorizing it, etc. I want to write out all of the possible ...
4
votes
0answers
636 views

Find Max Line Count for Unity UI.Text

I'm trying to determine the max line count of a UI.Text with VerticalOverflow set to truncate...
3
votes
1answer
118 views

center point of a text?

i'm drawing a text using a spritefont and the draw.string function of the spritebatch object. in some point, i need to augment the size of the text, so i use a variable to scale it. all this is ...
3
votes
1answer
2k views

How do I measure a string that will be drawn with SpriteBatch?

Is there a way to measure width and height of an ever-changing string (a player's score, specifically)?
3
votes
2answers
195 views

Why are symbols placed in front of UI texts?

I've been to play testing sessions from both large and indie studios, and I often see a symbol in front of UI texts during development builds. It most commonly appear in buttons texts, but can also be ...
3
votes
1answer
207 views

How to integrate images into text lines in Unity?

Here are two screenshots from Stellaris, where images are seamlessly integrated into the text. How can I achieve this in Unity?
3
votes
1answer
519 views

How to refresh allegro textprintf_centre_ex text upon keypress?

I'm trying to print the coordinates of a drawn square upon movement. The problem is that the x value doesn't get refreshed on screen. This is the code I have: ...
3
votes
1answer
103 views

View individual UI Rect boxes when multiple UI elements are selected?

I have 2D UI layout with multiple text boxes over the canvas, I need to easily be able to see where the Rect boxes for each are positioned, so that I can see where the safe areas are for placing ...
3
votes
2answers
3k views

What is the most efficient way to render a textbox in C++ SDL2?

I'm a beginner in sdl2 and I'm trying to make a window, with a gui (where you can move a sprite around) and a CLI (a textbox where the game can return some text and the user can insert commands). Let'...
3
votes
2answers
145 views

How to store and update presentation strings describing effects with parameters?

Consider this spell: As you can see in my design a Spell is a composition of one or more Effects. An Effect has properties on ...
3
votes
3answers
4k views

UI Text in Unity World Space Canvas

I've been struggling with the text for my game labels, as can be seen below. Unity has even included it as an official bug, although no timeline is set to fix it. The text just looks poor. I've seen ...
3
votes
1answer
641 views

Using a script to draw an icon next to (i.e. inline with) a text label in Unity

Suppose mystring is a string variable (whose value changes over time) and that myIcon is a texture or sprite of known dimension, ...
3
votes
1answer
4k views

How can I use ImGui to render simple text instead of using stb_truetype directly?

Since ImGui builds on top of stb_truetype for its font rendering, I thought it could be nicer to use its already built font-processing capabilities (...
3
votes
3answers
7k views

How to Use Text in Unity3d

How Can i Create Text in Unity3D? I Use "3D Text" But Its Always on Top Of Everything! Can You Suggest Anything? I creating a 2D Game So its not Necessarily a 3D Text.. Edit: Because I Building a 2D ...
3
votes
2answers
58 views

Change Text - Inside A button, inside a Canvas, inside a GameObject: Access all the texts inside of hierchy?

//.... Gameobject tile; int count = 1f; float posX = 0; float posY = 0; ....// GameObject blueTile = (GameObject)Instantiate(Resources.Load("block_blue")); tile = (GameObject)Instantiate(blueTile, ...
3
votes
1answer
292 views

How to draw a string into a polygon? (Libgdx, Java)

I am working on a 2D grand strategy game (like Hearts of Iron from Paradox but as I said only 2D game) and I would like to render the area names on the map. I made the Polygons for each area. How can ...
3
votes
1answer
977 views

Print string letter by letter in UI Text

i'm trying to print a string letter by letter for UI Text of Unity. With each click of a button, the Stampa function, must print a letter. Up to this point everything is working perfectly. But if I ...
3
votes
0answers
357 views

Unity 5.3.5 - Blurry UI text after switching canvasses - until text is refreshed by turning visibility off/on or changing resolution

I have multiple scenes in my project where the canvas are switched between, each canvas having UI text included on it. The project was originally created in version 5.0 and I have just updated to ...
2
votes
3answers
13k views

UNITY : I want to make my UI text fade in after 5 seconds

I know this question has been asked and asked but none of the topics i visited gave me an answer. I'm making a game programmed in c# where you control a boat and i want my UI to appear smoothly by ...
2
votes
2answers
37k views

How to add a UI Text for keeping Score in Unity 5

My Problem is simple I want to show scores on my game. The examples on internet are good but in Unity 5 there are no GUI elements but instead these are now ...
2
votes
3answers
5k views

Unity UI - Value of text input (assigned with OnChange event) is always "one letter behind"

I am having a problem in unity setting up a search field. I will post pictures down reggarding my problem but first let me quickly explain what is going on. I have input element in my ui and i have ...
2
votes
1answer
10k views

C# OpenTK Text rendering

I've been looking everywhere for a solution on how to render/draw text for my 2D OpenTK-based game. Been trying quite a few QuickFont ones without success (either a AccessViolation exception or text ...
2
votes
1answer
2k views

Creating a 3D text mesh from a 2D glyph

I have thought of three steps for doing this: Acquire the vertex coordinates which will represent the glyph's form Extrude them Render Can you suggest a better method? Can you give me an insight on ...
2
votes
2answers
3k views

Godot: What options are there for removing the filtering or anti-aliasing from text

If I were to start making a pixel-art game with the Godot engine, what options do I have for removing the filtering or anti-aliasing from text? EDIT: I want to know how to remove the AA from ...
2
votes
2answers
274 views

Trouble creating a "Game Log" for a text-based RPG

I've made significant progress porting my game from print-output to Pygame over the last few days, and I think I'm almost there! Unfortunately, I'm beginning to suspect one of the methods I'm using ...
2
votes
2answers
7k views

How to update UI after changing text in a view

After applying a text change to a scrolling view, how do you get the new height of the text, resize other UI elements around the changed text length, etc? Many have posted this question. Some have ...
2
votes
2answers
558 views

How do I render text in a view in SFML 2.5.1 without artifacts?

I'm using the following code to render text in a letterboxed view. ...
2
votes
1answer
128 views

Why am I hitting a small character limit when rendering with SDL_TTF?

I'm making a text based game using SDL2 and SDL_TTF. I just started working with TTF, and I've noticed there is some kind of character limit regarding how much text you can render at a time! I can ...
2
votes
2answers
540 views

SFML: Optimizing sf::Text?

I've been noticing that using multiple sf::Text objects has a huge impact on performance. The difference between using 1 or 4 sf::Text objects can result in almost a 40FPS drop (From 120 to 80). <...
2
votes
4answers
4k views

How do I make dialogue text appear with a beeping effect?

I'm interested in old-school RPG dialogue boxes, where text appearing in dialogue boxes is accompanied by a subtle beeping sound. This is demonstrated in a video here. Is this morse code translated ...
2
votes
1answer
51 views

Comparing strings doesn't work

I'm making something for a dialogue system that reads "cues" from a textfile to identify which emotion to show in the character's portrait during a conversation. Basically if the current ...
2
votes
2answers
264 views

How to draw a string to the screen by fading in one letter at a time?

I'm making a text adventure-style game with MonoGame. I have created a TextBox class which prints text onto the screen one letter at a time (like it's being typed). It does this by storing received ...
2
votes
2answers
2k views

Unity: Change Text with Time (Text Flashes)

I am trying to display instructions within the Unity game. The idea is to have the instructions appear over time. For example, "instruction 1" then wait 5 seconds and show "instruction 2" instead of ...

1
2 3 4 5