Pages: 1
Author Topic: We need a standard graphical API  (93,932 Views)
Offline (Unknown gender) Game_boy

Member
Joined: Apr 2008
Posts: 228
View profile
Posted on: May 10, 2008, 02:16:48 PM
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.
Offline (Unknown gender) Rusky

Resident Troll
Joined: Feb 2008
Posts: 954
View profile WWW
Reply #1 Posted on: May 10, 2008, 03:26:38 PM
just write a gtk extension or something.
Offline (Unknown gender) Game_boy

Member
Joined: Apr 2008
Posts: 228
View profile
Reply #2 Posted on: May 10, 2008, 04:37:29 PM
Quote from: Rusky on May 10, 2008, 03:26:38 PM
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.
Offline (Unknown gender) sprintf()

Past Contributor
Joined: Apr 2008
Posts: 72
View profile
Reply #3 Posted on: May 10, 2008, 08:32:07 PM
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.
Offline (Unknown gender) Josh @ Dreamland

Prince of all Goldfish
Developer
Joined: Feb 2008
Posts: 2,950
View profile
Reply #4 Posted on: May 11, 2008, 04:44:26 PM
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.

Offline (Unknown gender) sprintf()

Past Contributor
Joined: Apr 2008
Posts: 72
View profile
Reply #5 Posted on: May 12, 2008, 02:56:32 AM
Also GTK has syntax highlighting options in its text widget.
Offline (Unknown gender) sprintf()

Past Contributor
Joined: Apr 2008
Posts: 72
View profile
Reply #6 Posted on: May 12, 2008, 02:19:18 PM
Oooooh, you meant for in the games? GTK is overkill. Use GLUI. The API is shit but it's still useful.
Offline (Unknown gender) uuf6429

Member
Joined: Jun 2008
Posts: 5
View profile
Reply #7 Posted on: June 04, 2008, 10:57:35 PM
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...)
Offline (Unknown gender) sprintf()

Past Contributor
Joined: Apr 2008
Posts: 72
View profile
Reply #8 Posted on: June 04, 2008, 11:17:10 PM
I don't think a GUI is a priority or even necessary.
Offline (Unknown gender) uuf6429

Member
Joined: Jun 2008
Posts: 5
View profile
Reply #9 Posted on: June 05, 2008, 05:35:06 AM
At the moment I would agree with that.
The idea is extending ENIGMA after it is working.
Pages: 1