Circuit Dude [2.1] - Awesome Puzzle Game With 50 Levels!


(Holmes) #1

Circuit Dude - v 2.1

Help Circuit Dude build an awesome invention by leading him through 50 unique levels, completing circuits and plugging in microchips. After all chips are inserted into their sockets, the exit will activate and you can advance to the next puzzle! What kind of secret invention is Circuit Dude building? Complete all of the levels to find out!

Honestly, this my favorite game that I’ve made in a while and I really would appreciate any kind of feedback. :slight_smile:

Video

Check it out, here: https://twitter.com/crait/status/799399783387500544

Controls

D-Pad: Move Circuit Dude around
Hold A: Blow Circuit Dude up to restart the level
A + B: Return to stage select

Tiles

Basic Tiles

This is Circuit Dude! Move him around with the d-pad

Walkable tile that Circuit Dude can move around on

All blank sockets must be walked over in order to put a microchip into them

Whenever a chip is inserted, it looks like this and cannot be walked over

Whenever all sockets are inserted, this is the exit for the level

Walls

These are wall tiles that you cannot walk through

Conveyor Belts

Stepping onto a conveyor belt will move Arduboy off of the space in the direction of the arrows.

Rotating Walls

These tunnels rotate 90 degrees whenever you pass through them

These corner pieces rotate 90 degrees whenever you step off of them

Stepping on this button will rotate all rotating pieces 90 degrees

Movable Walls

This is a wall that has been lifted up that cannot be walked through

Whenever movable wall is lowered, it can be walked over

This button will switch all movable walls up or down whenever Circuit Dude walks onto it

Misc Tiles

LED’s cannot be walked through

All LED’s will turn on whenever all of the sockets are filled

Walking over a CPU socket will put a CPU inside of it

CPU’s cannot be walked through but are not required in order to complete a level

Downloads

Download .arduboy: http://www.crait.net/proj/CircuitDude.arduboy
Download Sketch: http://crait.net/proj/CircuitDude.ino
Download .hex: http://crait.net/proj/CircuitDude.hex
Circuit Dude is also available to download using the Arduboy Manager!
I’ve also got a PC version on Steam!

Links

Follow me on Twitter for more updates and releases: @crait
Check out my site for my other stuff: http://crait.net/?projects

Changelog

2.0: February 26, 2017

  • Minimized boot code to acommedate for library change

2.0: January 9, 2017

  • Switched over to the Arduboy2 library! (Shout out to @MLXXXp!)
  • Busted out the audio to the Playtunes library
  • Added the ability to quit the level with A+B
  • Expanded the help section to include all of the tiles
  • Compressed most images to save some space (Shout out to @igvina!)
  • Sound on/off is now saved in the global EEPROM location
  • Updated some screens to include better graphics
  • Packed everything into a .arduboy package
  • Included the Screen Mirror feature

1.11: December 5, 2016

  • Level 6 and Level 14 were too hard! I moved them down past level 20.

1.0: November 17, 2016

  • Initial Release

Circuit Dude For PC Released On Steam!
Tile map collision and some other basic questions
MazezaM - Puzzle Game
Screen Mirroring Guide / How To Screenshot Your Game
Incorrect information in the "upload games" guide
Red / Blue LED won't analog if arduboy.begin();
Make Your Own Arduboy Game: Part 9 - Mapping DinoSmasher
Arduboy2 - The now recommended alternative to the Arduboy Library
What is your favorite game?
(Trevor Ancona) #2

Very cool game, I really like the graphics! One thing I think you should add are descriptions for the more advanced tiles in the help section.


(Holmes) #3

I am so limited on space for a description that I do not think I can really fit it in with only 200 bytes left. Maybe when I update to the new Arduboy library. :wink: Good feedback, though. Please let me know how far you get!!


(koteitan) #4

Suicide with high temperature is funny! I love this one


(Scott) #5

It took me about 5 minutes to switch it from the Arduboy library to the Arduboy2 and ArduboyTones libraries. This frees up another 1166 bytes of program space.

For anyone interested, here’s the unified diff:

--- ../CircuitDude_org/CircuitDude.ino	2016-11-18 10:17:57.689285448 -0500
+++ CircuitDude.ino	2016-11-18 10:28:07.070154311 -0500
@@ -22,10 +22,12 @@
 //	Align and clean up menu text
 //	
 
-#include <Arduboy.h>
+#include <Arduboy2.h>
+#include <ArduboyTones.h>
 #include <EEPROM.h>
 
-Arduboy arduboy;
+Arduboy2 arduboy;
+ArduboyTones tones(arduboy.audio.enabled);
 #define OFF HIGH
 #define ON LOW
 #define SAVELOCATION (EEPROM_STORAGE_SPACE_START + 410)
@@ -1641,9 +1643,9 @@
 #define NOISECPUOUT 140
 #define NOISECHIPOUT 475
 #define NOISELEVELCOMPLETE 700
-void sound(int pitch, long duration) {
+void sound(unsigned int pitch, unsigned int duration) {
 	if(soundon) {
-		arduboy.tunes.tone(pitch, duration);
+		tones.tone(pitch, duration);
 	}
 }
 

(Scott) #6

By eliminating the compiler warnings, you can save another 64 bytes of program space

--- ../CircuitDude_org/CircuitDude.ino	2016-11-18 10:17:57.689285448 -0500
+++ CircuitDude.ino	2016-11-18 11:09:12.355362771 -0500
@@ -1671,7 +1673,7 @@
 		level = givenlevel;
 		canswitch = true;
 		deathcounter = 0;
-		for (int i = 0; i < sizeof(currentmap) / sizeof(currentmap[0]); i++) {
+		for (unsigned int i = 0; i < sizeof(currentmap) / sizeof(currentmap[0]); i++) {
 			currentmap[i] = pgm_read_byte(&levelmap[givenlevel][i]);
 			if(currentmap[i] == 51) {
 				playery = i / 14 * 8;
@@ -1786,7 +1788,7 @@
 	}
 }
 
-void rotateinplace(char index) {
+void rotateinplace(unsigned char index) {
 	if(currentmap[index] == BRROT) {
 		currentmap[index] = BLROT;
 		sound(NOISEROTATE, 150);
@@ -1820,7 +1822,7 @@
 }
 
 void swapall(char from, char to) {
-	for (int i = 0; i < sizeof(currentmap) / sizeof(currentmap[0]); i++) {
+	for (unsigned int i = 0; i < sizeof(currentmap) / sizeof(currentmap[0]); i++) {
 		if(currentmap[i] == from) {
 			currentmap[i] = to;
 		}
@@ -1829,7 +1831,7 @@
 
 void checkcompletion() {
 	boolean gotemcoach = true;
-	for (int i = 0; i < sizeof(currentmap) / sizeof(currentmap[0]); i++) {
+	for (unsigned int i = 0; i < sizeof(currentmap) / sizeof(currentmap[0]); i++) {
 		if(currentmap[i] == 37) {
 			gotemcoach = false;
 		}
@@ -2006,7 +2008,7 @@
 			arduboy.print((int)(level + 1));
 			drawlevel();
 			if(transitionanimation == 0 && gamebuttonfree) {
-				char index = playerx / 8 + playery / 8 * 14;
+				unsigned char index = playerx / 8 + playery / 8 * 14;
 				if(gamebuttonfree && arduboy.pressed(UP_BUTTON) && checkcollision(playerx / 8, (playery - 8) / 8) && currentmap[index] != HTROT && currentmap[index] != TLROT && currentmap[index] != TRROT) {
 					rotateinplace(index);
 					playertoy -= 8;

(Curtis Ovard) #7

Sweet just uploaded can’t wait to play it.


(Piotr Bzdura) #8

Sweet game! Like a variation of Boulder Dash.


(Grover Gruflund) #9

This is a fun game, and I’ve been impressed with the subtly of some of the puzzles so far. Good job!


(Gavin Atkin) #10

Very cool game! Difficult and creative puzzles. I want to try to get through all the levels :slight_smile:


(Kelvin Smith) #11

@crait This game is amazing! I’ve been playing it obsessively for two days. This is the best game for the platform (arduboy) so far :heart_eyes:


(Kelvin Smith) #12

Is level 6 solvable?


(Kelvin Smith) #13

My girlfriend solved it :slight_smile:


#14

incredibly fun game. I’m now stuck in level 14…:heart_eyes_cat:


(Holmes) #15

Thank you all so much for your support and feedback! Glad you guys are enjoying the game!

Whoa. This is the biggest complement that I’ve ever gotten for a game I made. This really means a lot to me. :cry:

Haha. Yeah! :stuck_out_tongue: I was trying to think of a cheeky animation for restarting a level.

@MLXXXp, thanks! I have some more ways in mind to refactor the code, but doing that will definitely give me enough space to add some stage transitions and more animations.

Do it! There is an awesome twist at the end that you need to beat all the levels to see!

Haha! Yes, all the levels are solvable!


(Scott) #16

It’s difficult to know for sure without trying it but compressing some of your bitmaps and then drawing them with the drawCompressed() function in the Arduboy2 library may reduce the code size. It depends on how much is saved by compressing the bitmaps and whether it offsets the amount of code added by using drawCompressed().


(Ignacio Viña) #17

I was checking the drawCompressed() function to try to understand the RLE encoding that it’s applied to the original bitmap. I think that some bits of the original encoded array can be removed, also a zig-zag image scanning could reduce the size of the encoded image with no performance penalty on the draw.
I will write a post on the forum after a better research about this issue.
I’m sure that @crait will save a lot of space with compressed bitmaps! :wink:


#18

It seems like a pretty good game.
But if I compile the sketch the size of the sketch is too big. I tried to compress the sketch with the ideas you had. But it is still to big.

The size of version 1.0 is 30.000 Bytes (104%) for me.

Any suggestions?


#19

@BlurAurA Have you tried the newest version of Arduino IDE ? I’m using v1.6.12 which results 28470 bytes sketch size.


#20

Thank you! That solved the problem haha.