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

[1.4.5] Old Style Games! Post yours here!

Started by nitrogenfingers, 14 October 2012 - 12:50 PM
nitrogenfingers #1
Posted 14 October 2012 - 02:50 PM
The release of 1.4.5 has me excited for two big reasons:

- I can finally start making some genuine games
- I can teach some principles of game design in a fun and interesting way

Video games encompass some of the greatest challenges to programmers. They have to be carefully written, efficient, and good interactive design and is pivotal. Unlike many applications, they have to run smoothly in real time, supporting multiple threads of execution that must work together flawlessly. Making real games is a real challenge. But, arguably, there is no accomplishment more satisfying than finishing a good one.

Why did I open this thread? Partially to spread my excitement, partially to see what ideas and games people on the forums here can come up with! I'll be making as many as I can and releasing them fairly regularly, along with explanations of the techniques I've used. There will be a series of standard game making API's I'll be constructing as well, covering collision detection, animation queues, layered painting and more!

So I'll be keeping a list of games being made (and any cool screenshots/videos) here- if you have a game you want to showcase, be it just an idea, a few images or fully implemented post here, and I'll update your list with details! And if you run into trouble or want advice, I and I'm sure many others will be happy to help point you in the right direction.


Games for Advanced Computers

AdventureWorld (billysback):
SpoilerHigh Concept: Explore a village, talking to NPC's and seeing cool buildings. Uses billysback's art api!
Progress: Graphics, scrolling, conversations with NPC's and spawning buildings
Screenshot/Video:

Download: http://pastebin.com/azdWxCpy

Chess (KaOS):
SpoilerHigh Concept: An advanced, mouse-enabled version of Chess. Adds a colourful display with features like taken pieces on the side of the board and coloured squares denoting legal moves.
Progress: Appears largely complete, most rules implemented.
Screenshot/Video:

Download: Get the API and game here: http://www.computerc...mputer-version/

Game Studio (Hackingroelz):
SpoilerHigh Concept: A game engine, able to create video games at the click of a button! Compatible with the animation/paint formats of NPaintPro and Paint 2.0
Progress: Object placement, property editing and creation of executable game files
Screenshot/Video:
[media]http://www.youtube.com/watch?v=dvV-5BCJuHA&feature=plcp[/media]
Download: Not yet available

Shipper (billysback):
SpoilerHigh Concept: You have bought your space cruiser and set out on the beginning of your journey, but lately pirates have been prowling around… Even being in the space ports around the area is tough, and as you grow so do the pirates.
You must destroy and loot pirate ships to get money and crew-members in order to upgrade your ship and better defend yourself
Progress: Playable
Screenshot/Video:

Download: Visit the forum article here: http://www.computerc...9229#entry49229


Space: The Space Game about Space (nitrogenfingers):
SpoilerHigh Concept: Pilot a space vessel deep through space, shooting enemies and avoiding space-like mines!
Progress: A little movement and animation (arrow keys, enter to quit)
Screenshots/Video:

Download: http://www.mediafire...v7fcfkl469yi4l4

Target (KillaVanilla)
SpoilerHigh Concept: Targets appear on screen- click as fast as you can! Scored on speed and accuracy
Progress: Complete(?) Interface, graphics and main interaction
Screenshot/Video:

Download: http://pastebin.com/DrYqgrpj

Tetro (faubiguy):
SpoilerHigh Concept: A clone of Tetris for computercraft. Navigate a series of falling tetronimos in a well to form horizontal lines, without letting the blocks reach the top of the well.
Progress: Untested, appears to be complete or near complete (will confirm soon)
Screenshot/Video:

Download: http://pastebin.com/5NaF8YVL
Requires billysback's CGE API, obtainable here: http://www.computerc...ine-v12-colors/
and faubiguy's own Menu API, obtainable here: http://pastebin.com/UgMUtQGU

9 Men's Morris (KaoS):
SpoilerHigh Concept: A game for two players based on the ancient roman past time. Try to create mills, or rows of three while breaking your opponents.
Progress: Complete
Screenshot/Video: none yet
Download: http://pastebin.com/ckXcj0WA



Games for Standard Computers

Hurdles (Noodles):
SpoilerHigh Concept: Hurdles scroll towards you- jump over as many as you can with as few jumps as you can!
Progress: Complete, and fully playable
Screenshot/Video:

Download: Get it here: http://www.computerc...__fromsearch__1

Darklands: Tales from Transylvania (nitrogenfingers):
SpoilerHigh Concept: An explorer from a distant land is thrown into the turmoil of a botched Wallachian invasion of the Carpathian mountains. Explore strange lands, meet strange people and battle fantastical monsters in this fully-featured RPG
Progress: Base engine includes combat, exploration, quests, inventory, levelling and conversation
Screenshot/Video:
Download: Get the demo at http://www.computerc...__fromsearch__1

