Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

Kylotan

Member Since 08 Mar 2000
Offline Last Active Today, 02:10 PM
*****

Topics I've Started

Where are all the good GUI libraries?

03 April 2013 - 11:28 AM

This is as much of a rant as a question, for which I apologise.

 

Basically, I want to make small games that are quite GUI-heavy. Think XCOM, or old-school RPGs. And I want to use higher level languages, such as Python or C#, because life's too short to be writing in C++ if you don't really need to. Unfortunately, what I seem to be finding is that the game libraries and frameworks for any language other that C++ either have no GUI support or what they do have is shockingly bad.

 

My usual development environment of choice these days is Unity. It has a built-in GUI system, but this is pretty awful to use (unless you're a fan of immediate mode GUIs), lacks a lot of the really useful widgets, is very awkward to style, and renders really slowly.

 

Unity developers usually therefore resort to 3rd party libraries, but these too are awful in their own different ways. Take NGUI for example: if you want to be able to scroll one panel inside another, it needs to employ a separate shader and you need to place invisible barriers in the interface to stop the player from accidentally clicking one of the objects outside the clipped window. Ridiculous.

 

Another language I would like to use is Python. But pretty much the only modern game engine there is pyglet (or cocos2d, which is based on pyglet) and that doesn't seem to have any decent GUI library at all. kytten exists, but while having a decent selection of widgets, construction of dialogs is very 'fire-and-forget' and it's incredibly awkward to try and modify the GUI later. You end up needing to create the UI in reverse order so that you can hold references to the controls in the middle, in case you need to edit their values.

 

Yet when you look at C++, there seems to be a lot of decent GUI libraries available: CEGUI, GWEN, SFGUI, libRocket, Awesomnium, etc. It's obviously not impossible to write decent, usable, flexible GUI libraries. Just that nobody is apparently bothering when it comes to the other languages.

 

Is it any wonder that so many indie games are simple puzzle platformers, when we have 101 different choices for getting sprites onto the screen, and virtually no good options for getting text and dialogues on screen? Am I missing something? Are there some great options out there that I've overlooked? Or is this as big of a problem as I think it is?


Can we undo votes?

02 April 2013 - 03:43 PM

I clicked the down-vote instead of the upvote (on this topic's first post) and I can't find any way of undoing it. Why can't we change our votes?


Seeking variable width line drawing algorithms

06 March 2013 - 08:15 AM

I have a 2D array of values that map to coordinates, and a set of lines that pass through some of those coordinates. I want to be able to change the values in the array based on their proximity to these lines. So basically I need a line-drawing algorithm, but which supports arbitrary widths.

 

An algorithm like the Bresenham line-drawing algorithm would be fine if the line had essentially zero thickness, but the thickness varies from line to line and I'm not sure how I'd extend it to handle that.

 

I'm also aware that I could treat the line as a rectangle and fill that in, but it sounds suspiciously like implementing half of a software renderer which I'm not keen on doing, unless there is some very simple code or pseudocode that I can pretty much just drop in.

 

I currently have an interesting inverted solution, where I take each point in the array and calculate the distance from that point to the nearest line, and if that distance is less than the line's thickness, then the point is filled in. This has the beneficial effect of letting me taper off the values further from the line, giving me a nice gradient at the edges and avoiding aliasing as well. It also has the detrimental effect of being very slow, even with all the square roots removed from the distance calculations. There are too many redundant distance calculations against lines which turn out not to be the nearest one and thus not contributing to the final distance. But if I could speed this up I'd be happy to stick with it.

 

Any suggestions?


Infinite terrain generation in chunks - need hints on handling chunk edges

25 February 2013 - 12:09 PM

I'm doing some terrain generation, using the usual Perlin-style interpolated noise (although strictly speaking it's value noise, as I'm not using gradients). However rather than generating a large landmass in one go, I am generating it chunk by chunk, eg. 100m x 100m areas. Therefore it's important that the edges of each chunk line up with each other in terms of their generated height. (I think this is how Minecraft does it, but I couldn't find out exactly how the height values are calculated, especially across changing biomes. And I'm not using voxels, anyway.)

 

Most algorithms that I've seen for terrain generation using noise seem to assume that you're generating across the whole landmass, that you have precalculated noise values that span the entire world which you then interpolate between (and repeat with higher frequencies at lower amplitudes, etc). But since my world is unbounded I don't have this. I think the answer should be as simple as having some sort of 2D hash function that can return a noise value for any arbitrary x,y in the world, and sampling that value itself is easy. But I'm having trouble thinking about how to generalise this to the system of frequency and amplitude. If I just scale up x and y by the frequency each time then I'm sampling values from elsewhere in the world which seems logically incorrect. Can anybody clear this up for me? Maybe post some pseudocode?

 

I have one other aspect I am trying to implement - each chunk has itself got a height value, so that I can specify that certain parts of the world are higher than others before the noise algorithm runs. I am contemplating calculating the height at each point as basically a bilinear interpolation of the chunk height with that of its neighbours, and then add the noise value for that position. I think this should be continuous both within chunks and across chunk boundaries, but I'd be interested to hear if there are any problems with this approach, ways it could be improved, or ways to combine it with the previous step to make the algorithm simpler and/or faster.


Can we turn off URL shortening?

11 February 2013 - 07:41 AM

Whenever I post a link, it gets the middle hidden. eg.: http://udn.epicgames.com/Three/ReplicationHome.html

 

What purpose does this serve, other than to obscure the content of the link?

 

Is it to prevent some sort of SEO spam? If so, we have moderators and other tools for that.


PARTNERS