Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » How to Reproduce video with Allegro 5

This thread is locked; no one can reply to it. rss feed Print
 1   2 
How to Reproduce video with Allegro 5
Itachihro
Member #12,001
May 2010

How about using stringstreams instead of sprintf?

Thomas Fjellstrom
Member #476
June 2000
avatar

It would probably be best to just not use non ASCII characters in filenames.

--
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

23yrold3yrold
Member #1,134
March 2001
avatar

IonBlade said:

Final Fantasy VII-VIII-IX-X-X2-XII-XIII (everything past 6, basically)

Part of the reason why FF has become such a running joke as more of an interactive movie than a game and why VI was considered by many to be the last "good" one. :) Anyway, I'm sure a lot of games use video, I guess they aren't games I've been playing (or I've been skipping the videos).

EDIT: Typo'ed my Roman Numeral. :P

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

Thomas Fjellstrom
Member #476
June 2000
avatar

Part of the reason why FF has become such a running joke as more of an interactive movie than a game and why IV was considered by many to be the last "good" one.

I think you mean VI. >:(

--
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

AMCerasoli
Member #11,955
May 2010
avatar

It would probably be best to just not use non ASCII characters in filenames.

No actually the problem isn't at loading the files because as you can see i just let the name that Matthew gave me (bg1.jpg) is good would be background 1..2.. and so on...

and those are perfectly ANSCII... The problem is that all my environment is encoded in UTF-8.. and sprintf is waiting for just ANSCII encoding... so when I send from my program (Code::Block which is using UTF-8) "bg%d.jpg" it send it encoded in UTF-8 and sprintf doesn't know how to interpret it... That is what I think is happening.

When I change the encoding option to ISO-8859-1 in CODE::BLOCKS works but then I can't use Ñ or ¿ with al_draw_text

Thomas Fjellstrom
Member #476
June 2000
avatar

and those are perfectly ANSCII... The problem is that all my environment is encoded in UTF-8.. and sprintf is waiting for just ANSCII encoding... so when I send from my program (Code::Block which is using UTF-8) "bg%d.jpg" it send it encoded in UTF-8 and sprintf doesn't know how to interpret it... That is what I think is happening.

I thought you knew, but the first 128 characters in UTF-8 are ASCII. Any ASCII string encodes to itself when put into UTF-8.

Quote:

When I change the encoding option to ISO-8859-1 in CODE::BLOCKS works but then I can't use Ñ or ¿ with al_draw_text

Those aren't part of ASCII either.

--
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

AMCerasoli
Member #11,955
May 2010
avatar

Oh YHEA!!! now is working... I don't know what was doing wrong...

And yes I knew that Thomas
But before was giving me an error... and the strange thing is when I change to ISO works... then I change back to UTF thinking in that, that is true that UTF is identical at the first 128 characters, so the problem must be another thing, but this time it work......................................................................................................................................

I don't want to close CODE::BLOCK or turn off my PC until I finish my project ahahahaha

Bob
Free Market Evangelist
September 2000
avatar

But the community must spend more time in creating DOCS so Allegro is going to growth faster, because even with this poorly documentations Allegro is intuitive and powerful...

The best introductory documentation is written by newbies to the tools: No prior knowledge, and few assumptions.

The documentation for OpenGL produced by the nice people in the Khronos group is all detailed specification. I can guarantee you will not learn to begin writing OpenGL applications from those documents.

Instead, the users of such libraries typically build their own documentation (books, tutorials, examples, and so on) to guide beginners and show them how to get started.

If you feel like the Allegro documentation in insufficient in any way, or too complicated / obtuse / difficult to follow, then by all means, please either submit a patch to fix the official documentation, contact the authors of external documents, or just write your own. This is no different than SDL, G2D, OpenGL, and the Windows API.

Quote:

Because when you want to create something you want to learn the enough info, why do I need to learn everything about MinGW or command lines to compile Allegro5?

Learning about the compiler you are using is important. The compiler is the major tool you'll be using. Most of your time will be spent trying to get the tool in question to do what you meant it to do, by figuring out how to tell it to do what you wanted.

It's important to know the abstraction layer above and at least one abstraction layer below the one you are using. It gives you a much better understanding of the tools at your disposal, and how to wield them to maximize your efficiency.

Do you need to know the necessary command line to build an application or library? Yes.
Do you need to know the internals of GCC's lexical parser? Probably not.

--
- Bob
[ -- All my signature links are 404 -- ]

Ariesnl
Member #2,902
November 2002
avatar

Didn't Allegro have FLIC once ?

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 ;-)

AMCerasoli
Member #11,955
May 2010
avatar

Bob said:

If you feel like the Allegro documentation in insufficient in any way, or too complicated / obtuse / difficult to follow, then by all means, please either submit a patch to fix the official documentation, contact the authors of external documents, or just write your own. This is no different than SDL, G2D, OpenGL, and the Windows API.

You can count on it Bob... I am going to make Tutorials and Video Tutorials so easy to understand that people is going to think that Allegro is for kids.

I am still noob, but it take me a long time to get here, And I don't consider myself a slow learner <<< I don't know if i can say that :-X ... But the poor info cause this second effects on people...

I going to do the next tutorials because i know how...

- Installing Allegro: Already Done but must be improved because if installing allegro was a kick on my balls installing Zlib is even more painful... and without that I couldn't use the text addon (TTF)..

- Copy and paste the binaries: To get allegro ready to work in just a minute which i'm going to recommend to people if I don't find out how to install Zlib

- Using Timers
- Drawing images: is too easy to make a whole tutorial but some tricks would help.
- Drawing Text: Solve problem with ASNCII and UTF-8 with CODE::BLOCK
- Bounding Box collision detection
- How to reproduce a sequence of images (just learned)
- Keyboard / mouse

I think that when someone get this, and understand it very well is able to do everything... And I'm not saying that this tutorials doesn't exist but to my are too precarious...

Thomas Fjellstrom
Member #476
June 2000
avatar

Quote:

going to do the next tutorials because i know how...

If you have the time, would you be willing to help out with the tutorials on the wiki? It doesn't seem like we have a good tut or explanation of how to install Allegro 5 from normal release packages. We do however have a few on how to build Allegro 5 from svn, you could base anything you add to the wiki on those :)

Also I do have a few basic Allegro 5 tutorials up there too.

--
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

AMCerasoli
Member #11,955
May 2010
avatar

If you have the time, would you be willing to help out with the tutorials on the wiki?

Of course I will!. To be honest I didn't know that those tutorials exist, I get tired to search for tutorials even for the 4.0 version was a little bit difficult... But anyway things must change now, I see those tutorials were created recently?...

If I had those when I start... :-[

But I already found things that I don't like too much (Just to keep it in order) on the wiki page like this:

{"name":"menuwiki2.gif","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/f\/c\/fc75186aa088ae8b09f6dee22ce69c3c.gif","w":682,"h":378,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/f\/c\/fc75186aa088ae8b09f6dee22ce69c3c"}menuwiki2.gif
{"name":"menuwiki3.gif","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/d\/e\/de06dba09b8ac68e8cd7bba9508aec4e.gif","w":682,"h":378,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/d\/e\/de06dba09b8ac68e8cd7bba9508aec4e"}menuwiki3.gif

I will keep this web page in mind...

EDIT: OMG I can actually modify the page without any permission??? ;D ;D ;D ahahahaha that is amazing...

 1   2 


Go to: