Author Topic: Pixelblocks! Revned, I've got an assignment for you...  (Read 27205 times)

0 Members and 1 Guest are viewing this topic.

Offline JonLeung

  • Administrator
  • *****
  • Posts: 3695
Pixelblocks! Revned, I've got an assignment for you...
« on: June 05, 2006, 06:26:59 pm »
Or anyone else who can do some coding...I thought of Revned because I figure this might be very similar to his slicer/splicer program that he could just start with that.



I haven't spent money on anything cool in a while, and I was thinking of spending on some PixelBlocks and making game sprites out of them.  They're relatively expensive, though, so I only want to buy as much as I need.  Instead of taking a screen capture of a game sprite that I want to make out of PixelBlocks and then counting the individual pixels of each colour, I was hoping you could write a program that counts how many pixels of each colour there are (RGB values are fine).  Then I'll know how many of each colour I should buy with minimum extra.



I'll post pics of my other PixelBlock creations so far, but I only have two...an Octorok and a Super Mushroom...



EDIT: Here they are:

User posted image

User posted image


Offline Revned

  • Hero Member
  • *****
  • Posts: 1094
RE: Pixelblocks! Revned, I've got an assignment for you...
« Reply #1 on: June 05, 2006, 06:35:44 pm »
I'll take a crack at it, I've got plenty of extra time. I suppose I could just modify my slicer to do 1x1 tiles and count how many it comes across each.

Offline JonLeung

  • Administrator
  • *****
  • Posts: 3695
RE: Pixelblocks! Revned, I've got an assignment for you...
« Reply #2 on: June 05, 2006, 08:15:59 pm »
Remember this topic?

Offline Revned

  • Hero Member
  • *****
  • Posts: 1094
RE: Pixelblocks! Revned, I've got an assignment for you...
« Reply #3 on: June 05, 2006, 08:21:36 pm »
http://www.geocities.com/revned22/PixelCounter.zip



Try that. Not very elegant, but it works. You can try the .bat, but if Windows XP is like 98 the command line will go away as soon as the program ends. You'll have to open the DOS prompt and manually find your way to the jar, and run the command in the .bat. Anyway, running it will tell you how many occurrences of the pixels it finds, and it'll write the pixels to files just like Tile Splicer. Sorry, I couldn't figure out an easy way to get the RGB colors, and I'm really rusty at programming. So you'll have to manually open the .png files to see what colors they are.

Offline JonLeung

  • Administrator
  • *****
  • Posts: 3695
RE: Pixelblocks! Revned, I've got an assignment for you...
« Reply #4 on: June 05, 2006, 08:26:59 pm »
Could it maybe name the .png files the number of that pixel?



I suppose if there are more than one with the same number (for example, in the SMB3 Mushroom, there are the same number of black and white pixels) you could call one 2A.png and another 2B.png.  Or, if there are more than 26 colours, maybe something like 2-001 and 2-002.



I dunno.  Just ideas.  If the PixelCounter works I won't bother bugging you about it.



I guess you probably want Coinage for that, eh?

Offline JonLeung

  • Administrator
  • *****
  • Posts: 3695
RE: Pixelblocks! Revned, I've got an assignment for you...
« Reply #5 on: June 05, 2006, 08:34:17 pm »
Wait, how does the program work exactly?  Say I have an image named "pic.png".  What should the command line say?



EDIT: Never mind, I figured it out.

"pixelcounter.jar pic.png"



But wait, where does it tell me how many of each colour of pixel I need?

Offline Revned

  • Hero Member
  • *****
  • Posts: 1094
RE: Pixelblocks! Revned, I've got an assignment for you...
« Reply #6 on: June 05, 2006, 10:28:11 pm »
Sorry, I forgot to tell you that it reads "image.png" by default. You need to read what displays on the command line. Example scenario: it tells you that there are "4 occurrences of pixel #5". You open "5.png" and see that it is red. That means you need 4 red blocks.



I don't care about coins, really.

Offline Jade

  • Newbie
  • *
  • Posts: 18
RE: Pixelblocks! Revned, I've got an assignment for you...
« Reply #7 on: June 06, 2006, 11:59:20 pm »
I use lego for them. Nuff said.

Offline JonLeung

  • Administrator
  • *****
  • Posts: 3695
RE: Pixelblocks! Revned, I've got an assignment for you...
« Reply #8 on: July 03, 2006, 11:29:15 am »
LEGO can work too. But I sold all of mine in a garage sale years back (regrettably), and Pixelblocks catch the light better.



I do really like those LEGOLand exhibits, though.



Check this out!  Nintendo's Legend Of Zelda pixel thingies!

Offline DarkWolf

  • Hero Member
  • *****
  • Posts: 640
RE: Pixelblocks! Revned, I've got an assignment for you...
« Reply #9 on: July 03, 2006, 12:47:53 pm »
I find thread to be more cost effective.  I wouldn't mind building one PixelBlock model though.



User posted image

User posted image

Offline JonLeung

  • Administrator
  • *****
  • Posts: 3695
RE: Pixelblocks! Revned, I've got an assignment for you...
« Reply #10 on: July 03, 2006, 05:46:03 pm »
Hey...that Fox looks familiar.  He throws that thing on his back at enemies, doesn't he?  What game is he from?

Offline DarkWolf

  • Hero Member
  • *****
  • Posts: 640
RE: Pixelblocks! Revned, I've got an assignment for you...
« Reply #11 on: July 03, 2006, 06:37:02 pm »
He's from Psycho Fox for the Master System.  I have some Nintendo stuff too, but I don't happen to have any pictures.  Maybe I can snap a few later.