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

The Game Library!

Started by Chub1337, 22 February 2012 - 07:35 PM
Chub1337 #1
Posted 22 February 2012 - 08:35 PM
The ComputerCraft Games Library!


Hey, I had this awesome idea, in my opinion ComputerCraft hasn't got enough games! So, what will we do? Add our own!

So the idea is everyone who has made a game or is making one will post them here, thereby creating a neat list of games for us to play inside minecraft with or against others for example on a server or alone in ssp.

The layout:



[size=6]Title[/size]

Amount of players:
Genre:

Screenshots

[spoiler]
Image1 + description
Image2 + description[/spoiler]


Code
[spoiler][code]--Paste your code here[/code*][/spoiler]

Author:
Credits(optional):


Note, remove the * from [/code*]

How to find/install the games

Singleplayer

For windows users, go to %appdata% then click on: Roaming>.minecraft>Saves>'WorldName'>computer>'ComputerID'

If you don't know the ID of your computer, in the computer type id and it will return it's ID.
In there you can open the existing game with for example notepad (or Notepad++) and copy it to here.
If you want to install a game, create a new text file, paste the code and save it as All types (*.*), make sure you have no .txt at the end!

Multiplayer

If you are the host of the server, go to the 'ServerFolder'>'WorldName'>computer>'ComputerID'
Again, to find the ID of the computer, in the computer type id and it will return it's ID, there you'll be able to find the game.
And installing a game is the same as for singleplayer, paste the code in a new text file and save it as All types (*.*)

If you aren't the host of the server ask the host to check out this page and let him/her install the desired game(s).


List of all games so far

- Pong Download: Pong
- Tunnel Download: Tunnel
- Your awesome game?
-

—————————————————————————————


I will start with my own recently made game, PONG!

PONG!

Amount of players: 2
Genre: Arcade

Screenshots

SpoilerThis is the startscreen, showing the controls before pressing enter to continue to the game itself.


Here you can see the game itself.


Code
Spoiler
--Vars
width, height = term.getSize()
i = 0
i_max = width*height
x = 1
y = 1
p1 = 0
p2 = 0
pad1 = math.ceil(height/2)
pad2 = math.ceil(height/2)
up = false
right = true

--Functions
function drawPads()
	term.setCursorPos(1,pad1-1)
	write("#")
	term.setCursorPos(1,pad1)
	write("#")
	term.setCursorPos(1,pad1+1)
	write("#")
	term.setCursorPos(1,pad1-2)
	write(" ")
	term.setCursorPos(1,pad1+2)
	write(" ")
	if pad1 == 4 then
		term.setCursorPos(1,pad1-2)
		write("-")
	end
	if pad1 == 15 then
		term.setCursorPos(1,pad1+2)
		write("-")
	end
	
	term.setCursorPos(width-1,pad2-1)
	write("#")
	term.setCursorPos(width-1,pad2)
	write("#")
	term.setCursorPos(width-1,pad2+1)
	write("#")
	term.setCursorPos(width-1,pad2-2)
	write(" ")
	term.setCursorPos(width-1,pad2+2)
	write(" ")
	if pad2 == 4 then
		term.setCursorPos(width-1,pad2-2)
		write("-")
	end
	if pad2 == 15 then
		term.setCursorPos(width-1,pad2+2)
		write("-")
	end
end

