GithubHelp home page GithubHelp logo

bailang1 / xiq Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cschladetsch/xiq

0.0 0.0 0.0 29.57 MB

A QIX Clone written from scratch on Linux using just video- and audio-buffers.

C++ 95.76% C 3.94% CMake 0.30%

xiq's Introduction

XIQ - A QIX clone written quickly

This is a very simple game based on the old arcade game, Qix.

Title

Now, this may seem like a really small, trivial and badly written game. And it is.

However it is written with practically no 3rd-party library source or components. It uses a framebuffer of pixels, and a sound buffer of unsigned 8-bit bytes. These are provided by SDL, as well as input.

Nothing else is used. So when a line has to be drawn, I had to write a line-draw algorithm. Want to draw a circle? Then write the algorithm to plot the points of a circle (quickly).

When a sound effect had to be played, I had to write the sound values directly to the byte array for the sound buffer.

There is a custom FontLibrary as well. As well as an ObjectFactory and GamePhase management system.

Basically, I wrote this to see what I could with the following self-imposed limitations:

  1. A framebuffer of R8G8B8A0 pixels.
  2. A sound-buffer of unsigned 8-bit bytes.
  3. An input system that I could poll for key down/key up.
  4. One weekend.
  5. And absolutely nothing else.

So, it's a simple, badly-drawn game with no fancy graphics or sound or music or fonts. But it has graphics and sound and music and fonts, all custom made from the ground up.

Instructions

  • Move with the cursor keys or WASD.
  • Get hit and you lose a life.
  • You have three lives.

I know there's a problem with the game area being half the screen. That's a consequence of the 23-minute port from SDL1 to SDL2 and can't see much point fixing it.

Build Instructions

Linux

$ sudo apt install cmake libsdl2-dev
$ mkdir -p build && cd build
$ cmake ..
$ make
$ cd .. && build/xiq

Windows

Projects for VS2017 and VS2019 are included.

xiq's People

Contributors

cschladetsch 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.