Author Topic: GLSMAC - Open-source OpenGL/SDL2 remaster of SMAC  (Read 6003 times)

0 Members and 1 Guest are viewing this topic.

Offline afwbkbc

Re: GLSMAC - Open-source OpenGL/SDL2 remaster of SMAC
« Reply #30 on: February 02, 2023, 01:45:30 AM »
If I remember correctly - SMAC was the first 4x strategy that had simultaneous turns :)
Last time we managed to play by IP was in like 2015 (and had to use some specific VPN), after some point of time it just never worked again. Network protocol is very old and based on ancient DirectPlay (Windows 95 technology iirc).
One of reasons why I'm making GLSMAC is that multiplayer in original SMAC is just impossible now.

Offline Sardaukar

Re: GLSMAC - Open-source OpenGL/SDL2 remaster of SMAC
« Reply #31 on: February 02, 2023, 03:50:38 AM »
3D map looking great.

Offline afwbkbc

Re: GLSMAC - Open-source OpenGL/SDL2 remaster of SMAC
« Reply #32 on: February 02, 2023, 10:53:03 PM »
Improved coasts a bit (not final version yet)

Offline Sardaukar

Re: GLSMAC - Open-source OpenGL/SDL2 remaster of SMAC
« Reply #33 on: February 03, 2023, 09:10:01 PM »
I like the vertical feel. Know it's not the original game but I have, for some time, yearned for an actual 3D globe with north-south icecaps that you can only cross by airpower.

Offline afwbkbc

Re: GLSMAC - Open-source OpenGL/SDL2 remaster of SMAC
« Reply #34 on: February 04, 2023, 12:06:33 AM »
Globe idea is doable, just not before 1.0, need to do original SMAC first  :)

Offline afwbkbc

Re: GLSMAC - Open-source OpenGL/SDL2 remaster of SMAC
« Reply #35 on: February 06, 2023, 03:26:37 AM »
Smoothed and normalized map - added removing of overly sharp slopes (sharper than 1km elevation per tile), now every tile is visible and clickable. Also fixed map zoomout and scrolling - it's not possible to drag it off screen anymore or zoomout further once it already fits whole in viewport. It's possible to zoomout map of any size to make it fit. Also implemented map saving and loading (no menus for it yet, just for debugging). And many bugfixes of course :)
Started working on UI, it will be responsive and adapt to (almost) any resolution, it can already be displayed in window as narrow as 640px, with some work it can fit in 300-400 pixels ( in case GLSMAC will be ported to smartphones  ;lol ). On wide resolutions empty area in the middle will be filled with information panels like charts, relative strengths, etc. 1920 will probably fit all panels at same time.
Next steps - adding horizontal infinite scrolling, then some more UI, then putting sprite-based units on map, then model-based units (CVR).

Offline afwbkbc

Re: GLSMAC - Open-source OpenGL/SDL2 remaster of SMAC
« Reply #36 on: February 07, 2023, 01:41:23 AM »
Small map demo :)
Update: fixed that water glitch
« Last Edit: February 07, 2023, 01:10:05 PM by afwbkbc »

Offline Sardaukar

Re: GLSMAC - Open-source OpenGL/SDL2 remaster of SMAC
« Reply #37 on: February 07, 2023, 05:11:39 PM »
Man, that's sweet.

Getting excited about this project.

Offline DrazharLn

Re: GLSMAC - Open-source OpenGL/SDL2 remaster of SMAC
« Reply #38 on: February 09, 2023, 04:39:56 PM »
I'm really impressed by how quickly you're developing this!

I had another look at the voxel models today because I wanted to see if it would be practical to convert them to a better known voxel format. As far as I can tell, there isn't a well known voxel format that supports smooth rotations in their animations like Caviar (the format SMAC's models are in) does. There's the Vengi format, but it's not well known.

For conversions to a mesh format, glTF looks like an okay destination because it's an open format that supports the right kinds of animations and blender is able to import and export it (so it's good for modders and making new content).

One possible route for converting the existing models would be to add a loader for the Caviar format to the open source Vengi VoxConvert tool, then use their converter to generate glTF files. Another would be to write a direct caviar -> glTF conversion tool, possibly reusing some of the existing (separate) libraries for writing glTF and converting voxels to meshes.

Offline afwbkbc

Re: GLSMAC - Open-source OpenGL/SDL2 remaster of SMAC
« Reply #39 on: February 10, 2023, 03:23:02 AM »
Thanks, doing what I can :)

About CVRs - for now the plan is to decode them and load as 3D textures (with different angles/positions) into OpenGL. If FPS will be bad (which I doubt) - then I'll try to optimize them and maybe convert them into polygons. They key thing is - they'll need to be converted in runtime without any intermediate files, because it won't be possible to ship modified or converted SMAC resources due to copyright reasons. That applies to all SMAC resources, for example images and sound upscaling, if it happens, will have to work in runtime (during loading of original SMAC assets). It's possible to save them to some cache on user's computer later for quicker loading.

Offline DrazharLn

Re: GLSMAC - Open-source OpenGL/SDL2 remaster of SMAC
« Reply #40 on: February 10, 2023, 11:42:33 AM »
What do you mean by 3D textures? Maybe a texture with colour and a heoghtmap that you then render onto a plane (with the heoghtmap displacing the pixels off the plane for 3D)?

Are you open to contributions? I might be able to write some C++ for loading the CVRs at runtime or as something that occurs on first run.

Offline afwbkbc

Re: GLSMAC - Open-source OpenGL/SDL2 remaster of SMAC
« Reply #41 on: February 10, 2023, 12:13:41 PM »
In OpenGL there's GL_TEXTURE_3D target and, I guess, corresponding shader processing. I haven't tried them yet but they exist.
It's always better to use things already implemented in OpenGL, they are much faster than improvising.

About contributions - generally yes, but I want to do CVR myself, because to load them one must also know how to store them internally and how to load into OpenGL, etc, it's all very interconnected. Generally I'd prefer coding core functions myself and accept contributions only for modules (something that is not hardwired to other parts and can coexist with alternatives), for example, mapgen, later maybe AI and custom mods. Something that user will be able to select in game settings from list of alternatives (i.e. which AI to use for faction, which mapgen to use, etc).
But if I'll get stuck with CVRs somewhere then I won't mind some help  :)
Also, generally it's better to not create any extra files, so that GLSMAC.exe could just sit in user's SMAC directory and be launchable as alternative to terranx.exe, and also to move easily between PCs. Caching something on disk only makes sense if initial processing makes loading way too long (for example if it's some AI-based upscaling of texture or video).

Offline DrazharLn

Re: GLSMAC - Open-source OpenGL/SDL2 remaster of SMAC
« Reply #42 on: February 11, 2023, 01:42:49 AM »
I'd not heard of GL_TEXTURE_3D before, thanks for naming it, it's been interesting reading about different ways of rendering voxels and volumes on GPUs.

For anyone else interested, I found these two resources most helpful: https://developer.nvidia.com/gpugems/gpugems/part-vi-beyond-triangles/chapter-39-volume-rendering-techniques (for an intro) and these slides for more advanced techniques and much better visual references: https://cgl.ethz.ch/teaching/scivis_common/stuff/StuttgartCourse/VIS-Slides-06-Direct_Volume_Rendering.pdf

Sounds like a good policy for contributions. It's important to know what you want. Good luck!

Offline afwbkbc

Re: GLSMAC - Open-source OpenGL/SDL2 remaster of SMAC
« Reply #43 on: February 12, 2023, 04:24:31 AM »
Added tile preview under map (also tiles are selectable with mouse now). Thinking of extending area towards bottom, to make sure all terraforming and other things fit and be readable. There's way too much space for units anyway on modern resolutions.

Offline dino

Re: GLSMAC - Open-source OpenGL/SDL2 remaster of SMAC
« Reply #44 on: February 12, 2023, 08:36:00 AM »
As for map rendering, the surface geometry should be far more detailed, in the original tiles have smooth surface with tile borders connected with tangent, no sharp edges.

As for UI, with so much space to play with, there is a one easy and no brainer thing to add:
Clickable icons with commands from action and terraform menus, with keyboard shortcut displayed in the corner of the icons and unavailable actions faded out.
Not having essential actions hidden under two levels of list menus would make the game more accessible for new, young players that grew up playing modern civ games.
I'm sure that some forum member would eventually design you nice minimalistic SMAC style icons for unit actions, while simple squares with keyboard shortcuts in the corner would do until then.
I'd add them as two separate pannels for action and terraform menus on infopannel area and arrange icons in two rows within the pannels.
« Last Edit: February 12, 2023, 08:54:07 AM by dino »

 

* User

Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Select language:

* Community poll

SMAC v.4 SMAX v.2 (or previous versions)
-=-
24 (7%)
XP Compatibility patch
-=-
9 (2%)
Gog version for Windows
-=-
103 (32%)
Scient (unofficial) patch
-=-
40 (12%)
Kyrub's latest patch
-=-
14 (4%)
Yitzi's latest patch
-=-
89 (28%)
AC for Mac
-=-
3 (0%)
AC for Linux
-=-
6 (1%)
Gog version for Mac
-=-
10 (3%)
No patch
-=-
16 (5%)
Total Members Voted: 314
AC2 Wiki Logo
-click pic for wik-

* Random quote

It is not uncommon to see patients undergo permanent psychological trauma in the presence of the Sphere, before the nerve stapler has even been strapped into position. Its effect on the general consciousness of the culture is profound: husbands have seen wives go inside, and mothers their children. Dr. Xynan left the surface of the sphere semitranslucent for a reason. You can hear them in there.. you can see them. It is a thing of terrible beauty.
~Baron Klim 'The Music of the Spheres'

* Select your theme

*
Templates: 5: index (default), PortaMx/Mainindex (default), PortaMx/Frames (default), Display (default), GenericControls (default).
Sub templates: 8: init, html_above, body_above, portamx_above, main, portamx_below, body_below, html_below.
Language files: 4: index+Modifications.english (default), TopicRating/.english (default), PortaMx/PortaMx.english (default), OharaYTEmbed.english (default).
Style sheets: 0: .
Files included: 45 - 1228KB. (show)
Queries used: 38.

[Show Queries]