Analog Circuit Video Game Concept

There's only need for one forum for now. Discuss development. No advertising or thinly veiled attempts at advertising. Create a single thread for your project and be prepared to show and tell.
100goats
Posts: 162
Joined: Mon May 04, 2020 9:29 pm

Re: Analog Circuit Video Game Concept

Post by 100goats »

I am working on this idea again.

I decided to change the scope of this project to just having analog circuits run the game logic.

Digital display input and analog circuit output are just very different paradigms that don't communicate well with each other.
It is a nightmare trying to figure out a way to have discrete timing for drawing graphics with analog signals.

I am going to make a digital module that takes analog output (positions of players) from the analog circuit logic module
and determines where to draw characters based on analog circuit logic module output.
For now, the plan is to just have a raspberry pi take in analog signal input with an ADC(analog-to-digital converter) and draw
a sprite to screen based on the converted digital input from ADC.

Also, I saw that my previous 2 dimensional collision detector circuit failed if difference between x coordinates and difference between y coordinates
of players were the same. I fixed it by looking for an equation that would be zero if both player's coordinates were the same.

diff_sum = (xdiff + ydiff) + (xdiff - ydiff) . diff_sum is zero only if coordinates of 2 players are are the exact same i.e. xdiff = 0 and ydiff = 0. Also order for subtraction doesn't matter if xdiff and ydiff are zero or the same.

I will figure out collision detection with bounding box later.
User avatar
Deckhead
Site Admin
Posts: 128
Joined: Fri Feb 21, 2020 5:44 am
Location: Sydney, Australia
Contact:

Re: Analog Circuit Video Game Concept

Post by Deckhead »

I read recently that analogue circuits have some very promising applications in things like neural networks. The issue was degradation of the signal as it passed through thousands of neurons etc.
Developer of The Last Boundary and webmaster of IndieGameDev.net
100goats
Posts: 162
Joined: Mon May 04, 2020 9:29 pm

Re: Analog Circuit Video Game Concept

Post by 100goats »

Deckhead wrote: Wed Mar 30, 2022 6:39 am I read recently that analogue circuits have some very promising applications in things like neural networks. The issue was degradation of the signal as it passed through thousands of neurons etc.
Yes. A specialized analog circuit can use less power than a digital computer doing the same function.
A motivating factor for researching analog circuits for neural networks is to decrease energy used for neural networks.

This is a good article that describes using analog circuits for neural networks.
https://semiengineering.com/developers- ... ural-nets/

I hope computing with analog circuits comes back.
User avatar
Deckhead
Site Admin
Posts: 128
Joined: Fri Feb 21, 2020 5:44 am
Location: Sydney, Australia
Contact:

Re: Analog Circuit Video Game Concept

Post by Deckhead »

It's super interesting stuff, especially some of the more advanced historical uses like the sights for bombing aircraft circa WW2 or tidal prediction computers.
Developer of The Last Boundary and webmaster of IndieGameDev.net
100goats
Posts: 162
Joined: Mon May 04, 2020 9:29 pm

Re: Analog Circuit Video Game Concept

Post by 100goats »

It turns out that my equation was half correct. It did accurately result in being zero whenever positions of 2 dots were the same.

However, diffsum_result became negative or positive depending on xdiff and ydiff polarity and magnitude.
diffsum_result = (xdiff + ydiff) + (xdiff - ydiff)

The change in polarity of diffsum_result made the zero detector circuit detect a zero even when xdiff and ydiff were not zero.

I fixed the circuit by taking out the possibility of a polarity change in diffsum_result by taking the absolute value of xdiff and ydiff.

diffsum_result = | xdiff | + | ydiff |
100goats
Posts: 162
Joined: Mon May 04, 2020 9:29 pm

Re: Analog Circuit Video Game Concept

Post by 100goats »

I made a lot of progress on this project since the last time I posted.

I added an attack mechanic that just made the player who had the highest value when sampling a triangle wave "It".
I simplified and improved this attack mechanic by replacing sampling a triangle wave with just tracking button press with a differentiator circuit
that activates on the positive and negative edges of the square wave signal made by a button press.

This decreased the number of quad op-amp components used significantly. Checking which player has the highest attack value is still done.

I made progress on the rendering. I have the ADCs on the STM32 Nucleo-F446RE dev board connect to analog output signals and USB-UART bridge connect to the PC. The microcontroller takes digital samples from the ADC and sends them to the PC via USB-UART bridge.
The software program takes these digital samples and renders an image based on the information that these samples represent.

Here is a brief overview video explanation:
Post Reply