Code Monkey home page Code Monkey logo

megademo's Introduction

megademo

A pastime project for recreating some of the demo effects from my childhood that I enjoyed tinkering with. This time instead of going full berzerk on CPU cycle tight optimisation in 6510/6502 and x86 assembly I went for pyxel (a super nice and easy to approach retro game engine for Python) because I got lazy :) and it just allows me to quickly capture a bit of nostalgy in between times. You can check out the current version of this little experiment of mine running in your browser! ๐Ÿ˜‰

C64 loader mandelbrot voxel amiga ball

The term megademo was used to refer to longer then usual demoscene product, that would include an extensive range of effects, so called demo parts. Later demos evolved into a more fluid, story telling like visual experience with a more unified look and stronger visual integrity. Early megademos on the other hand were more like just a series of independent parts, sections, a showcase of graphics routines.

pyxel - the retro game engine under the hood

While programming the good old Commodores or even sometimes the 16 (and later) 32 bit era PCs required you to hand optimise some assembly code to get to the desired performance for specific visual effects, pyxel (that is inspired by pico-8) poses some artificial (and inherit) limitations on what you can build with it.

pyxel palette

  • 16 color palette. (which you can customise if you want to go for the look and feel of a specific machine, but I'll just stick to the default one depicted above)
  • although you do have access to "video memory" but it is still python, so it is preferred that you rely on the the fairly limited, SDL2 backed primitives.
  • for pixel based graphics you only have access to 3 banks of 256x256 pixels (and similarly sized tilemaps)

What is great about pyxel, that due to it's ability to create wasm ouput, you can very easily make your game/demo run in a browser as well. Basically you just need to link to the python file, which is amazing!

Development environment

To be able modify and run the demo you will need:

  • Pyhton 3.7+ (3.10 is recommended for performance purposes, just in case)
  • pipenv (to be frank, this is optional. pipenv just happens to be my choice of tool for managing virtual environments for it's simplicity and keeping my work folder clean)
  • pyxel python package is basically the only dependency
  • in the development workflow I also like to use black for code formatting, but that is purely optional.

Steps for setting up the environment once creating the folder and downloading the contents of this repository (presuming you already have homebrew installed):

brew install [email protected]
brew install pipenv
pipenv install

For running the demo in the same folder your would want to

pipenv run python3 megademo.py

(VS Code will/can recognise the virtual enviroment for python and you should be able to run it just by clicking on the "Run Python file" button.)

megademo's People

Contributors

greg76 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

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.