What "technologies" should I use?

Member
Posts: 321
Joined: 2004.10
Post: #1
I'm writting a strategy game in C++/SDL/OpenGL with lots of different units. I want to implement functionality that allows players to (option + click) on a unit which would then cause an informational subwindow to appear with all the unit's statistics, history, etc.

I'm thinking of SQL to store all the data. I chose SQL because I'll be taking a class in SQL soon and why not leverage off it.

However, for the subwindowing, formatting and displaying I'm a little bit lost. I might be mistaken, but I looked at the SDL API and I couldn't find anything that seemed to apply. Am I grossly mistaken here?

If I was really ambitious and wanted to add hypertext links to the informational windows, what approach should I take? Don't need any low level detail. Just general approaches to technologies.

thanks.
Quote this message in a reply
Moderator
Posts: 698
Joined: 2002.04
Post: #2
I'm not sure what you mean by sub-windowing, but if you want multiple windows external to the main window, SDL is not the way to go; although I've heard of hacks which implement it (which may or may not be supported on all of the platforms supported by SDL), out of the box SDL does not support multiple windows.

Mark Bishop
--
Student and freelance OS X & iOS developer
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #3
Use a Cocoa .app bundle on Mac OS to write applications which work like real programs and dont impose restrictions on you.
Theres an Xcode template here to get started with if you like.

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
Moderator
Posts: 434
Joined: 2002.09
Post: #4
SDL is pretty low level. There's nothing stopping you from drawing rectangles on the screen to subdivide it into panes, or from drawing some content into a texture and then putting a vertically-oriented polygon in front of the camera with that texture, thus yielding a pop-up window.

The point is, it's roll-your-own. If that sonds tedious to you (and it does to me) you might want to look around for GUI libraries people may have written to recreate windows and common controls in OpenGL. I have no info there, sorry.

Measure twice, cut once, curse three or four times.
Quote this message in a reply
Xkivi
Unregistered
 
Post: #5
you could use GLUT (OpenGL Utility Toolkit) to code the UI
it has support for subwindows as far as I know.
If you know how to use OpenGL, GLUT shouldn't be a problem for you.

Documentation of GLUT:
http://www.opengl.org/documentation/spec...node1.html

Tutorial which i have not tested:
http://www.lighthouse3d.com/opengl/glut/
Quote this message in a reply
Member
Posts: 567
Joined: 2004.07
Post: #6
I'd stay away from GLUT; the mac os x implementation is really bad. I'd use SDL.

It's not magic, it's Ruby.
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #7
I'd much rather use a GLUT program (the implementation on mac is just fine for what it is) than SDL, much more mac like and uniform/expect behavior but above all a proper Cocoa application with an NSOpenGLView.

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #8
SDL on Mac OS X creates proper Cocoa applications... and NSOpenGLView provides so little that most advanced projects won't use it, in order to get some flexibility back.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Getting up to date - Tools, Technologies... jaktrip 1 2,103 May 19, 2009 08:28 AM
Last Post: AnotherJake