VOGONS


First post, by x86++

User metadata
Rank Newbie
Rank
Newbie

The source code is here for the Serious Engine 1: https://github.com/Croteam-official/Serious-Engine.

It is the engine which runs Serious Sam:The First Encounter and The Second Encounter:
http://www.mobygames.com/game/serious-sam-the … first-encounter
http://www.mobygames.com/game/serious-sam-the … econd-encounter

Details in the README file:
https://github.com/Croteam-official/Serious-E … aster/README.md

Update:
The README states that a recent version of Visual Studio is required. Unless the source code was heavily modified since its release date, then it should be possible to build a binary with an older version, such as VS2005. And backwards compatibility with Windows 98 and later.

Located many references to MMX code by searching for "mm0", including these files: DrawPort_RenderScene.cpp, Gfx_Direct3D_Colors.cpp, Gfx_Direct3D_Textures.cpp, Gfx_OpenGL_Textures.cpp, Graphics.cpp, TextureEffects.cpp, LayerMixer.cpp, RenderModel_View.cpp, SoundMixer.cpp.

I haven't confirmed yet, but there are lines which define where to use MMX code in TextureEffects.cpp: ASMOPT. This file has a lot of references to the "mm0" register. If the ASMOPT line is undefined, then a build of this engine should rely on the alternate C source code path. If this is true for all MMX code, then it should be possible to build the engine on non-MMX CPUs, such as the Pentium Pro; even though low framerates are expected.

Last edited by x86++ on 2016-03-12, 01:45. Edited 2 times in total.

Reply 1 of 17, by keropi

User metadata
Rank l33t++
Rank
l33t++

It's always nice to see companies release the code for older games... nice for those who can use it I guess 😀

🎵 🎧 PCMIDI MPU , OrpheusII , Action Rewind , Megacard and 🎶GoldLib soundcard website

Reply 2 of 17, by lightmaster

User metadata
Rank Oldbie
Rank
Oldbie
x86++ wrote:
The source code is here for the Serious Engine 1: https://github.com/Croteam-official/Serious-Engine. […]
Show full quote

The source code is here for the Serious Engine 1: https://github.com/Croteam-official/Serious-Engine.

It is the engine which runs Serious Sam:The First Encounter and The Second Encounter:
http://www.mobygames.com/game/serious-sam-the … first-encounter
http://www.mobygames.com/game/serious-sam-the … econd-encounter

Details in the README file:
https://github.com/Croteam-official/Serious-E … aster/README.md

Always cool, and cooler for those who can mod it or make TCs with it!!

25071588525_735097840e_b.jpg

Reply 3 of 17, by x86++

User metadata
Rank Newbie
Rank
Newbie

* moved mmx details to OP.

Software to convert Visual Studio project files:
http://stackoverflow.com/questions/31532477/v … ual-studio-2013
https://sourceforge.net/projects/vspc/
https://vsprojectconverter.codeplex.com/

Last edited by x86++ on 2016-03-12, 22:14. Edited 3 times in total.

Reply 5 of 17, by Azarien

User metadata
Rank Oldbie
Rank
Oldbie

The solution file is for VS2013.
This means it should be possible to open it with 2010, 2012 and 2015.

For earlier versions one needs to manually recreate all the project files. That's more boring work than potential syntax novelties.

But there is another way. It is possible to install 2015 and 2008 on the same machine, open the solution in 2015 and select 2008 as platform toolset, thereby using 2015 IDE but 2008 compiler.
I believe that executables built with 2008 work on 9x.

I do have VS 2008 and 2015 but not on the same machine. Maybe I'll create a vm with them both and try it.
For now I can confirm the source compiles with VS2015 and "runs" on XP (after selecting the platform toolset for XP).

I said "runs" because I do not own Serious Sam and I never played it. There is a freeware assets file (SE1_10.gro) included with the sources but it doesn't work.

EDIT: it seems the included data file allows reaching the main menu and settings, but does not contain any levels so any attempt to start a new game results in an error.

Reply 6 of 17, by Kerr Avon

User metadata
Rank Oldbie
Rank
Oldbie

It's great to see the source code for another great game (well two, I suppose, but I've not played SS2 yet) released. SS1 was a lot of fun, especially with the kamikaze enemies, who'd run at you screaming, with a bomb in each hand.

