MeseconEdit - Version 1.6 (7/7/12)

Temperest
Member
 
Posts: 651
Joined: Tue Nov 15, 2011 23:13
GitHub: Uberi

MeseconEdit - Version 1.6 (7/7/12)

by Temperest » Sat Mar 03, 2012 17:49

An external 2D layout and design environment for Mesecon circuits.

Features:

  • Infinite grid management and drawing.
  • Smooth panning and zooming, drawing only visible grid elements.
  • Power source connectivity counting mechanism allows fast circuit recalculation after adding/removing power sources or mesecon.
  • Custom drawing for each node type - mesecon connects to adjacent mesecon, and every node can have its own shape and behavior.
  • Save and open Mesecon schematics (*.mesecon)
  • Import/export WorldEdit schematics (*.we)

Screenshot:

Image

Details:

This program is written in AutoHotkey; you may download the latest AutoHotkey interpreter here. As a Windows-only language, I'm afraid this program is not available for users of other platforms, until I can get familiar enough with something like PyGame to do a port, or someone else does it.

So far the power source connectivity count mechanism works as follows:

  • Mesecon has a state, which is a positive number or 0. Any positive number means that the mesecon is on; 0 means the mesecon is off.
  • On placement, mesecon will find the sum of the states of all neighbor nodes, and then increment the states of the neighbor nodes such that they are all equal to the calculated sum. This means that the mesecon "conducts" power source connectivity counts when it connects two active power sources.
  • On incrementing or decrementing the current node's state, also increment the states of neighbor nodes to match. This means that mesecon "propagates" charges across to neighbors.
  • Whenever changing another node's state, to prevent infinite recursion, keep an "open set" of nodes that have already been operated on. Don't process any neighbors that are already in the open set.
  • On removal, a full recalculation is done.

This mechanism is powerful because it is localized: only nodes that need to be changed will be processed, otherwise no recalculation is needed. Although it means that more data needs to be stored with each node, it also allows faster circuit calculation.

Download:

Source:

GitHub Repository
Latest Development Version

Compiled:

Version 1.6 Stable
Version 1.5 Stable
Version 1.0 Stable
Last edited by Temperest on Sat Jul 07, 2012 22:34, edited 1 time in total.
WorldEdit 1.0 released

The Mesecons Laboratory - the art of Mesecons circuitry
Latest article: Mesecons Basics.
 

User avatar
Death Dealer
Member
 
Posts: 1379
Joined: Wed Feb 15, 2012 18:46

by Death Dealer » Sat Mar 03, 2012 17:56

faster mescons correct? and can they still be edited from in-game?
Last edited by Death Dealer on Sat Mar 03, 2012 17:58, edited 1 time in total.
Keep calm and code python^_^
 

Temperest
Member
 
Posts: 651
Joined: Tue Nov 15, 2011 23:13
GitHub: Uberi

by Temperest » Sat Mar 03, 2012 18:18

Well this is an editor and simulator for mesecons, it's an external program and the mesecons mod uses a different algorithm for calculating circuits. When saving and loading are implemented, it will be possible to import your mesecons creations into the game using WorldEdit.

I'm hoping that by working out the issues in the algorithm, it will eventually be possible to implement the same thing in the actual mesecons mod, for faster circuit calculations.
WorldEdit 1.0 released

The Mesecons Laboratory - the art of Mesecons circuitry
Latest article: Mesecons Basics.
 

User avatar
Jordach
Member
 
Posts: 4412
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Sat Mar 03, 2012 18:19

This will be helpful!

EDIT: Why not use Wine?
Last edited by Jordach on Sat Mar 03, 2012 18:20, edited 1 time in total.

( ͡° ͜ʖ ͡°) ( ͡o ͜ʖ ͡o) [$ ( ͡° ͜ʖ ͡°) $] ( ͡$ ͜ʖ ͡$) ヽ༼ຈل͜ຈ༽ノ



