Pryme8 Posted March 7, 2018 Share Posted March 7, 2018 Coming up with a prototype for a game for 2-4 players and I got to the part where I need to make some decisions about game play and what the actual rules are for how things go down. https://www.babylonjs-playground.com/#1TH4ZE#19 So you have a 3d grid that is 5 by 5 by 5. To win you need to get a block from your side to the other side. Each end has 5 hotspots that you can click once they are fully "charged", once you fire that hotspot it spawns a block that travels up if it hits a blank block or one of your own color and then goes across the top of the block under it. Once it travels settles on top of the block under it, I check to see if its is a blank block or your own color. If it is a blank block you push/smash it out of the way and replace it with the block on top of it. If its your own color the block keeps traveling forward until its faced with a opponents block or a blank block. If its an opponents block then both block stop and become "locked" in that position. This is where I need to make some decisions. How should I handle your block ending up on top of a opponents block? Should it treat it like a blank tile and smash it/push it down off the map. Should it do it when you only have one on top or two? Should I instead leave color blocks in place and make them disappear if you split an opponents block like if it goes blue then red then blue the red would get crushed... Should there be stalemates or when the line gets locked up from too many blocks should they all get destroyed? Im just trying to brain storm this idea before I go to far and flub it. jerome and Wingnut 2 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted March 7, 2018 Share Posted March 7, 2018 Hi P8, thx for sharing your project. If I were you, I would design it modular, so that you can easily try ALL the methods, and maybe offer 3-8 different "modes of play". Sure, you end-up with a few switch/case statements (case mode1, do this, case mode2, do that) in the "react to user action" area... but if you coded modular, each case is a little 'jump table'... a short list of function calls. Easy to invent other modes, too... when its real modular like that. Each function does one simple thing, so later re-arranging and mix'n'match is easy (experimenting with game logic). Doncha wish all life decisions could be done like that? We could try-out the results of each decision-path... prior to hard-deciding. Interesting game concept, P8. Breakout and horizontal Tetris... had a baby together. Pryme8 1 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted March 7, 2018 Author Share Posted March 7, 2018 https://www.babylonjs-playground.com/#1TH4ZE#19 Im thinking about making it split view for now so you can do local vs another person instead of doing AI for now and having keys control the launch of blocks. Another idea would be to add 'upgrades' so you can try to gain advantage over the other player like upgrade speed of blocks or their re spawn rate. So like player 1 would get QWERTY as their buttons with Q - open upgrade menu WERTY to launch blocks and player two then gets IOP{}| I opens upgrade menu OP{}| launches blocks. Just gotta make the logic handle when a block gets to a map point before the other one and blocks it from moving forward so they can start stacking. https://www.babylonjs-playground.com/#1TH4ZE#20 @Wingnut -> any ideas why the view here is off? The cameras should effectively show the exact same thing just opposite sides. *EDIT* nm got it, was a dumb position error... https://www.babylonjs-playground.com/#1TH4ZE#21 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted March 7, 2018 Author Share Posted March 7, 2018 https://www.babylonjs-playground.com/#1TH4ZE#24 Hmm Im actually wondering now if I need them to stack, this is kinda a cool dynamic when they get launched the same time. They pass through each other and then you have to like make up a slot to get back to where you were. Thinking about play testing this with my buddy and girl friend when I get home. QWERTY for player one (Q does nothing yet) and BNM<>? for player two (B does nothing yet). Quote Link to comment Share on other sites More sharing options...
Wingnut Posted March 7, 2018 Share Posted March 7, 2018 *nod*. Jury-rigged the camera positions/targets, a bit, eh? hmm. Strange issue. Is your model all squared-up with 0,0,0? Maybe not, eh? Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted March 7, 2018 Author Share Posted March 7, 2018 Yea, its 0.5 off cause I am lazy... but nothing a little bit of duct tape did not fix. Quote Link to comment Share on other sites More sharing options...
Wingnut Posted March 7, 2018 Share Posted March 7, 2018 I had a theory... var game = new BLOX(scene); camera.setTarget(game.assets.blockA.position); camera2.setTarget(game.assets.blockB.position); That didn't work either. Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted March 7, 2018 Author Share Posted March 7, 2018 https://www.babylonjs-playground.com/#1TH4ZE#26 I got it. Just had to shift some things around a hair. Thanks for your help though! GameMonetize and Wingnut 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.