I'm hoping this can truly inspire some unique ideas. Look forward to hearing from everyone!

-Nitrogen Fingers
Hackingroelz #2
Posted 14 October 2012 - 03:14 PM
Ive made a game API. It allows you to do things like addObject(0, 0, sprite, function). It uses the same sprite format as Cruors paint program
tommyroyall #3
Posted 14 October 2012 - 04:18 PM
I think that this is an amazing idea. I would go with using an API for it, like CGE. I'm more into creation of things such as servers, interpreters, encryption APIs, etc. but I may attempt to create a MUD soon, now with text coloring, it's going to be pretty nice :)/>/>. Also, I was thinking that I might attempt to create a networking protocol for server development, and it has quite a lot of use with gaming.

On a side-note, I've been developing a graphical API of which entails usage of a framebuffer class and a screen class, therefore allowing much more advanced control over the graphics. Lyqyd is working on a windows API, which doesn't just cut off the views, but works with the shell, allowing the program to wrap over. Once that is released, and I finish up my networking protocol I may release the protocol and graphics classing API.
billysback #4
Posted 14 October 2012 - 07:58 PM
This topic inspired me to add colored support for CGE,
so it should make making these games a hell of a lot easier, then I shall post a game or something :)/>/>

(also, Nitrogen could you upload them as a paste as well as or instead of a media fire link?)
BigSHinyToys #5
Posted 14 October 2012 - 08:02 PM
I made this relay hacky way to have programs on a monitor for the "worm" game that comes with CC it also works for your game.

Pictures of setup
Spoiler


This you run on the computer with monitor edit sides as needed
Spoiler

rednet.open("right")
mon = peripheral.wrap("back")
mon.setTextScale(0.5)
term.redirect(mon)
print("computer booted")
local function rmButtons()
    while true do
	    local event,from,message,distance = os.pullEvent("rednet_message")
	    if tonumber(message) then
		    os.queueEvent("key",tonumber(message) or 0)
	    elseif message ~= "nil" then
		    os.queueEvent("char",message)
	    end
    end
end
local function OverShell()
    shell.run("shell")
end
parallel.waitForAny(rmButtons,OverShell)

this goes on the computer in the center of the Dpad of pressure plates
Spoiler

rednet.open("bottom")
local last = os.startTimer(0.1)
while true do
    local numb = 0
    local event,arg1,arg2 = os.pullEvent()
    if rs.getInput("front") then
	    numb = 208
    elseif rs.getInput("back") then
	    numb = 200
    elseif rs.getInput("left") then
	    numb = 203
    elseif rs.getInput("right") then
	    numb = 205
    elseif rs.getInput("top") then
    elseif rs.getInput("bottom") then
    end
    rednet.broadcast(tostring(numb))
    if event == "timer" and arg1 == last then
	    last = os.startTimer(0.1)
    end
end

and this is on the computer near the dpad that acts as a remote keyboard < not strictly needed
Spoiler

rednet.open("back")
print("computer booted")
local function rmButtons()
    while true do
	    local event,from,message,distance = os.pullEvent()
	    if event == "key" or event == "char" then
	    rednet.broadcast(tostring(from))
	    end
    end
end
local function OverShell()
    while true do
    read()
    end
end
parallel.waitForAny(rmButtons,OverShell)
Hackingroelz #6
Posted 14 October 2012 - 10:42 PM
I've been experimenting some more. Didn't really plan it out too well, so it's a bit/extremely buggy:

[media]http://www.youtube.com/watch?v=RgMai60n6BA&feature=plcp[/media]
Hackingroelz #7
Posted 15 October 2012 - 03:49 PM
GameStudio program:

[media]http://www.youtube.com/watch?v=dvV-5BCJuHA&feature=plcp[/media]

[media]http://www.youtube.com/watch?v=h9ah9X7aSQE&feature=plcp[/media]
nitrogenfingers #8
Posted 16 October 2012 - 01:50 AM
Looks awesome Hackingroelz! I'll add it to the list :D/>/>
Hackingroelz #9
Posted 16 October 2012 - 09:46 AM
I've added collision to GameStudio:

[media]http://www.youtube.com/watch?v=-zJRwoKzsqc&feature=youtube_gdata[/media]
billysback #10
Posted 20 October 2012 - 10:51 AM
Heres my current RPG game project called aw (AdventureWorld)
Black = block, collision
Grey = Door, to new map.


It uses CGE (A dev build with some added functions); heres the current code:
Spoiler


local root = "awdat/"

local curmap = nil
local player = cge.createSprite({8}, {8}, {"@"}, "player", 1)
cge.addSprite(player)

local map1 = cge.readMap(root.."map1.png", true)
local house1 = cge.readMap(root.."house1.png", true)
local house2 = cge.readMap(root.."house2.png", true)
local house3 = cge.readMap(root.."house3.png", true)

local ml1 = {house1, house2, house3}

local ncolb = 0
local ncold = 0

local function loadMap(map)
	for i,v in pairs(map) do
		--print(v)
		local splt = cge.split(v, ":")
		local type = splt[3]
		if type == "&amp;0" then
			--print("CREATED BLOCK: "..tonumber(splt[1])..";"..tonumber(splt[2]))
			ncolb = ncolb + 1
			--print("creating sprite 0")
			local nsp = cge.createSprite({tonumber(splt[1])}, {tonumber(splt[2])}, {type}, "colb"..ncolb, 1)
			--print("CREATED SPRITE")
			cge.addSprite(nsp)
		elseif type == "&amp;8" then
			--print("CREATED DOOR")
			ncold = ncold + 1
			--print("creating sprite 8")
			local nsp = cge.createSprite({tonumber(splt[1])}, {tonumber(splt[2])}, {type}, "cold"..ncold, 1)
			--print("CREATED SPRITE")
			cge.addSprite(nsp)
		end
	end
	curmap = map
	cge.setMap(curmap)
end

local function checkFor(sprite, type_str, type_n)
	local table = {}
	for i=1,type_n,1 do
		local csprite = cge.getSprite(type_str..i)
		if csprite ~= nil then
			table[#table + 1] = csprite
		end
	end
	--print("SIZE("..type_str.."): "..#table)
	return cge.checkCollision(sprite, table)
end

local function checkForBlocks(sprite)
	-- "colb" = collision blocks
	-- ncolb = number of collision blocks
	-- sprite =
	return checkFor(sprite, "colb", ncolb)
end


local function checkForDoors(sprite)
	--"cold" = collision doors
	-- ncold = number of collision doors
	-- sprite = sprite being checked
	return checkFor(sprite, "cold", ncold)
end

local function moveIntoDoor(sprite)
	local curdoor = nil
	for i=1,ncold,1 do
		local csprite = cge.getSprite("cold"..ncold)
		if csprite ~= nil and curdur == nil then
			if cge.checkCollision(sprite, {csprite}) then else
				curdoor = csprite
			end
		end
	end
	if curdor ~= nil then
		local x, y, type, name, mxaf caf, cuv = cge.getSpriteLineData(curdor[1])
		if name ~= nil then
			local nmap = curmap
			local dn = tonumber(name.sub(5, -1))
			if curmap == map1 then
				if dn == 1 or dn == 2 then nmap = house2
				elseif dn == 3 then --map2
				elseif dn == 4 then nmap = house1
				elseif dn == 5 then nmap = house3 end
			end
			if nmap ~= curmap then
				loadMap(nmap)
			end
		end
	end
end

local function move(sprite, dir)
	local nsprite = cge.moveSprite(sprite, dir[1], dir[2], false)
	if checkForBlocks(nsprite) then
		print("HIT BLOCK")
		term.setCursorPos(1,1)
		return sprite
	else
		if checkForDoors(nsprite) then moveIntoDoor(nsprite) end
		return nsprite
	end
end

curmap = loadMap(map1)

local on = true
local timer = os.startTimer(1)

local interval = 0.1

while on do
	local event, p1, p2 = os.pullEvent()
	if event == "timer" and p1 == timer then
		player = cge.getSprite("player")
		timer = os.startTimer(interval)
		term.clear()
		term.setCursorPos(1,1)
		cge.colorDraw(1, 1)
	elseif event == "key" then
		local key = p1
		if key == 200 then --up
			local nplayer = move(player, {0, -1})
			cge.changeSprite(player, nplayer)
		elseif key == 208 then --down
			local nplayer = move(player, {0, 1})
			cge.changeSprite(player, nplayer)
		elseif key == 203 then --left
			local nplayer = move(player, {-1, 0})
			cge.changeSprite(player, nplayer)
		elseif key == 205 then --right
			local nplayer = move(player, {1, 0})
			cge.changeSprite(player, nplayer)
		elseif key == 56 then --alt
			on = false
		end
	end
	player = cge.getSprite("player")
end

cge.reset()
term.clear()
term.setCursorPos(1,1)
nitrogenfingers #11
Posted 22 October 2012 - 02:05 AM
Looks great billysback- I'll add it to the list. Keep posts of your progress!
KillaVanilla #12
Posted 22 October 2012 - 07:38 AM
I'm working on a shooting game. It's actually very simple - a 3x3 target on a black background. It keeps track of misses, hits, and a score. I'm working on adding multiple difficulty levels to the game. The hard part's making the UI. I'll probably have a picture up tomorrow if I remember; it's 1:38 AM here.
Noodle #13
Posted 22 October 2012 - 07:54 AM
Add Mine?
It doesn't use colors, but it's still retro.
Hurdles
nitrogenfingers #14
Posted 22 October 2012 - 12:10 PM
I'm working on a shooting game. It's actually very simple - a 3x3 target on a black background. It keeps track of misses, hits, and a score. I'm working on adding multiple difficulty levels to the game. The hard part's making the UI. I'll probably have a picture up tomorrow if I remember; it's 1:38 AM here.

Sounds good KillaVanilla- I'll wait until you have a screenshot and title before adding it to the list, but sounds interesting so far!


Add Mine?
It doesn't use colors, but it's still retro.
Hurdles

Something I hadn't thought of! Well I did say retro games, and this is a retro game- I had meant with colour, but only implicitly and I don't like to step on that…

Tell you what, I'll divide it into 2 sections- one for those colour games and others for our older… lets say "Standard-computer compatible" games. I still think there's a place for those games, I mean my RPG will not work with colours, so it seems right to advertise them just as proudly :)/>/>

Edit: I've added the section to include one for standard computers. I'm only going to list my RPG there (none of my other games) because it's not finished and because I opened this thread to share the community's work, rather than plug my own projects.
KillaVanilla #15
Posted 22 October 2012 - 01:31 PM
Introducing: "target" (I couldn't think of a name, so I'm using the development name)!

Okay, title screen/difficulty levels finished, bit I can't post the pictures right now - rushed on time to get to school.

Pictures (a bit outdated - it keeps track of chains of hits and a score multiplier):



Yeah, it's not much to look at, but it's fun for a bit.
faubiguy #16
Posted 22 October 2012 - 11:29 PM
Tetro! This is basically a tetris clone in ComputerCraft.



This requires billysback's CGE, and my (until now) unreleased menu API (at /CGE and /menu respectively).

EDIT: Fixed line detection. Now it should only detect lines that ere actually complete, and always detect lines that are complete. I'm surprised I didn't catch this bug earlier.

EDIT 2: Now it automatically downloads the APIs if it doesn't detect them, and refuses to load on standard computers.
nitrogenfingers #17
Posted 23 October 2012 - 02:28 AM
Keeping up with everyone as best as I can, I'm surprised to see so many games already on the list. Fantastic to see so many people as excited about this as I am, and not just making great games but making tools that will help everyone in the future.

If there are any issues with the list let me know and I'll be sure to fix them, but for now thanks everyone for posting!
Noodle #18
Posted 23 October 2012 - 05:15 AM
I'm making Pacman in CC..
Gimme a day or two, it should be finished.
It's also colored!
nitrogenfingers #19
Posted 03 November 2012 - 01:49 AM
I've been a little quiet on this topic and I apologise! I am working on a game but very much in the background to some other stuff at the moment.

The space game will be a full-bloated space trading game, with some combat and a few adventure sequences. A lot of it is planned out, and will use things like monitors for displays. More details as I continue development!

Oh, and tutorials are on the way too… but not for awhile.
Cruor #20
Posted 04 November 2012 - 12:52 AM
Why havent i seen this thread before?! keep being epic Nitrogen and other epic people :3
billysback #21
Posted 10 November 2012 - 11:17 PM
(EDITED THE POST WITH AN UPDATE; added textboxes and talking to NPCs which spawn around the village….)

Download:
Spoilerhttp://pastebin.com/azdWxCpy

Heres a Screenshot:
Spoiler

Controls:
arrow keys to move around the "village", up to 6 houses will spawn, you can walk around and look at these houses.

Details:
Walking past the edge of your current map view will walk you one that way in the real map if it can;
To change the map size or the amount of houses go to line 6 and 7 for map width and height, change those values, line 66 change the math.random(6) to math.random(number_of_houses).

There are now people as well, walk in to the people to talk to them.

It was made to test the art API but I had a lot of fun with it, after making it scroll I realised that it was rather powerful in what it could do without changing much of the core code… because of this I will almost definitely be adding to and updating this game :unsure:/>/>
ETHANATOR360 #22
Posted 11 November 2012 - 04:09 PM
i want to make a full color platformer like mario bros right now the only thing that stands in my way is when you jump how do i code you going up then down
billysback #23
Posted 11 November 2012 - 11:31 PM
Here's my space adventure inspired by FTL:
http://www.computercraft.info/forums2/index.php?/topic/5911-game-shipper-become-a-space-pionere-v11/page__pid__49229#entry49229

I am rather proud of the UI and general look of that game, especially the ships :unsure:/>/>

Screenies:
Spoiler

tommyroyall #24
Posted 12 November 2012 - 07:20 AM
This is amazing Nitro, all of these games piling up :unsure:/>/>.
nitrogenfingers #25
Posted 13 November 2012 - 06:50 PM
Sorry for the delay on adding these BillysBack, will do it now
billysback #26
Posted 18 November 2012 - 10:45 AM
edit, spam post got removed so it looked like I was having a go at nitrogen :)/>/>