My image and media server is back online and is functioning as normal.
 

User avatar
Death Dealer
Member
 
Posts: 1379
Joined: Wed Feb 15, 2012 18:46

by Death Dealer » Sat Mar 03, 2012 18:22

Temperest wrote:Well this is an editor and simulator for mesecons, it's an external program and the mesecons mod uses a different algorithm for calculating circuits. When saving and loading are implemented, it will be possible to import your mesecons creations into the game using WorldEdit.

I'm hoping that by working out the issues in the algorithm, it will eventually be possible to implement the same thing in the actual mesecons mod, for faster circuit calculations.

very cool +1
Keep calm and code python^_^
 

User avatar
Death Dealer
Member
 
Posts: 1379
Joined: Wed Feb 15, 2012 18:46

by Death Dealer » Sat Mar 03, 2012 18:24

Jordach wrote:This will be helpful!

EDIT: Why not use Wine?


"This program is written in AutoHotkey; you may download the latest AutoHotkey interpreter here. As a Windows-only language, I'm afraid this program is not available for users of other platforms, until I can get familiar enough with something like PyGame to do a port, or someone else does it."
thats what he said. in his post
Last edited by Death Dealer on Sat Mar 03, 2012 18:24, edited 1 time in total.
Keep calm and code python^_^
 

Temperest
Member
 
Posts: 651
Joined: Tue Nov 15, 2011 23:13
GitHub: Uberi

by Temperest » Sat Mar 03, 2012 18:52

Jordach wrote:This will be helpful!

EDIT: Why not use Wine?


I haven't tested it out in Linux yet, but I'm not too optimistic there...

If it works, that would be great!
WorldEdit 1.0 released

The Mesecons Laboratory - the art of Mesecons circuitry
Latest article: Mesecons Basics.
 

User avatar
Jordach
Member
 
Posts: 4412
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Sat Mar 03, 2012 19:32

I have WINE, but I'm using Windows and I won't reboot for a while.

( ͡° ͜ʖ ͡°) ( ͡o ͜ʖ ͡o) [$ ( ͡° ͜ʖ ͡°) $] ( ͡$ ͜ʖ ͡$) ヽ༼ຈل͜ຈ༽ノ



My image and media server is back online and is functioning as normal.
 

cosarara97
Member
 
Posts: 180
Joined: Tue Nov 01, 2011 18:53

by cosarara97 » Sat Mar 03, 2012 19:58

Jordach wrote:EDIT: Why not use Wine?


Because we want native programs...

I will check if it works in wine

EDIT: It works.
Last edited by cosarara97 on Sat Mar 03, 2012 20:20, edited 1 time in total.
:D
 

Temperest
Member
 
Posts: 651
Joined: Tue Nov 15, 2011 23:13
GitHub: Uberi

by Temperest » Mon Mar 12, 2012 00:19

Update: Working mesecon removal and circuit recalculation!

Next in line are the most commonly used circuit elements such as plugs and sockets, mesecon torches, and others.
Last edited by Temperest on Mon Mar 12, 2012 00:19, edited 1 time in total.
WorldEdit 1.0 released

The Mesecons Laboratory - the art of Mesecons circuitry
Latest article: Mesecons Basics.
 

Temperest
Member
 
Posts: 651
Joined: Tue Nov 15, 2011 23:13
GitHub: Uberi

by Temperest » Thu May 31, 2012 01:40

Quick update:

  • Working plugs
  • Working sockets
  • Working inverters
  • Working meselamps
  • Continuous panning (like in Blender)
  • Tons of bugs fixed - no more glitching on removal!

Bug reports welcome.

TODO: file saving/loading, more mesecon devices.
Last edited by Temperest on Thu May 31, 2012 01:41, edited 1 time in total.
WorldEdit 1.0 released

The Mesecons Laboratory - the art of Mesecons circuitry
Latest article: Mesecons Basics.
 

