Allegro.cc - Online Community

Allegro.cc Forums » Allegro Development » Allegro new style???

This thread is locked; no one can reply to it. rss feed Print
Allegro new style???
Ariesnl
Member #2,902
November 2002
avatar

would that be good?

- based on C++ (classes)
- hardware support

- full blown 3D engine

- etc

just an idea...

Perhaps one day we will find that the human factor is more complicated than space and time (Jean luc Picard)
Current project: [Star Trek Project ] Join if you want ;-)

spellcaster
Member #1,493
September 2001
avatar

You might want to look into OGRE.
It seems to be what you're looking for.

(Small note: this is to discuss "allegro.cc" the site, not "allegro" the library. You might have wnated to post in the "Allegro Development" forum).

--
There are no stupid questions, but there are a lot of inquisitive idiots.

CGamesPlay
Member #2,559
July 2002
avatar

Quote:

would that be good?

No. If only for the reason that it is nice to be able to get a simple presentation going in Allegro in 20 minutes or less.

--
Tomasu: Every time you read this: hugging!

Ryan Patterson - <http://cgamesplay.com/>

Krzysztof Kluczek
Member #4,191
January 2004
avatar

Quote:

Allegro new style??

The only thing I'd really like to see in Allegro is:

IDirect3D9 *al_Direct3DCreate9(UINT SDKVersion);
;D

A J
Member #3,025
December 2002
avatar

KK, seems like you already know what you want, coding it should be a problem.

___________________________
The more you talk, the more AJ is right. - ML

Richard Phipps
Member #1,632
November 2001
avatar

Quote:

coding it should be a problem.

So true!

Thomas Harte
Member #33
April 2000
avatar

Quote:

So true!

Don't jump too hastily - this could be one of those Americanisms. Like saying "I could care less" instead of "I couldn't care less".

amarillion
Member #940
January 2001
avatar

Ariesnl: Are you asking permission for making a new style allegro library? You don't need permission for that, just go right ahead. No problem.

Evert
Member #794
November 2000
avatar

Before reinventing the wheel yet again, you may want to look at howfar Korval got. And if you want, we can also use a hand for Allegro itself (though I think everyone is too busy at the moment with other things to do much in the way of explaining what needs to be done and how).

Elias
Member #358
May 2000

I think Korval wasn't going to include a full 3d engine though.

--
"Either help out or stop whining" - Evert

Ariesnl
Member #2,902
November 2002
avatar

Hum I made a sprite/unit engine for my startrek game.. maybe I could make it a common sprite handeling engine with depth sort It onl;y needs better collision detection .. and maybe change it to using fixed point math..

would that be nice in allegro ?

usable like this:

1 
2TEngine * engine = new TEngine;
3 
4TSprite * player = new TSprite;
5/*
6offcourse you can derive your own units and put them in the engine too
7the position of a sprite is NOT top -left but the middle of the sprite
8makes steering and going somewhere easier to code
9*/
10player->position(500,500);
11engine->add(player);
12/*
13the "eye" of the engine it is where the middle of the screen is looking to
14*/
15engine->position(500,500);
16 
17 
18 
19while (!key[KEY_ESC])
20{
21engine->do_ai(); //calls the virtual do_AI of every sprite/unit
22engine->move(); // moves everything according to speed and angle
23engine->kill(); // kills all sprites with their destroyed flag up
24engine->draw(); // draws everything in Z order
25}

Perhaps one day we will find that the human factor is more complicated than space and time (Jean luc Picard)
Current project: [Star Trek Project ] Join if you want ;-)

GullRaDriel
Member #3,861
September 2003
avatar

isn't allegro in full c ?

"Code is like shit - it only smells if it is not yours"
Allegro Wiki, full of examples and articles !!

Ariesnl
Member #2,902
November 2002
avatar

owww ok but most compilers ( the one's I know) mix C and C++ whthout any trouble)

Perhaps one day we will find that the human factor is more complicated than space and time (Jean luc Picard)
Current project: [Star Trek Project ] Join if you want ;-)

ImLeftFooted
Member #3,935
October 2003
avatar

I think someting I'd really like to see in allegro is more GPU usage.

Evert
Member #794
November 2000
avatar

Quote:

would that be nice in allegro ?

I think it's too highlevel. You could make it an addon, though.

Quote:

I think someting I'd really like to see in allegro is more GPU usage.

Yes, we know.

Ariesnl
Member #2,902
November 2002
avatar

Quote:

Yes, we know.

hum allegro has support for DirectX hardware .. hum how about OpenGL hardware ? on some com's OpenGL HW is faster

Perhaps one day we will find that the human factor is more complicated than space and time (Jean luc Picard)
Current project: [Star Trek Project ] Join if you want ;-)

GullRaDriel
Member #3,861
September 2003
avatar

try allegro gl.
google is your friend to foundit.
Or try openlayer, follwing my second advisement.

"Code is like shit - it only smells if it is not yours"
Allegro Wiki, full of examples and articles !!

HoHo
Member #4,534
April 2004
avatar

Quote:

hum allegro has support for DirectX hardware ..

I think it was directDraw, not Direct3D. There is quite a big difference.

__________
In theory, there is no difference between theory and practice. But, in practice, there is - Jan L.A. van de Snepscheut
MMORPG's...Many Men Online Role Playing Girls - Radagar
"Is Java REALLY slower? Does STL really bloat your exes? Find out with your friendly host, HoHo, and his benchmarking machine!" - Jakub Wasilewski

Thomas Harte
Member #33
April 2000
avatar

Quote:

