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.

DarkBASIC Professional Discussion / How to create GUI in-game, even 3D GUI?

Author
Message
ale870
19
Years of Service
User Offline
Joined: 17th Jan 2007
Location:
Posted: 14th Jan 2013 15:08
Hello,

I was looking for a decent (even basic) GUI system, not using Windows controls, but with in-game graphics. Even better using 3d style.
I red about BBB, but it seems it uses windows components. Is it true?

Any alternative?

Thank you for your help!

--Alessandro
SamKM
17
Years of Service
User Offline
Joined: 25th May 2009
Location:
Posted: 14th Jan 2013 18:43
Hey
Pretty sure I know what you're asking here. The way I'd create an ingame gui would be using sprites. There are probably other ways of doing it, but that way is pretty fast and effective. So you could create sprites for all the buttons and things you can click on ingame, and also create a sprite to replace the mouse pointer. Then you can test to see if a button is being clicked on using SPRITE COLLISION and MOUSECLICK
Not sure what you mean about the 3d bit though, so can't help you there, sorry :/
Good luck
ale870
19
Years of Service
User Offline
Joined: 17th Jan 2007
Location:
Posted: 14th Jan 2013 19:00
You understood perfectly what I say!
So there are no tools to make the process faster than making everything by hand and by code? (no gui, no ide, etc...)?

--Alessandro
SamKM
17
Years of Service
User Offline
Joined: 25th May 2009
Location:
Posted: 14th Jan 2013 19:09
Oh good
I wondered if we might not be talking about different things!
Well... I don't think there's any way to do things faster in terms of coding, sorry!
But in terms of artwork and graphics to use as GUI sprites, you should find quite a few sites on the web that'll give you free art for that stuff
Also, if you're prepared to pay a little, TGC offer this tool, which looks great!
http://www.thegamecreators.com/?m=view_product&id=2317
It looks like it can generate graphics for you, and let you lay them out and arrange them to see what they'll look like
Sasuke
20
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 14th Jan 2013 19:14
3d meaning a UI that has depth or can be rotated, which pretty much every game uses these days. ScaleForm is what they use and it's flash based, so you can count DBP out of this. But we can replicate the effect.

Basically it's just a plain with a texture of a UI element on it, like a button. More complex ones use render targets for animations. But simply it's a bunch plains. The tricky part of 3D UI's or Surface UI is collision, if a plain makes up the whole UI element then it's simply a collision check with it. But if a complex UI is on a single quad then you have to do UV based collision, so converting the collision point to UV corrds to find where the cursor point will be. But best to start simple.
ale870
19
Years of Service
User Offline
Joined: 17th Jan 2007
Location:
Posted: 14th Jan 2013 19:19
Ok, thank you, good hints!
I think my next job will be a gui generator (maybe even in 3d

I could open a "task" in Kickstarter.... maybe

--Alessandro
Sasuke
20
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 14th Jan 2013 19:23
First start small. Code a simple button. We're here to help so go for!
ale870
19
Years of Service
User Offline
Joined: 17th Jan 2007
Location:
Posted: 14th Jan 2013 19:27
@Sasuke I know what you say, but please consider I'm new in DBPro but I make programs since from 25 years ago , so I can even start to fly high...

--Alessandro
Sasuke
20
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 14th Jan 2013 19:30
Quote: "so I can even start to fly high..."


Haha

I keep looking at peoples Join date thinking they've been here for years but I keep forgetting there's more here than just DBPro
ale870
19
Years of Service
User Offline
Joined: 17th Jan 2007
Location:
Posted: 14th Jan 2013 19:34
I joined (and bought) dbpro several years ago, but I abandoned it for a long time, and in the meantime I learnt unity, 3d game studio, jme3, shiva 3d engine (stonetrip), leadwerks engine (using lua and blitzmax), etc...
I made several nice things using unity 3d, but the pro version is TOOOO expensive, so...

(this is my site: http://www.massivecreek.com/home).

--Alessandro
Chris Tate
DBPro Master
17
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 14th Jan 2013 22:40
TopGUI is engine driven. YOu have to compile 7k lines though.

I did a 3D user control for my game a few months ago. What I did is build my shapes out of numerous planes; each representing a component of the user control which can easily detect mouse clicks. It was easier than expected.

ale870
19
Years of Service
User Offline
Joined: 17th Jan 2007
Location:
Posted: 14th Jan 2013 22:49
Understood, I used a similar process to make a 3d interface in unity: I made some cubes, and applied 3d text ) to simulate the controls. The final effect was cute

--Alessandro
Mage
Valued Member
19
Years of Service
User Offline
Joined: 3rd Feb 2007
Location:
Posted: 14th Jan 2013 22:55
I started using DB back in 2002 and didn't create an account until 2007.

Sasuke
20
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 15th Jan 2013 00:43 Edited at: 15th Jan 2013 00:43
I created a GUIS or GUI Surfaces class which works exactly the way it does in Doom 3 and various other games. I uses a render target to display various animations built via image layers that are animated (like flash) then the final image is what is render to the quad.

Pic below is a copy of Valve's ingame GUI I made a while back but converted to 3d:

Login to post a reply

Server time is: 2026-07-07 09:05:01
Your offset time is: 2026-07-07 09:05:01