Pages: 1
  Print  
Author Topic: We need a standard graphical API  (Read 12165 times)
Offline (Unknown gender) Game_boy
Posted on: May 10, 2008, 09:16:48 am
Member
Joined: Apr 2008
Posts: 228

View Profile
ENIGMA is cross-platform, and fast.

For these reasons, big game and application projects can be feasibly created with ENIGMA, unlike Game Maker. To produce any professional application and some types of game, graphical widgets such as scrollbars, menubars, buttons and text boxes are needed.

Often in Game Maker, WinAPI bindings were used. This was a bad idea because:

- WinAPI functions were not consistent with other GML functions, leading to poor and unintuitive binding conventions
- Breakage due to it being a one-person project with little testing
- WinAPI is ugly and looks bad next to well-designed games/applications
- WinAPI has ugly code since it has to maintain backwards compatibility with obsolete applications from Windows 3.x (from 1990!)
- WinAPI sucks in general next to modern toolkits like Cocoa, GTK and Qt

As ENIGMA is cross-platform, WinAPI bindings are unsuitable anyway. With a new era of fast, cross-platform ENIGMA games and applications in mind, we need a standard graphical API that is:

- Fast (that means C++)
- Pretty but functional
- Cross-platform, i.e. consistent on all platforms
- Is easy to use for someone used to GML
- Is easy to use for someone used to C++
- Integrates well with the existing ENIGMA code
- Is standard, i.e. will be used by many people to provide consistency: parallel, redundant development is inefficient
- Is free software, preferably of the same license as ENIGMA

The best way to fulfil most of these criteria is to have a community-developed standard graphical API to be distributed either in ENIGMA or alongside it on the website. I am unable to help because I cannot code in C++, but I am willing to suggest ideas, test, or contribute in some other way if possible.

Most of all, it will give ENIGMA something unique that is a real asset that GM doesn't have and emphasises ENIGMA's advantages over GM.
Logged
Offline (Male) Rusky
Reply #1 Posted on: May 10, 2008, 10:26:38 am

Resident Troll
Joined: Feb 2008
Posts: 954
MSN Messenger - rpjohnst@gmail.com
View Profile WWW Email
just write a gtk extension or something.
Logged
Offline (Unknown gender) Game_boy
Reply #2 Posted on: May 10, 2008, 11:37:29 am
Member
Joined: Apr 2008
Posts: 228

View Profile
just write a gtk extension or something.

...

That would require distribution of a ton of unnecessary libraries with sub-1MB programs on non-GNOME OSs. An in-house one would only be a few widgets and still make ENIGMA a thousand times better than GM.
Logged
Offline (Male) sprintf()
Reply #3 Posted on: May 10, 2008, 03:32:07 pm

"Past Contributor"
Location: S. Wales
Joined: Apr 2008
Posts: 72
MSN Messenger - dmgoron@gmail.com
View Profile Email
http://www.gtk.org/download-windows.html
Here's some more information about distributing GTK+ with applications. I've used GTK+ before, and it really does help a lot. In the day and age where people actually HAVE to download things like .NET to use MS applications, GTK+ really isn't a big stretch. GTK is actually easier to obtain and install than .NET. Another bonus is gtkglext, a package that lets you embed OpenGL contexts and drawable surfaces within GTK widgets. Very useful for the room editor, for example, but something as simple as that may be doable with GTK's regular stuff.

I would advocate GTK, but I haven't sampled other windowing toolkits. I've heard bad about wxWidgets but good about QT.
« Last Edit: May 10, 2008, 03:34:30 pm by bigmoron » Logged
Offline (Male) Josh @ Dreamland
Reply #4 Posted on: May 11, 2008, 11:44:26 am

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2950

View Profile Email
The thing about using GM's function names is that when you go to compile on a different platform, I can just include different definitions for the same functions. So no matter how different something may be, if I can make it achieve an effect at a certain function call, well, we're in good shape for any kind of cross platforming.

However, a good thing about being a compiled language is that if you want to, you can include libraries for GTK and for other kinds of APIs. I need to use winapi to be able to achieve the things GM can. So dumping that is completely out of the question. However, when you go to compile for mac, I will include a different library with different calls, all made under the same function names.

This could probably be done for other things outside of Game Maker if all the platforms have a function in common. We'll see.

But I don't want to include a bunch of different things to bloat the exe like a certain entity of competition has done.

Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Offline (Male) sprintf()
Reply #5 Posted on: May 11, 2008, 09:56:32 pm

"Past Contributor"
Location: S. Wales
Joined: Apr 2008
Posts: 72
MSN Messenger - dmgoron@gmail.com
View Profile Email
Also GTK has syntax highlighting options in its text widget.
Logged
Offline (Male) sprintf()
Reply #6 Posted on: May 12, 2008, 09:19:18 am

"Past Contributor"
Location: S. Wales
Joined: Apr 2008
Posts: 72
MSN Messenger - dmgoron@gmail.com
View Profile Email
Oooooh, you meant for in the games? GTK is overkill. Use GLUI. The API is shit but it's still useful.
Logged
Offline (Unknown gender) uuf6429
Reply #7 Posted on: June 04, 2008, 05:57:35 pm
Member
Joined: Jun 2008
Posts: 5

View Profile
You know, on the GMC there are those GUI packages for winAPI-like controls, for example GearGod's.
This being compiled should support something similar.
An idea is, a source code generator (yea I'm obsessed with those) which generates the needed GUI elements. Whatever it is, if it is well programmed then it's feasable.
But I say leaving toolkits out of this (QT GNUT GTK...)
Logged
Offline (Male) sprintf()
Reply #8 Posted on: June 04, 2008, 06:17:10 pm

"Past Contributor"
Location: S. Wales
Joined: Apr 2008
Posts: 72
MSN Messenger - dmgoron@gmail.com
View Profile Email
I don't think a GUI is a priority or even necessary.
Logged
Offline (Unknown gender) uuf6429
Reply #9 Posted on: June 05, 2008, 12:35:06 am
Member
Joined: Jun 2008
Posts: 5

View Profile
At the moment I would agree with that.
The idea is extending ENIGMA after it is working.
Logged
Pages: 1
  Print