|Pliant talk forum
Discussion: Pliant + SDL & Pligame
|Message posted by marcus on 2003/03/10 18:33:35
|Mujtaba Hasni, a student at Ryerson University, is currently doing his
undergrad thesis on the use of Pliant+SDL to develop a tool for developing
computer games, called Pligame.
More details at http://sourceforge.net/projects/pligame
|Message posted by hubert.tonneau on 2003/03/10 20:58:01
|Pliant graphic library and web browser is under construction, so it will
be the natural interface for many Pliant applications, but it's rather high
end bitmap and vector drawing oriented, with tight link to the HTML high level
page description model and it will take a fiew more years to get mature.
In other words, Pliant user interface will be an HTML/HTTP extension that enables
Anyway, for multimedia applications, it's clearly not, and will not be a decent
solution at any time.
For applications that require target plateform native user interface look and
feel, it's also clearly not and will not be a decent a solution at any time (*).
Here is a list of what I would call 'interesting' user interface libraries:
Could you elaborate on SDL selection.
Should we try to interface all libraries, or concentrate and recommand a small
(*) In the same are, we have Pliant built in database engine which is the
natural database engine for many Pliant application, but would absolutely not
fit for some applications that require complex queries on large databases, what
modern SQL database engine like MySQL do marvelously.
In other words, Pliant built in libraries focus on consistency and reliability,
which imply self content most of the time, so there is a high need to
interface more beeding edge technologies, but we have to carrefully select
these so that the extra quality of the product truely outperform the interface
high penality (**).
(**) Interfacing always mean high penality because of subtil design desagreements,
so it should be planed, just as development is planed.
|Message posted by hubert.tonneau on 2003/03/10 21:03:50
|"but for some reason I can't figure why Pliant doesn't open win32 DLLs properly"
You need DLLs that use WINAPI calling convention as opposed to native compiler
calling convention for all the functions exported by the DLL.
This is what many DLLs comming from Unix word fail to do (good samples are Zlib
and libjpeg that I had to recompile myself because none was properly packaged nor
|Message posted by mujtaba on 2003/03/11 16:16:39
SDL is designed really for games, and similar applications. Unlike WxWindows and
QT which are GUI application frameworks, SDL is more like Direct X. It provides
fast (and often direct) access to the video card, sound card, CD-ROM, Joysticks
ect. SDL provides facilities for blitting graphics, mixing sound, clock timing
and handling user events and input devices. SDL is popular for applications
like games, emulators, video players and "Demos."
Alot of high level languages (such as Python) offer bindings to toolkits like
Tk, Qt wxWindows, etc. And it works well for them, because they only need to
"glue"* pieces of the toolkit together to make a GUI app. The language code does
only the bare essential processing, and does so intermittently. In a video game
(particularily arcade style), the programmer has to write code that executes
almost all the time, and it has to execute fast.
Pygame offers bindings to SDL for Python. Its designed for creating simple
games.Its language is easy to use, but it cannot execute very fast due to its
use of an interpreter. It would be sufficient for puzzle games, but fast action
arcade games would be a problem. I'm betting that Pliant can offer what Pygame
does, but with better performance.
And indeed, Pliant does perform better. On my machine, the roto.pli demo
performs bitmap scaling and rotation smoothly at 640x480. The perfomance is
almost indistingushable from the C version** I based it on . Pygame** on the
other hand couldn't even muster 1 fps at that resolution. The pliant code
is also only 92 lines long! So I really think I'm onto something here.
So to close, Pligame is for creating high-performance video games and multimedia
applications in Pliant. Not for making GUI interfaces or desktop applications.
BTW, for making GUIs, perhaps C++ toolkits may not be a good idea. Its because
some of them assume you can create subclasses, but Pliant does not support
inheritence out of the box. Perhaps a C cross platform toolkit like Tk or
GTK+ (though it wouldn't look native) would be better?
*Like laying out and packing widgets, connecting events, etc.
**rotozoom.c from http://demo-effects.sourceforge.net
***http://pygame.org/pcr/rotozoom/index.php (it cheats by rendering 1/8 the
size and scaling it to 320x200. The results look artifacted.)
|Message posted by hubert.tonneau on 2003/03/11 17:47:17
|Ok, so if I understand well, there is an extra bonus with Pliant SDL interface
which is that it can bring examples that demonstrate it's capability to be
efficient and high level all at once.
Given the fact that Pliant is completely ignored by the media, this seems
enough to me to justify the interface.
|Message posted by mujtaba on 2003/03/12 14:45:22
|Yes, that's exactly the point. Thanks.
|Message posted by mujtaba on 2003/03/14 17:33:46
|I've put up some images (mockups) of the demo game I'm currently working on.
Its to give myself an idea of what the result should look like. The demo is
really just a platform for testing features for Pliant+SDL as I make them. My
goal is not to make a fun game, but rather an example of what a game written
in Pliant could look like. BTW, the demo like my other demos will not be hardware