This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Jummit's profile picture

Screeps >_ In computercraft

Started by Jummit, 14 December 2017 - 05:08 PM
Jummit #1
Posted 14 December 2017 - 06:08 PM
I realy enjoy this game called Screeps >_ and I wonder how you could make something similar in CC. Maybe start with one turtle in a flatland world with trees, grass and lakes? It doesn't sound as fun to me, but maybe it will with some ideas from you?

I recommend you to watch the TRAILER:

[media]http://www.youtube.com/watch?v=ZboTgOajnGg[/media]

What is screeps?
In screeps, you code a colony of robots, called screeps which can farm energy, build buildings and defend your territory.
Edited on 07 February 2018 - 06:54 PM
Lupus590 #2
Posted 14 December 2017 - 08:14 PM
Trailer link is borked.
Jummit #3
Posted 14 December 2017 - 08:30 PM
Can I somehow make it that the video is played in the post? I think i have seen that before…
KingofGamesYami #4
Posted 14 December 2017 - 08:39 PM
Can I somehow make it that the video is played in the post? I think i have seen that before…
Just paste the link, changing http to https. Eg:

[spoiler]
http://youtu.be/ZboTgOajnGg
[/spoiler]
becomes
Spoilerhttp://youtu.be/ZboTgOajnGg
Edited on 14 December 2017 - 07:40 PM
Jummit #5
Posted 16 December 2017 - 12:16 PM
Update:
I have a basic idea how it would work:
You code turtles to farm resources and then tell a command computer to make energy out of it. You can make new turtles with energy. Then you can trade with other turtles to get different types of resources.

Vote in the poll above; should this be a function in the API?
Spoiler
print("Press enter to detect block as ore.")
io.write("Ore: ")
local input = io.read()
local ore
if input == "" then
  local succ, data = turtle.inspect()
  if succ and data then
	ore = data.name
	print("Took "..ore.." as ore.")
  else
	print("No block was detected. Place a block in front of the turtle!")
  end
else
  ore = "minecraft:"..input
end
local total = 0
local blocks = 0

function mine(ore)
  for rotation = 1, 4 do
	local succ, data = turtle.inspect()
	if succ and data and data.name == ore then
	  total = total + 1
	  os.setComputerLabel(tostring(total))
	  turtle.dig()
	  turtle.forward()
	  mine(ore)
	  turtle.back()
	end
	turtle.turnRight()
  end
  blocks = blocks + 1
  return
end

if ore then
  mine("minecraft:diamond_ore")
  print("Mined a total of "..total.." "..ore.." whilest exploring "..blocks.." blocks.")
end
Edited on 16 December 2017 - 11:33 AM