• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
Cappa Games

How do I update text (or anything) in a game, in real time?

4 posts in this topic

If I wanted to add a news section to my game so I could update it in real time, how would I go about that? If I could get some direction that would be great. I'm good at researching things and figuring them out for myself, but I don't know enough to even know where to start.

 

Purpose: I want to be able to add updates (Ex. News Update) to a game in real time. These could be done through text, links, pictures....i want it to be pretty flexible.

 

I just need a general idea of how that would work and all the parts that are needed.

 

Thanks

0

Share this post


Link to post
Share on other sites
a fairly simple and flexible approach is to just embed a html renderer (Webkit, Gecko, etc) in the game and display the newsfeed as a html page (Which you can retrieve from a webserver using curl (or some equivalent library)), You could also do the same with a custom renderer and json or xml data.

If updates need to arrive alot quicker (if you fetch http data you can't really have your client ask for updates too frequently or it will kill your server) you pretty much have to write a custom server and have the game open a connection to that (And then push out updates from the server rather than have the client ask for updates) Edited by SimonForsman
1

Share this post


Link to post
Share on other sites

Thanks for your reply! Very helpful.

 

If I'm understanding correctly:

 

  • Have the game link to an HTML5 page with the news feed
  • Use this HTML5 page to change text, images, etc on the fly
  • Have a server running this HTML5 file and link the game to it
  • Preferably only update when a change is made to this page, rather than load the page every time someone loads the game up

 

Hopefully I can pull this off with Game Maker somehow...either way it looks like I'm going to have to learn a little bit of HTML5.

 

 

Thanks a lot for your help, I was completely lost, but now I have a rough idea of what I need to do.

0

Share this post


Link to post
Share on other sites

Preferably only update when a change is made to this page, rather than load the page every time someone loads the game up

 

Just load the page at startup, It'll be easier to implement and it's a relatively cheap operation. (To prevent UI blockage during the load-time, you should load the page on a background thread)

1

Share this post


Link to post
Share on other sites

Hopefully I can pull this off with Game Maker somehow.

If the requirement is "has to be implemented within Game Maker" then that may be a pretty harsh requirement.

I agree with others: Spin up a web server that serves the "news and information" page. Web servers are great at distributing semi-static content. Load this from the game and display it. If you don't need the full HTML DOM / CSS / JavaScript engine, you could probably write a simple text-and-image renderer that understood just enough HTML to display your news blurb correctly.

Most web browsers pay attention to cache control headers, so you can mark your news data to expire a few hours from when it's fetched. That way, a client will re-load news only if it's been several hours since it last saw it.
1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0