KranX / Vangers

The video game that combines elements of the racing and role-playing genres.
https://store.steampowered.com/app/264080/Vangers/
GNU General Public License v3.0
668 stars 89 forks source link

Vangers Enhanced #98

Open lpenguin opened 8 years ago

lpenguin commented 8 years ago

Hi, guys! Thanks for sharing Vangers source code, it's really a gift.

I wonder, may be it's time to make "Enhanced" version, like Black Mesa. With 3D graphics, sane physics and so on. I dumped a peace of Forstral level and loaded it into Unity3D. There is a trouble with rendering of "floating" in air objects (like wires), but even now it looks pretty cool for me: https://youtu.be/-4nQo-NwsLM. I think such project is a LOT of work, but may be it's worth it?

stalkerg commented 8 years ago
  1. You can help this project https://github.com/kvark/vange-rs
  2. You are not correct parse second level.
  3. Good idea :)
lpenguin commented 8 years ago

You can help this project https://github.com/kvark/vange-rs

thank you, i'll try to cooperate =)

You are not correct parse second level.

Well.. actually i'm not parsing levels, i just dumped data from lineT[i] variable inside accept() function. See code. Then i loaded data into python, and saw strange picture: pic

This vertical stripes showing top level (odd indexes: 1, 3, 5,...) and lower level (even indexes: 2,4,6,..), i thought. So i just averaged odd and even stripes, and got two images:

**Top level: Right part of level on my video (click)** ![heven](https://gist.github.com/lpenguin/7fbc1d7e1f2f6a7fd1a359d1bfc98fc5/raw/a0e2253b1a39c6b058c361cbe29199c71d0f2ae9/height_event.png)
**Lower level: Left part of level on my video (click)** ![huneven](https://gist.github.com/lpenguin/7fbc1d7e1f2f6a7fd1a359d1bfc98fc5/raw/a0e2253b1a39c6b058c361cbe29199c71d0f2ae9/height_uneven.png)

I know, averaging is not good, but it was enough for short demo.

How to correctly parse vertical "stripes"/second level? I cannot find such peace of code, but honestly I did not spend with Vangers code much time...

Good idea :)

Thanks! I have some experience with C++, Shaders(HLSL) and Unity3D, and have some free of work time for such project. This is one of best games of my youth, and it would be really cool to present it to current generation :) May be we could add support of modern screen resolutions, make new menus (like what happened with Baldurs Gate), or even build new engine with 3d support.


Я извиняюсь за английский, просто хочется чтобы поучаствовали и англо говорящие тоже :)

stalkerg commented 8 years ago

https://github.com/KranX/Vangers/blob/master/src/terra/siderend.cpp#L63 For detect second level and low res after that (second level merge into first level as tile).

stalkerg commented 8 years ago

https://github.com/kvark/vange-rs/blob/master/src/level/mod.rs#L75 you can see here too.

lpenguin commented 8 years ago

Ok, thanks!

lpenguin commented 8 years ago

Hi guys, i am trying to run vangers in different resolution (other than 800x600). Thanks to @vaelund i could change resolution via command line args. I faced few issues:

curIbs -> back -> load2mem(XGR_VIDEOBUF);

Video memory buffer size does not match image size. We could just use offs_show(int x,int y,int frame = 0); function instead

vaelund commented 8 years ago

Thanks to @vaelund i could change resolution via command line args. I faced few issues:

I am still working on that. I haven't even found the code that draws the UI elements. I would appreciate it, if you could point me in the general direction. I do not think that editing the ressources is the right way to go, scaling and/or repositioning seems easier and would work for almost al screen sizes.

lpenguin commented 8 years ago

I do not think that editing the ressources is the right way to go, scaling and/or repositioning seems easier and would work for almost al screen sizes.

Well, yes and no: i agree that we don't need to edit resources for every possible screen resolution. But i think it would be easer to edit few values than to find and edit UI code if we want to run simple working prototype (for single resolution). Moreover, we will need resource editor for images editing, elements alignment (to which side of screen elements should stick), etc. May be i'm a maniac, but I made bunch of scripts for converting xbm/bmp to png, and for converting binary resources to human readable format and vice versa. I'll share this a little bit later.

I am still working on that. I haven't even found the code that draws the UI elements. I would appreciate it, if you could point me in the general direction.

I am happy to help you: Main UI rendering happens in actIntDispatcher::redraw() function, just after the surface rendering (see iGameMap::draw()). This function followed by aScrDisp -> flush() call, but as far as i understand flush() does almost nothing (only i_evince_pal(actIntPal,16); does some useful work).

As far as i understand game UI consist of:

There is also some static images:

Vangers code is not easy to understand, and i am very glad i'm not alone in this journey 😄

vaelund commented 8 years ago

Thanks, that is very helpful.

I already fumbled around inside iGameMap::draw() to get the map to be drawn at full screen size. Time constraints prevented me from getting much further.

if we want to run simple working prototype (for single resolution).

Well for that we would not need to put in any work. I get nostalgic for 800x600 anyway^^

I actually started working on this to get a grip on the codebase and clean it up at the same time(or at least try)

Maybe tomorrow evening i can push a fix with properly scaled 3d objects, afterwards i will look into the ui.

[Offtopic:]

Vangers code is not easy to understand

That definitely isn't limited to Vangers. It seems to be a constant for games, that the developers have bad coding habits or more likely too short deadlines. But at least you can clearly see the places were the more recent development, to port this to SDL happened.

i am very glad i'm not alone in this journey :smile:

Same here, might motivate me to work a bit more on this.

lpenguin commented 8 years ago

Maybe tomorrow evening i can push a fix with properly scaled 3d objects, afterwards i will look into the ui.

How exactly do you want to support high resolutions? Just move UI elements to screen corners or scale (2x, 4x) them? I don't quite understand why you scale 3d, looking forward to your fix :)

lpenguin commented 8 years ago

Here is aci_hi.scb file exported to yaml: https://gist.github.com/lpenguin/43165fbca9b9452e58d08804dde11cf6

As far i understand it contains information about UI, world constants, mechoses, may be more.. File is pretty big, i suggest opening it in Sublime Text (it has nice yaml support with object folding).

i used ParseScript function (iscript.cpp) as a base and made script in python (https://github.com/lpenguin/vangers-utils) that dumps every value or operation code. Keys starting with "$" is just comments.

lpenguin commented 6 years ago

Решил поделиться, что смог сделать по-поводу больших разрешений:

Наработки в ветке https://github.com/lpenguin/Vangers/tree/fullscreen Запускать:

./vangers --screenwidth 1200 --screenheight 700
stalkerg commented 6 years ago

вау круто! Это прям очень вовремя т.к. мы активно начали фиксить сетевую игру.

stalkerg commented 6 years ago

@lpenguin welcome to our telegram channel: https://t.me/vangers

cartoonka commented 6 years ago

Огромное спасибо за такой апдейт! Следующим летом у Вангеров 20-ти летие. Будет здорово если слегка обновимся и всем подарим такую версию.

Кранку показал - доволен. :) Если нужна помощь какая-то по графике - пиши, не стесняйся, может быть найдем ресурсы. Я могу попинать Влада СПицкого (художник оригинальных Вангеров) - может быть он найдет время переделать интерфейс, если будет внятное ТЗ или параметры "как и что переделать"