kvark/vange-rs

Vangers is a legendary game featuring unique gameplay and technical innovation

The idea of this project is to replicate the old look and behavior, but with native hardware acceleration for the graphics

Vange-rs

Vangers is a legendary game featuring unique gameplay and technical innovation. .

You need the original game in order to try out vange-rs. The path to resources needs to be set in config/settings.ron.

Technology

The game uses wgpu-rs for graphics and winit for windowing.

The level is drawn in a single full-screen draw call with a bit of ray tracing magic. There is also an experimental tessellation-based renderer, but neither produce results of sufficient quality. See the dedicated wiki page for our rendering technologies.

Instructions

The project is structured to provide multiple binaries. road binary is for the main game, which includes mechouses, items, and the level. Note: leaving the level="" empty in the config would load a flat boring debug level.

git clone https://github.com/kvark/vange-rs
cd vange-rs
cp config/settings.template.ron config/settings.ron
edit config/settings.ron # set the game path
cargo run

The graphics engine tries the available backends in this order: Metal, Vulkan, DX12, DX11.

Controls:

  • WSAD: movement in the game, rotating the camera around the car during the pause
  • left shift: turbo
  • P: enter/exit pause for debugging
  • R: reset forces and orientation of the mechous
  • <>: step physics frame back/forward during the pause
  • Esc: exit

Mechous viewer/debugger

car binary allows to see the mechos with items selected by the configuration. It also shows the debug collision info.

cargo run --bin car

Controls:

  • WSAD: rotate the camera
  • Esc: exit

3D model viewer

model binary loads a selected "m3d" from games resource to observe.

cargo run --bin model resource/m3d/items/i21.m3d

Controls:

  • AD: rotate the camera
  • Esc: exit

Level viewer

level binary allows to fly over a level with free camera. Useful for debugging the level rendering shader.

cargo run --bin level

Controls:

  • WSAD: move the camera along X-Y plane
  • ZX: move the camera along Z plane
  • Alt + WSAD: rotate the camera
  • Esc: exit

Converter

convert binary is a command line utility for converting the game data into formats that are more interoperable. Please see the wiki page for the usage instructions.

Issues

Collection of the latest Issues

DileSoft

DileSoft

Comment Icon0

Просто показывать мир из указанного положения камеры, читать/писать данные мира, загружать/сохранять файлы.

Можно для начала простое чтение/запись по точкам.

int getTopHeight(int x, int y) int getBottomHeight(int x, int y) int getDeltaHeight(int x, int y) int getTopMaterial(int x, int y) int getBottomMaterial(int x, int y) bool getIsDoubleLayer(int x, int y) setTopHeight(int x, int y, int height) setBottomHeight(int x, int y, int height) setDeltaHeight(int x, int y, int height) setTopMaterial(int x, int y, int material) setBottomMaterial(int x, int y, int height) setIsDoubleLayer(int x, int y, bool isDoubleLayer)

Get/set палитры с конвертацией <-> rgb тоже хорошо бы сделать.

Потом можно добавить методы какой-то пакетной обработки, например засунуть ArrayBuffer с информации о высоте какого-то региона.

Плюс хорошо бы еще команды смены положения камеры, как в 3d-версии.

После чего обвязку из vange-rs web, где создается страница с canvas-ом и возможностью указать config, и всё.

Мне важно чтобы я мог на страничке подключить результирующую библиотеку, создать canvas, привязать его к ней через JS, а потом через JS вызывать функции чтения/записи данных, смены камеры, и импорта/экспорта файлов (но это можно позже).

Rust должен публиковать функции для wasm-bindgen.

DileSoft

DileSoft

type: feature
Comment Icon1

Сделать конвертер который тупо берет 1 или 2 самых верхних слоя а все остальное игнорирует и проверить что получится.

ZhangHanDong

ZhangHanDong

Comment Icon1

I installed the GOG Vangers game on my m1, but the window flashed when I ran it, I checked the logs:

And, the data configuration in config/settings.ron under macosx m1 is not /Applications/GOG/Vangers.app/Contents/Resources/game, I don't know how to set this path.

DileSoft

DileSoft

Comment Icon1
kvark

kvark

area: visuals
Comment Icon1

The painting method is currently very rough and could see a number of optimizations to speed it up by a good factor. Here is a rough plan:

  1. Add support for GPU time queries
  2. Set up a benchmarking scene. We want to know, roughly, given a fixed camera and the bar count, how much GPU time is spent per 1M of the bars (on average).
  3. Process bars in the pairs of 2, so that each pair of pixels produces exactly 2 bars unconditionally.
  4. Rotate the map so that the metadata for 2 points can be read using a single texture fetch.
  5. Merge height and metadata into one RGBA8Uint texture - #5.
kvark

kvark

type: bug
Comment Icon0

Somewhat related to #168, but turned out to be a different issue. Screen Shot 2021-12-10 at 09 30 06

Interestingly, I can see that depth testing on vehicles works correctly. So the terrain is drawn correctly into the shadow map. However, it appears completely absent from the main color rendering. Playing with the shader gives me nothing, it appears that the draw call is totally ignored.

kvark

kvark

type: feature
Comment Icon6

The terrain is mostly smooth. It would be most efficient to render from any angle if we could polygonize it. This crate may come handy - https://github.com/PsichiX/density-mesh . It supports providing a height (or a steepness) map. We just need to figure out how to generate one based on the level data.

kvark

kvark

type: feature
Comment Icon0

Currently, Application::draw() returns a command buffer to be submitted by the boilerplate. Instead, we need to pass in a Queue to allow write_* operations to happen and let the app submit the work itself.

Versions

Find the latest versions by id

v0.2.0 - Aug 24, 2021

This release has the main shaders ported to WGSL. This means, glsl-to-spirv toolchain is retired, and we get the most optimal path on all platforms, including the Web.

This is the first version of the game that is redistributable. Previously, the weirdness of glsl-to-spirv was blocking the program to be copied around.

vangers-0 2

Information - Updated Aug 03, 2022

Stars: 320
Forks: 11
Issues: 48

Repositories & Extras

Arsenal 2D retro Rust Game engine

Katharos Technology is focused on producing our first game prototype, bevy game engine and our own Katharos...

Arsenal 2D retro Rust Game engine

Grumpy Visitors 2D Rust game for code reference and learning

Grumpy Visitors is a top-down 2D action arcade game

Grumpy Visitors 2D Rust game for code reference and learning

Rust Game Remake

Remake in rust of a game I made during the here

Rust Game Remake

A 3d rust game using OpenGl and Emscripten to build for the wasm32-unknown-emscripten

It can also run standalone, developed and tested on Linux but will

A 3d rust game using OpenGl and Emscripten to build for the wasm32-unknown-emscripten

Rust Game of Life

This is a simulator of Conway's Game of Life in Rust, using SDL2 to render the game graphically

Rust Game of Life

INOX - Rust Game engine integrated in Blender

It's a Game Engine written in Rust with some bindings for external libs and with Blender as editor

INOX - Rust Game engine integrated in Blender

Rust GameBoy Advanced Emulator

Building this project on linux requires cmake and gtk3

Rust GameBoy Advanced Emulator

A Rust Game Engine

In an effort to learn the Rust language (because I am a nut), I am building a game engine

A Rust Game Engine

A Rust GameBoy emulator!

TetrisZelda: Link's Awakening

A Rust GameBoy emulator!

Another Rust game engine

It's started as a rust version of the tutorial from

Another Rust game engine
Facebook Instagram Twitter GitHub Dribbble
Privacy