Since I've gotten a decent amount of the flag sprite data dumped into appvars now, I figured I might as well announce the project.

The idea hit me as I was trying to figure out what flag/shirt one of the characters of Scandinavia and the World was wearing, when I figured that maybe a program similar to this might either come in handy, or just in general be considered 'cool' to browse through. I have located 206 flags through Wikipedia, which I am using to get the images from. http://en.wikipedia.org/wiki/Gallery_of_sovereign_state_flags

I currently have 89 of the images stored to appvars. I also have all 206 country names stored into an appvar, as well. The flag sprite data should take 8 appvars, at just over 64000 bytes each.

I doubt this project will be super popular, but it's fun to check out all the flags that are out there from each country. Smile

Only screenshots I have of my testing the hex sprite data:

Cool project, sir, keep up the good work! I think I remember you mentioning data about countries; was that for this project or a different one?
You should add some historical ones as well, like the Bennington Flag and the Green Mountain Boys Flag.
KermMartian wrote:
Cool project, sir, keep up the good work! I think I remember you mentioning data about countries; was that for this project or a different one?


This one is just flags and country names, since it will take up so much space for the sprite data.

elfprince wrote:
You should add some historical ones as well, like the Bennington Flag and the Green Mountain Boys Flag.


Eh, since they weren't listed with the countries, I'll probably leave them out of this project. If I were to include those, I'd have to include a whole slew of others, like the different state flags and such. Not sure those are as important since they aren't current to what is being used these days.

Edit:

After further consideration, I suppose I could add in the 50 states flags, and any historical flags you think should be in there. Care to give me a list of those that you think should be put in? Smile
State flags, historical US flags, and flags of states that were previously independent republics (which includes at least Vermont, Texas, and Hawaii) would be cool. Flags of U.S. territories too - Puerto Rico, etc?
Might as well include every flag for all states and provinces, as well all former countries.
I suggested to tifreak a mechanism whereby particularly simple or geometric flags could be stored as pseudo-vector information instead of sprite data, but as he pointed out, that would be a pain to both encode and decode. It might be an interesting way for one of us to join on the project, though, as I think there are a lot of flags that could be significantly shrunk with that trick.
A note to self; last flag I finished from the list is Marshall Islands. This means I now have 114 converted of the 206 I'm starting out with.

I also have plans to set it up to be a game like the president database had where players guess the names of the flags from multiple choice.

Edit:

Added up to Federated States of Micronesia while waiting on a train to go away.
I have completed to Syria tonight. This puts me at having 180 of 206 flags completed from the countries. 6 appvars containing roughly 64KB of data each, a 7th that is nearly full (18 of the 27 lines filled), so I'll need at least one more appvar for the country flags. Still have to work on a UI for this all, but that shouldn't take long to deal with.
A great victory tonight.

206 flags converted, covering 8 appvars, 7 of which are full; tallying up 480,328 bytes of data with the flags being set to a size of 60x40.

I just have to remember that almost all flags are depicted with the pole to the left side, while Iran, Iraq, and Saudi Arabia are on the right side of the flag. I'm going to try to remember to do that inside the program when it goes to display the flags.
I'm working on debugging an issue that tifreak8x ran into: a test program that is supposed to grab a random flag from among the many AppVars the program uses and display it is running into what might be programmer error and might be Celtic II CSE problems. One flag worked, then on the second run flag #128 in AppVar #4 = SPRDAT7, line 20 failed for me with ..LN:NT:FN. I confirmed in SourceCoder 3 that the AppVar in question has over 20 lines. Therefore I suspect it's a Celtic II CSE issue, and I'll try to get to the bottom of it.
I do hope that the issue isn't huge. Also, if you notice, it has a blank line at the end of each appvar. If I don't do that, celtic2 breaks badly reading the last line of an appvar. I don't know if that might also be linked to the read line error? Thanks for looking into this.
So, now that Kerm has managed to correct the issue Celtic ReadLine was having, we can get back to finishing things Smile



I was running a test and debug program, since before the fix, it was kicking back a lack of data, when there were data before, so that's why there are all the numbers and such.

Please keep in mind that each flag is 60x40. In this form, they take 2400 bytes. Celtic takes a little bit of time to locate and copy this data to Str9, so that is why there is a slight delay.

I was hoping to catch some of the more colorful flags, but you might have to wait for this and DCSE 8.1 to be released to truly enjoy all the flags that are uploaded on to here Smile

Now, on to writing the quizzing program, then the database.

Should I just list out all the names and then have it display a selected flag? I'm thinking that will be fastest..
tifreak8x wrote:
Please keep in mind that each flag is 60x40. In this form, they take 2400 bytes. Celtic takes a little bit of time to locate and copy this data to Str9, so that is why there is a slight delay.
From the technical side of things, it's the locating that takes the longest: starting from the 0th byte and scanning through for the Nth line takes a lot of Flash reads, specifically one per byte passed until the starting byte. Makes sense?

Quote:
Should I just list out all the names and then have it display a selected flag? I'm thinking that will be fastest..
That sounds like a reasonable option to me.
Okay, so, testing my flags program, It randomly landed me into SPRDAT9, line 14. This is what it is supposed to look like:



