Zum Hauptinhalt springen
tsecurity.de LIVE
Echtzeit-Radar & Feeds
Alle RSS Feeds
👥 Community & Social
Sichere ProgrammierungBreeze TTS 2 vs ElevenLabs: Open Source TTS Verdict(23.09.2026 um 05:44 Uhr)
Sichere ProgrammierungAgentic AI vs Generative AI: The 2026 Verdict(23.09.2026 um 05:44 Uhr)
Sichere ProgrammierungI made my agent prove every quote against the source document(23.09.2026 um 05:45 Uhr)
Sichere Programmierung8mb.video Alternative: Skip the Line, Skip the Upsell(23.09.2026 um 05:47 Uhr)
Sichere ProgrammierungBuilding a GTA 6 JSON API for entities and current status(23.09.2026 um 05:52 Uhr)
Sichere ProgrammierungEvery filter needs a documented exception(23.09.2026 um 06:01 Uhr)
Sichere ProgrammierungBreeze TTS 2 vs ElevenLabs: Open Source TTS Verdict(23.09.2026 um 05:44 Uhr)
Sichere ProgrammierungAgentic AI vs Generative AI: The 2026 Verdict(23.09.2026 um 05:44 Uhr)
Sichere ProgrammierungI made my agent prove every quote against the source document(23.09.2026 um 05:45 Uhr)
Sichere Programmierung8mb.video Alternative: Skip the Line, Skip the Upsell(23.09.2026 um 05:47 Uhr)
Sichere ProgrammierungBuilding a GTA 6 JSON API for entities and current status(23.09.2026 um 05:52 Uhr)
Sichere ProgrammierungEvery filter needs a documented exception(23.09.2026 um 06:01 Uhr)
Intelligence View
⚡ tsecurity.de Intelligence

GameMaker Textbox above player

Optimizing Dialog and Tooltip Rendering in GameMaker Surface based GUI Rendering Technique This document outlines an optimization technique for rendering dialogs and tooltips in GameMaker games, especially useful for games…

0
↗ Quelle (dev.to)
Reagiere als Erste:r — dein Feedback zählt!




Optimizing Dialog and Tooltip Rendering in GameMaker






Surface based GUI Rendering Technique



This document outlines an optimization technique for rendering dialogs and tooltips in GameMaker games, especially useful for games with varying display resolutions. Example in my game my Camera width and height are 420x236 while the viewport width and height is 1920x1080px.



DEMO:

https://youtu.be/5Xhd9O3Wevo






Key Concepts





  1. Surface Creation: We create a surface matching the viewport dimensions (e.g., 1920x1080).


  2. Render-to-Texture: Dialog/tooltip content is drawn onto this surface.


  3. Scaling: The surface is then stretched to fit the current GUI dimensions.






Benefits




  • Consistent appearance across different screen sizes

  • Improved performance through selective redrawing

  • Better scaling quality




Following are just brief sections related to surface rendering not the entire code on how to create a Dialog with options. Link to itch has al code you need.




Dialog message






Implementation for Dialogs






Object Creation






dialog_surface = -1;
surface_width = 1920; // Match viewport width
surface_height = 1080; // Match viewport height
_needs_redraw = true;









Drawing Logic (Draw GUI event)






if (dialog_active && current_dialog != noone) {
if (!surface_exists(dialog_surface)) {
dialog_surface = surface_create(surface_width, surface_height);
_needs_redraw = true;
}

if (_needs_redraw) {
surface_set_target(dialog_surface);
draw_clear_alpha(c_black, 0);

// Draw dialog content here

surface_reset_target();
_needs_redraw = true;
}

// Draw stretched surface
draw_surface_stretched(dialog_surface, 0, 0,
display_get_gui_width(),
display_get_gui_height());
}










Implementation for Tooltips



Similar to dialogs, but typically with different positioning logic.



Tooltip






Key Differences for Tooltips




  • Often need to follow game objects

  • May require camera-relative positioning






Step event would






// In Step Event
var _cam_x = camera_get_view_x(view_camera[0]);
var _cam_y = camera_get_view_y(view_camera[0]);

x = (_init_x - _cam_x) * (surface_width / camera_get_view_width(view_camera[0]));
y = (_init_y - _cam_y) * (surface_height / camera_get_view_height(view_camera[0]));









Best Practices



Redraw Flags: Use _needs_redraw to avoid unnecessary rendering.

Scale Calculations: Pre-calculate scaling factors when possible.

Surface Management: Always check if the surface exists before using it.

Clean Up: Free surfaces when objects are destroyed or rooms end.






Conclusion



This technique significantly improves rendering quality and performance for UI elements like dialogs and tooltips. It ensures consistent appearance across different display sizes while optimizing draw calls.






Download:



https://steelx.itch.io/gm-dialog-system

Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten GameMaker Textbox above player

Thematisch verwandte Begriffe: GameMaker, Textbox, above, player · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

Zum Aktualisieren ziehen
ZERO-DAY CVE-2026-18163 | IBM Financial Transaction Manager (FTM) for RedHat OpenShift could allow…
Advisory →
TTS Reader • tsecurity.de Voice
tsecurity.de Icon
tsecurity.de App
Offline-Lesen, Eilmeldungen & 0ms Ladezeit

Installiere tsecurity.de direkt auf deinen Home-Bildschirm für das ultimative Vollbild-Magazinerlebnis ohne Browser-Leisten.

Nächster Beitrag
Themen-Radar & Intelligence Matrix
Echtzeit-Taxonomie nach Angriffsvektoren & Plattformen

tsecurity.de Live Threat Radar

🔴 LIVE RADAR
MONITORING
AKTIV
CVE-DATENBANK
LIVE
🔍
Community Radar & Live Chat
Sentinel Bot online • Live-Stream
Dein Cluster: Security Explorer
Match:
lädt…
Verbindung zum Community-Stream wird aufgebaut...
Bearbeitungsmodus — Senden überschreibt deine Nachricht
Community-Puls — was gerade passiert
lädt…
Aktivitäten deiner Analysten
lädt…
Neues Thema oder Eilmeldung einreichen

Reiche interessante Links, Zero-Days oder Debatten ein. Die Community entscheidet per Upvote über die Veröffentlichung.

Heiß diskutierte Einreichungen
🔖 Gespeicherte Artikel
📂 Keine gespeicherten Artikel vorhanden.
Zurück Ziehen Vor
Links: vorheriger Artikel Rechts: nächster Artikel unten: schließen
News NIS-2 Frühwarnung Tier-1 Intel ⏱️ 3 Min vor 10 Min
Artikeldaten werden geladen...

Zurück: vorheriger Vor: nächster
↗ Original-Quelle
Social Reaktionen Deine Reaktion zählt
Einstufung & Relevanz-Poll 0 Stimmen
In sozialen Netzwerken teilen 1-Klick