Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonAlling committed May 27, 2016
2 parents 6e8ef1d + de2151d commit 2e1d015
Show file tree
Hide file tree
Showing 42 changed files with 2,298 additions and 781 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.sublime-project
*.sublime-workspace
26 changes: 24 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# Achtung, die Kurve! in JavaScript

The aim of this project is to create a HTML5/JS remake of the original *Achtung, die Kurve!* from 1995.
The aim of this project is to create an HTML5/JS remake of the original *Achtung, die Kurve!* from 1995.

Open `zatacka.html` in a browser to run the game.

## Play

Open `ZATACKA.html` in a browser to run the game. It will automatically scale itself up as much as possible; fullscreen is recommended for the best experience.


## Contribute

All JavaScript files can be found in `js/`.

The main JS file is `Zatacka.js`. It is responsible for creating a `Game` and supplying a config, a `Renderer` and a `GUIController` to it. It also adds `Player`s to the `Game` and forwards key events to it.

`Game.js` controls the game logic. It knows which `Player`s are in the game and handles their interaction with eachother and the playing field, and it controls progress throughout the individual rounds. The `Game` constructor must be passed a config object, a `Renderer`, and a `GUIController`.

`Player.js` describes a single player. It knows whether it is alive, where it is, where and how fast it is going, its score, and what `Game` it is attached to.

`Renderer.js` does all the drawing on the actual playing field. `Game.js` does not draw anything; it just calls upon its `Renderer` to do that.

`GUIController.js` controls the scoreboard and additional GUI features, such as hiding the lobby and showing the results when the game ends. When a player's score is changed, the `Game` will tell its `GUIController` to update the scoreboard entry of that player.

`js/lib/` contains **general libraries** and help functions.

`dev/` may only contain **development tools** that are not needed at runtime, such as test suites or code generators.
101 changes: 101 additions & 0 deletions ZATACKA.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="UTF-8" />
<title lang="de">Achtung, die Kurve!</title>
<link rel="stylesheet" href="Zatacka.css" />

</head>

<body>

<div id="wrapper">
<aside id="left" class="canvasHeight"></aside>
<div id="border4" class="border">
<div id="border3" class="border">
<div id="border2" class="border">
<div id="border1" class="border">
<canvas id="canvas_main" width="559" height="480"></canvas>
<canvas id="canvas_overlay" width="559" height="480" class="overlay"></canvas>
<div id="lobby" class="overlay">
<ul id="controls">
<li>
<div class="red controls"></div>
<div class="red ready"></div>
</li>
<li>
<div class="yellow controls"></div>
<div class="yellow ready"></div>
</li>
<li>
<div class="orange controls"></div>
<div class="orange ready"></div>
</li>
<li>
<div class="green controls"></div>
<div class="green ready"></div>
</li>
<li>
<div class="pink controls"></div>
<div class="pink ready"></div>
</li>
<li>
<div class="blue controls"></div>
<div class="blue ready"></div>
</li>
</ul>
</div>
<div id="KONEC_HRY" class="hidden overlay">
<ul id="results">
<li class="red digits"></li>
<li class="yellow digits"></li>
<li class="orange digits"></li>
<li class="green digits"></li>
<li class="pink digits"></li>
<li class="blue digits"></li>
</ul>
</div>
<div id="messages" class="unobtrusive overlay"></div>
</div>
</div>
</div>
</div>
<aside id="scoreboard" class="canvasHeight">
<div class="red digits"></div>
<div class="yellow digits"></div>
<div class="orange digits"></div>
<div class="green digits"></div>
<div class="pink digits"></div>
<div class="blue digits"></div>
</aside>
</div>

<div id="debug">
<span id="debug_red"></span>
<span id="debug_yellow"></span>
<span id="debug_orange"></span>
<span id="debug_green"></span>
<span id="debug_pink"></span>
<span id="debug_blue"></span>
</div>

<script src="js/lib/Queue.js"></script>
<script src="js/lib/mainloop.min.js"></script>
<script src="js/lib/Utilities.js"></script>
<script src="js/lib/Message.js"></script>
<script src="js/lib/InfoMessage.js"></script>
<script src="js/lib/WarningMessage.js"></script>
<script src="js/locales/Zatacka.en_US.properties"></script>
<script src="js/Player.js"></script>
<script src="js/Round.js"></script>
<script src="js/Renderer.js"></script>
<script src="js/GUIController.js"></script>
<script src="js/Game.js"></script>
<script src="js/Zatacka.js"></script>

</body>

</html>
Loading

0 comments on commit 2e1d015

Please sign in to comment.