Author Topic: Programmerin' ideas  (Read 10935 times)

MDude

  • Meticulous Maniac
  • Hero Member
  • *****
  • Posts: 638
  • Enjoy machine world.
    • My Soundcloud Account
Programmerin' ideas
« on: July 20, 2006, 08:43:15 pm »
So, I've been thinking about making some programs for a while, and I decided to put my ideas up here so you can comment on them, post you own ideas, and stuff, but also just to help me organize myself and decide what to try to do first.

One thing I've thought of is trying to make my own little graphics editor. I figured the best place to start would be monochrome .bmp files, since really, how simpler can you get than that? So, to figure out how .bmp files work, I made a quick doodle in paint and opened it up using the text editor that command.com uses, and I was able to edit it without causing any errors. That's a great start, honestly, since I half expected to get an error when I tried to re-open it in paint. However, I haven't figured out what each character does yet. Also, since you can't copy from or paste from the command prompt, and when I try to edit the file in a text editor, all the other characters look different, and  tend to get errors more. I was able to change the file without messing it up when I changed it to a .txt file and opened it in WordPad as a MS-DOS format text file, but I think there could be a better solution. Hence the next idea!

Specifically, the idea is to make a reader/editor for data files that displays the characters as circles with the character map number inside, instead of just the character, which can look different in different fonts. It would probably be a good idea to show the character itself below the number, for reference. I'm also hoping to be able to make to copy to and paste from the clipboard. This program would mainly be to help me examine file types so I can make programs that work with 'em.

Another thing I'd like is to be able to do is make a program that can take text and turn it into sentence maps using grammar rules, and eventually into graphical charts that show the logical meaning of the sentence. The first step is to get the program to recognize individual words and their formal parts of speech. Then I would need to make the program figure out what a word is being used as: for instance, if two nouns are placed in a row, like in "dog house" or "water balloon", the first noun is being used as an adjective to the second. At this point, the sentence map should be fairly accurate. This would let me make sure that the program properly associating the nouns with adjectives, verbs, and adverbs. Then I would make the program display how the words are related using Venn diagrams. After that, I would try to make the program take a set of statements and use deductive reasoning to reach conclusions. I would then use this as the basis for an AI, or at least part of one.

As if that wasn't enough, I would like to make a DOS shell with vector graphics, because vector graphics are cool and you can do some sweet stuff with them, like rotation and scaling. I could even make the objects on the screen go all wiggly for the screensaver. That's really the only reason I have for making it, although after I make this I'll probably make most of my other programs work inside of it. I would also like to make some existing open source program compatible with it. Anyway, I'll post some more stuff later probably.

FyberOptic

  • King of Earth
  • Administrator
  • Hero Member
  • *****
  • Posts: 2522
  • Oh god what is that?
    • Fybertech.com
Re: Programmerin' ideas
« Reply #1 on: July 20, 2006, 09:15:00 pm »
I'm curious what language you intend to use to write any of these programs in.  I'd be able to give more direct comments and such if I had a better idear how you were gonna do'em.

Once upon a time I set out to learn how BMP files worked as well, since the other file formats use compression which wasn't something I wanted to get into.  While it's possible to figure out some things by making different files and viewing their contents to see what's different, you'll never get a good enough idea of what all the junks in there are for unless you take a look at the actual file format info.  It's all over Google, using phrases like 'bmp file format' to search with.  Wikipedia might be a good spot, too.  Once you know the actual structure of the file, it's easier to make your own from scratch from a homemade graphics editor or whatnot.

A thing with monochrome bmp files, btw, is that the pixels are packed 8 per byte.  So just changing one byte will change 8 pixels.  Each bit of the byte is either 0 or 1 of course, which represents white or black.  That might give you a better idear of what's going on.

As for how to edit a binary file, what you need is a hex editor.  Normal text editors mess up binary files because they don't know how to handle all the special characters and lack of line feeds/carriage returns.  A hex editor generally displays the numeric code of each character on the left (and in hexadecimal, which you might want to look up if you don't know how numbering works with that), and the ascii representation on the right.  The program I use for editing pretty much everything is UltraEdit, because it can edit both text and binary files, has syntax highlighting for most popular programming languages, and lots of other advanced features.  It costs some dollars though, and I don't recall how well the demo works.  You can find free hex editors out there too, that's all you really need for what you're trying to do.  Google has a million, surely.

If there's anything you wanna ask, feel free~!

MDude

  • Meticulous Maniac
  • Hero Member
  • *****
  • Posts: 638
  • Enjoy machine world.
    • My Soundcloud Account
Re: Programmerin' ideas
« Reply #2 on: September 19, 2006, 06:27:33 pm »
I'm thinking I'll try to make them in C, since that and Basic are the only ones I've learned. I have C++ for Dummies but I don't realy care for it very much. And I'd rather use C that Basic for speed. Also, one of the reasons I was interested in .bmp files was that I'm considering that platform game I posted srites for in C instead of making it in Game Maker, although I think I'll just keep working with the current verion of it until I get a GP2X.