User avatar
LolManKuba
Member
 
Posts: 939
Joined: Fri Feb 10, 2012 22:36

by LolManKuba » Thu May 31, 2012 10:31

So basically this is like a patch to Jeija's Mesecons.
 

User avatar
Jordach
Member
 
Posts: 4412
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Thu May 31, 2012 15:21

No, this is a Windows program that simulates mesecons in a 2d view.

( ͡° ͜ʖ ͡°) ( ͡o ͜ʖ ͡o) [$ ( ͡° ͜ʖ ͡°) $] ( ͡$ ͜ʖ ͡$) ヽ༼ຈل͜ຈ༽ノ



My image and media server is back online and is functioning as normal.
 

User avatar
LolManKuba
Member
 
Posts: 939
Joined: Fri Feb 10, 2012 22:36

by LolManKuba » Sat Jun 02, 2012 14:26

Why is this in mods then
 

User avatar
Jordach
Member
 
Posts: 4412
Joined: Mon Oct 03, 2011 17:58
GitHub: Jordach
IRC: Jordach
In-game: Jordach

by Jordach » Sat Jun 02, 2012 15:06

Because its a emulator for a mod - which works like the mod.

( ͡° ͜ʖ ͡°) ( ͡o ͜ʖ ͡o) [$ ( ͡° ͜ʖ ͡°) $] ( ͡$ ͜ʖ ͡$) ヽ༼ຈل͜ຈ༽ノ



My image and media server is back online and is functioning as normal.
 

Temperest
Member
 
Posts: 651
Joined: Tue Nov 15, 2011 23:13
GitHub: Uberi

by Temperest » Tue Jun 05, 2012 21:18

Update: current git version supports a bunch of new things. Complete enough, in fact, that I made a half adder that simulated perfectly:

Image

Next up: undo/redo and file saving/loading!
WorldEdit 1.0 released

The Mesecons Laboratory - the art of Mesecons circuitry
Latest article: Mesecons Basics.
 

User avatar
SegFault22
Member
 
Posts: 870
Joined: Mon May 21, 2012 03:17

by SegFault22 » Wed Jun 06, 2012 02:11

cool
Resources are abundant; only money is scarce. People should not have to work hard and remain poor just to pay for the needs of survival.
Society can thrive without money - but only if productive members of society are rewarded for being productive.
 

Temperest
Member
 
Posts: 651
Joined: Tue Nov 15, 2011 23:13
GitHub: Uberi

by Temperest » Tue Jun 19, 2012 00:52

Update:

Version 1.0 Stable has been released!

Here's a screenshot:

Image

And here's the half adder schematic seen in the image above:

Half Adder.mesecon

Download links in the first post!
WorldEdit 1.0 released

The Mesecons Laboratory - the art of Mesecons circuitry
Latest article: Mesecons Basics.
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

by sfan5 » Tue Jun 19, 2012 11:58

Nice!
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

Temperest
Member
 
Posts: 651
Joined: Tue Nov 15, 2011 23:13
GitHub: Uberi

by Temperest » Tue Jun 19, 2012 15:56

By the way, sfan5, would you happen to have a desription of the WorldEdit save format? I'm planning to add and "export to WorldEdit" menu option in the next version.
WorldEdit 1.0 released

The Mesecons Laboratory - the art of Mesecons circuitry
Latest article: Mesecons Basics.
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

by sfan5 » Tue Jun 19, 2012 18:09

Example WorldEdit Save Lua Code:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
{
  {
    {-2,6,0},
    {name="default:water_source",param1=5},
  }
}

That is Saved with http://lua-users.org/wiki/SaveTableToFile
Note: I disabled "file:write( "-- Table: {"..idx.."}"..charE )" because that is useless
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

Temperest
Member
 
Posts: 651
Joined: Tue Nov 15, 2011 23:13
GitHub: Uberi

by Temperest » Tue Jun 26, 2012 00:03

