Giter Site home page Giter Site logo

paulsapps / alive Goto Github PK

View Code? Open in Web Editor NEW
104.0 16.0 9.0 6.34 MB

EFFORTS HAVE NOW MOVED TO https://github.com/AliveTeam/alive_reversing Unofficial open source implementation of ALIVE engine that powers Oddworld Abes Oddysee and Oddworld Abes Exoddus.

License: MIT License

CMake 1.19% C++ 63.94% Batchfile 0.02% Visual Basic 0.01% SystemVerilog 0.01% C 33.45% Python 0.22% Squirrel 1.18%
oddworld c-plus-plus engine

alive's Introduction

Build Status
Windows Build status
Linux/OSX Build Status
Coverage Coverage Status
Coverity Coverity status

Open source implementation of ALIVE engine that powers Oddworld: Abe's Oddysee and Oddworld: Abe's Exoddus.

This engine will be designed to allow easier modding than the orignal engine and for more extensive and complex AI. For example it should be possible to allow Sligs to use lifts and have interaction between Scrabs and Paramites.

UPDATE: Focus has shifted to reverse engineering Abe's Exoddus in order to replicate the AI/behaviour exactly, see the new repo here: https://github.com/AliveTeam/alive_reversing

Youtube playlist here: https://www.youtube.com/playlist?list=PLZysgmpXqKgSCUuU9S2ccQq0Sdrai3UQY

You can become a patreon here (donations to support development): https://www.patreon.com/alive

[Alive Screenshot]

Build instructions.

Supported compilers are clang, gcc and msvc 2015. The clang and gcc version must support at least C++14. Should be possible to build on Windows, OSX and most *nix OS'es.

  1. Install CMake 2.8 or newer.
  2. Clone down the repo with with --recursive option so that sub modules are also cloned.
  3. Create a build directory in the root of the repo.
    • If on Windows, set the SDL2DIR enviroment varaible to the directory that you have extracted the SDL2 development libraries into.
  4. cd into the build dir and run CMake .. to generate project files, pass -G "the generator you want" for example cmake -G "Visual Studio 14 2015 Win64".
  5. Now run make/msbuild or whatever the build command is for your generator. Or if using the Visual Studio generator you can just open the .sln solution file and build that way.

alive's People

Contributors

mlgthatsme avatar mrsapps avatar rozniak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

alive's Issues

Spike: Wire up basic player controlled object via lua script

Once #43 is complete then a spike is needed to wire up the resource system and input to the lua scripting.

Then some basic player controls/animation/state machine need to be implemented. This will fill in most of the ground work/base for a proof of concept. Once this works in a flexible way the grid system and parsing of objects from real game levels can be worked on.

  • Bind input to lua
  • Basic lua state machine
  • Movement
  • Collision
  • Switch between "in game" and "editor" mode

OpenGL version and error checking

Not much error checking at the moment, also don't really know what GL version we should be using. Currently set to 3.1.

While this works on Win7, on Ubuntu on the same hardware "invalid operation" is spammed each frame and only the clear colour is rendered.

UI bugs/features

Bugs.

  • Clicking anywhere in an unfocused window should give focus - currently has to be the title bar
  • Radio buttons should be rounded - current rendering as checkboxes?
  • Buttons with the same name share states - e.g click the "blank" camera name button, they all become "pressed" state
  • Buttons can render outside of a window
  • UI shakes/filters if holding and scrolling the scroll bar so the first item only just fits in the window, easy to check if the FMV list
  • After displaying a camera FMV playback breaks - FMV should probably use rendering API to avoid this
  • Strange camera window behavior - click a path, click a camera. Click another camera, now click another path - window closes. Click a camera - camera window wont open, click another camera, window now opens
  • Resizing the host/OS window glitches out
  • Subtitles are now rendered off the bottom of the screen and too far right

Features.

  • Allow scrolling with mouse wheel
  • Allow windows to be re-sized - allows min/max size policy
  • Scroll bar should be sized according to height/number of items. A 5px bar is too small with many items
  • Allow control of layouts - for example setting all button widths to be equal
  • Add a line edit control for filtering lists like what ImGui had - also for setting names of things in the editor

Fail to start when launched from UNC path

Hello, just stumbled upon this after seeking a DDV player, and i must say, brilliant work! However, the build's don't work, here is the output:

