Home LittleBigPlanet 2 - 3 - Vita - Karting LittleBigPlanet 2 [LBP2] Tutorials
#1
Q&A: Sackbot X - How to manage complex logic (image heavy)
Archive: 3 posts
Hi everyone, I decided to make a thread for anyone with questions regarding complex logic systems, using my Sackbot X project as an example. The point of this thread is to answer questions anyone has as to how to get something work the way they want to, or how to organize your logic to keep things manageable etc. I'll try my best to give answers to any questions you might have. Thread in LBPC: Sackbot X - Arena Battle (https://lbpcentral.lbp-hub.com/index.php?t=45135-Sackbot-X-Arena-Battle) Level in lbp.me: http://lbp.me/v/wy54py Brief summary of what features I have in Sackbot X: - support for up to four players, each having their own controllable sackbot with their own health bar, lives, weapons, ammo and scoring system - eight different weapons that you can switch at will with L1/R1 (and later on possibly thru a pause menu) - each weapon has two firing modes: charged up and normal - enemies with weaknesses to different weapons - overhauled movement system to get rid of LBP's floaty controls Here's the current logic, as of v0.02: http://linque.pp.fi/LBP/LBP2/stage.jpg This is what the stage looks in create mode. Thin plasma layer to prevent Sackbots from switching away from the front layer. At the top you can see the UI logic that displays the selected weapon for each player in game. http://linque.pp.fi/LBP/LBP2/sackbot_x.jpg All the logic of a single Sackbot. Each player has identical circuits, but the TAG LABELS are different for each player (1-4). Also the controllinator color is different for each Sackbot. The function of each colored microchip in the picture above: BROWN: Sackbot main microchip WHITE (bottom right): Jumping behavior (yes, all that is just for jumping) YELLOW: Left/right movement ORANGE (bottom left): Hit detection (meaning damage calculation) BLUE: Weapon selection & firing commands RED: Weapon emitters (one microchip for shooting left, one for shooting right), and one microchip per weapon inside each I used custom microchip stickers (thanks to the tutorial here!) to make it easier for me to recognize which chip is for which weapon: http://linque.pp.fi/LBP/LBP2/custom_microchip.jpg Currently I've made four different weapons for the player and one for the enemies. The logic for those weapons look like this: http://linque.pp.fi/LBP/LBP2/weapons.jpg Finally, the health bar & damage calculations for any Sackbot or enemy requires their own microchip: http://linque.pp.fi/LBP/LBP2/healthbar.jpg The health system can be easily customized to give the enemy / sackbot weaknesses against certain types of damage. It might not be such an interesting read, but one last thing I'll post is the current list of tag labels that I use in the project. Keep in mind that ALL tags are colored blue in my project, because it's only confusing to use both color tag codes and tag labels at the same time. So, here's the labels: PLR - SACKBOT (Any player character) PLR - FACING LEFT PLR 1 (to 4) <-- means there are tags for PLR 2, PLR 3 and PLR 4 as well PLR - FACING RIGHT PLR 1 (to 4) PLR - NUMBER 1 PLR - NUMBER 2 PLR - NUMBER 3 PLR - NUMBER 4 BTN - X PLR 1 (to 4) BTN - CIRCLE PLR 1 (to 4) BTN - TRIANGLE PLR 1 (to 4) BTN - SQUARE PLR 1 (to 4) DMG - 1% DMG - 5% DMG - 10% DMG - 25% DMG - 33% DMG - DEATH ENV - ENEMY ENV - GROUND HEAL - 1% HEAL - 5% HEAL - 10% HEAL - 25% HEAL - 33% HEAL - FULL SHOT - BASIC SHOT - BASIC CHARGE SHOT - FIREBALL SHOT - WATER SHIELD SHOT - ENEMY BASIC WPN - FIRE PLR 1 (to 4) WPN - CHARGED PLR 1 (to 4) WPN - CHARGE SHOT PLR 1 (to 4) WPN - NEXT WEAPON PLR 1 (to 4) WPN - PREV WEAPON PLR 1 (to 4) WPN - SELECT 1 PLR 1 (to 4) WPN - SELECT 2 PLR 1 (to 4) WPN - SELECT 3 PLR 1 (to 4) WPN - SELECT 4 PLR 1 (to 4) WPN - SELECT 5 PLR 1 (to 4) WPN - SELECT 6 PLR 1 (to 4) WPN - SELECT 7 PLR 1 (to 4) WPN - SELECT 8 PLR 1 (to 4) WPN - WEAPON 1 PLR 1 (to 4) WPN - WEAPON 2 PLR 1 (to 4) WPN - WEAPON 3 PLR 1 (to 4) WPN - WEAPON 4 PLR 1 (to 4) WPN - WEAPON 5 PLR 1 (to 4) WPN - WEAPON 6 PLR 1 (to 4) WPN - WEAPON 7 PLR 1 (to 4) WPN - WEAPON 8 PLR 1 (to 4) ---- That's it for now! If you have any questions relating to the images (why I've done this or that instead of some other way, for instance), don't hesitate to ask. See ya around! | 2011-01-25 00:54:00 Author: Linque Posts: 607 |
A recommendation, if you are going to do symmetrical (or almost symmetrical multiplayer stuff) is to keep the tag labels identical per player and only modify colours, Then ensure that tags and any sensors working on tags can be group selected and tweaked. It means you can update one player, then copy and paste, do 2-3 group tweaks and you have an identical player two, with uniquely identifiable tags. Having different tag labels for each player is just a nightmare and asking for way more work than you need to do in terms of maintenance and updates (and initial development in honesty). plus you're far more likely to make errors in the update process as each step is manual and there are far more steps. | 2011-01-25 01:02:00 Author: rtm223 Posts: 6497 |
Crap, I didn't know you can group edit tag colors. Would've saved me a lot of time. And now I need to go back and re-do the sackbots, seesh. Thanks for the info, though. | 2011-01-25 01:05:00 Author: Linque Posts: 607 |
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.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.