As I mentioned in my WIP-thread, Iāve been working on and off on a Pacman clone in CircuitBlocks. The game is now finished!
Quick demo:
Whatās your best score? Iām unfortunately pretty bad at the game myselfā¦
As promised, hereās the CircuitBlocks project file! Hopefully it can help someone get started. Feel free to change/copy/steal/do whatever with it. Happy hacking and if you end up modding/building something new based on this - please share PacMan.zip (299.7 KB)
Some things to note:
CircuitBlocks is not super performant with project files this bigā¦ it works, but itās quite slow
Thereās currently no support for Arrays/Lists in CircuitBlocks which makes this project waaaay more complex than it should be
I know, I wish there were arrays in circuitblocks so thatās why I switched to c++ for my bad game. I donāt even know how you managed but you did a great job!
Hi @tarzanek - yes it can be compiled in CircuitBlocks. Itās a pretty big project file though, so some times CircuitBlocks struggles to deal with it. Iāve noticed that if you click the āOpen Codeā button it will sometimes show an empty code window - when that happens CircuitBlocks will fail to compile the project for you. The workaround is to open another project file and try to compile that, then go back to pacman.
You can download the zip Oscar provided in his original post and extract the contained XML file into the CIrcuitBlocks sketches directory (My Documents\CircuitBlocks). When you open CircuitBlocks, the sketch will be listed under Your sketches, where you can open it and run it on your Nibble.
@oscar@filipCM when I download the file, it comes up as a zipped file. all good, right? then I moved the file into the Circuitblocks folder, under āmy documentsā. I extracted the file, and now it is a normal folder. But when I open the folder, it shows another folder and a microsoft edge tab. The tab looks like this:
What you are seeing is Edge trying to display the XML sketch as if it were an HTML webpage. Since you donāt have any other program for opening XML files on your computer, Windows automatically assumes it should be opened by Edge, thatās why it is displayed as an Edge tab.
Please move the xml sketch into the CircuitBlocks directory. Your folder structure should be My Documents\CircuitBlocks\PacMan.xml
In other words, the file that is displayed as an Edge tab on your computer should be directly inside the CircuitBlocks directory.
Once you placed the sketch into the right folder, donāt open it directly. Instead, launch CircuitBlocks and the sketch should appear under Your sketches.
@filipCM So when I download the file, it is downloaded as a .zip file. when I open it, it still shows the edge. if I download it, donāt touch it, and move it to the folder, open CircuitBlocks, it STILL isnāt there. Is there something wrong with my download type? Or do I need some form of software to make it download as a xml? Or is this just me?
Sorry to hear youāre still struggling to get it working. Please contact us with a screenshot of your CircuitBlocks sketches directory at contact@circuitmess.com and weāll do our best to get you sorted out.
@filipCM Itās ok with the download now. It is now in my circuitblocks folder, and running in the app itself. But, like with @tarzanek it just spins on āCompiling Sketchā Forever. I tried to close and re-open it, but that didnāt work either. Next I tried to close and re-open it, then run only the sketch, but that didnāt work EITHER. So finally, I tried leaving it to compile the sketch overnight. The only thing that I achieved was a notification of a flat battery on my nibble. I have also tried the solution to tarzanekās problem, but that only made my program lag out, and made the window give me the messge of āCircuitBlocks is not respondingā. Iām confused as to why this is happening, as tarzanek found this to work. Should I try to just let it try to respond for a while, then try?
@BtTweeks That is some strange behavior from the app. Compiling can indeed take a long time on some machines, but not the whole night. Please try compiling that sketch again, and leave it compiling for at least 20/30 minutes. Then if it still isnāt done, stop the compilation by clicking the run button again, go back to the home screen, and send an error report. You can find the āSend error reportā button at the very bottom of CircuitBlocks. Let me know your report ID so I can take a look at what is happening.
On a sidenote, weāre soon releasing a web browser-based version of CircuitBlocks with micropython instead of C, which will eliminate problems such as this one and drastically speed up running sketches on your devices.