9/8/2023 0 Comments Super hexagon pc hack![]() ![]() The POV shouldn’t take up too much of the processing power of the Arduino, so most of the clock cycles can be used for playing the game. After some frustration in the original idea, they realized that the game is perfectly suited for a POV display since it’s almost circular. To navigate the intricate maze of blending a POV display with a fast-paced game like this, the group turned to the trusty Arduino Micro. They didn’t stop there, though, and thought that it would work best with a POV display. Normally this 80’s arcade-style game would run in a browser but some of the people at Club de Jaqueo in Buenos Aires decided to cram all of that into an Arduino. Figuring our how to drive the audio codec IC would have been another entire project itself.For those who haven’t addicted themselves to Super Hexagon yet, it’s pretty… addicting, to say the least. Unfortunately there wasn't enough time to add sound to the project. There are a total of 4 colour schemes which change every time the spinning gets a little crazier.Īll of this results in the following game (sorry about the screen glare): Colour changing is done by a simple lookup into an array of predefined colours based on whether a wall, the player, or the background is present at any particular pixel. The spinning was achieved by applying a rotation to the initial x/y coordinates by multiplying by sin and cos functions. An example of such pattern is shown below: walls_maze = 6'b011111 walls_maze = 6'b000000 walls_maze = 6'b101111 walls_maze = 6'b000000 walls_maze = 6'b110111 walls_maze = 6'b000000 walls_maze = 6'b111011 walls_maze = 6'b000000 walls_maze = 6'b111101 walls_maze = 6'b000000 walls_maze = 6'b111110 walls_maze = 6'b000000 walls_maze = 6'b011111 walls_maze = 6'b000000 walls_maze = 6'b101111 walls_maze = 6'b000000 Once all the walls and player are in place the only thing left to add is crazy spinning and flashing colours to distract the player. New walls are sourced (pseudo)randomly from a set of 16 predetermined patterns. ![]() Two pointers index this array, one for making the walls move inwards towards the player, and another for updating the walls with new ones when they go off screen. The currently active walls are held in a 6bitx128 array in RAM. This collision logic was embedded into the main game state machine:Īnother interesting part of the project (It was all interesting!) was the wall generation. If the new coordinate collides, but the old one does not then the player's position is reverted back to the old coordinates. This was achieved by storing the player's old and new coordinates. ![]() Below is a highly simplified version:Īn Issue I came across during development was finding a way to allow the player to be killed when colliding with the front of a wall, but still allow the player to bump into the sides. ![]() The huge block diagram in the gallery shows the details. This colour is then fed back into the VGA driver module. Each coordinate is then clocked through the pipeline and processed until an RGB colour appears at the other end. On each pixel clock the VGA driver module would output an x/y coordinate. To get the data to the screen I chose a pipelined approach for calculating the pixels. This is what will ultimately display the graphics onto the screen. The core of the whole project is the VGA driver. All source code can be found on my github: The game mechanics were simple enough that It would be feasible to do an FPGA implementation. At the time I was quite addicted to Super Hexagon. As part of my Digital Design module for my Electronic Engineering degree I was tasked with writing an verilog project using an Altera DE1 FPGA. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |