Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (525)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (593)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  An extremely nerdy waste of time, combining two of my biggest fetishes...  (Read 6262 times)
0 Members and 1 Guest are viewing this topic.
Offline Markus_Persson

JGO Wizard


Medals: 16
Projects: 19


Mojang Specifications


« Posted 2006-02-27 18:58:33 »

... hexagons and logic gates!
http://www.mojang.com/notch/logichex/

I managed to build a proper four bit adder in that. Cheesy

Play Minecraft!
Offline t_larkworthy

Senior Devvie


Medals: 1
Projects: 1


Google App Engine Rocks!


« Reply #1 - Posted 2006-02-28 00:01:49 »

mahaha, is there a plan to implement a VM for it?

Runesketch: an Online CCG built on Google App Engine where players draw their cards and trade. Fight, draw or trade yourself to success.
Offline Markus_Persson

JGO Wizard


Medals: 16
Projects: 19


Mojang Specifications


« Reply #2 - Posted 2006-02-28 08:08:43 »

Considering how hard the adder was; no. ;-)

Play Minecraft!
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Ask_Hjorth_Larsen

Junior Devvie




Java games rock!


« Reply #3 - Posted 2006-02-28 17:02:59 »

This is really funny!

Quote
Cell inputs are up, lower right and lower left.
Cell outputs are down, upper left, and upper right.

Isn't it the opposite? If I place a + above an OR, it will stay off, but it will turn on if I place a + below it.
Offline blank_axolotl

Junior Newbie





« Reply #4 - Posted 2006-02-28 18:37:56 »

That's one of the most entertaining things I've seen in while.

It has a similar feel to the game of life. I haven't tried, but I'd bet you could make some pretty neat systems by using the cyclic patterns that sometimes appear. You could encode information by setting up cyles of different frequencies, and broadcast these frequency signals down 'wires' (made of ORs) to a signal reciever somewhere.

I got a two-bit adder working, in a parallelogram 60 by 20 hexes ( a four bit one would be around 60 by 40) . I haven't found a way of making nice condensed AND gates though.. mine are pretty big.

(Oh.. and what would be nice is a way to save/load what you've done)
Offline SluX

Junior Devvie





« Reply #5 - Posted 2006-02-28 22:27:17 »

Amusing..indeed.

I guess that i ll stick to it for some time.

Good job.

"Intelligence is the most beautiful gift and the greatest temptation which one life can receive from the gods."Me Cheesy
Play strategic football
Offline nonnus29

Senior Devvie




Giving Java a second chance after ludumdare fiasco


« Reply #6 - Posted 2006-03-01 00:58:36 »

The key would be to not build an adder, but a decoder and multiplexer then you could peice those into everything else.

Very cool stuff though.  Alternative forms of computation are fascinating to me.  I'd read something awhile back about a research group working on computation with self organizing tiles, this might give us a glimpse into something like that.
Offline Alan_W

JGO Knight


Medals: 8
Projects: 3


Java tames rock!


« Reply #7 - Posted 2006-03-01 07:29:27 »

Hum, a 4 bit adder.  I thought this would be easy... <sometime later> It's coming up with a tidy way of doing the carry's that makes it hard.  The logic is easy, the layout is the killer.  Not sure I have enough time for this.

You can make some nice oscillators in this as well.  How about a slow update option, so we can make counters?

Alan Smiley

Time flies like a bird. Fruit flies like a banana.
Offline Markus_Persson

JGO Wizard


Medals: 16
Projects: 19


Mojang Specifications


« Reply #8 - Posted 2006-03-01 10:24:07 »

This is really funny!

Quote
Cell inputs are up, lower right and lower left.
Cell outputs are down, upper left, and upper right.

Isn't it the opposite? If I place a + above an OR, it will stay off, but it will turn on if I place a + below it.

Yeah, it's.. wrong. I'll fix that.
I'll also add some more features, like being able to save the grid as a base 64 encoded rle packed string (and load it again, of course), and an update speed control. :-)


Here's a "leaky intersection" and a NAND gate:
Click to Play

The intersection swaps two pipes, but it leaks three "bits" of data down the wrong pipe when it does so.
The NAND is probably close to optimal in size.

For two pipes at at angle, here's a (fairly large) intersection:
Click to Play

Play Minecraft!
Offline nonnus29

Senior Devvie




Giving Java a second chance after ludumdare fiasco


« Reply #9 - Posted 2006-03-01 13:00:01 »

Markus, what inspired you to come up with this thing?  This is awesome...
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline CaptainJester

JGO Knight


Medals: 12
Projects: 2
Exp: 14 years


Make it work; make it better.


« Reply #10 - Posted 2006-03-01 14:16:45 »

Am I doing something wrong?

The instructions state:
Cell inputs are up, lower right and lower left.
Cell outputs are down, upper left, and upper right

So since I am sending an on signal out of the "+", shouldn't the 3 attached cells be on as well?  I only took one digital electronics course a long time ago, so please correct me if I missunderstand.

Thanks.

Offline Markus_Persson

JGO Wizard


Medals: 16
Projects: 19


Mojang Specifications


« Reply #11 - Posted 2006-03-01 14:24:54 »

Woo, thanks. Cheesy

I've always had a thing for hexagons. They just feel so LOGICAL.
Combine that with an interest in cellular automata (not that this is proper CA) and a fascination with logic gates, and this idea was bound to happen.
When I realized that the inputs and outputs would line up perfectly and still allow loops, I just had to implement it.

The first version was actually a flash applet:
http://www.mojang.com/notch/cellogic/

By the way, there's a new version up:

* Click and drag with the left mouse button to paint
* You can now load/save grids by using the nifty base 64 encoded panel to the right. Just paste the data you want in there and click "Load"

Play Minecraft!
Offline Markus_Persson

JGO Wizard


Medals: 16
Projects: 19


Mojang Specifications


« Reply #12 - Posted 2006-03-01 14:25:43 »

Am I doing something wrong?

The instructions state:
Cell inputs are up, lower right and lower left.
Cell outputs are down, upper left, and upper right

So since I am sending an on signal out of the "+", shouldn't the 3 attached cells be on as well?  I only took one digital electronics course a long time ago, so please correct me if I missunderstand.

Thanks.

The instructions were wrong.. my bad.
The outputs are the other three cells. The html page should be updated now.

Play Minecraft!
Offline Markus_Persson

JGO Wizard


Medals: 16
Projects: 19


Mojang Specifications


« Reply #13 - Posted 2006-03-01 14:39:07 »

Here's a full adder:

1  
2  
3  
4  
5  
==== BEGIN LOGICHEX ====
H4sIAAAAAAAAAO3bsQ0CMRBEUSMZcYEDVsLBBdcFBdDCdUQJlEwDREzg5L38a5NNp82jt0RV1p9h
X/WM+jm3sN+jvvfK+nlkfYX3z7BP78+5tu/Z/67uR9i3tB8j6wEAAAAAAAAAAAAAAAD4qb/0ev3f
/TvsP5esv4f947q2T/ezt7Dfwn4P+2w//wWqGfl3AEAAAA==
==== END LOGICHEX ====


It uses the leaky intersection, so it outputs the wrong value briefly.
The inputs are are the bottom, and are (from left to right):

Carry in
A
B

The outputs are at the top and are (from left to right):

S
Carry out

Play Minecraft!
Offline nonnus29

Senior Devvie




Giving Java a second chance after ludumdare fiasco


« Reply #14 - Posted 2006-03-02 01:14:48 »

If you made every change update all cells immediately this would be a nice approximation of 'quantum dot' logic...  Did I just invent that term?

edit; umm, no I didn't.
Offline Ask_Hjorth_Larsen

Junior Devvie




Java games rock!


« Reply #15 - Posted 2006-03-02 02:11:56 »

Quote
(and load it again, of course)

Or if you use this device you won't have to:

http://ingemeda.tripod.com/imag/wom1.jpg
http://ingemeda.tripod.com/imag/wom2.jpg
Offline Alan_W

JGO Knight


Medals: 8
Projects: 3


Java tames rock!


« Reply #16 - Posted 2006-03-02 07:21:23 »

A stackable one bit adder with carry in and out.  Hope this post works Wink

1  
2  
3  
4  
5  
==== BEGIN LOGICHEX ====
H4sIAAAAAAAAAO3TMQqDQBCGURdibCJY6D1yhC1Wxc4id8hFPZiH+ItAeK//GBhmuu7XPmH/DfsW
9mvJ+jJGee2z+XXrs749o/7cH1E/tSHq5+uV9Ue2/7ZEeXy+6ftNYf8OewAAAAAAAAAAAAAAAAAA
+CM3O5rkYQBAAAA=
==== END LOGICHEX ====


The carry input is at the bottom, the carry output is at the top.  The two inputs are difficult to spot.  They are the two '+'s on the lower part of the right hand side.  The output of the one bit adder is also difficult to find.  Start at the input carry and move 3 spaces up and then one diagonally up to the right.  Yep that one!

I had a bit of trouble getting this out of the edit box on my mac.  dragging it seemed to do the job.

/Edit: It does work after all.  My first post misidentified the data output.

/Edit2: Just spotted Markus'  has posted his adder.  It's much tidier than mine, with all the inputs and outputs much neater.  Bah Humbug Grin

Time flies like a bird. Fruit flies like a banana.
Offline Markus_Persson

JGO Wizard


Medals: 16
Projects: 19


Mojang Specifications


« Reply #17 - Posted 2006-03-02 08:14:36 »

Quote
(and load it again, of course)

Or if you use this device you won't have to:

http://ingemeda.tripod.com/imag/wom1.jpg
http://ingemeda.tripod.com/imag/wom2.jpg


.. write only memory?
Surely that's a joke. Cheesy

Right? *looks worried*

Play Minecraft!
Offline Markus_Persson

JGO Wizard


Medals: 16
Projects: 19


Mojang Specifications


« Reply #18 - Posted 2006-03-02 08:19:25 »

A stackable one bit adder with carry in and out.  Hope this post works Wink

1  
2  
3  
4  
5  
==== BEGIN LOGICHEX ====
H4sIAAAAAAAAAO3TMQqDQBCGURdibCJY6D1yhC1Wxc4id8hFPZiH+ItAeK//GBhmuu7XPmH/DfsW
9mvJ+jJGee2z+XXrs749o/7cH1E/tSHq5+uV9Ue2/7ZEeXy+6ftNYf8OewAAAAAAAAAAAAAAAAAA
+CM3O5rkYQBAAAA=
==== END LOGICHEX ====


Wow, that's tiny! :-o

Play Minecraft!
Offline Ask_Hjorth_Larsen

Junior Devvie




Java games rock!


« Reply #19 - Posted 2006-03-02 18:27:29 »

Hmm, looks like they weren't so happy about having the files linked. Here's a better link to the data sheet:

http://academics.vmi.edu/ee_js/Research/IC_Datasheets/digital_cmos/Write%20Only%20Memory.pdf

Sorry for going off-topic Smiley.

(Here's an explanation for why it exists: http://en.wikipedia.org/wiki/Write_Only_Memory)
Offline Tzan

Junior Devvie





« Reply #20 - Posted 2006-03-02 18:49:46 »

haha!

Love that pdf spec sheet!
Offline Markus_Persson

JGO Wizard


Medals: 16
Projects: 19


Mojang Specifications


« Reply #21 - Posted 2006-03-08 15:10:21 »

I just HAD to do it, so here's a proper four bit adder:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
==== BEGIN LOGICHEX ====
H4sIAAAAAAAAAO3bQYqEMBAF0AQSdGkgWbjwFn2ANJR7GzyQR+gjT2KcC/y/mYH/kd69LrFCrVIu
b2HEYVkS5w/SL+lFeVdm0q+cD4msv3E+kfU/pGfrl8J64/pnFjm/O87XTPqT8mcNhfDWvp8zwu+7
+ZPw7Q1iJXw+7agR96eZ24n6Ybd8MP59ngvjq4XI9P+9B+b9bTfzxPe3ox0AT/il/YUjfH+Y9+/P
QXpXSA/nv3tFURRFURRFURRFURRFURRFURRFURRFURRFURQwZvDNr7/kK+lPT/n65urni/LVf6n3
z25hfPUuR8JnR/lW3sH3P5tv5d2Ee+vlZ9y38rWsuF/a1wsJ9/34lI3xuV/Cx33r34fxuS8BvGDf
j08pM+z78SllhX0rX0NIqA/dx7LB3vXpmfD67edqDWT813P1F1/Q+8dj/EbW4/OnQ2J/4vYT58NM
+XqvMOE+3ytMsL+nF+HzWCFCvfmxwoT6Mb1wv9zTC/funl6M79OL8rE3kPB3A3F/3Q3EfZ9ejO/T
i/F9enGemT9jejF+4nyYKV+fBUzU52cBE/X+WcAEffCJqh9+FzBhn8YGLezL2KAl/Mr4Mb0IH0cD
Yf9ssKL+ehqI+q/n6o/phfsxvRhPzZ/wG9RPpJ9Jv5Ke25//AfjxmhYAQAAA
==== END LOGICHEX ====


Scroll down a bit to see the inputs. They're separated so the left four bits/inputs specify the first four bit number, and the four bits/inputs to the right specify the other four.

If you scroll way up (to the left in the structure), you'll find the five output bits.

[edit: Fixed a bug with the first output bit]

Play Minecraft!
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #22 - Posted 2006-03-08 15:45:39 »

.. write only memory?
Surely that's a joke. Cheesy

Right? *looks worried*

Actually, the GBA has some sections of write-only memory. Certain special memory locations are used to poke commands to the tile hardware, but attempting to read these bits of memory always returns the same value (which, oddly enough, isn't zero).

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline Markus_Persson

JGO Wizard


Medals: 16
Projects: 19


Mojang Specifications


« Reply #23 - Posted 2006-03-08 15:50:58 »

Assuming the hardware can read the bits, it's not write only.

Now, a harddrive that can store only 0's would be useful. Cheesy

Play Minecraft!
Offline swpalmer

JGO Coder


Exp: 12 years


Where's the Kaboom?


« Reply #24 - Posted 2006-03-08 22:36:18 »

.. write only memory?
Surely that's a joke. Cheesy

Right? *looks worried*

Actually, the GBA has some sections of write-only memory. Certain special memory locations are used to poke commands to the tile hardware, but attempting to read these bits of memory always returns the same value (which, oddly enough, isn't zero).

Reminds of the C64 where you would have a loop that copies memory overtop of itself  essentially like
for(int i = 0; i < 16384;i++) mem = mem;

but what you were doing was copying the image of the BASIC ROM from ROM to the RAM that lived at the same address, then you would flip a bit somewhere so reads would also come from the RAM and at that point you had a copy of the BASIC interpreter that you could tweak to add more commands, patch things, etc.
The cool thing was that the processor would by default read from teh ROM at that address, but the graphics chip (VIC II rulez!) would read from the underly RAM.  So you would store bitmaps and sprites "under" the image of the BASIC interpreter so it took no memory away from what was available to your BASIC program.

Offline Ask_Hjorth_Larsen

Junior Devvie




Java games rock!


« Reply #25 - Posted 2006-03-13 21:54:13 »

Pretty cool trick there, swpalmer Smiley

Quote
Now, a harddrive that can store only 0's would be useful.

That would be inefficient. You see, it's possible to store many more 1's in the same space because they stack more closely, while lots of space between the 0's goes to waste. So the way to go would be to use a harddrive that can only store 1's, then convert them to 0's when read.
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

toopeicgaming1999 (67 views)
2014-11-26 15:22:04

toopeicgaming1999 (58 views)
2014-11-26 15:20:36

toopeicgaming1999 (13 views)
2014-11-26 15:20:08

SHC (26 views)
2014-11-25 12:00:59

SHC (24 views)
2014-11-25 11:53:45

Norakomi (30 views)
2014-11-25 11:26:43

Gibbo3771 (24 views)
2014-11-24 19:59:16

trollwarrior1 (37 views)
2014-11-22 12:13:56

xFryIx (76 views)
2014-11-13 12:34:49

digdugdiggy (53 views)
2014-11-12 21:11:50
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!