Giter Club home page Giter Club logo

euphoria's Introduction

euphoria

A bunch of code I wrote back in 2004 (at 14 years old) in the EUPHORIA language.

Contents include:

  • A low level mode 19 (13h) graphics engine. It has some nice things like a 256 color palette fade algorithm, and a cute implementation of RLE sprites (which I thought I had invented at the time). A blast of 320x200 goodness from the past.

  • A few copies of the VESA BIOS Extension documentation which was basically my goto handbook for all sorts of low level graphics goodness.

  • A platformer game, written using the graphics engine. It ran in mode 19. The code for this game is horrific, but the most interesting thing about it is an algorithm that can analyze user generated platformer maps and then generate new platformer maps based on the samples.

  • A Windows program installer that can wrap up a compressed archive inside an executable that can extract itself.

  • A DOS commandline messagebox (with terminal mouse support)

  • A really weird sorting algorithm

  • An attempt at creating an encryption algorithm after reading Bruce Schneier's book Applied Cryptography. 14 year old me was very impressed and thought it would be quite glamorous to roll my own algorithm.

  • A very naive compression algorithm that frankly is pretty embarassing.

  • Some amazing quotes like this one: I have a very old machine though with a slow processor, 32 mb memory and demo.ex runs at 56 kbs encoding and 56 kbs decoding.

  • Some incredible ASM code:

     global constant retrace_vertical = allocate(20)
     poke(retrace_vertical, {
       #50,          --    PUSH EAX
       #52,          --    PUSH EDX
       #BA,#DA,3,0,0,--    MOV EDX, 0x03DA
       #EC,          -- 1: IN AL, DX
       #A8,#08,      --    TEST AL, 0x08
       #75,#FB,      --    JNZ 1:
       #EC,          -- 2: IN AL, DX
       #A8,#08,      --    TEST AL, 0x08
       #74,#FB,      --    JZ 2:
       #5A,          --    POP EDX
       #58,          --    POP EAX
       #C3 } )       --    RET
    
  • A severe lack of well named variables, but an abundance of scary looking one liners:

    --A weird sprite routine that I doubt many will use.
    --It is fast though!
    global procedure buffer_sprite_fast(atom where,graphic_point xy,sequence img)
      atom a,x3,y3
      a = buffers[where][1]
      x3 = buffers[where][2]
      y3 = buffers[where][3]
      for counter = 1 to length(img) do
          poke(a+(xy[2]*x3)+xy[1]+((counter-1)*x3),img[counter]+peek({a+(xy[2]*x3)+xy[1]+((counter-1)*x3),length(img[1])}))
      end for
    end procedure
    
  • Many, many 8.3 filenames.

euphoria's People

Contributors

nathanpeck avatar

Watchers

Jovan Trujillo 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.