[ENTER] main
SdlAudioWrapper::SetAudioSpec [I] SetAudioSpec samples: 1024 freq 44100
[ENTER] SdlAudioWrapper::Open
SdlAudioWrapper::Open [I] Trying default audio device
[EXIT]  SdlAudioWrapper::Open
[ENTER] Actions::Actions
[EXIT]  Actions::Actions
GameFileSystem::InitBasePath [I] basePath is \\InfinitySrv\massData\Temp\OddStuffz\ALIVE-0.1.0-win32\
[ENTER] Engine::InitSubSystems
OpenGLRenderer::InitGL [I] GL settings r 8 g 8 b 8 bufferSize 24 double buffer 1
[EXIT_EXCEPTION] Engine::InitSubSystems
[ENTER] Engine::~Engine
assertOnGlError [E] GL ERROR: 1282, before glDeleteProgram(mShader)
Assertion failed: 0 && "GL ERROR", file C:\alive\src\openglrenderer.cpp, line 20

And your blog is inaccessible

High-quality image upscaling

  • gamma-correction
  • something better than just linear interpolation. Should look into edge-preserving algorithms etc.

Map MOV's to individual DDV files

Example can be seen here: https://github.com/paulsapps/alive/blob/dev/data/videos.json

For E1.MOV being mapped to Barrels.ddv, E1P4C8.ddv, moon.ddv and L1P1C14.ddv. To do this it requires JPSXDEC to calculate the sectors and the PC data to figure out what the PC file name for that part of the MOV should be.

This allows the engine to play movies in a consistent way, e.g even if using PSX data it can just say "play moon.ddv" and figure out if moon.ddv or the correct section of E1.MOV is available. To test this ensure that the PSX data is higher priority than the PC data in resource_paths.json or using the debug UI.

Merge MDEC/Masher video codec

These seem to have many JPEG alike steps which are the same. Its probably possible to combine both. I suspect that the tables used in the decoding might be the only change but will need a lot of research to figure this out.

This will aid in cleaning up the reversed code too.

Crash if closed while audio thread is busy

Main thread:

Alive.exe!std::recursive_mutex::~recursive_mutex()  C++
Alive.exe!AliveAudio::~AliveAudio() C++
Alive.exe!Sound::~Sound() Line 50   C++
Alive.exe!Sound::`scalar deleting destructor'(unsigned int) C++
Alive.exe!std::default_delete<Sound>::operator()(Sound * _Ptr) Line 1200    C++
Alive.exe!std::unique_ptr<Sound,std::default_delete<Sound> >::reset(Sound * _Ptr) Line 1484 C++
Alive.exe!Engine::~Engine() Line 101    C++
Alive.exe!SDL_main(int __formal, char * * __formal) Line 30 C++
Alive.exe!main(int argc, char * * argv) Line 140    C

Audio call back thread:

Alive.exe!stk::OnePole::tick(double input) Line 83  C++
Alive.exe!stk::FreeVerb::tick(double inputL, double inputR, unsigned int channel) Line 200  C++
Alive.exe!AliveAudio::AliveRenderAudio(float * AudioStream, int StreamLength) Line 171  C++
Alive.exe!AliveAudio::Play(unsigned char * stream, unsigned int len) Line 201   C++
Alive.exe!SdlAudioWrapper::AudioCallback(unsigned char * stream, int len) Line 141  C++
Alive.exe!SdlAudioWrapper::StaticAudioCallback(void * udata, unsigned char * stream, int len) Line 133  C++
SDL2.dll!6c743e0d() Unknown

The audio thread has taken the lock which the main thread has gone and destroyed. We need a clean way to shutdown - such as shutdown SDL audio call back, then take the lock to ensure the call back has exited, then destruct fully.

make fatal error: sample.lvl.g.h: No such file or directory

Sorry if the question is stupid, I'm really a newbie at these things. I followed the instructions in the readme.md. Inside my local folder for git repos I recursively cloned this one

git clone --recursive https://github.com/paulsapps/alive.git

I cded into the newly created alive folder, created a build folder inside it, cded into it and

cmake .. -G Unix\ Makefiles

However, when subsequently running make, I get this error at 81%

main.cpp:10:26: fatal error: sample.lvl.g.h: No such file or directory
#include "sample.lvl.g.h"

Where should I get the missing header?

Add subtitle support

The "srt" format should be supported for FMV's. Probably also an in-game option for game speak/sound fx too.

Complete oddlib

  • Add mapping for PC -> PSX lvl name/locations
  • Fix issue reading lvls from ISO/BIN FS
  • Add decoder for PSX cameras, demo may have some other format
  • AO PC FG1 format
  • AE PC FG1 format
  • AO/AE PSX FG1 format (assuming equal)
  • PSX wave form data format
  • Masher video audio is noise when compiled for Release in VS2015
  • Support demo data
  • Fix corrupted cams names read from path sometimes (maybe reading too many entries?)
  • Path collision items
  • Path objects
  • Reduce VLC table size

Anims:

  • Anim frame decompression for type 1-8
  • Check FALLROCK.BAN in AE PSX demo really is corrupted - replaced ABESPEAK.BAN animation to all point to the same frame, then copied in FALLROCK.BAN palt and first frame, displayed corrupted which proves source data is bad.
  • Fix PSX type 2 decoding
  • Add DB for none BgAnim sprites to tell if semi trans should be used and what PSX blending mode - also for names/meta data, for example ABEBLOW animation 1 = spinning head, animation 2 = spinning body part.
  • Draft first API of rendering the animations in the engine
  • Split "full sprite sheet" AE PSX anims into single frames the same way all other anims work
  • Add function to apply algorithm to remove "islands" of pixels from a known list of sprites that have some artifacting (crafn)
  • Apply PSX RGB colour ramp for correct low intensity colouring
  • Pallet reader
  • Add semi trans/PSX blend modes to renderer (crafn)
  • Way to flip x or y of textured quad to renderer (crafn)

Allow more than 1 active subtitle/multi-line subs, and formatting

Currently if more than one sub title is active it won't render:

                // TODO: Render all active subs, not just the first one
                current_subs = subs[0]->Text().c_str();
                if (subs.size() > 1)
                {
                    LOG_WARNING("Too many active subtitles " << subs.size());
                }

And if a subtitle spans more than 1 line its draw as 1 line - i.e \n is ignored.

Additionally basic formatting such as [i]test[/i] should work. Probably at least i,b and u.

Enable CI builds for mingw

I think this probably has no chance of building atm - shouldn't be too hard to fix. Needs to be enabled in CI so it stays in a working state.

Allow zip FS to seek correctly/optimize LVL I/O

The zip FS loads entire files to a memory stream which can be quite slow. Instead it should stream and decompress the file on the fly. The LVL archive seeks all over the place during construction which is slow in a compressed file, instead it should load the none contiguous file records on demand.

Crash at the startup [0df4e9d] + Helping the project

Hello

Today, I've tried to compile the open-source, everything was alright, but when I launched Alive.exe, I got this error message :
screenshot_20160722115607
When I "Abort" or "Ignore", the program close, and when I "Retry", it's stop to work.

Assertion failed: IsArray(), file C:\Users\Benjamin\alive\3rdParty\rapidjson\include\rapidjson/document.h, line 1637

I searched in this file but I don't what's wrong with this line :

Array GetArray() { RAPIDJSON_ASSERT(IsArray()); return Array(*this); }

I'm not very good at coding, so I need your help to fix it please.

For information, I use the fs branch

Redesign file system/resource system

Current system is quite awkward because all games data is thrown into one big blob which can make picking the correct file tricky.

Need a system that:

  • Has a list of known data stores such as AoPc, AoPsx, AoDemoPc, AoDemoPsx etc.
  • Some big database of files to which LVL's the live in, this so CD1/CD2 files are picked correctly.
  • A way to have separate configuration of "mods" that can override any file, including a file, or file chunk/animation frame within a LVL. A mod will have to specify which data stores it depends on. Or this could be figured out automagically since we'll have the data base of files.
  • A mod should be able to include another mod for "layering" for example if someone has a custom path and someone else has a HD mod, then it should be possible to layer the HD mod on top of the new path.
  • Perhaps a higher level way of mapping resources, for example to give each animation a named ID and allow overriding in this way too. For example "kAbeWalkLeft" where overriding means something like providing a PNG with this name, otherwise the correct BND file, chunk and animation set is looked up.
  • Overriding should support new file types, for example overriding a camera should ignore the file extension in the comparison and then use the extension to select the correct loader. so if the real game had foo.cam and you had a remade version, then it should be possible to set an override of foo.cam to foo.png
  • Do some basic first run search for the game data, check steam location, registry keys etc.

Generating the file DB is possible to do via a tool, including generating the resource ID tables, there would then be a manual step of name the known animations and map AO to AE animations ids if they are not the same (not yet checked).

Support for Myst IV: Revelation?

Is this open source "ALIVE" engine, based of the same "ALIVE" engine that powered Myst IV: Revelation? Or is that one totally different?

If it's the same, would it be possible to make your open source engine support playing Myst IV? If it's not, then please just reject this issue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.