Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » Allegro needs your help!

This thread is locked; no one can reply to it. rss feed Print
Allegro needs your help!
Neil Roy
Member #2,229
April 2002
avatar

I may give the audio another go. When I first encountered this problem I was still fairly new to allegro 5. I have gotten my hands dirty now and accomplished quite a bit with it, so perhaps I could revisit this and see if I can understand what needs to be done. <shrug>

Matthew Leverton
Supreme Loser
January 1999
avatar

Really, the original api probably should have returned a sample instance

Then how is it any different from the instance api? The whole point is you don't have to manage a second set of data structures or set up mixers, etc.

Anyway, it's not like backward compatibility really matters between 5.0 and 5.2. If a substantionally better API is made, it could be included without hardly affecting anybody for the worse.

Fishcake
Member #8,704
June 2007
avatar

I want to help with maintaining Allegro for iOS/OSX or Windows, but I have zero idea how to do it though.

Thomas Fjellstrom
Member #476
June 2000
avatar

Well, you might want to find a specific thing to work on, then study the source to figure out how the part you want to change works. And of course ask questions here, and on the AD mailing list.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Chris Katko
Member #1,881
January 2002
avatar

How exactly do these mobile ports work? I thought IOS had to be written in Objective-C and Android required Java?

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs

Thomas Fjellstrom
Member #476
June 2000
avatar

ObjC is C/C++ compatible, and Android has the NDK which supports native C/C++ code. Android is harder as there has to be some java code at the top layer if you need to avoid the NativeActivity code (which allegro does want to avoid, its a polling interface, not event based).

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

SiegeLord
Member #7,827
October 2006
avatar

I personally don't mind just adding a few al_set_sample_id_gain/pan/speed functions to make the simple audio API more usable... what's an extra 5-6 functions between friends?

Alternatively/additionally, could easy add a ALLEGRO_SAMPLE_INSTANCE* al_play_sample_from_mixer(ALLEGRO_MIXER* mixer, ALLEGRO_SAMPLE* sample, gain, pan, speed, loop) to simplify Edgar's code a tiny bit.

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

OnlineCop
Member #7,919
October 2006
avatar

I've TL;DR'ed some of the comments here, but the gist I've gotten is that

1: It would be very useful to have a plethora of examples, and
2: In order to get a lot more control over some of the features (like sound), the code grows quickly from "dumb simple" to "a bit frustrating".

I started using Qt for work, and as soon as you launch the Qt Creator application, the first screen you encounter is a page FULL of run-out-of-the-box examples: You select it, hit compile, and you're instantly running little demo programs showcasing one specific aspect of the language.

I remember A4 having a hefty examples/ folder that I learned from. (I haven't touch A5, but I'd imagine that it, too, has something like this?) Would having even more example code be beneficial?

Most of my interest in game development centers around tile-based ones: Those take a bunch of brain power to wrap your head around: You have to understand how tilemaps work; you have to draw some layers over other layers; you have to include music; you have to have NPCs; you have to handle user input.

If A4 or A5 had one or two "example" demos like this (think along the lines of the AngryBots demo for Unity) where a new user can immediately see "how simple it is" to get something up and running, where you actually tie a bunch of those previous demos/examples together (hint hint), I think it would vastly help me to adopt it.

I made a VR game!

beoran
Member #12,636
March 2011

@Fishcake:

Thanks for trying to help out! It will be easiest to help work on allegro if you clone Allego's git repository, so you can make a patch easily with git diff or git format-patch. The Allegro Git repository is explained here:

http://alleg.sourceforge.net/git.html

First try to get allegro compiling for your platforms, try all the examples and look for things that you feel are not working well. If you find something like that report it and we can look into fixing it together. If someone else adds a feature to allegro, or makes a change, get it from git again and try it out for your platform(s). That's basically what maintenance is about. If all seems fine and no maintenance work seems needed, then try to think of a feature you'd like to add and propose that. Then we can look into implementing it. The road map may give you some ideas on what other people would like to add to Allegro:

https://wiki.allegro.cc/index.php?title=Allegro_roadmap

@SiegeLord

I agree a few extra functions to flesh out the "simple" audio API would be nice. I guess the documentation also needs to be enhanced. While the "complex" audio API isn't really that complex, it may be scary to beginning programmers and that's something we can improve on.

Chris Katko
Member #1,881
January 2002
avatar

and Android has the NDK which supports native C/C++ code.

But aren't you also giving up the whole point of JIT compiled code? Running across many architectures and taking advantage of a variety of CPUs? Then again, Android only runs ARM*... so why the hell is anyone bothering with JIT?

