Jump to content

[Mod] I created a program that can probably make this game HD, Are you interested?


KingCoin

Recommended Posts

As the title says, I created a program recently to fix the textures of the game I was playing (pokemon insurgence). If this game's textures are png files I should be able to run them through my program and post an HD texture pack here if anyone shows interest. Here is a before and after image to show you what my program is capable of doing/what it did to some pokemon insurgence textures:

EDIT: Their was interest expressed so I've gone ahead and created an HD texture pack for the game. THIS WILL NOT AFFECT YOUR FPS OR PERFORMANCE IN THE GAME.

To install it simply download this zip file, extract the files, paste it into your pokemon reborn folder, merge when prompted, choose replace for all conflicts.

Please reply with feedback for me if you downloaded it, found anything wrong with it, or liked it. I appreciate feedback!

Download Texture Pack:

https://drive.google.com/open?id=0B0muzpfLQvV4UkdEc2NHdkZKak0

Download my texture smoothing program:
https://drive.google.com/open?id=0B0muzpfLQvV4dktmU0R1N205Qms

Running the program yourself will allow you to specify various settings for smoothing and tailor the texture pack more to your liking. You can also use the program on any pokemon fangame as long as you have access to the png texture files used by the game.

To use the program you must have java. To run it:

1. Open command prompt (search for cmd in the search bar on the start menu).
2. Navigate to the directory containing the program. (Use the dir command to see all the folders in your current directory, use the CD command to enter one of the folders. Do this repeatedly until your in the right directory)
3. Type in: "java -jar KingsTextureSmoother.jar" without quotes and press enter.
4. Follow the instructions given by the program.

If you're having trouble getting it to work you can also check out this great tutorial made by MetrololAce which shows how to run the program:

https://www.youtube.com/watch?v=1AN7VB0ZmB8

If you're wondering what the different detail preservation settings do, here's an example image which shows what each possible setting looks like:

 

MOhEE7D.png



The only known issue at the moment is that for very few(only a couple out of the 8000+ of the textures used by the game) converting with my program will remove the transparency. I haven't been able to find a solution to this yet and it appears to be an issue with the png files themselves and not my program. The only known way to fix these files that has been found by people in this thread so far is to run them through one of these websites before converting: http://compresspng.com/ or https://tinypng.com/

I've tested it and it works fine as you can see in this image:
d75OL2E.png
cyc1P2Y.png

Edited by KingCoin
Link to comment
Share on other sites

  • Replies 140
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

  • Global Mods

Not sure about the overworld, But I think this looks nice in battle! I would definitely try these out next time I played reborn (which will probably be quite soon judging by how often I'm drawn to the forums and keep thinking about the game)

Link to comment
Share on other sites

Would the program also make the overworld sprites HD?

Yes, it would do the best it could with the limited pixels there are originally on overworld sprites.

6GjrPte.png

The program currently smooths them this much and intentionally doesn't smooth overworld tiles as much as all the other textures because I thought it might mess with how the tiles line up in game. I never actually tested to confirm if it would have that negative effect or not though.

Edited by KingCoin
Link to comment
Share on other sites

what about the increased strain on the pc though? i guess it will increase the lag on certain areas that are already laggy? otherwise this is kewl

My changes don't affect performance at all. It doesn't increase the resolution of the images, it just fixes their pixelation from being scaled.

Link to comment
Share on other sites

Ok, I've gone ahead and created the texture pack. Please tell me if I should put it in another section of the forums besides this one. I've edited my original post with the file.

Also, if anyone is interested. I can apply this process to any game in existance that uses png files for textures so if you have another fanmade pokemon game or something you think would benefit from my work, let me know.

Edited by KingCoin
Link to comment
Share on other sites

  • Global Mods

Found a Bug: it doesn't affect gen 6 team/box minisprites (but does change their portrait in summary)

Also does the style slightly remind anyone else of the sphax texture pack for minecraft?

Link to comment
Share on other sites

Found a Bug: it doesn't affect gen 6 team/box minisprites (but does change their portrait in summary)

Could you tell me which pokemon(by name) specifically? My program says "Improved a total of 7681 textures, 338 could not be improved.". So almost all textures should have been changed.

Link to comment
Share on other sites

  • Developers

This looks awesome! Didn't know this was even possible with Essentials - I always assumed the graphics are so bad because of some technical limitation.

Didn't find anything wrong with this pack yet but I've only played for couple of minutes to see the difference. I think I'll never play reborn without this again - I'll tell you if I find anything wrong. Maybe you should talk to Ame to incorporate it into E16?

Would you be willing to make your program (or better yet the source code) public so that future versions of Reborn and other games could benefit from it as well?

Anyway thank you very much for this! I'm really really greatful that my favorite games finally looks as good as it deserves!

Edited by baldr
Link to comment
Share on other sites

Would you be willing to make your program (or better yet the source code) public so that future versions of Reborn and other games could benefit from it as well?

I'd be willing to do that however not in the program's current state. I think I can improve the textures a lot more than I do in the current version with some changes I thought of recently and the program is currently too hard to use for anyone without a programming background. I don't have time to improve the program right now but I'm definitely willing to release it in an improved version when I get the time as long as I keep seeing interest in such a thing.

Also, I'm glad you like it so much! It's good to know when people appreciate your work. :D

Link to comment
Share on other sites

  • Developers

I'd be willing to do that however not in the program's current state. I think I can improve the textures a lot more than I do in the current version with some changes I thought of recently and the program is currently too hard to use for anyone without a programming background. I don't have time to improve the program right now but I'm definitely willing to release it in an improved version when I get the time as long as I keep seeing interest in such a thing.

Also, I'm glad you like it so much! It's good to know when people appreciate your work. :D

Yeah I understand that. :-) It shouldn't be too hard to make it as a simple batch script to run from command line - right?

Just out of curiosity what programming language did you use to write it? I'm quite interested in the tricks you used to achieve that and what further tricks you came up with for the future.

Link to comment
Share on other sites

  • Global Mods

Could you tell me which pokemon(by name) specifically? My program says "Improved a total of 7681 textures, 338 could not be improved.". So almost all textures should have been changed.

My reborn pokemon collection is by no means extensive, but it seems to be all my gen 6 pokemon. for me this is litleo, fennekin, flabebe, greninja, dragalge, noivern and pangoro.

I've also just noticed that dustox's shiny portrait hasn't worked either.

It also gives some overworld people sprites really small eyes that look very silly.

Edited by DreamblitzX
Link to comment
Share on other sites

My reborn pokemon collection is by no means extensive, but it seems to be all my gen 6 pokemon. for me this is litleo, fennekin, flabebe, greninja, dragalge, noivern and pangoro.

I've also just noticed that dustox's shiny portrait hasn't worked either.

It also gives some overworld people sprites really small eyes that look very silly.

Thank you for the information. I haven't had a chance to look at the gen 6 pokemon sprite issues yet but I believe I've fixed the small eyes thing in my latest version of the code. I probably won't post a version of the texture pack with this change though until I look into the other issue you mentioned and see what I can do to fix it first.

If you're curious, the small eyes issue stems from an issue I've had for a while. My algorithm tries to smooth corners and diagonals. A lot of things have eyes which are just a 2x2 square of pixels so my program would detect that there was a corner on the eye and replace the tip of the corner with a blended pixel. It did this for all 4 pixels in the eye because they were all detected as corners and left the sprite with a faded or removed eye/eyes. I've made a change that makes sure my program can't remove details from any textures anymore so that particular issue should be fixed.

Link to comment
Share on other sites

Yeah I understand that. :-) It shouldn't be too hard to make it as a simple batch script to run from command line - right?

Just out of curiosity what programming language did you use to write it? I'm quite interested in the tricks you used to achieve that and what further tricks you came up with for the future.