sfan5 wrote:Example WorldEdit Save Lua Code:


Unfortunately the example you gave did not seem to match what I had received as output from the mod:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
return {
{
   {2},
},
{
   {3},
   {4},
},
{
   ["y"]=0,
   ["x"]=0,
   ["z"]=0,
},
{
   ["param1"]=15,
   ["name"]="default:glass",
},
}


This was a single block of glass, which saved and loaded perfectly. I'm not quite sure what certain parts of the file are for.
WorldEdit 1.0 released

The Mesecons Laboratory - the art of Mesecons circuitry
Latest article: Mesecons Basics.
 

Temperest
Member
 
Posts: 651
Joined: Tue Nov 15, 2011 23:13
GitHub: Uberi

by Temperest » Sat Jul 07, 2012 03:38

Update:

Version 1.5 stable!

  • File handling changes - confirm save on exit, keep file modified flags, etc.
  • Nasty power propagation bug now fixed.
  • Hotkey bug fixed.
  • New schematic format! Is forward compatible, but not backwards. See warning below.
  • New nodes! Signs for labelling stuff (text shows up on them!), and switches, for more convenient inputs. Punch to modify.

You will get a warning about a malformed file when opening schematics created by older versions of MeseconEdit. In this case simply select "Yes" and it will still load the file.
WorldEdit 1.0 released

The Mesecons Laboratory - the art of Mesecons circuitry
Latest article: Mesecons Basics.
 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

by sfan5 » Sat Jul 07, 2012 05:33

Temperest wrote:
sfan5 wrote:Example WorldEdit Save Lua Code:


Unfortunately the example you gave did not seem to match what I had received as output from the mod:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
return {
{
   {2},
},
{
   {3},
   {4},
},
{
   ["y"]=0,
   ["x"]=0,
   ["z"]=0,
},
{
   ["param1"]=15,
   ["name"]="default:glass",
},
}


This was a single block of glass, which saved and loaded perfectly. I'm not quite sure what certain parts of the file are for.

The Thing i gave you was the raw array, which gets saved with http://lua-users.org/wiki/SaveTableToFile
That Code saves the Table
You must port the saving and loading logic of the savefiletotable.lua thing to autohotkey,
if you do that you get the raw array
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

Temperest
Member
 
Posts: 651
Joined: Tue Nov 15, 2011 23:13
GitHub: Uberi

by Temperest » Sat Jul 07, 2012 15:45

Ah thanks, I'll look into that.

WorldEdit support will land in one of the coming versions.
WorldEdit 1.0 released

The Mesecons Laboratory - the art of Mesecons circuitry
Latest article: Mesecons Basics.
 

Temperest
Member
 
Posts: 651
Joined: Tue Nov 15, 2011 23:13
GitHub: Uberi

by Temperest » Sat Jul 07, 2012 22:36

Update:

Version 1.6 Stable!

  • WorldEdit import/export! Find it in File -> Import and File -> Export, respectively.
  • Fixed major serialization bug in v1.5 that prevented files from being properly saved.
WorldEdit 1.0 released

The Mesecons Laboratory - the art of Mesecons circuitry
Latest article: Mesecons Basics.
 

User avatar
jojoa1997
Member
 
Posts: 2890
Joined: Thu Dec 13, 2012 05:11

by jojoa1997 » Tue Jan 15, 2013 22:33

can you post updated pics
Coding;
1X coding
3X debugging
12X tweaking to be just right
 

Temperest
Member
 
Posts: 651
Joined: Tue Nov 15, 2011 23:13
GitHub: Uberi

by Temperest » Tue Jan 15, 2013 22:35

That is an updated picture, jojoa1997.
WorldEdit 1.0 released

The Mesecons Laboratory - the art of Mesecons circuitry
Latest article: Mesecons Basics.
 


Return to WIP Mods

Who is online

Users browsing this forum: No registered users and 29 guests

cron