Omnimaga

Calculator Community => Discontinued => Major Community Projects => Correlation => Topic started by: Hot_Dog on December 17, 2010, 04:30:28 pm

Title: Request for a Java Programmer
Post by: Hot_Dog on December 17, 2010, 04:30:28 pm
As many of you know, Correlation is coming out for testing in about a month.  If there are any Java programmers who would like to write a simple, but much-needed application, it would be greatly appreciated.

There are two options available.  It will be "one-or-the-other", since I will not need both.

1. Easier: Create an application where a user can paste text.  The application will alter the text by turning it backwards, and then skipping every 5th, 6th, and sometimes 7th/8th character.  The new text will be available for the user to copy and paste.
2. Create a Correlation Font Compiler.  I wrote one, but it requires .NET, and I am concerned about cross-platforming and all.  I will have the exact .8xp file format provided, so all you would need to do is create the code to accept user values and write an .8xp file.

Thanks for any help!
Title: Re: Request for a Java Programmer
Post by: nemo on December 17, 2010, 04:36:21 pm
i'm confused when you say you want the text to turn it backwards.
so omnimaga would become agaminmo? and how would the program know whether to skip the 5th 6th 7th or 8th character?

#2 may be easier since it can be done command line style. would it be ok to export it as a .txt file, and then you can just resave it as NAME.8xp?
Title: Re: Request for a Java Programmer
Post by: Hot_Dog on December 17, 2010, 04:41:03 pm
i'm confused when you say you want the text to turn it backwards.
so omnimaga would become agaminmo? and how would the program know whether to skip the 5th 6th 7th or 8th character?

#2 may be easier since it can be done command line style. would it be ok to export it as a .txt file, and then you can just resave it as NAME.8xp?

Omnimaga would become agaminmo.  The program would skip the 5th/6th bytes if a user specified a font no more than 8 pixels wide, but it would skip every 5th-8th byte if the user specified that the font would be more than 8 pixels wide.

I thought that java could write .8xp files.  Anyways, .txt would be fine, but remember with command line style the user would still need to specify some options
Title: Re: Request for a Java Programmer
Post by: nemo on December 17, 2010, 04:48:14 pm
can you explain more in detail all pieces of information entered by the user? this is what i have so far:

-wait until the user presses a button...
-ask for the size of the font
-if it's less than 9, read through 4 bytes forwards and write them backwards, then skip 2 bytes (the 5th and 6th).
-otherwise, skip 4 bytes (5th-8th).
-display text, and return to the beginning waiting for a button press.

edit: or if this is what you want then i'll start coding.
Title: Re: Request for a Java Programmer
Post by: Hot_Dog on December 17, 2010, 05:04:18 pm
can you explain more in detail all pieces of information entered by the user? this is what i have so far:

-wait until the user presses a button...
-ask for the size of the font
-if it's less than 9, read through 4 bytes forwards and write them backwards, then skip 2 bytes (the 5th and 6th).
-otherwise, skip 4 bytes (5th-8th).
-display text, and return to the beginning waiting for a button press.

edit: or if this is what you want then i'll start coding.

:D I admire your enthusiasm, but I want to wait a couple of days to see if there's other people.  Last time I asked for help, I made the mistake last time of "hiring 'too quickly'" when there were so many people who wanted to help. 
Title: Re: Request for a Java Programmer
Post by: nemo on December 17, 2010, 05:06:18 pm
it's really no big deal. it'll be the most primitive solution, probably. plus i already have JCreator open working on my game... this shouldn't take more than a half hour if all goes well
Title: Re: Request for a Java Programmer
Post by: DJ Omnimaga on December 17, 2010, 06:15:51 pm
Question, what would be that program for? I am curious about the text inverting part. Is it some sort of font editor?
Title: Re: Request for a Java Programmer
Post by: Hot_Dog on December 17, 2010, 07:00:12 pm
Question, what would be that program for? I am curious about the text inverting part. Is it some sort of font editor?

If Option #2 doesn't work out, I'll end up using my font compiler, which probably won't work 100% for all computers.  In that case, Option #1--the program in question--will be used for compiling a font manually, which will be necessary for people who can't get my font compiler to work.
Title: Re: Request for a Java Programmer
Post by: DJ Omnimaga on December 17, 2010, 07:01:17 pm
Ah ok, so it's the font editor? That's what I was wondering.
Title: Re: Request for a Java Programmer
Post by: Hot_Dog on December 17, 2010, 07:02:26 pm
Ah ok, so it's the font editor? That's what I was wondering.

I'm sorry if I sound confusing :( Fonts are created and edited using paint programs.  The programs are both used for compiling, not for editing.
Title: Re: Request for a Java Programmer
Post by: nemo on December 17, 2010, 07:05:15 pm
can i have some test data / expected output?
Title: Re: Request for a Java Programmer
Post by: Hot_Dog on December 17, 2010, 07:12:29 pm
can i have some test data / expected output?

Okay, eager beaver! ;D  If it's option number #2, you're hired (and thanks!).  But before I can give you the data, I just need to make sure that it's #2 that you're wanting to do.
Title: Re: Request for a Java Programmer
Post by: nemo on December 17, 2010, 07:13:26 pm
ohh... i just finished number one... i don't anticipate #2 being very hard though.

edit: and what type of data is being entered? integers?
Title: Re: Request for a Java Programmer
Post by: Hot_Dog on December 17, 2010, 07:55:51 pm
ohh... i just finished number one... i don't anticipate #2 being very hard though.

It's not hard.  It's just that #1 is easier 0_0

Anyways, in case #2 works for you, feel free to do a command prompt or a GUI.

The user selects a monochrome .bmp file to select.  He also specifies the height (from 1 to 16), the width (from 1 to 16), the minimum value (from 0 to 255), the maximum value (from 0 to 255, cannot be less than minimum value), and the program name, which must be EXACTLY 8 characters.

I've attached a sample compiled font, though I don't have the original .bmp with me.

The file format: (Let me know if you have questions)
A star means the ASCII value of the character to be written to the file.
Quotes is a string to be written to the file.
For a double star, convert the two-byte value to little edian, and then write the value to the file

"**TI83F*"
*26
*10
*0
"Ti-83+ Font.  Used by Correlation.        "
** The size of the entire file, minus 57

----------------- (Ignore these dashes)


*13
*0
** The size of the .8xp program
*5
Eight-Character Program Name
*1
*0
** The size of the .8xp program
** The size of the .8xp program (This marks the beginning of the Ti-83+ program)
*User-Specified Width
*User-Specified Height
*User-Specified Minimum Value
*User-Specified Maximum Value
*255
*0       (This marks the end of the Ti-83+ program.)
**Check-sum (Take the sum of all bytes following the -------------, use AND %1111111111111111)
Title: Re: Request for a Java Programmer
Post by: nemo on December 17, 2010, 08:04:01 pm
i think i'll stick with the first.. lol. do you have any test data for the first i can use?
Title: Re: Request for a Java Programmer
Post by: Hot_Dog on December 17, 2010, 08:06:19 pm
i think i'll stick with the first.. lol. do you have any test data for the first i can use?

Not yet, but I'll work on some.

In the meantime, if there's any other takers for option #2, remember that Correlation isn't coming for a month
Title: Re: Request for a Java Programmer
Post by: jnesselr on December 17, 2010, 09:42:12 pm
i think i'll stick with the first.. lol. do you have any test data for the first i can use?

Not yet, but I'll work on some.

In the meantime, if there's any other takers for option #2, remember that Correlation isn't coming for a month
So basically like a m by n grid that they can do the font, and assign that to a letter or something?
Title: Re: Request for a Java Programmer
Post by: Hot_Dog on December 17, 2010, 09:51:39 pm
i think i'll stick with the first.. lol. do you have any test data for the first i can use?

Not yet, but I'll work on some.

In the meantime, if there's any other takers for option #2, remember that Correlation isn't coming for a month
So basically like a m by n grid that they can do the font, and assign that to a letter or something?

Yeah, essentially.  (Although in the file format, I forgot to mention the graphical data) The monochrome bitmap is created 8 or 16 pixels wide.  The height of the bitmap is the height of a character, multiplied by the total number of characters.  The minimum and maximum values assign these characters to letters--for instance, with a minimum of 65, the letter "A" will be assigned to the first character in the font.
Title: Re: Request for a Java Programmer
Post by: Hot_Dog on December 18, 2010, 11:40:41 am
Nemo, here's some test data, something I would expect someone to copy and paste in.

But first, I forgot two things.  First of all, for an 8-pixel wide font, after the string is turned around, every 1st-6th character should be skipped (1st through 4th for 16 wide).  That was my mistake.  The other thing is, even though the text is turned backwards, it's done in pairs--look carefully at the following example:    OMNIMAGA becomes GAMANIOM.

For an 8-pixel-wide font:  FA000000FA000000EA000000EA000000DD000000DD000000CA000000CA000000.  The output should be CACADDDDEAEAFAFA.

For a 16-pixel-wide font: 1122000023340000344500004556000056670000.  The output should be 67565645453434232211
Title: Re: Request for a Java Programmer
Post by: jnesselr on December 18, 2010, 12:07:25 pm
/me declares omnimaga should now be referenced as "GAMANIOM"
anyway, I don't full understand thr output format. Is it just a .png ir .gif or what?
Title: Re: Request for a Java Programmer
Post by: Hot_Dog on December 18, 2010, 12:22:12 pm
/me declares omnimaga should now be referenced as "GAMANIOM"
anyway, I don't full understand thr output format. Is it just a .png ir .gif or what?

If you're talking about the output from the example I gave Nemo, it's sprite data.  A monochrome bitmap is drawn "backwards," and has a lot of unnecessary 0s in it, so Nemo's program would adjust these to make the bitmap "calculator friendly."
Title: Re: Request for a Java Programmer
Post by: nemo on December 19, 2010, 09:15:54 pm
the program is attached, along with the source.
edit: reattached, bug fix.
Title: Re: Request for a Java Programmer
Post by: Hot_Dog on December 19, 2010, 09:17:26 pm
the program is attached, along with the source.

It works!  I'll let you know if I run into any trouble, though I'm not finding any problems yet! ;D
Title: Re: Request for a Java Programmer
Post by: nemo on December 19, 2010, 09:19:05 pm
the program is attached, along with the source.

It works!  I'll let you know if I run into any trouble, though I'm not finding any problems yet! ;D

that would be the goal ;)  if there's any layout issues you want changed don't hesitate to ask.
Title: Re: Request for a Java Programmer
Post by: Deep Toaster on December 21, 2010, 05:02:37 pm
ohh... i just finished number one... i don't anticipate #2 being very hard though.

It's not hard.  It's just that #1 is easier 0_0

Anyways, in case #2 works for you, feel free to do a command prompt or a GUI.

The user selects a monochrome .bmp file to select.  He also specifies the height (from 1 to 16), the width (from 1 to 16), the minimum value (from 0 to 255), the maximum value (from 0 to 255, cannot be less than minimum value), and the program name, which must be EXACTLY 8 characters.

I've attached a sample compiled font, though I don't have the original .bmp with me.

The file format: (Let me know if you have questions)
A star means the ASCII value of the character to be written to the file.
Quotes is a string to be written to the file.
For a double star, convert the two-byte value to little edian, and then write the value to the file

"**TI83F*"
*26
*10
*0
"Ti-83+ Font.  Used by Correlation.        "
** The size of the entire file, minus 57

----------------- (Ignore these dashes)


*13
*0
** The size of the .8xp program
*5
Eight-Character Program Name
*1
*0
** The size of the .8xp program
** The size of the .8xp program (This marks the beginning of the Ti-83+ program)
*User-Specified Width
*User-Specified Height
*User-Specified Minimum Value
*User-Specified Maximum Value
*255
*0       (This marks the end of the Ti-83+ program.)
**Check-sum (Take the sum of all bytes following the -------------, use AND %1111111111111111)

I have a version of #2 pretty much done, except that I don't really understand what the program's supposed to look like...

Where do I put the actual sprite data for the font?

And the third "** The size of the .8xp program" is supposed to be "** The size of the .8xp program minus 2", right? Just checking :)

EDIT: And I'm assuming the .bmp is made up of either 8- or 16-pixel-wide characters listed vertically, right?

EDIT2: Whoops, just noticed your example program. Still kinda confused, though... What's the $30, $00 for?
Title: Re: Request for a Java Programmer
Post by: Hot_Dog on December 21, 2010, 05:30:30 pm
Quote
I have a version of #2 pretty much done, except that I don't really understand what the program's supposed to look like...

Where do I put the actual sprite data for the font?

And the third "** The size of the .8xp program" is supposed to be "** The size of the .8xp program minus 2", right? Just checking

Deep Thought, I had no idea you were working on this!  Thanks a lot! 

To answer your questions, the bitmap data goes before the last *255.  (Do you understand the format of a monochrome bitmap, by the way?  Because monochrome bitmaps are weird--they display everything backwards, and with unnecessary extra bytes.) 

Also, you are right about the third "size of program" line...it should be the size of the program minus 2.

One more thing: the *5 should be *6 instead
Title: Re: Request for a Java Programmer
Post by: Deep Toaster on December 21, 2010, 05:34:03 pm
Quote
I have a version of #2 pretty much done, except that I don't really understand what the program's supposed to look like...

Where do I put the actual sprite data for the font?

And the third "** The size of the .8xp program" is supposed to be "** The size of the .8xp program minus 2", right? Just checking

Deep Thought, I had no idea you were working on this!  Thanks a lot! 

Np, needed to practice my Java anyway ;D

To answer your questions, the bitmap data goes before the last *255.  (Do you understand the format of a monochrome bitmap, by the way?  Because monochrome bitmaps are weird--they display everything backwards, and with unnecessary extra bytes.) 

Yep, it's stored from the bottom up, padded to multiples of 4, correct? :)

Also, you are right about the third "size of program" line...it should be the size of the program minus 2.

One more thing: the *5 should be *6 instead

Oh, okay. What's the $30, $00 before the sprite data in your example program for?

EDIT: I'll upload it when I get this done.
Title: Re: Request for a Java Programmer
Post by: Hot_Dog on December 21, 2010, 05:41:13 pm
Quote
Yep, it's stored from the bottom up, padded to multiples of 4, correct? :)

That's right!

Quote

Oh, okay. What's the $30, $00 before the sprite data in your example program for?

That's no longer needed.  It was the height times the width of each character ( 6*8 ), but I have no use for it in my program now.  It's basically "dead code" 8)

By the way, I really don't remember what I had *255 and *0 for, because I left my source code at college.  Do you know if it's needed for a .8xp program?  (The bitmap data in the example program takes 16 bytes) I have a feeling that those two bytes could be removed.
Title: Re: Request for a Java Programmer
Post by: Deep Toaster on December 21, 2010, 05:50:20 pm
Quote
Yep, it's stored from the bottom up, padded to multiples of 4, correct? :)

That's right!

Quote

Oh, okay. What's the $30, $00 before the sprite data in your example program for?

That's no longer needed.  It was the height times the width of each character ( 6*8 ), but I have no use for it in my program now.  It's basically "dead code" 8)

So I should just ignore it?

By the way, I really don't remember what I had *255 and *0 for, because I left my source code at college.  Do you know if it's needed for a .8xp program?  (The bitmap data in the example program takes 16 bytes) I have a feeling that those two bytes could be removed.

It doesn't show up on the actual calculator, so it's definitely not bad for the program. I don't know what it does, though.
Title: Re: Request for a Java Programmer
Post by: Hot_Dog on December 21, 2010, 05:53:33 pm
Yeah, just ignore the height * width.
Title: Re: Request for a Java Programmer
Post by: Deep Toaster on December 21, 2010, 07:47:52 pm
Here it is.

It's completely command-line (since I've never really done AWT stuff). Just put the .bmp file in the same directory as the .class file (to make things easier, so you don't have to type out the entire path) and run it with java bmp.class. It should detect nonexistent files, invalid filetypes, and some other common errors, but not invalid numbers for the width/height stuff (mostly because I'm not sure what to put there ;D). It outputs to a program with the same name as the bitmap (cut down to 8 characters if it's too long).

A couple of problems (not exactly bugs, since I put them in on purpose):

Tell me if there are any real bugs :)

bmp28xp.class is the compiled CLASS file, bmp28xp.java is the source, testing.bmp is an example .bmp I used for testing, and TESTING.8xp was what it gave me when I typed in 6 for width, 8 for height, and 65 for both starting and ending character.

EDIT: Updated files here (http://ourl.ca/8390/156089).
Title: Re: Request for a Java Programmer
Post by: Munchor on December 21, 2010, 07:49:47 pm
Deep Thought: Are you releasing the source? I'd like to give it a try and make it GUI :)
Title: Re: Request for a Java Programmer
Post by: Deep Toaster on December 21, 2010, 07:51:37 pm
Yep, edited in.
Title: Re: Request for a Java Programmer
Post by: Hot_Dog on December 21, 2010, 07:54:48 pm
@DeepThought The 3 things you mentioned as "a couple of problems" are absolutely fine.  Please don't try to fix them.  And thanks!

@ScoutDavid If you are able to make a GUI, that would be awesome.  Feel free to look here for a suggested GUI. http://ourl.ca/7900/141527

EDIT: I couldn't see the .java file.  It was there for a moment, then it was gone
Title: Re: Request for a Java Programmer
Post by: Munchor on December 21, 2010, 07:59:39 pm
@DeepThought The 3 things you mentioned as "a couple of problems" are absolutely fine.  Please don't try to fix them.  And thanks!

@ScoutDavid If you are able to make a GUI, that would be awesome.  Feel free to look here for a suggested GUI. http://ourl.ca/7900/141527

EDIT: I couldn't see the .java file.  It was there for a moment, then it was gone

Looking at Deep's code it doesn't look very hard, but only tomorrow, sorry :S
Title: Re: Request for a Java Programmer
Post by: Hot_Dog on December 21, 2010, 08:00:38 pm
Looking at Deep's code it doesn't look very hard, but only tomorrow, sorry :S

It's not needed until January anyways :D
Title: Re: Request for a Java Programmer
Post by: Deep Toaster on December 21, 2010, 08:04:16 pm
@DeepThought The 3 things you mentioned as "a couple of problems" are absolutely fine.  Please don't try to fix them.  And thanks!

@ScoutDavid If you are able to make a GUI, that would be awesome.  Feel free to look here for a suggested GUI. http://ourl.ca/7900/141527

EDIT: I couldn't see the .java file.  It was there for a moment, then it was gone

Sorry, now it's edited in.
Title: Re: Request for a Java Programmer
Post by: Hot_Dog on December 21, 2010, 09:22:34 pm
@DeepThought The 3 things you mentioned as "a couple of problems" are absolutely fine.  Please don't try to fix them.  And thanks!

@ScoutDavid If you are able to make a GUI, that would be awesome.  Feel free to look here for a suggested GUI. http://ourl.ca/7900/141527

EDIT: I couldn't see the .java file.  It was there for a moment, then it was gone

Looking at Deep's code it doesn't look very hard, but only tomorrow, sorry :S

Btw, ScoutDavid, just a reminder: The program name should be exactly 8 characters, no more and no less.  The height/width should be no more than 16, no less than 1.  The starting character and ending character should be no more than 255, no less than 0.  Finally, the ending character cannot be smaller than the starting character.

As always, let me know of any questions!

Deep Thought, no problems so far ;D
Title: Re: Request for a Java Programmer
Post by: Deep Toaster on December 21, 2010, 09:29:52 pm
@DeepThought The 3 things you mentioned as "a couple of problems" are absolutely fine.  Please don't try to fix them.  And thanks!

@ScoutDavid If you are able to make a GUI, that would be awesome.  Feel free to look here for a suggested GUI. http://ourl.ca/7900/141527

EDIT: I couldn't see the .java file.  It was there for a moment, then it was gone

Looking at Deep's code it doesn't look very hard, but only tomorrow, sorry :S

Btw, ScoutDavid, just a reminder: The program name should be exactly 8 characters, no more and no less.  The height/width should be no more than 16, no less than 1.  The starting character and ending character should be no more than 255, no less than 0.  Finally, the ending character cannot be smaller than the starting character.

As always, let me know of any questions!

Deep Thought, no problems so far ;D

Wait, you mean names for fonts have to be exactly 8 chars long?

Anyway, here's the bmp28xp files with the updates.
Title: Re: Request for a Java Programmer
Post by: Hot_Dog on December 21, 2010, 10:36:07 pm
Wait, you mean names for fonts have to be exactly 8 chars long?


Yep 8)

I'm having trouble running a .class file.  What do I do?
Title: Re: Request for a Java Programmer
Post by: Deep Toaster on December 21, 2010, 10:38:48 pm
Hmm, java bmp28xp should work. Just cd over to its directory and run it.

What error does it give you?
Title: Re: Request for a Java Programmer
Post by: Hot_Dog on December 21, 2010, 10:39:35 pm
Hmm, java bmp28xp should work. Just cd over to its directory and run it.

What error does it give you?

Ah, I had ".class" at the end.  It's working now :D
Title: Re: Request for a Java Programmer
Post by: Deep Toaster on December 21, 2010, 10:41:39 pm
Hmm, java bmp28xp should work. Just cd over to its directory and run it.

What error does it give you?

Ah, I had ".class" at the end.  It's working now :D


Glad it works.

When I first tried Java that confused me too. javac requires the extension (.java), but not java :P
Title: Re: Request for a Java Programmer
Post by: Hot_Dog on December 21, 2010, 10:47:28 pm
Deep Thought, do you invert the bitmap as you write it to an .8xp file?  I'm finding that's the case, and if so, 5 stars for you
Title: Re: Request for a Java Programmer
Post by: Deep Toaster on December 21, 2010, 10:49:15 pm
Deep Thought, do you invert the bitmap as you write it to an .8xp file?  I'm finding that's the case, and if so, 5 stars for you

Thank you ;D
Title: Re: Request for a Java Programmer
Post by: Munchor on December 22, 2010, 09:53:39 am
@Hot_Dog: I tried to make it GUI, but the code is too complex for my experience with Java (2 months). Sorry :(
Title: Re: Request for a Java Programmer
Post by: Hot_Dog on December 22, 2010, 10:11:32 am
@Hot_Dog: I tried to make it GUI, but the code is too complex for my experience with Java (2 months). Sorry :(

No worries, man 8)  Nemo, GUI by any chance?  ;D

Deep Thought, a couple more things if you are able.  It would be nice if the program could somehow display error messages in color.  Also, I found that I had no errors whenever my maximum character was smaller than my minimum character.  Finally, if the program name is smaller than 8 characters, I wonder if you could add 0s at the end, as in the number zero
Title: Re: Request for a Java Programmer
Post by: Deep Toaster on December 22, 2010, 02:26:14 pm
Also, I found that I had no errors whenever my maximum character was smaller than my minimum character.

x.x Forgot about that. Whoops.

Those fixes should be easy. I'll post it today.

And if I can relearn GUI stuff, maybe that as well.

EDIT: Command-line Java doesn't support color, unfortunately.

EDIT2: Attached.
Title: Re: Request for a Java Programmer
Post by: nemo on December 22, 2010, 04:10:26 pm
Deep Thought, forget the GUI, i've got it covered.

Hot_Dog, approval? i can easily space it out by changing just a few numbers.

edit: oh, and it doesn't work yet. it's just the skeleton right now.
Title: Re: Request for a Java Programmer
Post by: Deep Toaster on December 22, 2010, 04:19:12 pm
Deep Thought, forget the GUI, i've got it covered.

Great, some info if you need it:

My program doesn't prompt for the name of the font. It just takes the name of the bitmap, strips the ".bmp," runs toUpperCase(), and pads it with zeros until it's eight characters long. So basically, whatever the bitmap's called is what the .8xp is called. Not sure what Hot_Dog wants, though.

Any questions about the code, just ask me :)
Title: Re: Request for a Java Programmer
Post by: Munchor on December 22, 2010, 04:21:06 pm
Nice job nemo, we've got a great java programmer here too.

Also, nice job Deep Thought, you made the original program :)
Title: Re: Request for a Java Programmer
Post by: nemo on December 22, 2010, 04:42:55 pm
Deep Thought, forget the GUI, i've got it covered.

Great, some info if you need it:

My program doesn't prompt for the name of the font. It just takes the name of the bitmap, strips the ".bmp," runs toUpperCase(), and pads it with zeros until it's eight characters long. So basically, whatever the bitmap's called is what the .8xp is called. Not sure what Hot_Dog wants, though.

Any questions about the code, just ask me :)

i noticed that. the GUI has a name field though, so i plan on doing the same operation as you except take it from the name field.

i gotta say, your code is interesting to go through. how did you figure out that 16973 is the identification of BMP files?

anyway, hot dog, as you may or may not know i'm pretty good at dealing with images in java (*cough* juggernaut *cough*). i know a way i could extend the allowed filetypes to other lossless compressions, like PNG and GIF, granted that they are monochrome.
edit: nevermind, i could not. i wouldn't want to tamper with Deep Thought's code, now that i think about it.

edit2: done! hot dog, let me know if this works. jar file attached.
Title: Re: Request for a Java Programmer
Post by: Hot_Dog on December 22, 2010, 05:58:57 pm
Wow, a lot happened in 2.5 hours...

Deep thought, thanks for the changes!  Nemo, you too!

I would like it, though, if all text boxes are blank at the beginning.  Also, I have a screenshot of a file I tried to compile and an error box with no error message.  Finally, your error message for ending/starting characters should be "larger than or equal to" as opposed to simply "larger than."

And just like Deep Thought, don't push yourself to go "above and beyond the call of duty."  Plain 'ol monochrome, uncompressed bitmaps are fine ;D
Title: Re: Request for a Java Programmer
Post by: nemo on December 22, 2010, 06:02:54 pm
Wow, a lot happened in 2.5 hours...

Deep thought, thanks for the changes!  Nemo, you too!

I would like it, though, if all text boxes are blank at the beginning.  Also, I have a screenshot of a file I tried to compile and an error box with no error message.  Finally, your error message for ending/starting characters should be "larger than or equal to" as opposed to simply "larger than."

And just like Deep Thought, don't push yourself to go "above and beyond the call of duty."  Plain 'ol monochrome, uncompressed bitmaps are fine ;D

yep, i already reattached a fixed version, hoping no one would notice, but you did. new version attached in the same place.
Title: Re: Request for a Java Programmer
Post by: Hot_Dog on December 22, 2010, 06:08:48 pm
Hmm...I'm not seeing the .8xp file (meaning I probably can't find it), and I still have the error message saying "Ending character must be larger than starting character" instead of "ending character must be larger than or equal to starting character."

Otherwise, nice job!
Title: Re: Request for a Java Programmer
Post by: nemo on December 22, 2010, 06:10:28 pm
Hmm...I'm not seeing the .8xp file (meaning I probably can't find it), and I still have the error message saying "Ending character must be larger than starting character" instead of "ending character must be larger than or equal to starting character."

Otherwise, nice job!

oh poop i neglected that error message. new version updated  :-[

andd i think the 8xp file is made in the same directory as the BMP. at least that's where it was for me.
Title: Re: Request for a Java Programmer
Post by: jnesselr on December 22, 2010, 06:12:36 pm
That's actually some pretty good code, nemo. I like the way you handle error messages, too.
Title: Re: Request for a Java Programmer
Post by: Deep Toaster on December 22, 2010, 06:14:54 pm
Nice, I like the error message too. One :D But noticed a bug (probably why Hot_Dog didn't see the .8xp): It only works if the .bmp file is located in the same directory as the compiler.

EDIT: And after it compiles, it seems to keep the source bitmap in memory, so when I try to compile a different font, it compiles the first one.
Title: Re: Request for a Java Programmer
Post by: nemo on December 22, 2010, 06:15:36 pm
That's actually some pretty good code, nemo. I like the way you handle error messages, too.

i always used to get mad when i entered 5 pieces of information, and the software took the time to point out each error message individually, rather than just give me everything i'm doing wrong. thanks graphmastur
Title: Re: Request for a Java Programmer
Post by: Hot_Dog on December 22, 2010, 06:18:15 pm
Much better!  Deep thought is right...I found my files on the desktop because my program and .bmp were in different folders.  But that's a minor detail, because I can say in the instructions "program and bitmap must be in same folder."

Okay, now the program allows illegal filenames (I put a ! in front of the program name), name needs to be forced to 8 characters, and, if possible, accept only monochrome bitmaps.
Title: Re: Request for a Java Programmer
Post by: nemo on December 22, 2010, 06:19:47 pm
Much better!  Deep thought is right...I found my files on the desktop because my program and .bmp were in different folders.  But that's a minor detail, because I can say in the instructions "program and bitmap must be in same folder."

Okay, now the program allows illegal filenames (I put a ! in front of the program name), name needs to be forced to 8 characters, and, if possible, accept only monochrome bitmaps.

upper case A-Z only, right? i can do that.
Title: Re: Request for a Java Programmer
Post by: Hot_Dog on December 22, 2010, 06:20:29 pm
Much better!  Deep thought is right...I found my files on the desktop because my program and .bmp were in different folders.  But that's a minor detail, because I can say in the instructions "program and bitmap must be in same folder."

Okay, now the program allows illegal filenames (I put a ! in front of the program name), name needs to be forced to 8 characters, and, if possible, accept only monochrome bitmaps.

upper case A-Z only, right? i can do that.

Numbers are allowed after the first character (the first character must be uppercase A-Z)
Title: Re: Request for a Java Programmer
Post by: Deep Toaster on December 22, 2010, 06:22:31 pm
Much better!  Deep thought is right...I found my files on the desktop because my program and .bmp were in different folders.  But that's a minor detail, because I can say in the instructions "program and bitmap must be in same folder."

Okay, now the program allows illegal filenames (I put a ! in front of the program name), name needs to be forced to 8 characters, and, if possible, accept only monochrome bitmaps.

Mine detected whether or not the bitmap was monochrome, so if nemo used the code it should also do that. Grayscale chars would be awesome, though ;)

EDIT: Theta? Would that be valid?
Title: Re: Request for a Java Programmer
Post by: Hot_Dog on December 22, 2010, 06:23:41 pm
Sorry, Nemo, it does detect monochrome.  My fault :D
Title: Re: Request for a Java Programmer
Post by: jnesselr on December 22, 2010, 06:26:09 pm
Sorry, Nemo, it does detect monochrome.  My fault :D
You mean you aren't supporting grayscale characters! *gasp*
Title: Re: Request for a Java Programmer
Post by: Hot_Dog on December 22, 2010, 06:28:42 pm
Sorry, Nemo, it does detect monochrome.  My fault :D
You mean you aren't supporting grayscale characters! *gasp*

Lol, I wouldn't mind if someone wanted to use my source code to implement it, but I'm not messing with grayscale
Title: Re: Request for a Java Programmer
Post by: nemo on December 22, 2010, 06:31:50 pm
fixed .jar file uploaded in the same (http://ourl.ca/8390/156400) place. i'm off to go to a movie, if there are any more bugs leave them here and i'll deal with them once i'm back.
Title: Re: Request for a Java Programmer
Post by: Hot_Dog on December 22, 2010, 06:40:29 pm
fixed .jar file uploaded in the same (http://ourl.ca/8390/156400) place. i'm off to go to a movie, if there are any more bugs leave them here and i'll deal with them once i'm back.

Enjoy your movie!  It works perfectly!

Deep Thought and Nemo, you rock
Title: Re: Request for a Java Programmer
Post by: DJ Omnimaga on December 22, 2010, 11:59:55 pm
Seems pretty nice guys! :D
Title: Re: Request for a Java Programmer
Post by: Munchor on December 23, 2010, 05:02:21 pm
I should've worked harder on this, but I haven't really understood the goal/what is Correlation yet :S
Title: Re: Request for a Java Programmer
Post by: Hot_Dog on December 23, 2010, 06:07:22 pm
I should've worked harder on this, but I haven't really understood the goal/what is Correlation yet :S

Well, here's the first chapter of the manual, the chapter that will answer your question :D
Title: Re: Request for a Java Programmer
Post by: DJ Omnimaga on December 26, 2010, 02:08:25 am
Nice Hot_Dog, but you should change text-based to ASCII-based because it tends to confuse people. Text-based literally means not even ASCII sprites, just sentences describing the area you're in plus menus. Or you can say ASCII-art tilemaps.
Title: Re: Request for a Java Programmer
Post by: Hot_Dog on January 13, 2011, 05:33:09 pm
Here's the files I need you to look at, Deep Thought.
Title: Re: Request for a Java Programmer
Post by: willrandship on January 13, 2011, 05:35:41 pm
Just FYI, .net is cross platform if it works with mono....:P

I like the starcraft sprites!
Title: Re: Request for a Java Programmer
Post by: Deep Toaster on January 14, 2011, 12:05:59 pm
Here's the files I need you to look at, Deep Thought.

Saw your PM, anything I can do, or is it definitely just Paint?
Title: Re: Request for a Java Programmer
Post by: Hot_Dog on January 14, 2011, 12:10:55 pm
Here's the files I need you to look at, Deep Thought.

Saw your PM, anything I can do, or is it definitely just Paint?

Thanks, Deep Thought!  It turns out I was just saving in a location different from what I "thought" (no pun intended), so I was looking at and compiling the wrong file the whole time.
Title: Re: Request for a Java Programmer
Post by: Deep Toaster on January 14, 2011, 03:58:58 pm
Oh, okay, that's great then :D Any suggestions, just ask. It's a nice way for me to learn more advanced stuff.
Title: Re: Request for a Java Programmer
Post by: Hot_Dog on March 08, 2011, 05:37:00 am
Hey, Nemo, do you have the source code for the GUI version of the font compiler?  I have a couple of changes I need to make
Title: Re: Request for a Java Programmer
Post by: nemo on March 08, 2011, 06:54:30 pm
yep, it's attached. if you need me to package it again into a .jar file, just ask and i'll do so.
Title: Re: Request for a Java Programmer
Post by: Deep Toaster on March 13, 2011, 12:21:20 pm
Hot_Dog, this isn't too important, but when you're done changing it can I have a copy of the final bmp28xp.java (source)? Just want to know how things should work :)
Title: Re: Request for a Java Programmer
Post by: Hot_Dog on March 13, 2011, 04:21:40 pm
Hot_Dog, this isn't too important, but when you're done changing it can I have a copy of the final bmp28xp.java (source)? Just want to know how things should work :)

Sure thing.  There's an issue with checksum that I have to fix, and then I'll PM you when it's up.
Title: Re: Request for a Java Programmer
Post by: Deep Toaster on March 13, 2011, 04:45:05 pm
Hmm, the checksum doesn't work? Was that a problem in the original version?
Title: Re: Request for a Java Programmer
Post by: Hot_Dog on March 13, 2011, 05:00:54 pm
Hmm, the checksum doesn't work? Was that a problem in the original version?

I'm pretty sure it existed in the original.  But this would be my fault, because I gave you the wrong byte to start counting at.  Anyways, this is something I'm looking into.
Title: Re: Request for a Java Programmer
Post by: Hot_Dog on March 14, 2011, 01:52:35 am
Okay, so i found the problem.  A byte can only go from -127 to 128, so sometimes java was adding negative numbers in checksum.  So I added 256 after every negative number.

Here's the new code.  Nemo, I also put up the new fontcompile.java, so if you could package it into a jar that would be helpful.

Deep Thought, here's some changes I added:

* Fonts must be at least 2 pixels wide / 2 pixels high
* After the 8 character program name, the data should be "0" instead of "1"
* Like I said before, you will need "CORE" before the width/height of the font characters
Title: Re: Request for a Java Programmer
Post by: Deep Toaster on March 19, 2011, 01:14:47 pm
Okay, so i found the problem.  A byte can only go from -127 to 128, so sometimes java was adding negative numbers in checksum.  So I added 256 after every negative number.

Ohh, I never thought of that, whoops.