[LPC] Updated spritesheet generator
Tuesday, July 24, 2018 - 12:12
For my upcoming release I have been working a lot with the LPC content. I started off using the LPC-Spritesheet generator created by Gaurav0, however, a lot of cool stuff has been added since the last commit in this repo, and as I needed some flexibility and speed I forked it and updated it my self.
It offers all expansions made on LPC that I know about (some still missing as described in the readme). I hope it can be of any help for you as well.
You can use the generator here:
https://sanderfrenken.github.io/Universal-LPC-Spritesheet-Character-Gene...
And check the sources here:
https://github.com/sanderfrenken/Universal-LPC-Spritesheet-Character-Gen...
I was wondering if anyone knows of a way to make this with HTML and css only. I was hoping to use this on my laptop without installing a local server and such. It seems like it needs this right now to save/export the resulting sheet correctly. Perhaps I am going about this wrong?
I have also been trying to increase the spritebox size, to make a giant type creature also. This went okay and it is 200 x 200 px.
I have found details on previewing the spritesheet using css only, but am not sure how the option selecting system could work.
I am not really sure if I understand the problem, but you dont need to run a server. When you clone the repo, you can open the index.html in your browser. The generator only uses js in addition to html/css, which can run locally in your browser. Let me know if that helps you.
Using just html and css, well propably it is possible, but I guess it would be much more cumbersome than using js.
How does this work?
When I open index.html, I see various buttons and options, but none of them actually do anything. I have JavaScript enabled, I've tried on multiple browsers, I've downloaded the source, I've tried Gaurav's version, all with the same result. I've not found any other instructions or list of requirements anywhere.
What am I doing wrong?
You can use the hosted version here: https://sanderfrenken.github.io/Universal-LPC-Spritesheet-Character-Gene...
If you want to make changes etc, you should clone the repo and open the index.html. Does that help you?
Thanks for your help.
My problem is that whether I try a hosted version (whether Sanderfrenken or Gaurav), or download and open index.html, I see various buttons "Save Result as PNG," etc, and menus "Sex," "Body," etc. However, none of the buttons or menus do anything when clicked (except that the "Choose File" button opens up a dialog but loading a file has no effect, and the various "wound" checkboxes check and uncheck but otherwise have no effect), and I see no sprites at all. Have I missed something? Using Windows 10 and Chrome.
@NoOne00000 Do you have JavaScript enabled?
HTML5 Canvas Old School RPG
Can you try another browser, maybe from another device? Just to confirm that it is propably a combination of your OS and browser.
Not sure if you still read these, or are still updating this, but there are some issues:
1. The gloves section is missing
2. Many of the licenses/credits are missing
3. The Tabard is suppose to go in front of the armor, but it's going behind the armor instead. Also, when I add or remove something, it disappears
4. For many of the options (including weapons, armor, and shields) you cannot select to remove them.
Hi there, I am in the middle of a refactor of the generator. Your issues should be addressed soon, I will keep you updated here!
Hi everyone, I have finished a large refactoring of the generator. As a result, I have been able to remove > 5k lines of HTML, a lot of JS and fix a huge amount of bugs.
More importantly now, is that adding new assets should be much easier. Moreover, the rendering order of the assets is not any longer dependent on the HTML tree order. Istead, each item has it's own z-position defined in a json file.
Moreover, these json files encode not only the z-position of the items to be drawn, but also their location, whether they are oversized or not, their preview rows and actually anything you need. In addition, an item can exist of n-layers, which is needed for example for the capes, some hairstyles and some bodies (like the wolfman). For each layer you define, you can specify the z-position it needs to be drawn at.
Look at the cape definition as an example:
https://github.com/sanderfrenken/Universal-LPC-Spritesheet-Character-Gen...
Also, the generator now supports 5 body types (male,female,pregnant,muscular,child) and hides items that are not applicable for the body type selected (which again, is defined in the json).
In the process, I also fixed the preview functionality to preview images from your machine in the generator. And for each category, there is also now added the "none". option, to easily remove a previously selected item.
I am quite happy how it turned out, and thanks to Bluecarrot for thinking along the setup.
Please, let me know what you think about it!
Looks great! Good job with the generator!
Hey Castleonia, I was toying with the generator and had an idea I thought was worth sharing: it would be nice if the generated characters could have multple weapons on the same sheeet, for instance, the main characer in a game can wield different weapons throughout the game. The solution would be to have the generator so that if multiple weapons were selected, it would create the appropriate walking, attacking and dying animations below the first ones. That way, a character would be able to switch between, say, a bow and a sword, without having to splice together seperate spritesheets.
Also, I found a glitch with the wizard hat and the simple staff conflicting, as shown below. It's one magical staff if it can do that! :)
Anyways, thanks for dedicating your time to make such a wounderful tool, keep up the good work.
-Sincerely
FiveBrosStopMosYT
download.png 11.8K
I also found that the orc head blocks the view of his weapon above his head in the upward swing animation.
download_1.png 9.4K
Hi!
Yes those are valid issues, but they are not really related to a bug: It's the sheets themselves that cause this. The orc's head is somewhat lower than that of the human bodies, and therefore the cutout of the frames for the upward swing don't match properly. This could only be adjusted by someone creating either specific sheets for the orc, or add additional layers that prevent this glitch. The same goes for the wizard hat and the weapons.
For that, one should have actually hat layer at z-position n, a weapon layer at z-position n+1 and another hat layer at z-postion n+2 that covers the relevant parts.
I understand your request for sheets with multiple weapons! The engine I currently use for my game doesnt support larger sheets than 4096*4096, so I pack and load it in the buffer as efficient as possible.
So in essence, if one switches from weapon, I would load the sheet with the new weapon. Once loaded and rendered, I then dealloc the old weapon sheet, which as it is bundled in separate sheets also releases the pointer to the actual sheet it took the frames from.
Having all frames in one sheet therefore IMO doesn't appear very efficient.
But why dont you give it a try adjusting the generator, and I can look at the pull request!
I think the only solution to the orc problem is to draw the weapons without cutouts on two separate layers. You can see an example of this here https://opengameart.org/content/lpc-extended-weapon-animations ; the weapons-extended-layers.zip version includes two layers---"front" and "back" layer--- which go over- and under- the body respectively and therefore avoid this problem. The two layer images are easy to create---there are just a few frames that need to be put on the "back" sheet.
The current generator doesn't use this method, but with castelonia's recent improvements, it supports multiple layers per object, so could be updated to support this method, at least for weapons where the multiple layers already exist.
The hats have the same problem, but they need to be in front of or behind the weapons; it's why the hats in this submission https://opengameart.org/content/lpc-gentleman have two layers as well. It's a problem for almost all the hats.
That's a good point about those weapons and the hats, I will update them with their hind frames in the generator asap!
Ok, thanks guys! :)
I updated the oversize slash weapons to use the layered frames:
https://sanderfrenken.github.io/Universal-LPC-Spritesheet-Character-Gene...
It looks much better now when using the non-humanoid bodies! So I think we should aim to make this the standard for new weapons added as well, as the generator quite easily supports this now:
https://github.com/sanderfrenken/Universal-LPC-Spritesheet-Character-Gen...
I will do the dagger and the gentleman hats also asap.
Hi, Castleonia!
I've been messing around with Bluecarrot's pirate stuff as of late, and I stumbled upon a problem, as you can see in the image below, there seems to be some sort of gllitch with the protheses that causes a purple blob around them both. Am I using an old version or something?
-Sincerely
FiveBrosStopMosYT
pegleg_hookhand_example.png 9.6K
Hi, not a bug, a feature actually---just not really explained (realized I forgot to explain it on the pirate sheet as well)...
The pink mask is to hide parts of the base sprite (e.g. the remainder of the leg) that should be missing. It is designed this way so the prostheses work with multiple bases. To get rid of it, in the generator, click "Replace Mask (pink)". I'll add a note to this effect to the pirate page too.
Ok, thanks, that's a really clever way to do it. :)
I saw that the generator has updated, and I saw that a few things are missing or do not work when they are selected.
1. Plate shoulders.
2. Armored Gloves.
3. Sara's tunic use to be there, but the option toselect it seems to have been removed.
4. Some cape colors (male sprites only).
I assume that you are working on some of these, but just letting you know.
example.png 27.3K
Hey, thanks for pointing out these issues. We missed some of these in the process of the recent massive clothing refactoring https://opengameart.org/content/lpc-clothing-updates .
I actually missed that Sara has a unique tunic; I'll adapt that to the updated bodies and add to the generator. Everything else is due to simple mistakes with file names and such; should also be easy to fix.
Please let us know if you notice any other issues!
Halberd is facing wrong direction for right-facing thrust animation.
Thanks for maintaining this resource!
Thanks for pointing out! I converted the issues to issues on github:
https://github.com/sanderfrenken/Universal-LPC-Spritesheet-Character-Generator/issues
The gloves and shoulders I fixed already. Bluecarrot can you take a look at the remaining open issues? I am not sure how to resolve those myself, I think they need you:)
Boom Shaka, I dont understand your issue. Is it about this asset?
https://sanderfrenken.github.io/Universal-LPC-Spritesheet-Character-Generator/#?body=Body_color_light&head=Human_male_light&weapon=Thrust_oversize_halberd
If so, I think it works as it should, am I wrong?
Yes, but I didn't realize I had the female body selected. Looks like the same with the pregnant body.
https://sanderfrenken.github.io/Universal-LPC-Spritesheet-Character-Generator/#?body=Body_color_light&head=Human_male_light&weapon=Thrust_oversize_halberd&sex=pregnant
https://sanderfrenken.github.io/Universal-LPC-Spritesheet-Character-Generator/#?body=Body_color_light&head=Human_male_light&weapon=Thrust_oversize_halberd&sex=female
Please disregard if these are design limitations
Thanks for pointing out; the inverted female halberd seems like a mistake. Also we will probably be able to adapt this to use the same sprite for both male and female bodies now.
Yes, I will address the other issues, thanks! (Might take a few days).
Please share any other suggestions or issues you encounter!
Dude this is such a cool generator. GJ!
Co-founder of Swedish indie gaming studio Silver Lagoon Entertainment
Pages