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

Complicated Logic Schtuff

Archive: 36 posts


Hey, feel free to use this area to talk about anything to do with logic, anything you've made, or any suggestions you might have for me or other people to make!2012-02-09 18:14:00

Author:
Unknown User


How about a toaster? 2012-02-09 18:15:00

Author:
jwwphotos
Posts: 11383


Woah woah woah... not that complex, I was thinking more along the lines of a dishwasher, but... :O2012-02-09 18:17:00

Author:
Unknown User


lol... sorry, I couldn't resist.

Ummm... car wash? Gosh I have no idea.
2012-02-09 18:21:00

Author:
jwwphotos
Posts: 11383


I s'pose a car wash wouldn't be too hard, but you've inspired me for a minigame, thanks! 2012-02-09 18:25:00

Author:
Unknown User


LOL!!! Awesome! Then my work here is done! 2012-02-09 18:30:00

Author:
jwwphotos
Posts: 11383


Design a controllable hologram box that can travel along and align itself to any incline plane also made of hologram at a variable speed without any external tags or the like.2012-02-09 19:22:00

Author:
Ayneh
Posts: 2454


Design a controllable hologram box that can travel along and align itself to any incline plane also made of hologram at a variable speed without any external tags or the like.

I don't think that that would be possible, as there would need to be a way for it to detect which side wall it was touching. This has kept me entertained for a while though, as I still don't have a solution. I'll keep looking into it.
2012-02-09 20:17:00

Author:
Unknown User


i made a controllable hologram box that detects ledges just by its shape and puts a tag on it when nearby. it tags it only if the ledge is sloped between 0 degrees from the horizontal axis to 45 degrees. it won't tag if it's a floor or a wall. so there's certainly a way to detect an incline using impact sensors. don't give up

edit: i got something too. a holo that matches, 1 to 1, the movement of an analog stick. needs to be circular
example: stick is at rest, holo is in the middle
-tilt the stick to the right and the holo matches the distance from the center
-rotate the stick clockwise and the holo circles around the center, keeping the same radius
-let go of stick and holo snaps back to middle

it's kind of like the joystick rotator, but i need it to match how far away from the center the stick is.
2012-02-09 23:57:00

Author:
Unknown User


i made a controllable hologram box that detects ledges just by its shape and puts a tag on it when nearby. it tags it only if the ledge is sloped between 0 degrees from the horizontal axis to 45 degrees. it won't tag if it's a floor or a wall. so there's certainly a way to detect an incline using impact sensors. don't give up

edit: i got something too. a holo that matches, 1 to 1, the movement of an analog stick. needs to be circular
example: stick is at rest, holo is in the middle
-tilt the stick to the right and the holo matches the distance from the center
-rotate the stick clockwise and the holo circles around the center, keeping the same radius
-let go of stick and holo snaps back to middle

it's kind of like the joystick rotator, but i need it to match how far away from the center the stick is.
you mean like this? http://lbp.me/v/zwp6yt
2012-02-10 15:34:00

Author:
evret
Posts: 612


Hey, I was wondering if you guys could suggest something complicated for me to try make (I've done a calculator, it's just alot of and gates, so try something original)? Also, feel free to share something you've made!

a lift that moves up/down/right/left and stops on the floor or part of the floor you pick, ignoring everything else
2012-02-10 15:54:00

Author:
GribbleGrunger
Posts: 3910


you mean like this? http://lbp.me/v/zwp6yt

doesn't quite move in a circle, more like a square with rounded corners, but it's a lot smoother than what i made, kudos to the maker, i'd love to know the method he or she used
2012-02-10 16:14:00

Author:
Unknown User


doesn't quite move in a circle, more like a square with rounded corners, but it's a lot smoother than what i made, kudos to the maker, i'd love to know the method he or she used

it's a negative feedback system used with an advanced mover, basicly the mover positions itself relative to 2 tags at the edge of the erea based on the stength of the sticks analog output....... or maybe not basic
it's also the main building block of the logic used in this http://lbp.me/v/1g9hte
2012-02-11 05:17:00

Author:
evret
Posts: 612


I don't think that that would be possible, as there would need to be a way for it to detect which side wall it was touching. This has kept me entertained for a while though, as I still don't have a solution. I'll keep looking into it.
The only way I thought of doing it was measuring the impact of the incline at two points and working out the angle from the time that has passed taking into account the player speed. It would have problems though, like when the player came to the crest of a hill.
2012-02-11 17:59:00

Author:
Ayneh
Posts: 2454