function ball()
	term.setCursorPos(x,y)
	write(" ")
	if up == true then
		y = y - 1
	else
		y = y + 1
	end
	if right == true then
		if (x == width - 2) then
			if y == pad2 or y == pad2-1 or y == pad2+1 then
				x = x - 1
				right = false
			elseif up == true and y == pad2-2 then
				x = x - 1
				right = false
			elseif up == false and y == pad2+2 then
				x = x - 1
				right = false
			else
				x = x + 1
			end
		else
				x = x + 1
		end
	else
		if (x == 2) then
			if y == pad1 or y == pad1-1 or y == pad1+1 then
				x = x + 1
				right = true
			elseif up == true and y == pad1-2 then
				x = x + 1
				right = true
			elseif up == false and y == pad1+2 then
				x = x + 1
				right = true
			else
				x = x - 1
			end
		else
			x = x - 1
		end
	end
	if x == 1 then
		right = true
		p2 = p2 + 1
		x = math.ceil(width/2)
		y = math.ceil(height/2)
		term.setCursorPos(math.ceil(width/2)-3,1)
		write(p1.." | "..p2)
	end
	if x == (width - 1) then
		right = false
		p1 = p1 + 1
		x = math.ceil(width/2)
		y = math.ceil(height/2)
		term.setCursorPos(math.ceil(width/2)-3,1)
		write(p1.." | "..p2)
	end
	if y == 3 then up = false end
	if y == height-2 then up = true end
end

--Intro
term.clear()
term.setCursorPos(1,1)
print("")
print("")
print("	 X==---------------------------------==X")
print("	 |ComputerCraft Pong, made by Chub1337!|")
print("	 X==---------------------------------==X")
print("")
print("")
print("")
print("	   Player 1 controls: W = up, S = down")
print("")
print("	   Player 2 controls: O = up, L = down")
print("")
print("")
print("")
print("")
print("")
print("")
write("Press <Enter> to continue.")
io.read()

term.clear()
term.setCursorPos(1,1)

write("Player 1")
term.setCursorPos(width-8,1)
write("Player 2")
term.setCursorPos(math.ceil(width/2)-3,1)
write(p1.." | "..p2)
drawPads()
term.setCursorPos(1,height)
write(pad1.."|"..pad2)

for i=1,width-1,1 do
	term.setCursorPos(i,2)
	write("-")
end
term.setCursorPos(1,height-1)
for i=1,width-1,1 do
	term.setCursorPos(i,height-1)
	write("-")
end

--Pong
x = math.ceil(width/2)
y = math.ceil(height/2)
dir = math.ceil(math.random(0,4))


if dir == 1 then
	up = true
	right = true
elseif dir == 2 then
	up = true
	right = false
elseif dir == 3 then
	up = false
	right = true
elseif dir == 4 then
	up = false
	right = false
end

function timerupdate()
	ball()
	
	term.setCursorPos(7,height)
	write("X:"..x.." ")
	term.setCursorPos(13,height)
	write("Y:"..y.." ")
	term.setCursorPos(18,height)
	write("up:"..tostring(up).." ")
	term.setCursorPos(30,height)
	write("right:"..tostring(right).." ")
	term.setCursorPos(x,y)
	write("O")
	term.setCursorPos(1,height)
	write(pad1.."|"..pad2.." ")
		timer1 = os.startTimer(.1)
end
timer1 = os.startTimer(.1)
while true do
	event, par = os.pullEvent()
	if event == "timer" and par == timer1 then timerupdate() end
	if event == "char" then
		if par == "w" then
			pad1 = pad1 - 1
			if pad1 < 4 then
				pad1 = 4
			end
		elseif par == "s" then
			pad1 = pad1 + 1
			if pad1 > height-3 then
				pad1 = height-3
			end
		end
		if par == "o" then
			pad2 = pad2 - 1
			if pad2 < 4 then
				pad2 = 4
			end
		elseif par == "l" then
			pad2 = pad2 + 1
			if pad2 > height-3 then
				pad2 = height-3
			end
		end
	end
	drawPads()
end

Author: Chub1337
Credits: Casper7526 and Cloudy for helping me with handling multiple inputs at the same time.

—————————————————————————————



I hope you guys will flood this topic with your awesome games!

MTFBWY,

-Chub1337
Chub1337 #2
Posted 27 February 2012 - 02:50 PM
Tunnel

Amount of players: 1
Genre: other

Description:

We've probably all played it before, the game where you're a helicopter (or a simple arrow) and you have to navigate trough a horizontal or vertical tunnel.
Well, it's back! And now on ComputerCraft, and it even has it's own highscore system, meaning it saves the best score + their name!


Screenshots

SpoilerThis the the startscreen, showing the controls and the current highscore




Here you can see the gameplay itself



And as a last screenshot I beat my previous highscore


Code

Spoiler

--Vars
width, height = term.getSize()
i = 0
i_max = width*height
x = 1
y = 1
score = 0
tun_y = math.ceil(height/2)-4
tun_h = 7
s_time = 10
timer2 = 5+math.ceil(math.random(0,s_time))
dir = 0
timer3 = 400
lives = 3

--Highscore
if not fs.exists("tunnel_hs") then
	local tmp=io.open("tunnel_hs", "w")
	tmp:write("Name")
	tmp:write(1)
	tmp:close()
end

hs = io.open("tunnel_hs","r")
hs_name = hs:read("*l")
hs_score = hs:read("*l")
hs:close()

--Table
screen = {}
for a=1,width-1,1 do
	screen[a] = {}
end
for a=1,width-1,1 do
	for b=3,height-2,1 do
		screen[a][b] = " "
	end
end

--Functions
function drawPlayer()
	term.setCursorPos(2,y)
	write(">")
	if y == 3 then
		term.setCursorPos(2,y-1)
		write("-")
	end
	if y == height-2 then
		term.setCursorPos(2,y+1)
		write("-")
	end
end

function tunnel()
	for a=1,width-2,1 do
		for b=3,height-2,1 do
			screen[a][b] = screen[a+1][b]
			term.setCursorPos(a,B)/>/>
			write(screen[a][b])
		end
	end
	for a=1,height-2,1 do
		screen[width-1][a] = "#"
		if a >= tun_y and a <= tun_y+tun_h then screen[width-1][a] = " " end
		term.setCursorPos(width-1,a)
		if screen[a][width-1] then write(screen[a][width-1]) end
	end
	if timer2 == 0 then
		dir = math.ceil(math.random(0,2))
		if dir == 1 then tun_y = tun_y + 1 end
		if dir == 2 then tun_y = tun_y - 1 end
		if tun_y == 2 then tun_y = 3 end
		if tun_y == height-1-tun_h then tun_y = height-2-tun_h end
		timer2 = 5+math.ceil(math.random(0,s_time))
	end
	timer2 = timer2 - 1
	if timer3 == 0 then
		tun_h = tun_h - 1
		timer3 = 160+tun_h*40
		if tun_h == 1 then
			tun_h = 2
			s_time = s_time-1
			if s_time == 0 then s_time = 1 end
		end
	end
	timer3 = timer3 - 1
end

function gameover()
	lives = lives-1
	timer3 = 400
	tun_h = 7
	tun_y = math.ceil(height/2)-4
	y = math.ceil(height/2)
	s_time = 10
	if lives == -1 then
		term.clear()
		term.setCursorPos(math.ceil(width/2)-5,math.ceil(height/2)-4)
		write("Game Over!")
		term.setCursorPos(math.ceil(width/2)-10,math.ceil(height/2))
		write("Your score is: "..score)
		term.setCursorPos(math.ceil(width/2)-13,math.ceil(height/2)+2)
		if score > tonumber(hs_score) then
			write("You have beaten \n		   "..hs_name.."'s highscore of "..hs_score.."!")
			term.setCursorPos(math.ceil(width/2)-10,math.ceil(height/2)+5)
			write("Please enter your name: ")
			hs = io.open("tunnel_hs","w")
			name = io.read()
			hs:write(name.."\n")
			hs:write(score.."\n")
			hs:close()
		else
			write("Too bad, you didn't beat \n		   "..hs_name.."'s highscore of "..hs_score..".")
		end
		term.setCursorPos(1,height)
		write("Press <Enter> to continue.")
		read()
		score = 0
	else
		term.setCursorPos(1,1)
		write("Score: 0		")
		for a=1,width-1,1 do
			for b=3,height-2,1 do
				screen[a][b] = " "
				term.setCursorPos(a,B)/>/>
				write(screen[a][b])
			end
		end
	end
end

function timerupdate()
	tunnel()
	timer1 = os.startTimer(.05)
end

--Intro
term.clear()
term.setCursorPos(1,1)
print("")
print("")
print("	 X==---------------------------------==X")
print("	 | CC Games: Tunnel, made by Chub1337! |")
print("	 X==---------------------------------==X")
print("")
print("")
print("")
print("		   Controls:")
print("")
print("		   UP: ArrowKey-Up")
print("		   DOWN: ArrowKey-Down")
print("")
print("		   Current Highscore:")
print("		   "..hs_name.." with "..hs_score)
print("")
print("")
write("Press <Enter> to continue.")
io.read()

term.clear()
term.setCursorPos(1,1)

--Screen
write("Score: "..score)

for i=1,width-1,1 do
	term.setCursorPos(i,2)
	write("-")
end
term.setCursorPos(1,height-1)
for i=1,width-1,1 do
	term.setCursorPos(i,height-1)
	write("-")
end

--Tunnel
x = 2
y = math.ceil(height/2)

timer1 = os.startTimer(.05)

while lives~=-1 do
	event, par = os.pullEvent()
	if event == "timer" and par == timer1 then timerupdate() end
	if event == "key" then
		if par == 200 then
			y = y - 1
			if y < 3 then
				y = 3
			end
			term.setCursorPos(2,y+1)
			write(" ")
		elseif par == 208 then
			y = y + 1
			if y > height-2 then
				y = height-2
				
			end
			term.setCursorPos(2,y-1)
			write(" ")
		end
	end
	drawPlayer()
	score = score+1
	term.setCursorPos(1,1)
	write("Score: "..score)
	term.setCursorPos(math.ceil(width/2),1)
	write("Lives: "..lives)
	term.setCursorPos(1,height)
	--write("tun_h: "..tun_h.."   s_time: "..s_time.."   timer3: "..timer3.."  ")
	write("Highscore: "..hs_score.." by "..hs_name..".")
	if screen[2][y] == "#" then
		gameover()
	end
end

Author: Chub1337

Hope you like it! :D/>/>

-Chub1337
Liraal #3
Posted 27 February 2012 - 02:53 PM
i'd say you should place this before your code:

if not fs.exists("tunnel_hs") then
local tmp=io.open("tunnel_hs", "w")
tmp:write("Name")
tmp:write(1)
tmp:close()
end

it'll check whether 'tunnel_hs' exists, if not it'll create it
Chub1337 #4
Posted 27 February 2012 - 03:00 PM
i'd say you should place this before your code:

if not fs.exists("tunnel_hs") then
local tmp=io.open("tunnel_hs", "w")
tmp:write("Name")
tmp:write(1)
tmp:close()
end

it'll check whether 'tunnel_hs' exists, if not it'll create it

Thanks! Added :D/>/>
Wolvan #5
Posted 27 February 2012 - 08:01 PM
Could you please make your files downloadable? My copy and paste isn't working and I really want to play the games
Chub1337 #6
Posted 27 February 2012 - 09:49 PM
Could you please make your files downloadable? My copy and paste isn't working and I really want to play the games

Done! I've uploaded Pong and Tunnel. Download links are in the first post.

-Chub1337
Wolvan #7
Posted 02 March 2012 - 01:51 PM
Could you please make your files downloadable? My copy and paste isn't working and I really want to play the games

Done! I've uploaded Pong and Tunnel. Download links are in the first post.

-Chub1337
Thank you sir and am I allowed to try to make the pong game network compatible? So that you can play with 2 different networks over rednet
Chub1337 #8
Posted 02 March 2012 - 03:28 PM
Sure! Go ahead B)/>/> But only if you post the result here :unsure:/>/>

-Chub1337
Wolvan #9
Posted 02 March 2012 - 05:31 PM
Sure! Go ahead B)/>/> But only if you post the result here :unsure:/>/>

-Chub1337
Sure thing and I already do it. It will have spectation mode too! I post it here then B)/>/>
Wolvan #10
Posted 02 March 2012 - 08:14 PM
I finished it but couldn't test at all. Do you have a Server where I could test it? Best would be a server with many people
Chub1337 #11
Posted 03 March 2012 - 07:56 AM
I have a private server myself for a small group of friends. It uses hamachi though. And it's not very busy either. Would it still suffice?

-Chub1337
Wolvan #12
Posted 03 March 2012 - 10:18 AM
I have a private server myself for a small group of friends. It uses hamachi though. And it's not very busy either. Would it still suffice?

-Chub1337
Yeah I think so. I just need some people to test on different computers. And I think I have MUCH Bugs to fix.
Chub1337 #13
Posted 03 March 2012 - 10:38 AM
I have a private server myself for a small group of friends. It uses hamachi though. And it's not very busy either. Would it still suffice?

-Chub1337
Yeah I think so. I just need some people to test on different computers. And I think I have MUCH Bugs to fix.

You can join my temp server via hamachi with the name: CCServer1.3 and the pass: cc

whitelist is ON so please tell me your ingame name first :unsure:/>/>

-Chub1337
legomaniack #14
Posted 22 March 2012 - 11:43 PM
Working on a space ship game…. dodge and shoot asteroids as you fly through space!
Chub1337 #15
Posted 23 March 2012 - 05:08 PM
Sounds nice! Looking forward to it :(/>/>
Dreamlash #16
Posted 23 March 2012 - 06:22 PM
Those games plus the future Asteroids CC version are too classy, congrats guys : D
Wolvan #17
Posted 23 March 2012 - 06:54 PM
Those games plus the future Asteroids CC version are too classy, congrats guys : D
future asteroids CC version?
tommyroyall #18
Posted 24 March 2012 - 01:48 AM
Hey guys. I have nearly mastered RinAPI (used for physics, entities, etc. and specifically game dev) and I have MineDwarf as a blank slate, and I was hoping for any good ideas if you guys have them.
BigSHinyToys #19
Posted 24 March 2012 - 12:56 PM
Ideas for game

Tanks – game where you aim where a projectile will land using power and angle. ( should be a good work out for your physics )
Pokemon – ok so kinda of a joke suggestion
Space invaders – classic
Tetris – classic
Elf bolling – Google it if you haven't played it.
Mario – original 2d side scrolling game
catapult game – a game where you have to select power and projectile for a catapult and then it fires at a building of some kind. points for destruction
BlackRa1n #20
Posted 24 March 2012 - 01:05 PM
I like the sound of 'Space Invaders' and 'Tetris' being in CC. That would be pretty fun :(/>/>
Dreamlash #21
Posted 24 March 2012 - 06:12 PM
future asteroids CC version?
Working on a space ship game…. dodge and shoot asteroids as you fly through space!
SquareMan #22
Posted 25 March 2012 - 07:05 PM
I think i'll tackle the Tetris game, sounds like a good challenge for an early program
kaziu687 #23
Posted 25 March 2012 - 10:18 PM
Working on tic tac toe via rednet, share soon :o/>/>
Robd #24
Posted 05 April 2012 - 03:07 AM
Pacman: World's hardest Game. If someone makes that I'll give them a big kiss. I might start working on it myself if i think to.
Klausar #25
Posted 25 June 2012 - 05:06 PM
I can't start tunnel, its giving me an error in column 57
mrminer8888 #26
Posted 30 June 2012 - 06:24 PM
pong doesn't work………. no one can lose :P/>/>
mrminer8888 #27
Posted 30 June 2012 - 06:32 PM
im getting an error for tunnel on line 154
Klausar #28
Posted 30 June 2012 - 06:44 PM
im getting an error for tunnel on line 154
same problem.
Deathknight0897 #29
Posted 04 July 2012 - 01:48 PM
Pong isn't working at all key inputs are dead for some reason
nitrogenfingers #30
Posted 06 July 2012 - 05:32 AM
I've developed a few games for ComputerCraft, and it'd be cool to have them included as part of this project, iff your dev team is keen.

I wrote LaserBlast, a little bit like Missile Command I think would be a nice addition, and I'm still working on a Ultima-style RPG (that will take some time).
ssandiss #31
Posted 11 July 2012 - 08:40 AM
Tunnel is giving me a error on line 24?
drathek #32
Posted 25 January 2013 - 03:38 PM
Just to get it working for a friend I have debugged the tunnel program (mainly how it writes the high score) and had the game restart after a game ends. The code can be cleaned up more but it works.

Be sure to delete the old tunnel_hs program!

http://pastebin.com/JRQyisfJ

PS: This game drastically needs more difficulty - the default position is almost a perfect win lol.
Skullblade #33
Posted 25 January 2013 - 03:46 PM
Tunnel is giving me a error on line 24?
Just to get it working for a friend I have debugged the tunnel program (mainly how it writes the high score) and had the game restart after a game ends. The code can be cleaned up more but it works.

Be sure to delete the old tunnel_hs program!

http://pastebin.com/JRQyisfJ

PS: This game drastically needs more difficulty - the default position is almost a perfect win lol.
notice timestamps….
Plz PLz plz plz plz plz plz plz plz plz plz plz plz plz plz plz plz plz plz plz don't bump…….your 1st post is a bump…good start
Bubba #34
Posted 25 January 2013 - 04:11 PM
notice timestamps….
Plz PLz plz plz plz plz plz plz plz plz plz plz plz plz plz plz plz plz plz plz don't bump…….your 1st post is a bump…good start

Just as a note, I haven't seen anywhere that says bumping is not allowed if it's for a good reason: however I don't think that this qualifies as one.
Skullblade #35
Posted 25 January 2013 - 04:27 PM
It's annoying though and threads have been locked solely because some1 bumped it…
drathek #36
Posted 25 January 2013 - 06:14 PM
Tunnel is giving me a error on line 24?
Just to get it working for a friend I have debugged the tunnel program (mainly how it writes the high score) and had the game restart after a game ends. The code can be cleaned up more but it works.

Be sure to delete the old tunnel_hs program!

http://pastebin.com/JRQyisfJ

PS: This game drastically needs more difficulty - the default position is almost a perfect win lol.
notice timestamps….
Plz PLz plz plz plz plz plz plz plz plz plz plz plz plz plz plz plz plz plz plz don't bump…….your 1st post is a bump…good start

Really?

I could care less about the time stamps - its still valid code and just needed to be polished up a bit, which is exactly what I did since my friend had an interest in these two programs. I did everyone a favor by sharing the work - sorry for joining a forum for a computer language and doing some programming.

I could understand your argument if I got on a old topic and said "hey why dont dis work" - but contributing to something, especially to get it to a stable/working version, is different.
Cranium #37
Posted 25 January 2013 - 06:22 PM
I understand that the thread was revived from the dead, but I do believe this is benevolent necromancy. The bump did provide additional, and helpful content. I don't have a problem with it.
Bubba #38
Posted 25 January 2013 - 06:24 PM
I could care less about the time stamps - its still valid code and just needed to be polished up a bit, which is exactly what I did since my friend had an interest in these two programs. I did everyone a favor by sharing the work - sorry for joining a forum for a computer language and doing some programming.

Edit: Cranium the ninja has ninja'd me.
I think Skullblade's response was a bit drastic, but if you want to share your program I think perhaps the best way to do so would be by making a new topic rather than reviving a dead one. It's good to see new members coding so please don't be offended by this.

On the topic of the code itself, it looks pretty good with the exception that you (and/or the original creator) did not localize any code. Although not vital to performance or any such thing, it is a good habit to get into (I don't know if you know about environments and the global [_G] table yet, but when you do not localize you are essentially spamming it with unnecessary functions and variables). Other than that good job :)/>

Edit: Additionally, the gameplay itself is a bit easy at first - perhaps you should ramp up the difficulty slightly more quickly. And there's a rendering issue which you might want to take care of when somebody enters a name for the high score that exceeds the space you have available to render it, meaning that the name wraps down to the next few lines and messes up the game.
drathek #39
Posted 25 January 2013 - 06:34 PM
I could care less about the time stamps - its still valid code and just needed to be polished up a bit, which is exactly what I did since my friend had an interest in these two programs. I did everyone a favor by sharing the work - sorry for joining a forum for a computer language and doing some programming.

Edit: Cranium the ninja has ninja'd me.
I think Skullblade's response was a bit drastic, but if you want to share your program I think perhaps the best way to do so would be by making a new topic rather than reviving a dead one. It's good to see new members coding so please don't be offended by this.

On the topic of the code itself, it looks pretty good with the exception that you (and/or the original creator) did not localize any code. Although not vital to performance or any such thing, it is a good habit to get into (I don't know if you know about environments and the global [_G] table yet, but when you do not localize you are essentially spamming it with unnecessary functions and variables). Other than that good job :)/>

I don't think it would be really fair to repost this program when 99% of it wasn't made by me. All I really changed was a new line in the tunnel_hs so it would read it correctly, and then put the main program into a function that can be called again at the end. A lot of the variables (especially at the start of the gamestart function) could have been trimmed down but I didn't take the time to figure out what one(s) in particular was causing the program to not reset correctly, but thanks.
brett122798 #40
Posted 25 January 2013 - 06:55 PM
I could care less about the time stamps - its still valid code and just needed to be polished up a bit, which is exactly what I did since my friend had an interest in these two programs. I did everyone a favor by sharing the work - sorry for joining a forum for a computer language and doing some programming.

Edit: Cranium the ninja has ninja'd me.
I think Skullblade's response was a bit drastic, but if you want to share your program I think perhaps the best way to do so would be by making a new topic rather than reviving a dead one. It's good to see new members coding so please don't be offended by this.

On the topic of the code itself, it looks pretty good with the exception that you (and/or the original creator) did not localize any code. Although not vital to performance or any such thing, it is a good habit to get into (I don't know if you know about environments and the global [_G] table yet, but when you do not localize you are essentially spamming it with unnecessary functions and variables). Other than that good job :)/>

I don't think it would be really fair to repost this program when 99% of it wasn't made by me. All I really changed was a new line in the tunnel_hs so it would read it correctly, and then put the main program into a function that can be called again at the end. A lot of the variables (especially at the start of the gamestart function) could have been trimmed down but I didn't take the time to figure out what one(s) in particular was causing the program to not reset correctly, but thanks.
This topic has obviously been abandoned. So the point is, why revive an abandoned topic?
Skullblade #41
Posted 26 January 2013 - 01:13 AM
I agree with u Brett but apparently I am every blunt when I am tired….
billysback #42
Posted 26 January 2013 - 10:23 AM
EDIT:
oh right…
woops I just read what everyone else posted
MulticolouredMarshmellow #43
Posted 10 February 2013 - 09:44 AM
Is there a way to exit pong? without terminating it?
Skullblade #44
Posted 10 February 2013 - 11:27 AM
Is there a way to exit pong? without terminating it?
this project is abandoned so don't expect support…if you want a newer pong game you could use skull pong(link in my sig) :D/>
TheOddByte #45
Posted 10 February 2013 - 11:45 AM
Ideas for game

Tanks – game where you aim where a projectile will land using power and angle. ( should be a good work out for your physics )
Pokemon – ok so kinda of a joke suggestion
Space invaders – classic
Tetris – classic
Elf bolling – Google it if you haven't played it.
Mario – original 2d side scrolling game
catapult game – a game where you have to select power and projectile for a catapult and then it fires at a building of some kind. points for destruction
I can't belive that noone has created Tetris in CC..
Thanks for the idea, Now I'm going to get started with that mohahaha.. :P/>
By the way.. The Catapult game sounds like Angry Birds Or Something.

EDIT: Sorry For Posting Here since this is Abandoned, But just want to let you know that I'm going todo Tetris
Skullblade #46
Posted 10 February 2013 - 12:04 PM
Ideas for game

Tanks – game where you aim where a projectile will land using power and angle. ( should be a good work out for your physics )
Pokemon – ok so kinda of a joke suggestion
Space invaders – classic
Tetris – classic
Elf bolling – Google it if you haven't played it.
Mario – original 2d side scrolling game
catapult game – a game where you have to select power and projectile for a catapult and then it fires at a building of some kind. points for destruction
I can't belive that noone has created Tetris in CC..
Thanks for the idea, Now I'm going to get started with that mohahaha.. :P/>
By the way.. The Catapult game sounds like Angry Birds Or Something.

EDIT: Sorry For Posting Here since this is Abandoned, But just want to let you know that I'm going todo Tetris
Just so you know…tetris HAS been done…cant remember where i saw it…
TheOddByte #47
Posted 10 February 2013 - 12:07 PM
Ideas for game

Tanks – game where you aim where a projectile will land using power and angle. ( should be a good work out for your physics )
Pokemon – ok so kinda of a joke suggestion
Space invaders – classic
Tetris – classic
Elf bolling – Google it if you haven't played it.
Mario – original 2d side scrolling game
catapult game – a game where you have to select power and projectile for a catapult and then it fires at a building of some kind. points for destruction
I can't belive that noone has created Tetris in CC..
Thanks for the idea, Now I'm going to get started with that mohahaha.. :P/>
By the way.. The Catapult game sounds like Angry Birds Or Something.

EDIT: Sorry For Posting Here since this is Abandoned, But just want to let you know that I'm going todo Tetris
Just so you know…tetris HAS been done…cant remember where i saw it…
Huhmm… I haven't seen it so I assumed it had'nt been made…
Well Atleast I'll do my own tetris.
mineo72 #48
Posted 15 December 2013 - 03:50 PM
I like the sound of 'Space Invaders' and 'Tetris' being in CC. That would be pretty fun :D/>/>
There is already a tetris CC Game B)/> B)/> B)/>
Edited on 15 December 2013 - 02:51 PM
H4X0RZ #49
Posted 15 December 2013 - 04:44 PM
It was said above…
serpenoids #50
Posted 27 April 2014 - 01:27 AM
[size=6]Title[/size]
Protector
Amount of players: 1
Genre: arcade

Code
[spoiler][code]local over = false
local eypos = 15
local expos = 30
local ypos = 15
local tries = 1
local lives = 10
attachedMonitor = peripheral.wrap("back")
attachedMonitor.setBackgroundColor(colors.black)
attachedMonitor.setTextScale(.5)
attachedMonitor.clear()
attachedMonitor.setTextColor(colors.red)
while over == false do
expos=expos-tries
sleep(0.1)
attachedMonitor.clear()
attachedMonitor.setCursorPos(20,ypos)
attachedMonitor.write("~")
attachedMonitor.setCursorPos(expos, eypos)
attachedMonitor.write("X")
attachedMonitor.setCursorPos(2,2)
attachedMonitor.write("Lives Remaining: "..lives)
event={os.pullEvent("monitor_touch")}
local columnClicked = event[3]
local rowClicked = event[4]
if rowClicked <10 then
ypos = ypos-1
else
ypos = ypos+1
end
if expos > 18 and expos < 22 and eypos == ypos then
expos = 30
eypos = math.random(20)
end
if expos < 10 then
expos = 30
eypos = math.random(20)
tries = tries+0.1
lives = lives-1
end
if lives <1 then
over = true
end
end
attachedMonitor.setBackgroundColor(colors.red)
attachedMonitor.clear()
attachedMonitor.setCursorPos(15,15)
attachedMonitor.setTextColor(colors.black)
attachedMonitor.write("Game Over!")
sleep(3)
os.reboot()[/code*][/spoiler] Author:serpenoidsGoal:Kill the X's by touching them, if an X gets to the end you lose a life, you have 10 lives. Right click on the top half to go upright click on the bottom half to go downNote: Must be named startup to work and the ADVANCED computer attached to a 2x2 ADVANCED monitor on the back
Konlab #51
Posted 19 May 2014 - 05:28 PM
This topic is good idea!
Konlab #52
Posted 21 May 2014 - 01:59 PM
I have a new game, done in 15 days!!!!