Go to file
Joshua Yanovski cf74d55f2e Fix map image artifacts and remove unneeded allocations.
Specifically, we address three concerns (the image stretching during
rotation, artifacts around the image due to clamping to the nearest
border color when the image is drawn to a larger space than the image
itself takes up, and potential artifacts around a rotated image which
accidentally ended up in an atlas and didn't have enough extra space to
guarantee the rotation would work).

The first concern was addressed by fixing the dimensions of the map
images drawn from the UI (so that we always use a square source
rectangle, rather than a rectangular one according to the dimensions of
the map).  We also fixed the way rotation was done in the fragment
shader for north-facing sources to make it properly handle aspect ratio
(this was already done for north-facing targets).  Together, these fix
rendering issues peculiar to rectangular maps.

The second and third concerns were jointly addressed by adding an
optional border color to every 2D image drawn by the UI.  This turns
out not to waste extra space even though we hold a full f32 color
(to avoid an extra dependency on gfx's PackedColor), since voxel
images already take up more space than Optiion<[f32; 4]> requires.
This is then implemented automatically using the "border color"
wrapping method in the attached sampler.

Since this is implemented in graphics hardware, it only works (at
least naively) if the actual image bounds match the texture bounds.
Therefore, we altered the way the graphics cache stores images
with a border color to guarantee that they are always in their own
texture, whose size exactly matches their extent.  Since the easiest
currently exposed way to set a border color is to do so for an
immutable texture, we went a bit further and added a new "immutable"
texture storage type used for these cases; currently, it is always
and automatically used only when there is a specified border color,
but in theory there's no reason we couldn't provide immutable-only
images that use the default wrapping mdoe (though clamp to border
is admittedly not a great default).

To fix the maps case specifically, we set the border color to a
translucent version of the ocean border color.  This may need
tweaking going forward, which shouldn't be hard.

As part of this process, we had to modify graphics replacement to
make sure immutable images are *removed* when invalidated, rather
than just having a validity flag unset (this is normally done by
the UI to try to reuse allocations in place if images are updated
in benign ways, since the texture atlases used for Ui do not
support deallocation; currently this is only used for item images,
so there should be no overlap with immutable image replacement,
so this was purely precautionary).

Since we were already touching the relevant code, we also updated
the image dependency to a newer version that provides more ways
to avoid allocations, and made a few other changes that should
hopefully eliminate redundant most of the intermediate buffer
allocations we were performing for what should be zero-cost
conversions.  This may slightly improve performance in some
cases.
2020-07-29 18:29:52 +02:00
.cargo Remove spaces in .cargo/config file 2020-07-06 11:36:24 +05:00
.gitlab put optional builds in check like imbris suggested in order to test macOS and other builds easily 2020-07-17 12:17:34 +02:00
assets Fix map image artifacts and remove unneeded allocations. 2020-07-29 18:29:52 +02:00
chat-cli Add setting for displaying character names in chat. Placate cargo clippy. 2020-06-27 17:43:46 -04:00
client Fix map image artifacts and remove unneeded allocations. 2020-07-29 18:29:52 +02:00
common Fix map image artifacts and remove unneeded allocations. 2020-07-29 18:29:52 +02:00
network Participant closure was immeatiatly, even in case a new participant was connected, send a MSG and then dropped immeadiatly. 2020-07-22 09:18:15 +02:00
nix nix: regenerate Cargo.nix, update dependencies, some tweaks for better reproducibility, remove rustup from shell.nix (causes issues) and add rustc, cargo instead 2020-07-16 13:40:39 +00:00
server Removing WORLD_SIZE, part 1. 2020-07-28 10:55:48 +02:00
server-cli fix various clippy issues 2020-07-01 00:37:06 +02:00
voxygen Fix map image artifacts and remove unneeded allocations. 2020-07-29 18:29:52 +02:00
world Fix map image artifacts and remove unneeded allocations. 2020-07-29 18:29:52 +02:00
.dockerignore - Load characters after login. 2020-05-09 15:41:25 +00:00
.gitattributes Add a default world map. 2020-01-23 18:18:15 +01:00
.gitignore Merge branch 'yusdacra/crate2nix' into 'master' 2020-06-28 18:28:29 +00:00
.gitlab-ci.yml CI cleanup 2020-06-16 12:45:35 +02:00
.rustfmt.toml Workaround for rustfmt bug that affects waylands source generation in clean builds 2020-02-03 18:34:52 +00:00
.tokeignore Added tokeignore for Cargo.nix 2020-07-02 12:14:01 -04:00
Cargo.lock Fix map image artifacts and remove unneeded allocations. 2020-07-29 18:29:52 +02:00
Cargo.toml Fix issue where client_init was not set to None after it finished, use tweaked version of winit to avoid macos link failure in the CI, small comment fixes 2020-07-17 21:26:21 -04:00
CHANGELOG.md Bow charged shot attack 2020-07-26 03:06:53 +00:00
CONTRIBUTING.md Add CONTRIBUTING 2019-05-17 01:34:07 +00:00
LICENSE Update Veloren license year 2020-05-22 08:05:10 -04:00
README.md fix(readme): update link to correct book chapter 2020-07-07 09:42:02 +02:00
rust-toolchain update toolchain to nightly-2020-06-22 2020-06-22 18:37:24 +02:00

Veloren logo on a screenshot

pipeline status coverage report license discord lines of code

Welcome To Veloren!

Veloren is a multiplayer voxel RPG written in Rust. Veloren takes inspiration from games such as Cube World, Minecraft and Dwarf Fortress. The game is currently under heavy development, but is playable.

Development

Currently the communication of contributors happens mainly on our official Discord server. You can join it to keep up with the development, talk to us or contribute something yourself. Anyone who shows genuine effort to help is welcome in our team. You don't have to know how to program to contribute!

Sign Up - Here you can create an online account for Veloren. This will be needed to play on auth-enabled servers, including the official server.

The Book - A collection of all important information relating to Veloren. It includes information on how to compile Veloren and how to contribute.

Future Plans - Go here for information about Veloren's development roadmap and what we're currently working on.

Official social media and websites

Get Veloren

We provide 64-bit builds for Linux, Mac, and Windows, which can be downloaded on the official website: https://www.veloren.net

Due to rapid developement stable versions become outdated fast and might be incompatible with the public server.

If you want to compile Veloren yourself, follow the instructions in our Book.

Packaging status

Fedora

COPR repo: sudo dnf copr enable atim/veloren -y && sudo dnf install veloren -y

Arch

AUR Airshipper: yay -Syu airshipper-git

AUR latest binary release: yay -Syu veloren-bin

AUR latest release: yay -Syu veloren

AUR latest master: yay -Syu veloren-git

F.A.Q.

Q: How is this game licensed?

A: It's free to play, modify and distribute. Forever. Since it is a community project, we decided to license it under the GNU GPL 3.0 license which means it will always stay free and open source.

Q: What platforms are supported?

A: Veloren can run on Windows, Linux and Mac OS on all architectures (although x86_64 is our main focus). It's probably possible to compile Veloren on/for BSD, Fuchsia and others as well.

Q: Do you accept donations?

A: To keep Veloren a passion project free from financial incentives we will only accept donations to cover server hosting expenses. There is no way to donate yet.

Credit

Many thanks to everyone that has contributed to Veloren's development, provided ideas, crafted art, composed music, hunted bugs, created tools and supported the project.

Sponsorship

We are extremely proud to be sponsored by Digital Ocean.

Their support allows us to build and reliably power our shared backend services.