Home    LittleBigPlanet 2 - 3 - Vita - Karting    LittleBigPlanet 2    [LBP2] Everything Else LittleBigPlanet 2
#1

A LBP2 logic program prototype for PC, done with Java...

Archive: 37 posts


Hello people,

I got tired searching a suitable program to create similar logic as LBP2 when I'm away home, and I had some logic ideas to test... so I started my self to create one.

So far I created basic logic gates: AND,OR, NOT ; a CircuitBoard to put all your logic (that I will made it collapsable as well and convert it into a microchip ) a ToggleSwitch and a basic "Led".

I have already implemented basic wiring, and signal processing. So far it looks pretty cool, I'm trying to find a suitable path algorithm for wire-path. Because this is the only thing is taking me time to figure out, I just will continuing adding logic nodes like timers and signal splitters/joining...

I started this project a couple weeks ago, and I'm using :
JavaNetBeans 7.1, and Java 1.6;

I tested on Linux (Ubuntu) and Windows, and it works just nice...

Here is a pic of my progress so far...
http://www.lbpcentral.com/forums/attachment.php?attachmentid=38740&d=1328792613

38740
2012-02-09 13:00:00

Author:
xquake
Posts: 73


GOGOGO!

as much as i like my little notebook drawings, they take forever.

and i wouldn't worry about wire path. as long as you allow us to add nodes ourselves, organization shouldn't be a problem.
2012-02-09 13:29:00

Author:
Unknown User


GOGOGO!

as much as i like my little notebook drawings, they take forever.

and i wouldn't worry about wire path. as long as you allow us to add nodes ourselves, organization shouldn't be a problem.

Lol Do you think so? lol, Well as soon I got more nodes defined, I will release the first version for testing Actually I am going to test this over Android (I need to buy an Android phone!, or at least look for an emulator) because android support Java as well so theoretically this should work on smart phones as well that support java...

Thanks for the reply
2012-02-09 13:42:00

Author:
xquake
Posts: 73


tbh, the wire path in lbp2 isn't perfect either. i mean, sometimes the wires absolutely refuse to overlap if they can help it so they often go around the entire board just to get to a chip a few mm away.

the nodes i'm referring to are the small circle-y ones that look like an uninverted NOT gates btw. if you add those, that'd basically be like drawing the wires yourself.
2012-02-09 13:58:00

Author:
Unknown User


tbh, the wire path in lbp2 isn't perfect either. i mean, sometimes the wires absolutely refuse to overlap if they can help it so they often go around the entire board just to get to a chip a few mm away.

the nodes i'm referring to are the small circle-y ones that look like an uninverted NOT gates btw. if you add those, that'd basically be like drawing the wires yourself.

Of course I know what you mean. those nodes are like distributions hubs for a wire, I used them to re-organize the wires on LBP2 they are really useful to use. Yes, for sure I will add it, in fact I will do that now
2012-02-09 14:13:00

Author:
xquake
Posts: 73


Well, that does not take to much time to do

Node hub implemented

http://www.lbpcentral.com/forums/attachment.php?attachmentid=38741&d=1328801262

38741


2012-02-09 15:29:00

Author:
xquake
Posts: 73


I can see this being a really useful tool! Well done2012-02-09 22:44:00

Author:
Unknown User


I can see this being a really useful tool! Well done

Yeah!

I will try to release soon a jar file to run it..., I'm still implementing the rest of tools.

So far I have a few challenges, like the wiring path management, and also I'm implementing threads to speed up signal processing when circuit is too large.

Next to do:
* Multi-thread usage.
* implement rest of tools, like timers, signal splitters, etc.
* Implement Microchips, so far I all components are located over a circuit board, now, I will implement collapsing CircuitBoards to convert into chips.
* Implement wire path management...
* Implement Circuit saving.

The graphic library I'm using allows to print the graph into a printer, and save the image.
2012-02-09 23:56:00

Author:
xquake
Posts: 73


what is wrong withthe wire managment that you have now2012-02-10 07:41:00

Author:
JKY
Posts: 119


what is wrong withthe wire managment that you have now

Hi,

It's too basic, now with the node hub, you can "draw" the wire path yourself, wires do right now what they are intended to do, just connect nodes and transfer signal from one node to other, but I still want they find their way from initial node/pin to final node/pin, avoiding any obstacle between...

