Sign in to follow this  
superman3275

As a beginner in Game Programming, I just realized something.

Recommended Posts

I just realized: For simpler games, the bulk of the work is programming the GUI's/Setting up the User Interface. Getting down the actual functionality is actually really easy, but working with GUI's and figuring out how to implement that system was harder for me. I'm sure for more complex games with huge menus, like RPG's, it's just as Important/Hard, but It surprised me. Today I started breakout. The actual game is probably going to be done in the next three hours, and the menu would take way longer, but if you look at my posts, I made a special set of classes called SimpleGUI for SFML that I'm going to use. Is this true for the larger games you guys make that aren't so simple in functionality, or will I find that when I start making my own games it's actually a way smaller part of the design process?

Share this post


Link to post
Share on other sites
GUIs beat me up also. For me, it's not the GUIs themselves but the interaction between the GUIs and the rest of the game, since if I'm using a GUI library (which I am), then it tries to make me do things its way with its paradigns, which are at odds with the way the rest of my game is set up. [img]http://public.gamedev.net//public/style_emoticons/default/rolleyes.gif[/img] Edited by Servant of the Lord

Share this post


Link to post
Share on other sites
i dont know if there is a good thing in .net library for text fields but in game maker which is supposed to be easy engine... there you have to make your own text field..

by drawing a white rect and then drawing a border around it so it looks like a text field.
and then you have to draw a "|" and put it on a alarm so it looks like text field is active..
then you have to make scripts to check if textfield is active or not so its not blinking while u are typing in a different text field.
and then you have to make weird storage variables etc so message gets saved if you deselect txt field and then reselect it.

and then you have to check for special characters..

and then so you can edit the string by clicking in middle of the string to put input thingie there... etc.

so much work for a text field lol.... in game maker.

and same thign with anythign about gui in game maker...
no buttons etc... we have to make buttons outselves the same way as text field.

unity is much more powerful and simpler than game maker :D

Share this post


Link to post
Share on other sites
I would have to agree with glhf about networking. Even a high score system is daunting to the beginner programmer. On the other hand, I am a perfectionist, and unfortunately there is no 'perfect' UI, which is probably why I have such a hard time with them myself.

What gets me are what I call 'What If' situations... what if the user presses down the mouse button, then drags onto my UI button? What if they push down, then drag off? What if they push the UI button, drag off, then drag back on, and let go? Should I have an on-hover effect? Should it glow? What color? Should there be a 'down' effect, for when the user presses down, but has not released yet? Should the event happen on mouse DOWN or on mouse UP?

These are the things that keep me up at night!!!! :D

So yeah... networking and multi-player games are a real pain in the ass, but UI elements are a close contender.

Share this post


Link to post
Share on other sites
[quote name='BUnzaga' timestamp='1349045823' post='4985525']
I would have to agree with glhf about networking. Even a high score system is daunting to the beginner programmer. On the other hand, I am a perfectionist, and unfortunately there is no 'perfect' UI, which is probably why I have such a hard time with them myself.

What gets me are what I call 'What If' situations... what if the user presses down the mouse button, then drags onto my UI button? What if they push down, then drag off? What if they push the UI button, drag off, then drag back on, and let go? Should I have an on-hover effect? Should it glow? What color? Should there be a 'down' effect, for when the user presses down, but has not released yet? Should the event happen on mouse DOWN or on mouse UP?

These are the things that keep me up at night!!!! [img]http://public.gamedev.net//public/style_emoticons/default/biggrin.png[/img]

So yeah... networking and multi-player games are a real pain in the ass, but UI elements are a close contender.
[/quote]

lol we are the same!
i am also perfectionist and think samethings.

i even write down all those things you mentioned in my GDD LOL.

Share this post


Link to post
Share on other sites
Fancy pants solved this a bit by having the starting GUI be the actual engine, and having your character access doors did functions like: new game, load, high scores and similar.

Share this post


Link to post
Share on other sites
First and foremost, you can probably call me a [i]computer philosopher[/i].

I don't have much hands on experience with game programming like a lot of people here do, but I do study and practice computer science, hardware, and operating systems design, low-level programming, and the bridging between software and hardware through different platforms, kernels, and device infrastructure.

I will have to disagree with pretty much everyone here.

Setting up a GUI/UI for a game is in no way harder than creating an entire functioning game itself.

The time it takes to implement the ideas, structuring, and functions of these certain UI aspects of a game can take longer than the process of color-coding your way through a basic, tested, and experienced set of game code and logic that would otherwise take longer without the addition of pre-planning algorithms.

However, the elements of a game and its entirety are, at least to me, way more difficult, strategical, logical, and definitely much more overwhelming than a glossy, attractive interface would do on its own.

That is not to say that a UI is not important to a game at all, but I really doubt it's the [i]hard[/i] part of the whole scenario when adding so many other elements to the process that are severely time-consuming.

Then again, easily, it's very arguable that any of us (anyone reading this post, or the OP) can challenge or debate on what defines a game's "user-interface" or "graphical user-interface" in the first place. Edited by Pointer2APointer

Share this post


Link to post
Share on other sites
I have to +1 on networking. What also goes with networking is saving/loading games if you have a lot of state. It's the same problem all again: serializing your structs into binary blobs, and hoping they come back out the same way. Networking is all this, plus trying to keep multiple parties synchronized on the state of affairs.

And there's GUIs. Trying to us a library for it, such as Qt, with something like OpenGL ends up being pure crud. Qt creates a Window, and you get a GLWidget, which is just a rectangle you can draw into. You can't put Qt buttons on top of the GLWidget window (because the graphics card will obliterate anything drawn there in software), so you have two choices: You can draw menus and stuff with plain Qt (no GL), and when the game plays, fill the window with the GL Widget. Or, in the case of a level editor type thing, you have all the menus and buttons at the top/bottom/sides of the window, and the scene is drawn into the GL Widget. (not too bad if you want a OpenGL app with lots of controls, buttons, etc, but no good for a game). There is a third option for Qt, where Qt will let you draw a widget (which can be a frame of other widgets) onto a QImage which updates an OpenGL texture, and then redirects keyboard/mouse events to the OpenGL widget to the GL Widgets "inside" the openGL widget, but using it was even more awkward than this sentence trying to explain it.

When I just want a simple menu GUI, where you have a mouse pointer with clickable regions, and a mouseover or keyboard arrow highlights a selection, I just do it myself. A simple mouse/keyboard menu is very little code to get right.

Share this post


Link to post
Share on other sites
you must try to divive your game logic with your GUI code.
and you can use the signal/slot or event mode whith the notifycation between the game logc and GUI.
more techniquly. you can use scripte language such as lua, python to relate your game logic and GUI.
just follow one rude.
when you adjust your GUI. your wouldn't modify your game logic code.

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