If anyone wants a logical challenge I would try making Chess with an AI player (Artificial intelligence). That be something fun and challenging logic wise.

I've made Checkers with AI and 80-90% of the level is logic!

Here's a pic of the AI player logic ALONE (It has 2P mode too). I couldn't even fit it all on screen and it nearly crashed my PS3.

http://i8.lbp.me/img/ft/da874007b28f922b8ddb66a285948864333363b9.jpg

There's posed to be 12 microchips for 12 red pieces on the board, but I could only fit about 10.
2012-02-13 12:18:00

Author:
comishguy67
Posts: 849


Ok.... how ON EARTH can you have all that logic without it failing???

I'm currently making a level that involves a lot of logic, mainly based around tags. When a friend (Valeview) tested it over the network, it failed horribly. From his desciptions, it sounds like the logic was going completely doolally. Tags activating that shouldn't be, tags not activating when they should be. At the moment, it basically means that 1 and a half months of LBP creating has gone to waste.

Does anyone know of an effective way for grid-based logic, without each grid square having it's own logic???

By grid based, I mean like Battleships for example.

This is probably the wrong thread to ask, but I thought I might as well.
2012-02-13 12:25:00

Author:
Ali_Star
Posts: 4085


Ok.... how ON EARTH can you have all that logic without it failing???

Thing is, this isn't on earth, it's on my moon.


Does anyone know of an effective way for grid-based logic, without each grid square having it's own logic???

By grid based, I mean like Battleships for example.

This is probably the wrong thread to ask, but I thought I might as well.

Do you mean something that can move on a grid? Well that probably involve timers, movers and some math.
2012-02-13 12:37:00

Author:
comishguy67
Posts: 849


Thing is, this isn't on earth, it's on my moon.






Do you mean something that can move on a grid? Well that probably involve timers, movers and some math.

No no no. I mean something that is based on a grid. Think like a Battleships board. Every square of the board has its own grid reference (A1, B2, C9 etc), which would mean that every grid square requires its own logic. Would you agree?
2012-02-13 12:41:00

Author:
Ali_Star
Posts: 4085



<3


No no no. I mean something that is based on a grid. Think like a Battleships board. Every square of the board has its own grid reference (A1, B2, C9 etc), which would mean that every grid square requires its own logic. Would you agree?

Right.

And you're trying to make reference points without logic?
2012-02-13 12:50:00

Author:
comishguy67
Posts: 849


<3



Right.

And you're trying to make reference points without logic?

I need a way to limit the logic. Because, as you can imagine, having 100 microchips, each with a fair amount (not massive amount though) of logic can cause problems.

The only thing that differs on the microchips (well....most of them.... it's complicated) is the grid reference, HOWEVER, each grid square effects the ones around it, as well as itself.

I think it can be simplified, by putting some of the logic for each grid square onto a main chip. Stick a follower on that chip, so that it moves to the relevant square when activated. But as to how much logic I can scrape off the grid chips onto the main chips, I don't know. Because some logic will have to stay with the grid chips.

After over a month of work (basically not played any other games in the past couple of weeks, which is unlike me), I don't want to see this level go straight in the bin, so I'm willing to do anything to save it, despite how tedious it might be.

Crikey, this was only supposed to be a darn side project!
2012-02-13 13:00:00

Author:
Ali_Star
Posts: 4085


I need a way to limit the logic. Because, as you can imagine, having 100 microchips, each with a fair amount (not massive amount though) of logic can cause problems.

The only thing that differs on the microchips (well....most of them.... it's complicated) is the grid reference, HOWEVER, each grid square effects the ones around it, as well as itself.

I think it can be simplified, by putting some of the logic for each grid square onto a main chip. Stick a follower on that chip, so that it moves to the relevant square when activated. But as to how much logic I can scrape off the grid chips onto the main chips, I don't know. Because some logic will have to stay with the grid chips.

After over a month of work (basically not played any other games in the past couple of weeks, which is unlike me), I don't want to see this level go straight in the bin, so I'm willing to do anything to save it, despite how tedious it might be.

Crikey, this was only supposed to be a darn side project!

Yeah, if you could put the general logic on one microchip and keep the unique logic on the grids it might make things less excessive.

I think I could help more if I could see it for myself.

You could post pics or send me a request if you're interested
2012-02-13 13:09:00

Author:
comishguy67
Posts: 849


Thanks. I will look into it tonight. Because, thinking about it, I can probably save a fair bit. I have actually done done this in another part of my level. On the actual board, there is very little logic on each board square, the main logic for each board square is somewhere else in the level, to reduce lag, and clutter. Anyway, byu my board, I have a piece of holo that moves to the right board square when selected, so that it can emit the obkects when needed, rather than having emitters on each board square.2012-02-13 13:21:00

Author:
Ali_Star
Posts: 4085


it's a negative feedback system used with an advanced mover, basicly the mover positions itself relative to 2 tags at the edge of the erea based on the stength of the sticks analog output....... or maybe not basic


Thanks for this hint! Took me a while to decypher that "negative feedback" (brainiac type here) but once i built the one step (direction) it shaped up slowly but relatively easy.
Not sure how to best position the tags but the basics are there.
2012-02-13 17:44:00

Author:
zupaton
Posts: 167


I don't care if I took it out ofcontext....My name was mentioned in a "Complicated Logic" thread? Pah!2012-02-13 19:48:00

Author:
Valeview
Posts: 1581


I don't care if I took it out ofcontext....My name was mentioned in a "Complicated Logic" thread? Pah!

At least this time I've mentioned you in a positive light.
2012-02-13 21:10:00

Author:
Ali_Star
Posts: 4085


If anyone wants a logical challenge I would try making Chess with an AI player (Artificial intelligence). That be something fun and challenging logic wise.

I've made Checkers with AI and 80-90% of the level is logic!

Here's a pic of the AI player logic ALONE (It has 2P mode too). I couldn't even fit it all on screen and it nearly crashed my PS3.

http://i8.lbp.me/img/ft/da874007b28f922b8ddb66a285948864333363b9.jpg

There's posed to be 12 microchips for 12 red pieces on the board, but I could only fit about 10.

Wow.. that's a lot of logic. I'll think I'll take a different approach to my AI project (yes, I've actually thought of making one), namely buttons only having some basic measuring logic, and a CPU-esque machine doing all the work of moving buttons (please correct me if I'm wrong, but I feel that those buttons do way more than that).
2012-02-14 15:51:00

Author:
OrwellianStuff
Posts: 90


There's no way you need that many gates for a game of checkers. Even with an AI opponent.

Each piece can only move diagonally which could be handled by a single 5 x 5 diagonal cursor that snaps to whichever piece is selected. All the rules of the game are implicit in the cursor itself.

The cursor would have 2 tag sensors on each square. Depending which tag sensors are on determines how the piece can be moved. When the player had finished their move the AI would take over the cursor and cycle it over each of its own pieces and choose whichever move allowed it to take a piece or to make a legal move.

You may not even need to use tags and tag sensors, instead using impact sensors and different geometry for the player and computer controlled pieces.
2012-02-14 19:50:00

Author:
Ayneh
Posts: 2454


The logic for my Checkers level was insane, and I didn't even allow for AI. There's so many things you have to allow for, it's untrue. I had compulsory capturing in mine (ie when there's a piece you can take, you HAVE to take it), made things very complicated.
I was a relative logic noob at the time, so I could have perhaps made it a little simpler, but whatever. I gave up on making a chess level. Too difficult for my little brain.
2012-02-14 21:07:00

Author:
Ali_Star
Posts: 4085


There's no way you need that many gates for a game of checkers. Even with an AI opponent.

Each piece can only move diagonally which could be handled by a single 5 x 5 diagonal cursor that snaps to whichever piece is selected. All the rules of the game are implicit in the cursor itself.

The cursor would have 2 tag sensors on each square. Depending which tag sensors are on determines how the piece can be moved. When the player had finished their move the AI would take over the cursor and cycle it over each of its own pieces and choose whichever move allowed it to take a piece or to make a legal move.

You may not even need to use tags and tag sensors, instead using impact sensors and different geometry for the player and computer controlled pieces.

I'm sorry but this pis.sed me off BIG TIME.

Please don't judge something you haven't built yourself...you really have no idea how much logic is takes to make something this...

First off, all that logic in the picture is for the AI ALONE not the 2P mode. The 2P is actually really simple and really wasn't even worth showing. So yes, the "game of checkers" is relatively simple to create logically.

2nd if you look closely, you can see that every microchip has the same logic, but unique tags in each one. So really ALL the AI logic can be found in one piece, but ALL that logic shown in the picture and then some, IS require for the game as a whole to work properly...

And i've tried using impact sensors, instinctual, but I had to slow down the timers a lot because of logic lag. Impact switches don't work too accurately when things are moving fast. And I wanted it to be FAST and FUN!

I tried several methods actually...and the sensor worked the best.

Create before you type.

Edit: And sure maybe there WERE simplier methods, but as long as it works, who even cares?

And have you even played the level? NO? SO why are you being a smart asofireafkjrebfjrwrr!!!
2012-02-14 21:48:00

Author:
comishguy67
Posts: 849


First off, all that logic in the picture is for the AI ALONE not the 2P mode. The 2P is actually really simple and really wasn't even worth showing. So yes, the "game of checkers" is relatively simple to create logically.
I was writing about the computer controlled player as well, though. The idea was to use the same mechanic that determines whether the player can make a legal move to be used by the computer to the same effect.


2nd if you look closely, you can see that every microchip has the same logic, but unique tags in each one. So really ALL the AI logic can be found in one piece, but ALL that logic shown in the picture and then some, IS require for the game as a whole to work properly...
Ideally, there wouldn't need to be any logic for each individual square on the board. The physical and virtual state of the board don't need to be synonymous.


And i've tried using impact sensors, instinctual, but I had to slow down the timers a lot because of logic lag. Impact switches don't work too accurately when things are moving fast. And I wanted it to be FAST and FUN!
Do impact sensors take one frame to go high like tag sensors do? I don't know.
2012-02-15 20:24:00

Author:
Ayneh
Posts: 2454


I'm sorry but this pis.sed me off BIG TIME.

Please don't judge something you haven't built yourself...you really have no idea how much logic is takes to make something this...

First off, all that logic in the picture is for the AI ALONE not the 2P mode. The 2P is actually really simple and really wasn't even worth showing. So yes, the "game of checkers" is relatively simple to create logically.

2nd if you look closely, you can see that every microchip has the same logic, but unique tags in each one. So really ALL the AI logic can be found in one piece, but ALL that logic shown in the picture and then some, IS require for the game as a whole to work properly...

And i've tried using impact sensors, instinctual, but I had to slow down the timers a lot because of logic lag. Impact switches don't work too accurately when things are moving fast. And I wanted it to be FAST and FUN!

I tried several methods actually...and the sensor worked the best.

Create before you type.

Edit: And sure maybe there WERE simplier methods, but as long as it works, who even cares?

And have you even played the level? NO? SO why are you being a smart asofireafkjrebfjrwrr!!!

Hey take it easy man, shes only offering some advice. She didnt mean any offense and theres no reason to be angry; its not like she said your level was terrible, nor implied it was anything but awesome. Like you said, you already completed the level, so who cares? I really dont see how she was being smart about it and im sure she meant the best intentions, and I find these comments fairly immature and uncalled for.

Personally, I feel creators should always look for the most cost efficient methods for their levels. Its only when you see the possibility that you have not created the perfect stage or shortest trail of logic, that you will grow better for it. Learning to take feedback, whether it may help you or hurt you varies, but lashing out at someone for offering help is exactly why some creators never reach their full potential. There COULD be a more efficient logic setups and there COULD not be, but to ignore the possibility is almost to ignore finding mechanical advancements that will lead to the next step as a creator.
2012-02-15 21:29:00

Author:
Rpg Maker
Posts: 877


I was writing about the computer controlled player as well, though. The idea was to use the same mechanic that determines whether the player can make a legal move to be used by the computer to the same effect.


Ideally, there wouldn't need to be any logic for each individual square on the board. The physical and virtual state of the board don't need to be synonymous.


Do impact sensors take one frame to go high like tag sensors do? I don't know.

The ai doesn't just make legal moves, it makes strategic ones too. That's the bulk of the logic actually. And the logic isn't for the squares, there for the pieces. Thats how they determine what move to make based on the players pieces positions. The method you suggested would take the computer way too long to make a move. If you ACTUALLY played the level, you'll see it only takes a half of a second for the AI to calculate a move given the positions the pieces are in. And depending on how much lag you have, a few second to execute a move. I couldn't achieve that speed with impact sensors because they often don't work when things move as fast as the frame rate, like the pieces. The followers on all of them are set to 100. At that speed, the pieces are able to go right through each other, thus not activating the impact sensors. Even at 50 they can do that. That why I use tag sensors, cause you can tweak their range and things are more accurate.


Hey take it easy man, shes only offering some advice. She didnt mean any offense and theres no reason to be angry; its not like she said your level was terrible, nor implied it was anything but awesome. Like you said, you already completed the level, so who cares? I really dont see how she was being smart about it and im sure she meant the best intentions, and I find these comments fairly immature and uncalled for.

Personally, I feel creators should always look for the most cost efficient methods for their levels. Its only when you see the possibility that you have not created the perfect stage or shortest trail of logic, that you will grow better for it. Learning to take feedback, whether it may help you or hurt you varies, but lashing out at someone for offering help is exactly why some creators never reach their full potential. There COULD be a more efficient logic setups and there COULD not be, but to ignore the possibility is almost to ignore finding mechanical advancements that will lead to the next step as a creator.

I know...but you just don't know how much work went into that level...I'm a bit sensitive when it comes to it. And it really gets me when people think they know everything about it and thinks its so easy to make...

But your right, I've shouldn't gotten mad like that. For that I apologize.
2012-02-15 21:51:00

Author:
comishguy67
Posts: 849


The ai doesn't just make legal moves, it makes strategic ones too. That's the bulk of the logic actually. And the logic isn't for the squares, there for the pieces. Thats how they determine what move to make based on the players pieces positions.
Well, yeah. I thought that was apparent.


The method you suggested would take the computer way too long to make a move. If you ACTUALLY played the level, you'll see it only takes a half of a second for the AI to calculate a move given the positions the pieces are in. And depending on how much lag you have, a few second to execute a move. I couldn't achieve that speed with impact sensors because they often don't work when things move as fast as the frame rate, like the pieces. The followers on all of them are set to 100. At that speed, the pieces are able to go right through each other, thus not activating the impact sensors. Even at 50 they can do that. That why I use tag sensors, cause you can tweak their range and things are more accurate.

Quit talking out of your condescending *** and learn a thing or two before you implicitly claim I'm bad at logic.
If you used a single cursor then it would likely take 0.72 seconds at a minimum for it to cycle around all 12 pieces.

If speed was the goal then a couple of arrays of counters is the first thing that comes to mind. Feed them both into enough hideous combinational logic and you would get an instantaneous result.
2012-02-16 21:03:00

Author:
Ayneh
Posts: 2454


Well, yeah. I thought that was apparent.


If you used a single cursor then it would likely take 0.72 seconds at a minimum for it to cycle around all 12 pieces.

If speed was the goal then a couple of arrays of counters is the first thing that comes to mind. Feed them both into enough hideous combinational logic and you would get an instantaneous result.


Ok so what you are saying, and correct me if I'm wrong, is that I should put the AI logic (one microchip in the picture shown) on the cursor, and the cursor should scroll through each piece, calculating the position it is in, storing that calculation into some sort of memory, and then using the memory to determine which piece has the best possible move given the difficulty?


Hmm..well it's possible to do that, however, I'd probably have to give it a 0.1 to 0.3s grace period for each piece to allow little to no room for errors. And if you came up with that time given the speed of the follower is at max, which I think can move as fast as the frame rate, then the grace period would be required. I doubt I could do it instantaneously without logic errors as my method would be instantaneous as well.

Plus the cursor would still need to determine which piece has the best move AND Move that piece to appropriate spot, which would also take maybe .2 -.5s but it's really all a tentative matter.

So assuming a 0.1s grace period allows no logic errors and it takes .7s to scroll through them all, I'd say it'll take about 1.9s plus the .2 - .5s for it determine the best position so around 2.0 - 2.5s to make a move. Sure, It would probably render less logic than my method, but it still wouldn't be as efficient, and even give a higher chance of errors. (might calculate the position of other pieces while it's moving or might not calculate at all because of logic lag.

I'm not saying my method couldn't be better, in fact, using your method, I could probably create more difficult A.I. But the main purpose of the A.I is to teach people who have never played checkers how to play, not to annoy them and make the rage quit because the AI is too difficult. And even the AI on expert gets people sending me hate mail. I really want it to be speedy, and not bore the people playing it, waiting for the A.I to make a move, and this is what I saw worked best.

I may try to recreate checkers on VITA, but I'd probably find a way to scan all the pieces simultaneously, rather than one at a time.

But thanks I guess, for trying to help.
2012-02-17 00:37:00

Author:
comishguy67
Posts: 849


To move the topic in a better direction, has anybody created a logic-lite pathfinding system for enemys in a top-down game?2012-02-17 15:38:00

Author:
Unknown User


To move the topic in a better direction, has anybody created a logic-lite pathfinding system for enemys in a top-down game?

I believe I remember seeing Thee-Philospher (http://lbp.me/u/Thee-Philosopher) with one, but I'm not if it was his or if he was reviewing it for the Creator's Toolkit
2012-02-20 19:46:00

Author:
kirbyman62
Posts: 1893


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.