for now; I'm working on other things like making other tools, and will get back to wire management when I got a better Idea how to do it.
2012-02-10 09:42:00

Author:
xquake
Posts: 73


Hi,

It's too basic, now with the node hub, you can "draw" the wire path yourself, wires do right now what they are intended to do, just connect nodes and transfer signal from one node to other, but I still want they find their way from initial node/pin to final node/pin, avoiding any obstacle between...

for now; I'm working on other things like making other tools, and will get back to wire management when I got a better Idea how to do it.

ok i can understand being to basic i think i might have a soulition i will have to reinstall netbeens over the the week end and see if it is posable useing the DWARLINE() POINT haveing rounded edges will be of some issue and (0 long turns but i know you can to a () squar corner on click so you would click from point to point to point and it would draw the line

but there are ways to do it

if you would like help we could team up would take me about 2 weeks to switch languages and rember the basic santax

i dont have time to spell check this sorry so sloppy
2012-02-10 13:04:00

Author:
JKY
Posts: 119


haveing rounded edges will be of some issue

You mean for circle objects? just draw circle but virtually keep it as squere, i/O of such object always should be in the middle

Would be nice if you guys keep it 30Hz
2012-02-10 13:22:00

Author:
Shadowriver
Posts: 3991


ok i can understand being to basic i think i might have a soulition i will have to reinstall netbeens over the the week end and see if it is posable useing the DWARLINE() POINT haveing rounded edges will be of some issue and (0 long turns but i know you can to a () squar corner on click so you would click from point to point to point and it would draw the line

but there are ways to do it

if you would like help we could team up would take me about 2 weeks to switch languages and rember the basic santax

i dont have time to spell check this sorry so sloppy

Hey mate,

You know round corners are not a problem. I'm working with a really nice 2D library called "G" (http://geosoft.no/graphics/) and it's really good, it will take care of all forms and keep a track of all objects, it can detect collisions, and search for a specific object, and many other things.

Also it has a really good use for lines where I can decide what kind of corner I would like to use, rounded or square; that's not the issue.

My issue is, to find a suitable algorithm to calculate path between 2 objects, avoiding obstacles. For now it's not a big issue, because circuit works anyway without this pre-defined path. wires are connected to each node and transmit signal just fine.

But yeah, some help finding a good path algorithm will be nice.

NetBeans 7.1 or Eclipse (which ever suit better to you)

I'm using Java 1.6, if you have some knowledge of C# will be easy to get through it


You mean for circle objects? just draw circle but virtually keep it as squere, i/O of such object always should be in the middle

Would be nice if you guys keep it 30Hz

Yes I know what you mean, that's why I will implement threads. I did not do it from beginning for laziness... and because I was expecting the first prototype to see how it works, now I can see it' s working pretty well, I will implement properly the use of threads, and optimize Event handlers....

wish me luck...
2012-02-10 13:58:00

Author:
xquake
Posts: 73


Nice work, I look forward to seeing more.


I got tired searching a suitable program to create similar logic as LBP2 when I'm away home, and I had some logic ideas to test... so I started my self to create one.
There are lots of programs for designing circuits. Logicly (http://logic.ly/demo/) is one of the more accessible.
2012-02-13 11:40:00

Author:
Ayneh
Posts: 2454


Nice work, I look forward to seeing more.


There are lots of programs for designing circuits. Logicly (http://logic.ly/demo/) is one of the more accessible.

Hello, yes I had a look to many of them like this other (http://www.neuroproductions.be/logic-lab/index.php?id=52) too, I mean they have really nice stuff, but still lack look and feel I was looking for, and beside, all these programs needs a browser (or to you be online), to work with them. I also have a look to a ton of other programs like: Logic Circuit (http://www.logiccircuit.org/) and GateSim really nice programs and they are even free for download; but you can't run them over Linux (well you can running mono a .net implementation) , but still they do not fit what I was looking for.

And also, I take this as a personal challenge. To keep my mind busy ; but yes. if you feel comfortable with those programs they are ok, but not for me .

I have included a thread to manage simulation, now it can be paused,and resumed any time.

I'm still adding new components.

so far these are the only ones working ok:

http://www.lbpcentral.com/forums/attachment.php?attachmentid=38806&d=1329148007



38806
2012-02-13 15:51:00

Author:
xquake
Posts: 73


Hmmm contact Spaff to let you use offical LBP icons:

http://wiki.lbpcentral.com/Icons

If you will need higher res and MM won't provide to you i can make it for you, but yeah first ask Spaff since this stuff is copyrighted and most likely you will need to place copyright to icons on in about screen or title when you turn on program

Also that OR gate looks like more like moon then OR Gate and i bet XOR Gate would look even crazier with this OR gate should be the same as AND gate just the back be a curve.

Also i hope you will care for realizm with original logic, specially in terms of delays if you need help ask Aya since he was playing around with this kind of stuff them most
2012-02-13 16:02:00

Author:
Shadowriver
Posts: 3991


Hmmm contact Spaff to let you use offical LBP icons:

http://wiki.lbpcentral.com/Icons

If you will need higher res and MM won't provide to you i can make it for you, but yeah first ask Spaff since this stuff is copyrighted and most likely you will need to place copyright to icons on in about screen or title when you turn on program

Also that OR gate looks like more like moon then OR Gate and i bet XOR Gate would look even crazier with this OR gate should be the same as AND gate just the back be a curve.

Also i hope you will care for realizm with original logic, specially in terms of delays if you need help ask Aya since he was playing around with this kind of stuff them most

Hey mate, I had a look to the icons, really nice indeed... but they say "Remember that these icons are copyrighted, property of Media Molecule - we only have permission to use them on the LBPWiki domain. Please do not redistribute!"

So I can ask to Spaff, but this program it's out of LBPWiki domain so probably the answer will be negative

Yes I know what you mean. I will give more details to those icons. actually I do not like with these icons either... so yeah will re-design them again , but for now I will concentrate on rest of tools.

Yes, I'm trying to adapt signal speed propagation. I'm still having some issues, but hope I can get rid of them soon.
2012-02-13 16:39:00

Author:
xquake
Posts: 73


No we as a site have permission to only use them on LBPWiki, but other sites also got them, most notably LBP2Blog and LBPlanetarium because they also asked Spaff too use them. There no harm to ask just link Spaff to this thread or send him some screen or even video showing software in action, i know they are very open to any community things so they won't say no for no reason. I bet if you release this software they would interest in it anyway knowing them2012-02-13 17:00:00

Author:
Shadowriver
Posts: 3991


No we as a site have permission to only use them on LBPWiki, but other sites also got them, most notably LBP2Blog and LBPlanetarium because they also asked Spaff too use them. There no harm to ask just link Spaff to this thread or send him some screen or even video showing software in action, i know they are very open to any community things so they won't say no for no reason. I bet if you release this software they would interest in it anyway knowing them

Well, I wrote a message to him, so I will let you know what is his answer

Thank you!
2012-02-13 19:45:00

Author:
xquake
Posts: 73


quake looks good so far have you set the project opensource yet and are you going to2012-05-08 07:15:00

Author:
JKY
Posts: 119


Hello People,

I was away for long time, and it was because I moved home, and also a lot of work...

I started this project initially on Java and using a 2D library; but soon I have found a lot of limitation on this 2d library functions, so was looking for another graphic engine that can help me out to continue this project.

After testing other libraries, I have selected JME Game Engine, which is a 3D engine that works with Java very well supported and with a really cool Community ...

So I started my project (from scratch) again, it took me some time to understand how 3d graph scene works but after a really painful learning curve that at the end I've enjoyed because now I've learnt new things...

For this project also I've used Custom Java Event in order to propagate signal... so far seem to be working...

But still some work to do, I've recreated all nodes using Blender, so all of them are now 3d objects...

here is a updated picture of my actual work:

http://www.lbpcentral.com/forums/attachment.php?attachmentid=47222&d=1383780148

http://www.lbpcentral.com/forums/attachment.php?attachmentid=47219&d=1383779539

47222

47220

47221

47219


I will keep you guys updated...

regards,
2013-11-06 23:28:00

Author:
xquake
Posts: 73


Wow! I am rally amazed at what you have been working on! The whole work you've doing from post 1 to this one is incredible! It makes me regret not taking the computer programming class that my school offered even greater. Anyways, good luck on any problems you might face and finding all the solutions! I will make sure to check back as often as I can! 2013-11-08 05:31:00

Author:
Bryan_Zuckerberg
Posts: 874


If you could port this to an Android app, that would be awesome. Looks good so far.2013-11-08 15:21:00

Author:
DreadRandal
Posts: 434


Wow! I am rally amazed at what you have been working on! The whole work you've doing from post 1 to this one is incredible! It makes me regret not taking the computer programming class that my school offered even greater. Anyways, good luck on any problems you might face and finding all the solutions! I will make sure to check back as often as I can!

Thank you very much! , well learning something new like programming is cool... if you like it but it also require dedication and time, but if you really know what do you want to achieve and how to do it, it is really rewarding

Thanks for your comments, and of course I will keep posted new updates on this !

EDIT:


If you could port this to an Android app, that would be awesome. Looks good so far.

You know what, I'd read that JME3 is supported on Android so it may be possible! let me investigate more about this. When I have the initial program up and running as I want, I will look into porting...

Thanks for your comment!

Second EDIT:


quake looks good so far have you set the project opensource yet and are you going to

Hello JKY,

After I complete first version of it yes I've planned to release it for free download.
2013-11-08 16:47:00

Author:
xquake
Posts: 73


Hello Guys,

A quick update to show how program is processing logic signals (I know, I will replace video for another one with better Quality... sorry)...

http://youtu.be/HvGdbt6KOik


regards.
2013-11-09 01:49:00

Author:
xquake
Posts: 73


Last update,

I'm implementing A* pathfinding algorithm for the wires, it looks promissing... I'm still dealing with some zigzag effect of on this, and also I want to implement a "Snap to Grid" method but to be honest I've no idea how to do it, and it is really important this because components can be perfectly aligned with a grid and wires will behave as I like, but I've failed miserably trying to make and find a suitable method to implement "snap to grid"...

I've already implemented a special thread for signal processing, so I can ajust speed on how signal is being processed.
2013-11-13 23:45:00

Author:
xquake
Posts: 73


Ok, today update is about wire management,

Finally after learning how A* pathfinding method works I have managed to implement it into my project, now every wire will apply this algorithm to find out its way from initial out pin to final input pin.

Still some tweaks to do like grid snap, and other stuff but I'm getting there...

here is a picture of how wires are arranged now:


http://www.lbpcentral.com/forums/attachment.php?attachmentid=47260&d=1384474067
47260
2013-11-15 00:11:00

Author:
xquake
Posts: 73


Hello to all,

Last update; new nodes created:

* Sensor Node
* Tag Node
* Timer

Function implemented:
* Snap to grid

Sensor node has not logic implemented just yet
Timer it is implemented, I need to update the graphic representation of it.

Below is actual work:

http://www.lbpcentral.com/forums/attachment.php?attachmentid=47360&d=1385937297

47360


Regards
2013-12-01 22:40:00

Author:
xquake
Posts: 73


Hello guys,

this is last update on my progress with this project:

* Timer Node implemented, Graphic representation changed
* Multilple selection Implemented
* Removal of Nodes Implemented (depending how many are selected)
* Changed external swing Java Menu, for an internal graphic menu inside OpenGL screen.


I also made some tests exporting this project to Android, I'm having some problems with touching system and sometimes it crash. Still working on it.

Still in progress:
* Saving
* Other advanced nodes

This is actual view:
47467

http://www.lbpcentral.com/forums/attachment.php?attachmentid=47467&d=1388431140
2013-12-30 19:26:00

Author:
xquake
Posts: 73


or at least look for an emulator
here (http://www.bluestacks.com/)
2014-01-02 09:00:00

Author:
amiel445566
Posts: 664


here (http://www.bluestacks.com/)

Hi,

But I was referring to an emulator of Logic Circuits similar to LBP circuit logic.

Regards.
2014-01-02 20:31:00

Author:
xquake
Posts: 73


Hello people,

Here is my last updates:

Last implementations:

* Circuit Save
* Circuit Load
* MicroChip Expand/Collapse
* Gridding

Current working on:
* Setting wires between microchips; Expand/Collapse external wiring
* Adding Sound Nodes
* Counters
* Adding "Stickers" for Microchip customization
* Implementing Sensor detection radius
* Optimizing code

Some Screen samples:

Loading a saved circuit:

http://s12.postimg.org/bfewtflbh/Screenshot_from_2014_03_11_21_29_08.png

File loaded:
http://s12.postimg.org/cvqfbko8d/Screenshot_from_2014_03_11_21_29_44.png

Adding a new Microchip:
http://s12.postimg.org/rg7i6ej71/Screenshot_from_2014_03_11_21_38_19.png

Now Collapsing the Microchip:
http://s12.postimg.org/ue4h03qul/Screenshot_from_2014_03_11_21_43_35.png

Until next update...!

47794
47795
47796
47797
2014-03-11 23:14:00

Author:
xquake
Posts: 73


diagonal wires? Thats not quite LBP style

Also do you emulate 30Hz? :>
2014-03-12 02:24:00

Author:
Shadowriver
Posts: 3991


Why does the microchip symbol thingy look vaguely like a swastika? o.o
You could take pictures of all the logic in lbp2, and cut it in an image program and use those as textures for your program. I'm not sure why you're using a 3D game engine for something like this, isn't that overkill? o.o
2014-03-12 03:20:00

Author:
AmazingKittyCat
Posts: 204


diagonal wires? Thats not quite LBP style

Yes I know , but thing is the algorithm I've used for wire Path is A*, allowing Diagonal; I can change that behavior anyway


Also do you emulate 30Hz? :>
Actual update rate is made every 50 milliseconds; I've not tested the 30Hz emulation just yet but I can change update rate anytime, due is a dedicated thread.

Update rate in:

* An Athlon x 2 CPU (really old guy) is around 30 to 50 frames per second. (Original programming environment running Linux Mint 15)

Running on a modern machine FPS are around 130 - 200 fps... ( Using linux or Windows)

Android:
Is running it also between 50 and 55 fps. ( I've tested on my Sony Tablet S)
I've tested on a Samsung Galaxy III and fps are around 70 and 90.

I've some issues with graphics on Android; some weird artifacts; so Android port need more custom modifications.

I need to design an internal clock to keep same speed on all different platforms.


Why does the microchip symbol thingy look vaguely like a swastika? o.o

Hello, you know what; I though the exactly same thing after I finished the drawing, It was not my intention to do that;I really do not want that association so I will change the chip Representation.


You could take pictures of all the logic in lbp2, and cut it in an image program and use those as textures for your program.

I've tried ask for permission but never get an answer from MM; so I do not want to use original symbols without any permission... you know...
With basic gate symbols are different due they are universal representation of logic.


I'm not sure why you're using a 3D game engine for something like this, isn't that overkill? o.o

At the beginning I'd started this project using a plain 2d libraries, but they were so limited; and to be honest I want this project to be expandable to other things; is not my priority emulate all LBP engine, but finishing the Circuit logic I can have second thoughts you know... Actually JME3 engine is a really cool environment; it manage a lot of things like Physics, collisions, rotations, scaling etc... so who knows...

For now I'm concentrated on Circuit Logic engine... when I finish it then let see what else can be done...



Thanks for your comments guys.

Regards.
2014-03-12 12:20:00

Author:
xquake
Posts: 73


Please.. please please PLEASE get this finished ASAP and release it! I really want to perfect myself with logic in LBP and that would be the perfect program to practice with. You could also do tutorials and sample Logic too 2014-05-26 20:52:00

Author:
madmarsrocks
Posts: 83


Please.. please please PLEASE get this finished ASAP and release it! I really want to perfect myself with logic in LBP and that would be the perfect program to practice with. You could also do tutorials and sample Logic too

Hi madmarsrocks, I'm trying my best to finish the Circuit Engine as soon as possible. Still dealing with some bugs that I hope will get rid of them soon.

Until now, I'm adding:
* Microchip Identification (so you can set microchip name)
* Microchip Description (If you want to be more specific about what Microchip is doing)
* Microchip input/output Identification
* Microchip Save/Load so you can reuse them.
* Microchip Sticker support; so you can add what ever image you want.

I will do an update soon;

Regards,
2014-06-02 21:06:00

Author:
xquake
Posts: 73


LBPCentral Archive Statistics
Posts: 1077139    Threads: 69970    Members: 9661    Archive-Date: 2019-01-19

Datenschutz
Aus dem Archiv wurden alle persönlichen Daten wie Name, Anschrift, Email etc. - aber auch sämtliche Inhalte wie z.B. persönliche Nachrichten - entfernt.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.