Implement support for Spritemaps

Bug #1638356 reported by GunChleoc
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
widelands
Won't Fix
Undecided
GunChleoc

Bug Description

Since we now have a zoom feature, it would be nice to have higher-resolution graphics. This will mean an increase in filesize though, so we should have support for spritemaps.

There have been 2 approaches to implement utils/make_spritemap.py this so far:

1. A grid that joins the images together (trunk)
2. A compact spritemap that analyzes the image content and saves a lot of space (lp:~widelands-dev/widelands/spritemaps_testing)

I have attached an image comparing the 2 approaches.

I have pretty much implemented the C++ part for the second approach, but the python script still needs work if we want to use that. I would be in favor of option 2 if we can fix the script.

Either script would need adjusting so they will write to Lua format rather than the old conf format.

Tags: graphics

Related branches

Revision history for this message
GunChleoc (gunchleoc) wrote :
Revision history for this message
SirVer (sirver) wrote :

I am also in favor of 2, but instead of using the python script, I would rewrite it in c++. When this script was started, our build system did not easily allow multiple binaries to be built. And the code could benefit from having access to the graphics system and the lua dictionary parsing that is already implemented in c++.

Revision history for this message
GunChleoc (gunchleoc) wrote :

+1 to #2

GunChleoc (gunchleoc)
Changed in widelands:
assignee: nobody → GunChleoc (gunchleoc)
status: New → In Progress
Revision history for this message
GunChleoc (gunchleoc) wrote :

My current plan is the following:

1. Implement mipmaps https://en.wikipedia.org/wiki/Mipmap

2. Implement simple spritesheets (option 1). Bob animations have big changes from frame to frame, so it won't be possible to make them more compact.

3. Now we can start converting graphics

4. Implement compact spritesmaps (Option 2). These will be useful for immovables.

GunChleoc (gunchleoc)
Changed in widelands:
milestone: build20-rc1 → build21-rc1
Revision history for this message
GunChleoc (gunchleoc) wrote :
Revision history for this message
kaputtnik (franku) wrote :

Savegame needs much time to load

Revision history for this message
GunChleoc (gunchleoc) wrote :
Changed in widelands:
status: In Progress → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.