Reply 7 of 17, by leileilol

User metadata
Rank l33t++
Rank
l33t++

What I really want to see is a libretro core 😀

would be hard though, sicne there's so much inline assembly it'd restrict its use for x86 platforms only. but the fact the game has 4 player splitscreen makes it most appropriate

apsosig.png
long live PCem

Reply 8 of 17, by Tronix

User metadata
Rank Member
Rank
Member

Today i recompile engine with VS2008 compiler. Does VS2008 support Win98?

Attachments

  • Filename
    ss.rar
    File size
    1.92 MiB
    Downloads
    84 downloads
    File comment
    Serious Engine 1 / VS2008
    File license
    Fair use/fair dealing exception

https://github.com/Tronix286/

Reply 10 of 17, by aqrit

User metadata
Rank Member
Rank
Member

Does VS2008 support Win98?

idk, at the least you'll have to
avoid the crt and
change the MajorOperatingSystemVersion and MajorSubsystemVersion fields in the PE header, post build
... with the above it is known to work with Windows ME

Reply 12 of 17, by SpooferJahk

User metadata
Rank Member
Rank
Member

If someone could make a source port of The First and Second Encounter with the widescreen fix of Revolution on Steam, I would be a happy man.

Reply 13 of 17, by x86++

User metadata
Rank Newbie
Rank
Newbie

Here is a branch toward a linux port of this engine:
https://github.com/Ragora/Serious-Engine/tree/LinuxPort

And the engine's graphical functions are mapped to opengl and direct3d here:
Sources/Engine/Graphics/Gfx_wrapper.cpp

With the actual opengl functions here:
Gfx_wrapper_OpenGL.cpp

And direct3d here:
Gfx_wrapper_Direct3D.cpp

Viewport.cpp has the windowing routines which currently reference the Windows API. This is one place to replace with SDL functions by using the relevant Quake ports as a reference.

Reply 14 of 17, by x86++

User metadata
Rank Newbie
Rank
Newbie

The sound functions reference the Windows API in SoundLibrary.cpp, a file where the directsound API may be converted to SDL functions. I haven't yet located any functions related to threading, so the input functions are next and possibly last in creating a minimal port for SDL.

Others have discussed porting of the utilities, too, but the essential parts of the engine are located in /Sources/Engine/. It may be simpler to bypass x86 assembly, wherever possible, in testing an initial port.

Reply 15 of 17, by timofonic

User metadata
Rank Newbie
Rank
Newbie

This is a fork that wants to move to cmake, improving portability:
https://github.com/gunmetal313/Serious-Engine … se_cmake_gen_vs

The official repo seems active...
https://github.com/Croteam-official/Serious-Engine

And Ryan C. Gordon (Icculus) is going to merge the Linux code too...

http://www.croteam.com/serious-engine-linux-s … -code-in-works/
http://www.croteam.com/linux-source-code-rele … se-still-works/

https://twitter.com/icculus

He's merging changes to his repo, then making pull requests to the official one...

https://github.com/rcgordon/Serious-Engine

Reply 17 of 17, by x86++

User metadata
Rank Newbie
Rank
Newbie

Mr. Gordon has advanced the Linux port (and I think OS X and possibly FreeBSD):
https://github.com/rcgordon/Serious-Engine

Here is an extraordinary port for OpenPandora (not x86 but ARM based Linux):
https://github.com/ptitSeb/Serious-Engine
The author also has a couple of threads which provide further details:
https://pyra-handheld.com/boards/threads/seri … ncounter.77225/
https://pyra-handheld.com/boards/threads/seri … ncounter.77226/

Here are x86 fixes by notaz, but should be combined with rcgordon version:
https://github.com/notaz/Serious-Engine/commits/asm_fixes

There is a branch for mingw (Windows) which complements the original source release using Visual Studio, but it is not finished. The above ports also don't test in Windows, so recent additions will eventually make it more difficult to port the Linux/SDL version to Windows/SDL. As additional SDL ports are added, then it should make the overall code more easily adapted to future SDL platforms.

These SDL ports are actually reliant on SDL2 code, although the rcgordon port has SDL1 code at a specific commit level. This is for porting to SDL1 specific platforms which are not represented by SDL2, but perhaps this set generally does not have the performance necessary to run Serious Sam.