Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Work in Progress / ESystem - Simulate electrical and logical systems in your game.

Author
Message
enderleit
17
Years of Service
User Offline
Joined: 30th May 2007
Location: Denmark
Posted: 9th Oct 2009 18:51 Edited at: 13th Oct 2009 12:06
Hey guys,

ESystem, is a collection of functions and types which will let you create and simulate electrical or logical systems in your games and programs.

You create various circuits using different parts from the system, such as:
- WIREs
- TRIGGERs
- TIMERs
- GATEs (AND, OR, XOR, NAND, and Compare Gates)

- You can set up various Triggers, Gates, and Timers, and then connect them using the Wires.
- The system then simulates the circuit by following the wires and updating the various Gates, and Timers.
- Connect Triggers or Wires to your ingame events, to have an actual electrical or logic system in your game.
- You can Cut or Uncut wires to simulate someone trying to bypass the circuit.

Here's a quick example of a simple circuit:

Create 3 new Wires.
wire1 = ES_NewWire()
wire2 = ES_NewWire()
wire3 = ES_NewWire()

Create 2 new Triggers, and connect them to the Wires.
trigger1 = ES_NewTrigger(wire1)
trigger2 = ES_NewTrigger(wire2)

Create 1 new AND Gate, and connect the first two Wires to the inputs. Connect the third Wire to the output.
andgate = ES_NewAndGate(wire1, wire2, wire3)

You now have a basic AND Gate which is only opened if both triggers are activated...

I have plans to expand the system with more gates, and other types of units, but it should be very useable as it is.

Included in the .zip file is all the source(includes), and some examples that I have made to demonstrate how to use the functions.
Everything is commented, so it should be easy to understand.

Use the system as you like, and you are welcome to post any modifications or additions you make to it. It is FREE/OpenSource.
Credits is appreciated though...

- enderleit
[href]www.eleit.dk[/href]

Attachments

Login to view attachments
enderleit
17
Years of Service
User Offline
Joined: 30th May 2007
Location: Denmark
Posted: 9th Oct 2009 18:52
A screenshot of the elevator example...

- enderleit
[href]www.eleit.dk[/href]

Attachments

Login to view attachments
enderleit
17
Years of Service
User Offline
Joined: 30th May 2007
Location: Denmark
Posted: 9th Oct 2009 18:54
A screenshot of example1...

Please note that the graphical drawings is not part of the system, though the drawing functions are included in the example code...

- enderleit
[href]www.eleit.dk[/href]

Attachments

Login to view attachments
enderleit
17
Years of Service
User Offline
Joined: 30th May 2007
Location: Denmark
Posted: 10th Oct 2009 12:13
No comments?

Did anyone try it out?

- enderleit
[href]www.eleit.dk[/href]
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 10th Oct 2009 17:40
This is pretty cool. We have to use a program in uni called 'LogicWorks', and it's quite fun to play with. Of course, in a typical programmer fashion, I just spend most of my time wondering how that would be implemented. It's nice to see someone doing it here at TGC!

Good work.

"everyone forgets a semi-colon sometimes." - Phaelax
enderleit
17
Years of Service
User Offline
Joined: 30th May 2007
Location: Denmark
Posted: 10th Oct 2009 23:38
Thank you very much zoto.

It's not that I'm vain, but it is always nice to get some kind of appreciation out of the work you do...

- enderleit
[href]www.eleit.dk[/href]
Dreamsenshi
15
Years of Service
User Offline
Joined: 4th Sep 2009
Location: USA
Posted: 11th Oct 2009 00:19
Looks like something I'll be spurred to play with a little later on after I've learned a bit more. I think it's a great idea!



Your error is my treasure. =^--^=
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 12th Oct 2009 04:18
Thinking outside of the box this system could be worked with to implement quite a few features in games, quest objectives for example. Your adventurer could be on a quest to find two obelisks in the world and perform a spell to activate the obelisk. These obelisks could be wired to an AND gate and that could then be linked to a portal that would then open when a signal was received from both obelisks.
tiresius
22
Years of Service
User Offline
Joined: 13th Nov 2002
Location: MA USA
Posted: 12th Oct 2009 08:10
I've had an idea to do a circuitry timed game similar to Windows classic "Pipe Dream" but with circuits. This could be a good base for that.

I'm not a real programmer but I play one with DBPro!
enderleit
17
Years of Service
User Offline
Joined: 30th May 2007
Location: Denmark
Posted: 12th Oct 2009 21:13
I myself have been wanting to make a hacker-game for a long time, which is one of the reasons why I came up with this system...

- enderleit
[href]www.eleit.dk[/href]
French gui
20
Years of Service
User Offline
Joined: 11th May 2004
Location: France
Posted: 15th Oct 2009 21:02
Very interesting! I'm myself coding a hacker game , but what will be the use of this for your game?
Xeridox
21
Years of Service
User Offline
Joined: 19th May 2003
Playing: Scrap Mechanic
Posted: 20th Oct 2009 09:18
I used a program similar to this in electronics class back in high school (when a 200 MHz processor was REALLY FAST lol). We also had elements such as lights, transistors, capacitors, resistors, motors, speakers, and other things of the like in the program. I can't remember that program's name though...would've been great help designing my laser tag packs.

Phenom - MP FPS WIP - With bot support, even online!
Official Thread -> http://forum.thegamecreators.com/?m=forum_view&t=149585&b=8
enderleit
17
Years of Service
User Offline
Joined: 30th May 2007
Location: Denmark
Posted: 25th Oct 2009 01:01
French gui: Was thinking of letting people bypass security by cutting different wires and stuff like that...

- enderleit
[href]www.eleit.dk[/href]
Mnemonix
21
Years of Service
User Offline
Joined: 2nd Dec 2002
Location: Skaro
Posted: 27th Oct 2009 10:13
This system seems reminiscent of the unreal 3 visual scripting system kismet, which I am a big fan of. Perhaps some kind of visual editor would really take this product to a new level.

Mnemonix
Xsnip3rX
17
Years of Service
User Offline
Joined: 20th Feb 2007
Location: Washington State
Posted: 27th Oct 2009 14:16
very nice ^.^ now make me a tractor beam, back to work you!

Login to post a reply

Server time is: 2024-11-24 12:07:02
Your offset time is: 2024-11-24 12:07:02