Coder Social home page Coder Social logo

openc2e / pycreaturestools Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 3.0 193 KB

Python tools for working with the Creatures series of games

Home Page: https://openc2e.github.io/

License: GNU Lesser General Public License v2.1

Python 99.89% Shell 0.11%

pycreaturestools's Introduction

openc2e logo

openc2e

openc2e is an open-source game engine intended to run all the games in the Creatures series.

Games

openc2e is intended to support:

  • Creatures (1996)
  • Creatures 2 (1998)
  • Creatures 3 (1999)
  • Docking Station (2001)
  • Creatures Playground (1999)
  • Creatures Adventures (2000)

Status

Working

  • Agents (COBs) work
  • Imperfect physics
  • Creatures biochemistry
  • Sound effects

Todo

  • Actual creatures (C3+ creatures work somewhat, C1 and C2 ones don't work at all)
  • Physics improvements (Especially C3+)
  • Network ability (the Docking Station warp)
  • Serialization (world saving, creature exporting, ...)

There are lots of open issues that still need solving.

Building

Dependencies

openc2e depends on:

  • SDL2
    • SDL2_mixer
  • Python
  • CMake
  • Boost.Serialization (optional)

Linux

Ubuntu

On Ubuntu 18.10 and up, you'll need these packages:

sudo apt-get install \
  build-essential \
  libsdl2-dev \
  libsdl2-mixer-dev \
  cmake

macOS

Install dependencies using Homebrew:

brew install cmake

Windows

Install Python, and Visual Studio's C++ CMake Tools for Windows.

Open the folder in Visual Studio and it will automatically run CMake and set up the build system.

Compiling

Create a new build directory and compile:

cmake -B build .
make -C build openc2e -j4

Running

You should provide a path to a game's data files with the -d or --data-path flag:

./build/openc2e -d /path/to/Creatures2

The engine will try to guess the game based on files in the directory. If it can't decide, it will default to C3/DS.

Advanced Usage

To see an overview of all available options, use -h / --help:

./build/openc2e --help

pycreaturestools's People

Contributors

amaikokonut avatar ligfx avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

pycreaturestools's Issues

Handling duplicate tag names

Traceback (most recent call last):
  File "/home/aiko/.local/bin/praydumper", line 8, in <module>
    sys.exit(main())
  File "/home/aiko/.local/lib/python3.10/site-packages/creaturestools/bin/praydumper.py", line 90, in main
    blocks = read_pray_file(input_filename)
  File "/home/aiko/.local/lib/python3.10/site-packages/creaturestools/pray.py", line 118, in read_pray_file
    data = _parse_tag_data(data)
  File "/home/aiko/.local/lib/python3.10/site-packages/creaturestools/pray.py", line 45, in _parse_tag_data
    raise ReadError("Got duplicate tag name {!r}".format(name))
creaturestools.exceptions.ReadError: Got duplicate tag name 'Agent Animation Gallery'

Got this when trying to praydumper the attached agent. I'm getting this with several agents, and it doesn't seem to actually be an issue with praydumper-- I think it's actually a bug in Monk's compilation process producing duplicate "Agent Animation Gallery" lines in the pray. It doesn't typically cause issues in agents otherwise (it's a little hilarious I'm only finding this now), so maybe there could be an option for praydumper to ignore it so it can still dump Monk-compiled agents?

One of the agents I'm having the issue with: advmuco.agents.zip

"While parsing pray source, got unexpected character ending at *" with CAOS2Pray

I haven't been able to get anything to build from CAOS2Pray cosfiles, I just keep getting this when I run praybuilder:

  File "/home/aiko/.local/bin/praybuilder", line 8, in <module>
    sys.exit(main())
  File "/home/aiko/.local/lib/python3.10/site-packages/creaturestools/bin/praybuilder.py", line 29, in main
    blocks = parse_pray_source_file(input_filename)
  File "/home/aiko/.local/lib/python3.10/site-packages/creaturestools/praysource.py", line 168, in parse_pray_source_file
    t = _lex_pray_source(s)
  File "/home/aiko/.local/lib/python3.10/site-packages/creaturestools/praysource.py", line 157, in _lex_pray_source
    raise Exception(
Exception: While parsing pray source, got unexpected character ending at *

It will build agents from normal pray files just fine, (so at least it's working in general), just not from caos2pray. I also tried running caos2praybuilder and just got command not found

I got this same result on every cosfile I ran it on, here are a few (though github apparently doesn't like cosfiles embedded into issues so I renamed them to txt)

amk-egg-history.txt
popapple.txt

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.