This is what I ended up with:



This is the data it is supposed to give back:


Code:
555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB77777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777AA7777777777777777777777777777777777777777777777777777777777AA7777777777777777777777777777777777777777777777777777777777AA777777777777777777777777777777777777777777777777777777777AAAA777777777777777777777777777777777777777777777777777AAAAAAAAAAAAAA77777777777777777777777777777777777777777777777AAAAAAAAAAAA7777777777777777777777777777777777777777777777777AAAAAAAAAA7777777777777777777777777777777777777777777777777777AAAAAA777777777777777777777777777777777777777777777777777777AAAAAA77777777777777777777777777777777777777777777777777777AAAAAAAA7777777777777777777777777777777777777777777777777777AAA77AAA7777777777777777777777777777777777777777777777777777AA7777AA77777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555


And here is the screenshot of awesomeness that a Rcl Str9 (before displaying the image) nets me:



Attempting to open the recalled/exported Str9 in source coder netted this error:

Quote:
Error: Unable to load Str9.8xs. Are you sure it's a valid file type?
More Information: Str9: Detokenization process failed at ...0xaa, 0x32, ...Prevous context was: inReg(ax+b) >Dec and sin^-1((plotdotPlot2(~sin^-1({median(For([:(backtrack was [170,50])



Code:
ClrDraw:ClrHome
TextColor(Black
SetUpEditor |LPDGA
4→dim(|LPDGA
randIntNoRep(1,206,4→|LPDGA
randInt(1,4→T
|LPDGA(T)→A
iPart(A/27
6→B
A-B27→θ
"rowSwap(SPRDAT"+sub("3456789A",B+1,1)→Str0
14→θ
θ
det(0)
DispGraph
Return
det(9,60,110,50


Pause


The Return was put in to there to preserve Str9. Remove it to see the flag
I believe this has been fixed in both places it appears; it's weird that this didn't affect existing features in Doors CS and Doors CSE. I've emailed you a new build that increments the version to 8.1 and fixes this issue.
Seems to be fixed as of now, along with giving good version checking via


Code:
det([[20→θ
If θ=20 or θ>81
Then
Disp "Get Doors CSE to run this:","http://dcs.cemetech.net
Return
End


For what I'm doing.

I believe I have the flag centered to the screen where I wanted, and I have it to where it draws a flag pole of sorts to the proper side of the flag being shown.

Next will be adding in the 4 answers and letting the player choose.

Edit:

I think I'm going to change the Disp message above to say "Need latest DCSE to run this:" or something along those lines. I'll update the message above when I have something that looks/reads nice.
It is definitely getting better and better every day! Probably would be too space intensive, but maybe there could also be random facts, or fun information about the countries when the flag is displayed? Anyway, keep up the great work! It looks incredible!
If someone wanted to compile a list of such things for me, I'd be willing to add it in Smile Can't be any more space intensive than the 494,734 bytes being absorbed by the first 206 flags that are being put in there. I still have State flags and historical/other flags to add in Smile I guess if the facts were short and to the point, I could easily squeeze that in as well. We have plenty of Archive space for this calculator as it is.
I've been working on implementing the quiz setup for Flags. The code I used to do this with the president's database was kind of repetitive, and I'm trying to make it smaller.


Code:
If K=92:Then
If ˪PDGA(1)=D:Then
TextColor(GREEN
Text(98,75,"CORRECT!
Pause :Q+1→Q
End
If ˪PDGA(1)≠D:Then
TextColor(RED
Text(98,1,"WRONG! THE CORRECT ANSWER WAS # ",T
Pause :End
ClrDraw:R+1→R:4→W:End

If K=93:Then
If ˪PDGA(2)=D:Then
TextColor(GREEN
Text(98,75,"CORRECT!
Pause :Q+1→Q
End
If ˪PDGA(2)≠D:Then
TextColor(RED
Text(98,1,"WRONG! THE CORRECT ANSWER WAS # ",T
Pause :End
ClrDraw:R+1→R:4→W:End

If K=94:Then
If ˪PDGA(3)=D:Then
TextColor(GREEN
Text(98,75,"CORRECT!
Pause :Q+1→Q
End
If ˪PDGA(3)≠D:Then
TextColor(RED
Text(98,1,"WRONG! THE CORRECT ANSWER WAS # ",T
Pause :End
ClrDraw:R+1→R:4→W:End

If K=82:Then
If ˪PDGA(4)=D:Then
TextColor(GREEN
Text(98,75,"CORRECT!
Pause :Q+1→Q
End
If ˪PDGA(4)≠D:Then
TextColor(RED
Text(98,1,"WRONG! THE CORRECT ANSWER WAS # ",T
Pause :End
ClrDraw:R+1→R:4→W:End


I'm going to try to change this around to highlight the line with a green color for correct choice, or red that it was incorrect and possibly just highlight the correct line with green.

So far, to get the 1-4 button press, I have figured out:

K-91+(13)(K=82->R

Then it will be a matter of comparing D to the list element selected via R. More updates on this once I have some time to try messing with making this work.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 4
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement