Creativerse

Creativerse

Norr Apr 3, 2017 @ 5:03am
Creativerse D Flip Flop
Hello all of the Creativerse community. I am just posting here to share some knowledge about something I recently came up with in Creativerse and get some feedback on it's implementation. It's the D Flip Flop. For those of you not familiar with D Flip Flops, I shall explain:

A D Flip Flop (dff for short), is a memory unit that updates its information from a source input every rising clock edge of a given clock. For example, let's say I had an input signal called, 'banana' and a clock called 'apple' (arbitrary names here folks). Once 'apple' goes from a 0 signal to a 1 signal (when the clock rises), the dff will take in whatever signal 'banana' is sending. If 'banana' was a 1, then the dff will output 1, vice versa. The key thing about a dffs is that it stores it's signal from a source input and only updates its output every rising clock. If the input source signal were to change within rising clock edges, the dff will not respond. Only until the rising clock edge.

You may ask, "Hey Nor, what's the difference between D Flip Flops and regular Creativerse flip flops?" Well, it is true that a Creativerse flip flop only update every rising clock edge (updates after receiveing a 1), but the difference is that a Creativerse flip flop ALWAYS changes it's output on a rising edge, while a D Flip flop changes it's output only when the input signal is different than the output signal.

Using the above logic, we can implement a D Flip Flop in Creativerse very simply. You need an XOR gate, an AND gate, a Flip Flop, and a clock. We will call the input 'D' and output 'Q':

First check to see if output and input are different:
X = D XOR Q

Next we check if the clock is on AND D is different than Q:
A = X AND CLK

Finally, if the clock is on and D is different than Q:
Q = A (A is true and and changes the ff output)
(If A were false, then the ff would not change)


Now you may ask, "So what?" Well, my friend, the D flip flop is the most important part of any circuit involving memory. For example, I am working on a game of 'Snake' which needs to know which space you were last one to get the new space. I hope you guys enjoyed reading this info post on D Flip Flops and wish you all a nice day.

TL;DR
I made a D flip flop in Creativerse using only 2 logic gates and a flip flop. Thoughts?
< >
Showing 1-9 of 9 comments
Tsax Apr 3, 2017 @ 6:00am 
I am not tech savvy and creativerse is my first big project regarding logic and algorithms. However what you posted above seems to be of huge potential to large part of machine/adventure/game building and i will have to test it out and study it before i can contribute more of my thoughts.

Mighty cool find again, Nor!
Norr Apr 3, 2017 @ 6:04am 
Originally posted by Tsax:
I am not tech savvy and creativerse is my first big project regarding logic and algorithms. However what you posted above seems to be of huge potential to large part of machine/adventure/game building and i will have to test it out and study it before i can contribute more of my thoughts.

Mighty cool find again, Nor!
Yes, dffs are crucial in any kind of sequential circuit and provide a building block for any kind of project involving memory.

What project will you be working on in Creativerse?
Tsax Apr 3, 2017 @ 6:12am 
I am finishing up an adventure and i will post it in the adventures forum and in the Combeau's Adventure Contest post, no latter than the 10th.

Because it's going to be a story based adventure with dialogue, NPCs and a few choices, i made some form of 'memory' machine that i use throughout the whole thing to keep track of player progress and manage interactions.

You should check it out once it is live :)
Norr Apr 3, 2017 @ 6:19am 
I'll certainly look at it when I have the time. I think I kind of led you in the wrong direction though. If you are just testing NPCs status then I think regular flip flops will suffice. Dffs are meant for updating the status of a signal every clock cycle. I don't think you need that.

Still curious, are the NPCs just sensor text/arc sign text with a mob looking at you or something more?
Tsax Apr 3, 2017 @ 6:29am 
mostly sensor text in sequence with a mob. but there are a few little mechanisms that add more reality to it all. I'd rather not say more because it would be much more clear if you play through it .

But there is a part of the adventure that i won't be releasing with the rest, simply because i can't figure out the way to make a machine work, in time. And your dff might just be the solution.
Last edited by Tsax; Apr 3, 2017 @ 6:31am
Saraneth Apr 3, 2017 @ 5:01pm 
Nor, I assume you're using the traditional D flip-flop from a T flip-flop Fire tried here:
http://steamcommunity.com/app/280790/discussions/1/333656722971461026/

Have either of you been having any issues recently with the machines after area reloads (logging in and out, teleporting to and from the area, etc.)?
Tsax Apr 3, 2017 @ 5:10pm 
Originally posted by Saraneth:
Have either of you been having any issues recently with the machines after area reloads (logging in and out, teleporting to and from the area, etc.)?

Yes. most prominent one is when i try to reset my memories with a reset switch after coming back to the machine area from a teleporter. It takes 2-3 pulls to reset every bit of memory whereas if i am working on it, in its proximity and try a reset, it's always a one try success.
Last edited by Tsax; Apr 3, 2017 @ 5:11pm
Norr Apr 3, 2017 @ 5:56pm 
Originally posted by Saraneth:
Nor, I assume you're using the traditional D flip-flop from a T flip-flop Fire tried here:
http://steamcommunity.com/app/280790/discussions/1/333656722971461026/

Have either of you been having any issues recently with the machines after area reloads (logging in and out, teleporting to and from the area, etc.)?
I do get weird glitches where the states on my gates are different from what I had before when I reload an area. I just fix these glitches by using a master reset of some sort.

And yes, im using the same design as the Fire is in that thread. I am not using a Tff though. Only a Dff.
Saraneth Apr 4, 2017 @ 6:23pm 
Originally posted by Nor:
Originally posted by Saraneth:
I am not using a Tff though. Only a Dff.

I meant that here the Creativerse Flip-flop essentially functions within the design as a T flip-flop and occupies the same space that a T flip-flop would in D flip-flops that use them.
< >
Showing 1-9 of 9 comments
Per page: 1530 50

Date Posted: Apr 3, 2017 @ 5:03am
Posts: 9