Custom Sprites [v1.5]

The Partridge Family were neither partridges nor a family. Discuss.
User avatar
LuX
Posts: 1492
Joined: April 22nd, 2012, 12:33 pm
Location: Finland

Custom Sprites [v1.5]

Post by LuX » April 23rd, 2012, 12:02 pm

Anyone got an idea what's the simplest way to add custom sprites?

Writing pixel by pixel is a pain in the ass.
While i'm anxiously waiting for an answer, I'll try to make an image scanner that will save the image in a text file and can be copy pasted like the other face and poo <--(lol seriously?) sprites.

- LuX

Edit: Here's the project! n'joi

Latest Version: 1.5;
v1.1: Some fixes and cool new features.
-Fixed image size bug
-And something... can't remember...

v1.2: Some fixes and cool new features:
-Better error handling: force continue, etc.
-Slightly better control layout
-Drag drop image path to path strip
-Initial directories are set to desktop
-Probably forgot to list something...

v1.3: Some fixes and cool new features:
-Fixed save bug, where you couldn't save multiple times in one session
-Drag drop image to path strip will now attempt to load the image automatically
-Pointless, but none the less cool feature: Save extension selection!
Save your image in .txt, .lux or .chili :D No actual difference between them, other than awesomeness.
-Also the program opens at the center of the screen and will pop up nicely side by side :)

v1.4: Some fixes and cool new features:
-Faster scanning, completely new scan loop
-Images will automatically set their size, finally

v1.4.1: Quick update:
-Error handle fix... :x

v1.5: Some fixes and cool new features:
-Fast scanning, with crash "protection"
-Auto detect if image is too big
-Estimate scan time
-Direct output to selected folder (makes it a ton faster)
-While scanning it goes to a locked mode to prevent "visual" crashing, to prevent confusion

Bugs currently: Max image size seems to be 423 x 182, so I put a detector to tell if its too big

Insturctions (Old, slightly different than in 1.3):

1. Open. If you fail this, -> :cry:
2. Go to LuX: Image and click [...] search for your image, make sure it's an image.
3.5 >OR< drag the image to the path strip, release: automatic laziness...
4. Click [Load Image]. If the path is legit, your image will pop up on the gray area.
5. If you have, write the transparent colors and make sure it's checked. For example if your image has white edges, that you don't want in the final product, set the color as 255, 255, 255 or for black 0, 0, 0, as it is on default.
5.5 Quick tip on the transparent color; If you have no idea what it's RGB is, you can just scan to see what it is.
6. If you want to, you can change the "Line:" to correspond on the variable names in your project.
7. Click [--- Scan ---], in 1.4, instead of scrolling through pixel by pixel, it just throws the whole lump of text at once, expect lag if you have a crappy computer or scan big images.
8. Click [--- Save Text ---] and select directory
9. For pointless reasons you can select the file type you want to save in, default of course *.txt...
10. ????
11. Profit.

Insturctions (new, for 1.5):
1. Open
2. Drag drop to open an image or select through [...]
3. Check and change the settings to match the image (Automatic size, tho)
4. Click [--- Scan ---]
5. Select output folder, name and extension (creates a new file)
6. Click OK! and wait untill the scanning screen disappears
(!6.) If the OK! won't appear, make sure you have given all the information correctly!
7. Remember to be patient when scanning large images, it might take a lot longer that the estimated time tells, since it doesn't count the extra slowdown, it just displays the fastest possible time.

Inform me about any possible bugs :mrgreen:
Attachments
Scanner15.JPG
Scanner15.JPG (56.25 KiB) Viewed 27563 times
LuX Image Scanner v1.5.rar
(Medium)
(70.69 KiB) Downloaded 3398 times
LuX Image Scanner v1.3.rar
(Light)
(66.81 KiB) Downloaded 1054 times
Last edited by LuX on May 30th, 2012, 1:33 pm, edited 14 times in total.
ʕ •ᴥ•ʔ

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Custom Sprites

Post by chili » April 23rd, 2012, 12:22 pm

The easiest way is to load the sprite from a bitmap. This is coming soon bro.

As for generating compiled sprite source code from an image file, I already made that program and posted it here on the forum, source code and all. :lol:

How do you think I made the all the sprites for the poo game. ;)
Chili

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Custom Sprites

Post by chili » April 23rd, 2012, 12:25 pm

Here is a link to the thead containing my utility: fukbmp
Chili

User avatar
LuX
Posts: 1492
Joined: April 22nd, 2012, 12:33 pm
Location: Finland

Re: Custom Sprites

Post by LuX » April 23rd, 2012, 12:43 pm

Damn. I was almost done with my project :lol:
Well I'll finish it off anyways...
ʕ •ᴥ•ʔ

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Custom Sprites

Post by chili » April 23rd, 2012, 12:48 pm

Lemme see it when you're done. :P
Chili

User avatar
LuX
Posts: 1492
Joined: April 22nd, 2012, 12:33 pm
Location: Finland

Re: Custom Sprites

Post by LuX » April 23rd, 2012, 3:00 pm

Alright... Done did it!

Should work fine now, and it's so easy, my grandma could use it :D
There might be some bugs in it, dunno lol.

Tell me if you find something.

On another note, this is made in visual basic 2010, so you might need to download something for it to work...

Edit: Oh yeah scanning takes some time so grab yourself some popcorns, or something :lol:

Latest Version: 1.1; some fixes and cool new features.
Bugs currently: None that I know of 8-)
Last edited by LuX on April 29th, 2012, 6:51 pm, edited 3 times in total.
ʕ •ᴥ•ʔ

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Custom Sprites

Post by chili » April 23rd, 2012, 3:14 pm

Ewww! Visual Basic... :?

Hehe, nice work though. Is that built using the .NET framework?

(PS, the porn collection is on drive D:)
Chili

User avatar
LuX
Posts: 1492
Joined: April 22nd, 2012, 12:33 pm
Location: Finland

Re: Custom Sprites

Post by LuX » April 23rd, 2012, 3:20 pm

chili wrote:Is that built using the .NET framework?
...Possibly?
chili wrote:Ewww! Visual Basic... :?
Hehe... that's why I try to learn c++ now.

An I also found a bug incase someone actually uses my tool, the height needs to be set one less, so if its 90 set it at 89.
ʕ •ᴥ•ʔ

User avatar
chili
Site Admin
Posts: 3948
Joined: December 31st, 2011, 4:53 pm
Location: Japan
Contact:

Re: Custom Sprites

Post by chili » April 23rd, 2012, 3:27 pm

Looks like .NET from the icon in the application. Very nice for making utilities and the such, much easier than coding straight WINAPI. I used .NET on a few projects when I wanted a nice user interface, but I did it with C#.

Anyways, thanks for sharing broseph. Maybe some other boardies can get some use out of your util too.
Chili

User avatar
LuX
Posts: 1492
Joined: April 22nd, 2012, 12:33 pm
Location: Finland

Re: Custom Sprites

Post by LuX » April 23rd, 2012, 6:49 pm

Bump for the new fixed version ;)
ʕ •ᴥ•ʔ

Post Reply