Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Interface Question

Author
Message
Jna99
19
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 29th Jul 2007 02:42
Hi folks, in the development of my game I need to build some kind of visual interface, so I would like to know what kind of techniques I have at my dispose besides having to paste images on the screen, and create functions to respond to the mouse position+click...

CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 29th Jul 2007 02:44
use winforms

My DBP plugins page is now hosted [href]here[/href]
Jna99
19
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 29th Jul 2007 22:45 Edited at: 30th Jul 2007 22:48
what about a flash interface?

Jna99
19
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 30th Jul 2007 22:48
anyone?

lwatson
17
Years of Service
User Offline
Joined: 17th Nov 2006
Location: Lincoln, RI USA
Posted: 31st Jul 2007 15:25
I would agree with CattleRustler

IMO Flash is bad Flash is evil...
I personally have had a great deal of UI development using plain old winforms. While you seem averse to the drudgery of reading a mouse position over a picture to determine user interaction I can tell you that the work in practice is minimal and in many case performance is more than good enough.

With DarkGDK.Net I can have my 3d canvas sitting in a picturebox along with my grids of data, and treelists of data, and textboxes of data and what not. IMO a real winner...

Lonnie Allen Watson
rmag.blogspot.com (blog)
Jna99
19
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 31st Jul 2007 21:46 Edited at: 31st Jul 2007 21:46
lwatson If I wanted to build an interface like this would you still recommend winforms? (the lower interface)

lwatson
17
Years of Service
User Offline
Joined: 17th Nov 2006
Location: Lincoln, RI USA
Posted: 3rd Aug 2007 15:17
Well

I can see how you might do that with a winforms project now.
The background canvas object would be were the DarkGDK would be rendering its magic.

The foreground panel with a loaded bitmap and transparency to create the uneven graphics edge lays on top. Into this panel you render you buttons, and status items and what not..

Its not 3 lines of code mind you but I don't know of any thing where that would be 3 lines of code...

Of course if you have all your buttons and other screen elements present and don't have to draw them each time then you will have an easier time but thats also alot of work with a paint program something that I am not very good at. But good work with graphics design software would be needed no matter what techniques and toolkits you want to employ. (Winforms, Flash, Silverlight, whatever)

Lonnie Allen Watson
rmag.blogspot.com (blog)
Niels Henriksen
20
Years of Service
User Offline
Joined: 27th Sep 2004
Location: Behind you breathing heavely
Posted: 4th Aug 2007 11:36
For my UI im using sprites.

Niels Henriksen
Working on a (MMO)RPG right now in DarkEngine
http://www.tigernet.dk - Send SMS to mobile online (will come in english soon)
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 4th Aug 2007 16:10
I didnt realize you meant an in-game interface or HUD...
I thought you meant like start screen or pause menu's, etc

My DBP plugins page is now hosted [href]here[/href]
Jna99
19
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 4th Aug 2007 22:08
what kind of technique is used to make this kind of interface...

Attachments

Login to view attachments
Gervais
20
Years of Service
User Offline
Joined: 11th Mar 2004
Location: Canada
Posted: 4th Aug 2007 23:08
You use sprite for the 2D interface that will always stay on top of the 3D graphic and you can play with the Alpha of the sprite to make it translucent or opaque a will.

This is a lot of work I can tell you but when it is working correctly it give lot of flexibility to your interface.
Jna99
19
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 4th Aug 2007 23:57
Gervais but would all the UI based on sprites?

Gervais
20
Years of Service
User Offline
Joined: 11th Mar 2004
Location: Canada
Posted: 5th Aug 2007 00:16
Basically everything that you would put in a window text grid input field should go to an image that will by use on a sprite because sprite don’t use to much of the resource to be maintain on the screen and you would be free to concentrate all your effort on the 3D side of your application

The draw back is that each time you change something in one of the window you need to recreate the image of the sprite in question. Each time that this does append it eat lots of resource but there is way to minimize the impact. It all depend on how you code it
Jna99
19
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 28th Aug 2007 12:06 Edited at: 28th Aug 2007 12:08
Hi again I've got a question regarding interface, since I wanna use things like radio buttons, combo box, I believe I have to have MFC classes, with event handlers...my question is I normally see games with stuff like radio buttons etc.. do they use MFC too or are these buttons made from scratch?

lwatson
17
Years of Service
User Offline
Joined: 17th Nov 2006
Location: Lincoln, RI USA
Posted: 28th Aug 2007 14:20
I my albeit limited gamed dev experience I have seen it done both ways. In apps that basically live within a window on the standard desktop (Like a lot of the web delivered diddys) I have seen the OS used for control and UI elements. In apps that basically take over (Like pretty much everything else) these on-screen UI elements usually are done by hand.

For things like buttons this is not that difficult. Reading mouse coordinates and separating the screen into regions is pretty basic.

For things like Lists with scroll, and trees, and other more complex items I can see it being a painful experience.

There are some support DLLS for GDK that might be able to help in this case though. One other thing to consider though is the fact that the overall OS look and feel might not mesh with that of your application. In this case you might have no choice but to render you own control interface to preserve that look and feel you are aiming at.

Lonnie Allen Watson
rmag.blogspot.com (blog)
Jna99
19
Years of Service
User Offline
Joined: 3rd Nov 2005
Location: Portugal
Posted: 28th Aug 2007 16:09 Edited at: 28th Aug 2007 16:22
lwatson by the way when you used MFC classes you had to OverrideHWD so that you could create events etc, my question if I want a full screen or window aplication how can you alternade between the two, if the engine is showed e.g on a picture box?


EDIT: Which MFC or GDK Objects would you advice me in the creation of a 3d rotation menu?

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 11th Sep 2007 04:58
Butting in - I'd go GDK for this one. I think the Fancy mod'ing of an image - mixed with Sprite display and using mouse coords should work fine. Sometimes - you need to code event style gui - usually - but MAYBE this isn't one of them.

If mouse click within [this box] then EndGame(); and stuff like that in your main loop or whatever might suffice. Depends HOW complex and versatile it needs to be. 9 buttons and a "radar" - code it quick - make it brief - need multiple menus scrolling in and out based on context - multiple huds... yeah - maybe go event/message driven - either way -
I'd still got the GDK gfx method for full screen gfx like that where you aren't making a 2/d and 3/d interface... like say a modeling program where standard win32 menu pulldowns PLUS gfx are needed.

Login to post a reply

Server time is: 2024-11-16 20:57:43
Your offset time is: 2024-11-16 20:57:43