1 (edited by Temperest 2012-07-07 22:34:55)

Topic: MeseconEdit - Version 1.6 (7/7/12)

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:

http://i.imgur.com/oDgNM.png

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

The Mesecons Laboratory, a site dedicated to the art of Mesecons circuitry!

Latest article: Mesecons Basics.

2 (edited by Death Dealer 2012-03-03 17:58:07)

Re: MeseconEdit - Version 1.6 (7/7/12)

faster mescons correct? and can they still be edited from in-game?

Minetest is the shizneez!
Minetest.com Editor. The one stop shop to all your textures, mods, and servers:D

Re: MeseconEdit - Version 1.6 (7/7/12)

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.

The Mesecons Laboratory, a site dedicated to the art of Mesecons circuitry!

Latest article: Mesecons Basics.

4 (edited by Jordach 2012-03-03 18:20:52)

Re: MeseconEdit - Version 1.6 (7/7/12)

This will be helpful!

EDIT: Why not use Wine?

<Pixelized> yup the mpaa has some pretty fast seeders =)

Re: MeseconEdit - Version 1.6 (7/7/12)

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

Minetest is the shizneez!
Minetest.com Editor. The one stop shop to all your textures, mods, and servers:D

6 (edited by Death Dealer 2012-03-03 18:24:57)

Re: MeseconEdit - Version 1.6 (7/7/12)

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

Minetest is the shizneez!
Minetest.com Editor. The one stop shop to all your textures, mods, and servers:D

Re: MeseconEdit - Version 1.6 (7/7/12)

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!

The Mesecons Laboratory, a site dedicated to the art of Mesecons circuitry!

Latest article: Mesecons Basics.

Re: MeseconEdit - Version 1.6 (7/7/12)

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

<Pixelized> yup the mpaa has some pretty fast seeders =)

9 (edited by cosarara97 2012-03-03 20:20:46)

Re: MeseconEdit - Version 1.6 (7/7/12)

Jordach wrote:

EDIT: Why not use Wine?

Because we want native programs...

I will check if it works in wine

EDIT: It works.

:D

10 (edited by Temperest 2012-03-12 00:19:40)

Re: MeseconEdit - Version 1.6 (7/7/12)

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.

The Mesecons Laboratory, a site dedicated to the art of Mesecons circuitry!

Latest article: Mesecons Basics.

11 (edited by Temperest 2012-05-31 01:41:24)

Re: MeseconEdit - Version 1.6 (7/7/12)

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.

The Mesecons Laboratory, a site dedicated to the art of Mesecons circuitry!

Latest article: Mesecons Basics.

Re: MeseconEdit - Version 1.6 (7/7/12)

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

Re: MeseconEdit - Version 1.6 (7/7/12)

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

<Pixelized> yup the mpaa has some pretty fast seeders =)

Re: MeseconEdit - Version 1.6 (7/7/12)

Why is this in mods then

Re: MeseconEdit - Version 1.6 (7/7/12)

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

<Pixelized> yup the mpaa has some pretty fast seeders =)

Re: MeseconEdit - Version 1.6 (7/7/12)

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

http://i.imgur.com/VpCKd.png

Next up: undo/redo and file saving/loading!

The Mesecons Laboratory, a site dedicated to the art of Mesecons circuitry!

Latest article: Mesecons Basics.

Re: MeseconEdit - Version 1.6 (7/7/12)

cool

Re: MeseconEdit - Version 1.6 (7/7/12)

Update:

Version 1.0 Stable has been released!

Here's a screenshot:

http://i.imgur.com/snCPo.png

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

Half Adder.mesecon

Download links in the first post!

The Mesecons Laboratory, a site dedicated to the art of Mesecons circuitry!

Latest article: Mesecons Basics.

Re: MeseconEdit - Version 1.6 (7/7/12)

Nice!

My Mods: Nuke Mod WorldEdit Particles and working on Mesecons
Subscribe me on YouTube if you like my Stuff
My Minetest Builds for Windows

Re: MeseconEdit - Version 1.6 (7/7/12)

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.

The Mesecons Laboratory, a site dedicated to the art of Mesecons circuitry!

Latest article: Mesecons Basics.

Re: MeseconEdit - Version 1.6 (7/7/12)

Example WorldEdit Save Lua Code:

{
  {
    {-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

My Mods: Nuke Mod WorldEdit Particles and working on Mesecons
Subscribe me on YouTube if you like my Stuff
My Minetest Builds for Windows

Re: MeseconEdit - Version 1.6 (7/7/12)

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:

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 Mesecons Laboratory, a site dedicated to the art of Mesecons circuitry!

Latest article: Mesecons Basics.

Re: MeseconEdit - Version 1.6 (7/7/12)

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.

The Mesecons Laboratory, a site dedicated to the art of Mesecons circuitry!

Latest article: Mesecons Basics.

Re: MeseconEdit - Version 1.6 (7/7/12)

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:

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

My Mods: Nuke Mod WorldEdit Particles and working on Mesecons
Subscribe me on YouTube if you like my Stuff
My Minetest Builds for Windows

Re: MeseconEdit - Version 1.6 (7/7/12)

Ah thanks, I'll look into that.

WorldEdit support will land in one of the coming versions.

The Mesecons Laboratory, a site dedicated to the art of Mesecons circuitry!

Latest article: Mesecons Basics.