*There exists an unofficial x86 port of Android, but it can't run very much at all.

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs

beoran
Member #12,636
March 2011

@OnlineCop

Allegro 5 already has over 100 examples. Basically every Allegro 5 feature is covered by one or more examples. So I think that's plenty, the problem there is to get people to actually try and read them.

We could use a few more impressive demo games though. The current demos are OK but not really give much of a "wow!" effect. What could be also interesting would be, next to the kit idea, an Allegro 5 "blank slate" that already has the basics written, and which beginners can use to start their own game off.

I also guess the step up from the examples to the demo games might be too big. So perhaps, a set of "tutorial demos" that improve the same game step by step would be a nice idea?

Chris Katko
Member #1,881
January 2002
avatar

beoran said:

Allegro 5 already has over 100 examples. Basically every Allegro 5 feature is covered by one or more examples. So I think that's plenty, the problem there is to get people to actually try and read them.

Whether A4, or A5, I've almost never read examples except for a quick glance. I'd much prefer a few, well-written tutorials. And IIRC, those already exist.

If we're talking about "Allegro" as a brand, the biggest thing it actually needs is (relatively) high-profile games actually using it. For example, what was that one popular game with the jump/platforming lizard that emulated a gameboy screen?

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs

Arthur Kalliokoski
Second in Command
February 2005
avatar

beoran said:

Allegro 5 already has over 100 examples. Basically every Allegro 5 feature is covered by one or more examples. So I think that's plenty, the problem there is to get people to actually try and read them.

I'm trying to grok the shader stuff, and the four examples provided don't seem nearly enough to keep my brain from overheating trying to figure it all out from scratch.

“Throughout history, poverty is the normal condition of man. Advances which permit this norm to be exceeded — here and there, now and then — are the work of an extremely small minority, frequently despised, often condemned, and almost always opposed by all right-thinking people. Whenever this tiny minority is kept from creating, or (as sometimes happens) is driven out of a society, the people then slip back into abject poverty. This is known as "bad luck.”

― Robert A. Heinlein

bamccaig
Member #7,536
July 2006
avatar

But aren't you also giving up the whole point of JIT compiled code? Running across many architectures and taking advantage of a variety of CPUs? Then again, Android only runs ARM*... so why the hell is anyone bothering with JIT?

*There exists an unofficial x86 port of Android, but it can't run very much at all.

JIT compilation isn't just meant to be optimized for the machine hardware. You can do that already with static compilation using open source software (e.g., see the Gentoo project, which allows you to effectively recompile the entire OS for your specific hardware and software configuration).

I'd be lying if I said I understood how JIT can run faster than native code, but maybe start here.

In any case, I don't think too many of the Allegro developers are Java programmers (at least, not by choice). I don't think we have the personnel to propose a purely Java-based Android implementation (if that's even feasible).

SiegeLord
Member #7,827
October 2006
avatar

But aren't you also giving up the whole point of JIT compiled code?

What's the point if the user code is still in C/C++/compiled language? Making the user write Java would make the entire port pointless.

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

bamccaig
Member #7,536
July 2006
avatar

Thomas Fjellstrom
Member #476
June 2000
avatar

*There exists an unofficial x86 port of Android, but it can't run very much at all.

That hasn't been true for a while. Intel has ported to the newer Atoms. It's as official as the ARM port. I think there are also RISC ports :o

But yeah, you want the native code to get around the slow ass jvm. the newer one coming is supposed to be better because all apps are pre-jit'ed, where as dalvik is runtime jit-ed. It's still not going to be quite as speedy as native code.

But also, what they said. the idea is to make the porting as simple as possible.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

Gideon Weems
Member #3,925
October 2003

This thread has made me want to install Allegro GIT alongside the latest 5.1 release. Are there any caveats?

bamccaig
Member #7,536
July 2006
avatar

You will probably have a hard time maintaining both. You're probably better off just installing the latest Git. That way it forces you to use it, and if you have any problems you can report them and help improve Allegro.

You could manage an alternative copy, but you would have to take care installing it and use environment settings to keep things straight. It's easier to just maintain one.

Which OS? :-/

Gideon Weems
Member #3,925
October 2003

Eh, you persuaded me. I'll go Git-only. It'll be nice to finally be able to submit patches.

... Suddenly I find myself questioning the reason for the 5.odd branch's existence in the first place. Allegro may be spreading itself thin with 4.4, 5.even, 5.odd, and Git.

furinkan
Member #10,271
October 2008
avatar

Odd and even are purely names, although I'm all for implementing the 4.X API as some sort of addon and just dropping the actual 4.x branches. I mean, once that is done properly, there's no real need to continue to support 4.X.

Wasn't there an addon made by somebody?

Chris Katko
Member #1,881
January 2002
avatar

furinkan said:

I mean, once that is done properly, there's no real need to continue to support 4.X.

Maintenance releases. :P

When we all move to 48-bit color, for example, who knows what Allegro 4 is going to do.

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs

bamccaig
Member #7,536
July 2006
avatar

furinkan said:

Odd and even are purely names, although I'm all for implementing the 4.X API as some sort of addon and just dropping the actual 4.x branches. I mean, once that is done properly, there's no real need to continue to support 4.X.

Wasn't there an addon made by somebody?

Git isn't a branch. Git is the repository for the whole of Allegro 5, which has branches for 5.0 and 5.1 releases, which is where the actual release builds come from (at whatever arbitrary point where the developers feel there have been enough changes and they're stable enough to warrant a new official release). Working directly from Git is essentially using the code in development before it's really ready for release.

