Jump to content




CC Pyramid Run (in dev)

game command

6 replies to this topic

#1 Kaikaku

  • Members
  • 46 posts

Posted 26 April 2015 - 07:12 PM

Posted Image

CC PYRAMID RUN

Hi there!
I'm working already for a while on a command computer based game.
Since the beta of command computers I was facinated by the possibilities and wanted to do something, that you really cannot do with command blocks.
One thing difficult in Vanilla is randomizing lots of command blocks. That's an easy one for computers ;) so I came up with this idea.


About the game:
Spoiler

Status:
  • submitted to FTB'S Jampacked II
  • so far single player only
  • so far no pack download available
  • video to show concept
  • pastebin of builder
Current video:
(That's the one from "media".)


About the programs / computers:
  • not ready for pastebin yet
  • builder.lua, pastebin v1.00:The main program for reseting levels. It includes atm the room data as well, but I'll put this in a seperate file.
    Ppastebin seems to not recognise the closing ]]-- and messes up the display.
  • interiorData.lua, pastebin v1.00: This is the data file used by builder. It contains all the room interior data for generation.
  • orchestrator.lua., v1.00: Controller that manages signals form other computers and displays current level times and top 5 on main monitor.
  • Several small programs on further computers that teleport spectators, prepare the player for start, send time messages to the Controller, send progress signals, etc.
How you can try out (atm):
Spoiler

Mods:
Spoiler

Next steps:
Spoiler

Ideas for later:
Spoiler

Bugs:
Spoiler


I will keep this first post up to date.
Any comments, suggestions, what so ever are very welcome! :)


Edit 2015-05-15: complete update, spoilers and added 2 pastebins, 2015-05-16+24

Edited by Kaikaku, 24 May 2015 - 10:02 AM.


#2 Lyqyd

    Lua Liquidator

  • Moderators
  • 8,465 posts

Posted 26 April 2015 - 07:42 PM

The Programs section and its subsections are for released code. Please report your topic when you have code to post so we can unlock it for you.

#3 Cranium

    Ninja Scripter

  • Moderators
  • 4,031 posts
  • LocationLincoln, Nebraska

Posted 15 May 2015 - 01:38 PM

Unlocked to provide code.

#4 Kaikaku

  • Members
  • 46 posts

Posted 15 May 2015 - 01:43 PM

View PostCranium, on 15 May 2015 - 01:38 PM, said:

Unlocked to provide code.
Thanks, I'm on it done! :)

Submitted to FTB's Jampacked II and updated the first post.

Oh, my gosh, this project is much more complex and time consuming than I thought.
In most cases I know what effort is involved with the "normal" programs, but on top of that:
1) all the new possibilities (and issues) of the command blocks
2) learning and having troubles with the utility mods
3) trying to make the map somewhat cheat resistant
4) about 13 computers that communicate with others
5) unexpected program derping by myself (e.g. atm I've the impression that monitors with modems don't act as they should)

I probably slow down a bit for now (well, I intend to make the game available).

Edited by Kaikaku, 15 May 2015 - 03:13 PM.


#5 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 16 May 2015 - 07:26 AM

Without too much digging, it appears FTB currently offers no suitable packs; though their documentation is terrible, so appearances may be deceiving. Resonant Rise through ATLauncher seems to work. It's missing Lockdown, ObsidiPlates, PerfectSpawn, SquidAPI and SquidUtils, but has all the others (such as your *-marked mods). Most (including ComputerCraft) must be ticked from the "optional" list when downloading the pack from within the launcher.

To create the world, set the game mode to creative, hit "more world options", and change the world type to "superflat". /tp yourself to 0 70 0 when you enter.

On a Command Computer with a modem on top and with an advanced monitor to the right (a small one seems to work fine):

pastebin get qapgmdFu build.lua
pastebin get h2URG0mE interiorData.lua
build.lua 40 69 -42 3 3 1

A progress read-out will display on the monitor. Once that's done, the maze should be visible nearby. Bash your way in via the iron door, give yourself a wooden sword, and switch gamemode to 2 (adventure). Re-run the last command on the computer for new mazes, change the numbers to choose the position / size.

What I've played seems to work well, but I do notice that some rooms take dramatically less time to clear than others (eg, a room may contain ladders that you have to navigate, or... just a few flowers, that you can ignore). Dunno if you're already doing this, but it may pay to weight the odds of certain rooms appearing, or outright ensure all players get even amounts of "easy" and "hard" rooms per maze.

#6 Kaikaku

  • Members
  • 46 posts

Posted 16 May 2015 - 11:04 AM

View PostBomb Bloke, on 16 May 2015 - 07:26 AM, said:

...
Many thanks for findinding a suitable mod pack and the details to help people try it out! :)

Create all 5 pyramids:

View PostBomb Bloke, on 16 May 2015 - 07:26 AM, said:

...
pastebin get qapgmdFu build.lua
pastebin get h2URG0mE interiorData.lua
build.lua 40 69 -42 3 3 1
You can use this set-up up also to generate the other 4 pyramids.
In game I use different coordinates to not overwrite the pyramids, but for testing you can use:
build.lua 40 69 -42 4 3 2 -- for pyramid 2
build.lua 40 69 -42 4 4 3 -- for pyramid 3
build.lua 40 69 -42 5 4 4 -- for pyramid 4
build.lua 40 69 -42 5 5 5 -- for pyramid 5
However, in the later pyramids, you should give you also some protection like leather armor.
In game the ceiling glass and the sandstone is unbreakable. So in the test set-up TNT might destroy a bit too much.

Balancing:

View PostBomb Bloke, on 16 May 2015 - 07:26 AM, said:

...
What I've played seems to work well, but I do notice that some rooms take dramatically less time to clear than others (eg, a room may contain ladders that you have to navigate, or... just a few flowers, that you can ignore). Dunno if you're already doing this, but it may pay to weight the odds of certain rooms appearing, or outright ensure all players get even amounts of "easy" and "hard" rooms per maze.
Absolutely true. This is still on my to do list, but I had to postpone it to meet the deadline (was not the only thing ;)). In all 5 pyramids together there are atm 82 rooms, so to some degree it will balance it out.

Probably more an issue for fair balancing is the random door set-up. In some cases there are really nasty constellations. This is especially true for the higher levels, where there are two new room types ("jukebox" and "sand-TNT"). Both need you to find an item before you can pass.
Actually, I find it hard for myself to not loose orientation on level 5 :lol:

Format used in interiorData.lua:
As the format of the interiorData is now relativley stable I sould do a detailed description of it. For now here are some basic infos, for those who would like to play around with it a little bit.
Example "teleport" room:
{"interiors",{name="teleporter",maxCount={0,0,1,2,2},noExit=true,noEntrance=true}}
  -- floor
  {"base",{y=0,mat="chisel:woolen_clay",dmg=15}}
  -- tank walls
  {"base",{x1=2,x2=8,y1=1,y2=2,z=2,mat="OpenBlocks:tank"}}
  {"base",{x1=2,x2=8,y1=1,y2=2,z=8,mat="OpenBlocks:tank"}}
  -- ...
  -- teleporters
  -- -- left to bottom (white)
  {"blocks",{x=2,y= 0,z=1,mat="chisel:woolen_clay",dmg=0}}
  {"blocks",{x=2,y=-1,z=1,mat="minecraft:command_block",extra="{Command:/tp @p ~-1 ~2 ~4 }",absolute=true}}
  {"blocks",{x=2,y= 1,z=1,mat="ObsidiPlates:ObsidianPressurePlate"}}
  {"blocks",{x=1,y= 0,z=5,mat="chisel:woolen_clay",dmg=0}}
  -- top to left (orange)
  -- ...
  -- chests
  {"blocks",{x=5,y=3,z=5,mat="minecraft:trapped_chest",dmg={2,3,4,5}}}
  -- ...
  -- randomization access to chest
  {"subinterior",{name={"teleporter1","teleporter2","teleporter3","teleporter4"}}}

{"interior", ...}
- starts a new room definiton
- maxCount={0,0,1,2,2}: how often may this design be used in level 1, 2, 3, 4, 5.
- The example room "teleporter" is a level 3+ room and may occure twice on level 4 and 5. It is neither allowed to be in the entrance nor in the exit room, as it would mess up the redstone.
{"blocks", ...}
- sets one block
- {x,y,z,material,damageValue,extras}: If you set "x=3" this will set the block always there. You can also define an array "x={1,2,3,4,5}", then one of the options will be choosen randomly. This concept applies also to many other options (but not all).
{"summon", ...}
- summons one entity (quite complicated NBT-syntax)
{"base", ...}
- makes a base/wall/cube from one block type. You may either give a fixed value for x/y/z or you define a range, e.g. "x1=3, x2=7"
{"subinterior", ...}
- applies a further interior definition to the same room.
- In the example only one of the 4 sub-interiors will be applied. This randomizes the 4 differnet access ways to the chest.

Edit: Ups, just realized that the teleporter needs ObsidiPlates installed...

Edited by Kaikaku, 16 May 2015 - 11:21 AM.


#7 Kaikaku

  • Members
  • 46 posts

Posted 24 May 2015 - 09:34 AM

View PostKaikaku, on 16 May 2015 - 11:04 AM, said:

...
Format used in interiorData.lua:
...

Just linked this thread and want to add some information to avoid problems, in case you want to play around with room designs:

You want to put new room designs before this part of code (shows lines 1039 to 1072) and sub-interiors after it:
{"set_cRoomInteriorMaxExit"}
---------------------------------------
---- SUB-INTERIOR DEFINITIONS --------
---------------------------------------

{"interiors",{name="exitmechanism",maxCount={1,1,1,1,1}}}
  {"blocks",{x= 9,y= 0,z=5,mat="minecraft:hopper",dmg=0,extra="{Items:[:{Count:1,Slot:0,id:41}]}"}}
  {"blocks",{x= 9,y=-1,z=5,mat="minecraft:hopper",dmg=0,extra="{Items:[:{Count:17,Slot:0,id:41},{Count:1,Slot:1,id:41},{Count:1,Slot:2,id:41},{Count:1,Slot:3,id:41},{Count:1,Slot:4,id:41}]}"}}
  {"blocks",{x= 9,y=-2,z=4,mat="minecraft:sandstone",dmg=0}}--cRoomMaterial
  -- ...
  -- door
  {"blocks",{x=11,y= 1,z=5,mat="minecraft:iron_door",dmg=7}}
  {"blocks",{x=11,y= 2,z=5,mat="minecraft:iron_door",dmg=8}}


I keep all room and sub-room designs in the array interiors[]. All before cRoomInteriorExit are considered a full room design and may show up in the pyramids.
The sub-interior for the exit mechanism is always interiors[cRoomInteriorExit] and everything after this is only a sub-interior, that may alter a full room design.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users