GithubHelp home page GithubHelp logo

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

Stargazers

Masanori Ogino avatar Niten avatar  avatar

Watchers

James Cloos avatar  avatar

xiq's Issues

Timing is wrong

The timing is not correctly frame-rate adjusted for clock speed.

Cmake is Broken

CMake build system hasn't been maintained in over a decade. And it doesn't work.

Include SDL as a submodule

Currently, the entire SDL2 2.0.8 library is included in the repo, including its artifacts.

This is stupid and wrong. Also, SDL2 has line-draw primitives in it, which entirely misses the point of the project.

Better to add SDL1 as a submodule and revert the port to SDL2.

Build for Linux?

Title says you wrote it on linux. Can it build run on linux+sdl?

Cheers!

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.