You'll probably want to fetch, fast-forward, and rebuild Allegro every day you use it to keep getting fixes and new features. Unless you yourself are working on changes in which case you're better off staying where you are unless you know through communication that what you're doing will need to be done differently with changes from upstream.

There are fundamental differences to the internals of Allegro 5 and Allegro 4 so even though somebody did write an interface layer there's no way it will perform exactly the same as Allegro 4 did. Some things may be better, but others will be worse, and I bet several things just aren't even implemented (e.g., the sound layer stuff people are complaining about).

I don't really know what the big deal is about supporting 4.x. Are we seriously getting regular bug reports to that branch still? Maybe 4.4 because it was released around the same time as 5.0, IIRC... Sort of silly on the developers' part. :P

furinkan
Member #10,271
October 2008
avatar

When we all move to 48-bit color, for example, who knows what Allegro 4 is going to do.

What, exactly is the point of 48-bit color? I can't tell 24-bit color apart without a hex editor! 48-bit color had better support 3D! >:(

bamccaig said:

I don't really know what the big deal is about supporting 4.x.

Chicks dig guys with bulky legacy systems.

Srsly, though... I got a lot of contracts running, plus undergrad to finish, and student orgs to run. I have not, however forgotten the community that had to deal with my shit when I was first learning how to program. I also haven't forgotten about my first game library: Allegro 4.2! :'( As soon as my load lightens, I'll offer some help and some free beer. ;D

Chris Katko
Member #1,881
January 2002
avatar

furinkan said:

What, exactly is the point of 48-bit color? I can't tell 24-bit color apart without a hex editor!

{"name":"SEnndPs.png","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/f\/8\/f857a6d2f4c7c1a49f9fc6c5f57e28aa.png","w":1280,"h":1280,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/f\/8\/f857a6d2f4c7c1a49f9fc6c5f57e28aa"}SEnndPs.png

http://i.imgur.com/SEnndPs.png

Can you see circular banding near the dark area? That's why. You don't need to be able to tell a single color apart next to each other to be able to see a smoother transition on gradients.

There's literally no good reason not to increase the color depth. It's like asking why go from 100 Ethernet to gigabit.

It's also a solution to this, the color space problem:

http://en.wikipedia.org/wiki/RGB_color_model#mediaviewer/File:CIExy1931_sRGB_gamut_D65.png

The grey background is all of the color space our eyes are capable of perceiving. The triangle is what RGB actually gets you.

The fact that red + green + blue doesn't actually yield all colors is the reason gold doesn't look anything like gold on a TV.

Floating-point colors also allow us to mathematically demonstrate super bright white (such as looking into the sun and over-saturating your vision), and perfect black.

There's a good reason why HDMI already supports deep color spaces (as well as Windows 7 onward) and that SGI/Mac workstations were running 30-bit (not 24-bit padded) color back in the 90's.

Floating point color also allows us to do modifications to images with a guard band. That means we can increase/decrease, or stretch image intensity and not have that be a lossy operation. We can undo it. We can have a shader play with it in real-time. Even if we can't "see" 48-bit color, it allows us to transform images inside it in the same way that 24-bit audio allows use to master soundtracks without damaging them before we print it to the final consumer copy.

[edit] Why is the preview black. ??? Everyone viewing must not have a high enough color depth to see it! ;)

-----sig:
“Programs should be written for people to read, and only incidentally for machines to execute.” - Structure and Interpretation of Computer Programs



Go to: