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

0 Members and 1 Guest are viewing this topic.

Offline JonLeung

  • Administrator
  • *****
  • Posts: 3365
Pixelblocks! Revned, I've got an assignment for you...
« on: June 05, 2006, 05: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: 1093
RE: Pixelblocks! Revned, I've got an assignment for you...
« Reply #1 on: June 05, 2006, 05: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: 3365
RE: Pixelblocks! Revned, I've got an assignment for you...
« Reply #2 on: June 05, 2006, 07:15:59 PM »
Remember this topic?

Offline Revned

  • Hero Member
  • *****
  • Posts: 1093
RE: Pixelblocks! Revned, I've got an assignment for you...
« Reply #3 on: June 05, 2006, 07: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: 3365
RE: Pixelblocks! Revned, I've got an assignment for you...
« Reply #4 on: June 05, 2006, 07: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: 3365
RE: Pixelblocks! Revned, I've got an assignment for you...
« Reply #5 on: June 05, 2006, 07: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: 1093
RE: Pixelblocks! Revned, I've got an assignment for you...
« Reply #6 on: June 05, 2006, 09: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, 10:59:20 PM »
I use lego for them. Nuff said.

Offline JonLeung

  • Administrator
  • *****
  • Posts: 3365
RE: Pixelblocks! Revned, I've got an assignment for you...
« Reply #8 on: July 03, 2006, 10: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: 625
RE: Pixelblocks! Revned, I've got an assignment for you...
« Reply #9 on: July 03, 2006, 11:47:53 AM »
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: 3365
RE: Pixelblocks! Revned, I've got an assignment for you...
« Reply #10 on: July 03, 2006, 04: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: 625
RE: Pixelblocks! Revned, I've got an assignment for you...
« Reply #11 on: July 03, 2006, 05: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.