Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 10 Jul 2011
Offline Last Active Oct 05 2015 08:37 PM

Topics I've Started

CEGUI with custom renderer and resource handler?

16 February 2015 - 11:33 AM

The biggest reason I balk at CEGUI is its apparent reliance on its built-in renderers and resource loaders.
CEGUI gives you a set of renderers for common graphics engines, but there are few resources on how to write your own renderer like there is for, say, libRocket. And I'm hesitant to give CEGUI control over its text rendering when I already have text rendering in my game (libRocket falls a bit on this too, actually). How feasible is it to create a custom renderer, especially since I apparently only have the CEGUI::Renderer class reference to go on?
I'm also worried about CEGUI's data files and resource loading clashing with my own. CEGUI wants Imageset files, while I already have a sprite atlas system in place. CEGUI uses XML files (which requires an XML library) while all of my existing data files are YAML or scripts. How much of CEGUI's native resource loading is required for CEGUI, both for compiling and using CEGUI?

GUI layout algorithms

16 February 2015 - 11:01 AM

When thinking about positioning and sizing widgets in a GUI, I get as far as nesting widgets inside of other widgets and giving widgets a size and parent-relative position. I want to be able to easily support different resolutions and aspect ratios, so I've been thinking about automatic layouts and auto-sizing.


I'd want some widgets to automatically resize themselves to some preferred size, like labels fitting their text and containers fitting their child widgets. I'm considering auto-sized widgets the same as fixed-sized widgets, only the widget changes its own size occasionally. In addition to auto-sizing, I may want widgets that stretch with their parent in some direction. Finally I'd want container widgets that automatically position their children; at minimum I'd want a container that stacks widgets horizontally or vertically like .NET's FlowLayoutPanel, Swing's BoxLayout, or CSS3's Flexbox.


This seems to set up a bunch of layout dependencies I'm not sure how to manage. Changing a widget's size may change its parent's size, which may change its sibling widgets' sizes and its grandparent's size. And I need to make sure to handle these resizes and re-layouts in the right order (can't set a stretchable widget's size until I have the parent's current size) and make sure to not invoke any unnecessary re-layouts (a stretchable layout shouldn't cause its parent to re-layout itself when it gets resized by its parent during a re-layout).*


How is this managed. Are there any standard layout algorithms out there?


* Funnily enough, both of my hangups seem to stem from stretchable widgets.

How do you feel about using dead/unmaintained libraries?

21 November 2013 - 04:52 PM

Say I'm looking for a certain kind of third-party library/framework/engine to fill some role in my game. I find a library that fits my requirements, or at the very least fits my requirements better than similar libraries. The only drawback is that the project is apparently dead. The web site hasn't been updated in years, the forums are empty, and the source repository seems inactive.


The library is open source, so it's not necessarily lost. But then I'd have the responsibility of maintaining the library myself in my own project. The alternatives are (a) using a worse but active library or (b) implementing the library functionality myself and possibly killing my project again.


How do people here feel about using libraries that aren't maintained by anyone anymore? Does it ever depend on the project and/or what the library does?

Handling time travel from faster-than-light travel

13 November 2013 - 07:06 PM

When pondering my pipe dream space opera game, I looked up some things on that infamous sci-fi plot device known as faster-than-light travel. Today I learned that not only are there physical limits on actually getting past the speed of light, if you could magically outrun light you get time travel for free.
This presents several challenges to designing the setting and plot of my (admittedly theoretical) game. I'd have to figure out how an interstellar society with time travel would work. For the actual game, which would basically be an RPG/strategy hybrid akin to Heroes of Might and Magic, I'd be obliged to simulate the time travelling somehow; the time travel couldn't just be a plot device like in Chrono Trigger. Finally, there's the likelihood that the game's original sweeping tale of Jedi robots punching zombie dragons would get overshadowed by all the time travel stuff.
I'll note that the idea I had for my game is a bit unique in that it would actually be a fantasy set in space, with Harry Potter and Doctor Strange stye wizards zipping around the stars. But the ability to magically control reference frames seems a bit much.

Non-random evasion in turn-based games?

31 July 2013 - 03:18 PM

I've been thinking about the Playstation game Bushido Blade (here's a video). It's a fighting game without health bars. A character dies instantly if struck in the head or torso.


The one-hit kills place a premium on evading and blocking attacks. This makes sense from both a realism and a cinematic perspective. e.g. Batman typically has to do backflips or something to avoid gunfire.


Bushido Blade, as an action game, leaves the evading and blocking to the player. I'm left wondering one thing: how would I possibly adapt this for a turn based game?


In every turn based game I've seen evading attacks are represented by a random chance for an attack to do no damage; a "to-hit" rating. If I combine that with Bushido Blade style one-hit kills then a character's life is entirely in the hands of the Random Number Gods ("The only people who should roll dice are those who are prepared to roll a 1.").


Are there any non-random ways to represent evasion in a turn based game?