At the moment the program has about 1,200 lines of code although I admit that a lot of the code could be written better and some is repetitive or unused. It's written in java so to use it you would need to have java on your computer. The main reason it's not easy to distribute at the moment is that it currently lookes in a "textures" folder inside the directory of the project and uses that folder for input. When you run the program it prints information about what it's currently doing to the console/terminal and traverses the textures folder recursively converting all the textures it finds. When a texture is converted the program first tries to convert the entire texture image at once, if it can't improve the image then it divides the image up into 32x32 pixel sub-images and tries to smooth each individual sub-image, then rebuilds the original image and saves the changes.

Images which could be improved are saved to the "results" folder in the same directory as the textures folder and automatically saved in a directory structure the same as it was taken from in the textures folder. Images that couldn't be improved are saved into the "rejects" folder.

There are several operations I apply to the images but the main ones that it does at the moment are:

1. getOffset() - determine the offset of the sprite in the image from the edge of the image. (some sprites which have been scaled to 2x size were put an odd number of pixels from the edge of the image, some were put at an even number of pixels from the edge.

2. getImageScale() - determines the scale of the given image (if it has been resized to 2x normal size, 4x normal size, etc)

3. shrink() - this is only called on images which have 4x scale to convert them to 2x scale, they are later resized after smoothing/sharpening

4. sharpenImage() - loops through every other pixel in the image(skipping a pixel between each pixel it checks) adding pixels between any two pixels that are diagonal to each other whose shared adjacent pixels are not the same color.

5. smoothImage() - loops through every pixel in the image and adds a blended pixel between any diagonal pixels of the same colors to smooth the edge(Tricks your brain into thinking it isn't jagged like a staircase even though it technically is)

This image illustrates the process on an image which has 2x scale detected. The middle image is after sharpenImage() is applied.

xhuqyI9.png

So when I want to create a texture pack I simply do these steps:

1. Paste the entire graphics folder for the game into my textures folder.

2. Compile and run my program.

3. Navigate to the results folder.

4. Pack the newly created graphics folder from the results folder into an archive file.

5. Upload the archive file.

What makes the program difficult to use in it's current state is that if I were to release it as a runable jar file that anyone could use, The textures folder and the results folder would be packaged into the runable jar file and the user couldn't access them(I'm pretty sure). They would also have to know how to run it with a terminal so output could be displayed if they wanted to be able to know when the program was finished converting (It takes quite a while to convert every texture, for me it's as much as 15 minutes). I'm not really an expert programmer(still at university for another year, I've probably only written like 500,000 lines of code in my lifetime) and I thought of the process while taking a shit then wrote the code in a night so I'm sure some things could be implemented better. If you have any ideas let me know. At the moment I'm thinking I could allow people to choose the location of the textures folder and the results folder by inputting it in the terminal but that would still require them to launch it from a terminal.

As far as changes that I intend to make:

1. smoothImage() is currently not called on tiles to avoid making them no longer line up properly or blending them with nearby tiles in their respective texture file. I intend to make some changes to prevent issues it may cause with tile alignment and start calling this method on all textures including tiles.

2. I intend to make the program work better in situations like this:

eGxiXxv.png

Edited by KingCoin
Link to comment
Share on other sites

It works, and its awesome.

This actually improved my performance! I used to have slight lag at route 2 and now it is so smooth!

I really support that this should go sticky somewhere in the forum!

Link to comment
Share on other sites

  • Developers

Wow! That's a really detailed explanation! :-)

Launching it from command line is probably not a problem for anyone skilled enough to create a pokemon game so I wouldn't worry about that too much. Java might be a bit of a problem but most people probably have JRE installed anyway. The only real issue is to make it accept a path to the source images and a path to save results as arguments. My own experience with Java is a bit poor but it shouldn't be too hard I think?

Very good work so far! I'm looking forward to see future improvements.

Link to comment
Share on other sites

My reborn pokemon collection is by no means extensive, but it seems to be all my gen 6 pokemon. for me this is litleo, fennekin, flabebe, greninja, dragalge, noivern and pangoro.

I've also just noticed that dustox's shiny portrait hasn't worked either.

I see what you mean with the gen 6 box sprites however dustox looks fine to me. The shiny portrait is fine and the game doesn't appear to have separate box sprites for shiny and non shiny if that's what you were talking about.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...