I think someting I'd really like to see in allegro is more GPU usage.

I'd like to see some.

I'd also like to see the abandonment of the pure-C blitters for OS X. Firstly because the PowerPC variant of the OS provides a highly optimised version that Allegro seems to just ignore and secondly because now that SDL has Altivec blitters for situations that the OS can't inherently handle it really does leave Allegro in its dust trail.

Alternatively I'd like to see some sort of documentation on how the Allegro internals, because no matter what the developers who work on Allegro all the time say, figuring out what is going on where is not straightforward.

Evert
Member #794
November 2000
avatar

Quote:

I'd also like to see the abandonment of the pure-C blitters for OS X. Firstly because the PowerPC variant of the OS provides a highly optimised version that Allegro seems to just ignore

We're not `ignoring' it, we know it's there. But someone has to write the driver for that. Someone with OS X, that is. Of active developers, I think that implies Pete Hull.

Quote:

Alternatively I'd like to see some sort of documentation on how the Allegro internals, because no matter what the developers who work on Allegro all the time say, figuring out what is going on where is not straightforward.

Who ever said it was easy? I tried to integrate AllegroGL as an OpenGL driver on my sandbox copy of the new API branch a few weeks ago to get an idea for how the OpenGL driver would work and how some of Allegro's internals would have to be modified. I couldn't figure out how to integrate it `properly' (as a new driver), but I admittedly stopped trying after a short while (I had other things to do). If I take a day or two to look things over and sit down for it, I should be able to do it without too much problems.

The most confusing part, at first, as that most Allegro functions are really wrappers around calls to vtable functions. Once you know if a function is implemented in a vtable you can probably find it easily enough by opening the associated driver file (there's some logic to the naming of these, fortunately).

Allegro's internals are very poorly documented and that will need to be remedied in the new api, but right now there's not much we can do about it.

Thomas Harte
Member #33
April 2000
avatar

Every said:

Who ever said it was easy?

Several people on several occasions. For example, on the 19th April 2005 I started a thread entitled No hardware scaling?. My first post contained this text:

Thomas Harte said:

gfx_capabilities seems not to have a flag for hardware sprite scaling, yet I am aware that it is supported almost across the board by libraries such as DirectDraw. Am I to understand that Allegro never uses the hardware for this purpose?

The very first reply was by you and contained this:

Evert said:

There are however methods in the BITMAP vtable for all those operations, so it should be trivial to fill them in for someone with some basic DX knowledge.

Now, as far as I'm concerned, something being "trivial" means that it is more than easy. Of course I note that the only requirement to find the task of going into Allegro, locating the correct vtable (hence understanding the driver structure) and adding a new function (hence understanding the general source layout as to where stuff should go) is that they have "some basic DX knowledge". You notably do not suggest that it would only be trivial to someone who knew Allegro's source or that it should be trivial if documentation existed.

This is just one example.

Evert
Member #794
November 2000
avatar

Ok, let me rephrase that and put it into context.
That Allegro doesn't do blitting operations in hardware is in itself easy to fix in that it doesn't require (in principle) a massive rewrite or change of internal code (though that will be needed to make things a bit cleaner than they are now), it requires an extension of the driver. The operation of adding hardware acceleration to Allegro is trivial in the sense that it's a matter of filling in the missing vtable entries. It's a matter of someone supplying the function and someone plugging it into the vtable.

The hard part is figuring out how an existing driver works, where it is and writing a new driver from scratch. This isn't always obvious, but you don't always need to know either.

Quote:

You notably do not suggest that it would only be trivial to someone who knew Allegro's source

Well, that was meant to be implicit. Obviously, it's not easy to change something in sourcecode you have never seen before.

Anyway, hypothetical situation, if I told you the function prototype that a hardware accelerated blit function (say) should have, could you write it assuming you knew how to acces data from a source bitmap? When it comes down to it, that's all that is required for adding a vtable function.

Thomas Harte
Member #33
April 2000
avatar

Quote:

Ok, let me rephrase that and put it into context.

I was going to follow your lead and turn this into a thread quoting as many past examples of developers stating or implying that the Allegro sources are straightforward or easy to get into but then I discovered a thread that made me discover Tomasu's wiki concerning the internals of Allegro, which seems to be incomplete but immensely useful for those of us trying to decipher the thing without any clue whatsoever where to look. Is it likely that if that resource were used as a tool for someone trying to crack the Allegro code and any things not explained or left ambiguous in it were directly asked here that they'd be answered sufficiently that the answers could be put back into the wiki?

Evert
Member #794
November 2000
avatar

Quote:

I was going to follow your lead and turn this into a thread quoting as many past examples of developers stating or implying that the Allegro sources are straightforward or easy to get into

Well, they're not. Some tasks are easy in principle, like the example above, but not for someone unfamiliar with the code.
It also makes quite a difference what piece of code you're working on. The xwin driver is a nightmare, as is the mouse handler. The Windows code I can barely make heads or tails of. The datafile and font code is reasonably straightforward, as are most drawing primitives from what I remember. The GUI isn't too bad.

Quote:

Is it likely that if that resource were used as a tool for someone trying to crack the Allegro code and any things not explained or left ambiguous in it were directly asked here that they'd be answered sufficiently that the answers could be put back into the wiki?

Yes, that would be very useful. I intended to edit my post to point to the wiki, but somehow I only got gibberish when I tried to load the page.
It would be very useful if it were added to.

Ceagon Xylas
Member #5,495
February 2005
avatar

Quote:

- full blown 3D engine

NO!



Go to: