Coder Social home page Coder Social logo

castle's Introduction

castle

You know like...a sand castle in a sandbox or something? Basically a setup to play gym environments

Castle Example Castle Example

Why?

I like creating gym environments. But I want to play inside them too. It would be pretty cool to create simple games in pure python with like a couple hundred lines of code; even if it is an ASCII-esque game.

Rendering games as "rgb_array" is nice if you have all the information to do it, but most of the time I don't have it, nor do I "care" enough.

How will the game work?

My intent is that environments will use several conventions(?) (or is it grammatically better to say "semantics") which a generic wrapper will use. These are:

  • get_board() - returns a numpy array of 2 or 3 dimensions. If 2 dimensions then it displays the "height x width", if 3 dimensions then it displays "layers x height x width", especially if items can occupied the same position.
  • get_info() - provides the mapping from the numpy array to the icon which is displayed or the sprite which is used

Types of games to target:

  • Games which run based on a "frame-rate" (e.g. atari-esque)
  • Games which wait for input (e.g. solving a path finding environment)

Examples

See example/ folder. The various scenarios and approaches are shown there:

  • blocking: simple2x2 whereby you navigate a maze
  • random: movement - a demo example whereby the agent moves around at random
  • async: catch - a pseudo-async example for an atari-esque game

Goals and Milestones

  • Ascii wrapper
  • Ascii wrapper with colorama
  • Pyglet with ascii
  • Pyglet with sprites
  • Kivy for cross app development. Need to remove any numpy or gym dependencies to build it better.

Who knows!

castle's People

Contributors

8bit-pixies avatar

Watchers

 avatar

castle's Issues

PySDL2

Try doing some stuff using PySDL2 as a point for learning and prototyping something

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.