PDA

View Full Version : Programming/Coding in Games



riadsala
12-10-2012, 02:28 PM
Ok, so this is obviously inspired by the other two threads! But it got me thinking: a lot of pc gamers appear to have at least some basic knowledge of computer programming, or an interest in learning. A lot of us actually enjoy creating programs and puzzle solving! And I'm sure quite a lot of people who program also play some games.

are there any games that involve coding as a game mechanic? Usually, "hacking" is treated as a simplistic match 3 puzzle game something.

The only example I can think of just now is Spacechem. And Notch is planning on having a programmable computer in the space game he's working on, but I don't think many details have been released.

Any other ideas?

SanguineAngel
12-10-2012, 02:32 PM
Could this be the ticket? http://www.rockpapershotgun.com/tag/quadrilateral-cowboy/

kstress71
12-10-2012, 02:47 PM
I heard about Code Hero (http://primerlabs.com/codehero) from a podcast awhile back. It supposedly teaches game coding in Unity using a game interface. I haven't played it myself, so I can't speak to its effectiveness in that area (I'm skeptical).

aoanla
12-10-2012, 02:52 PM
B.A.T., which is old enough that it was released on the Amiga, Atari ST and PC (and I think the C64) (http://www.mobygames.com/game/bat ) gave you a wrist-mounted computer that you could do very simple programming on, IIRC.

Berzee
12-10-2012, 03:17 PM
Haha, I just remembered that The Island of Dr. Brain (http://en.wikipedia.org/wiki/The_Island_of_Dr._Brain) required you to program these little robots to solve a puzzle. (The "programming" was just directional instructions, but the different robots would interpret the instructions in different ways).

Digital: A Love Story gives a weird feeling of being a leet phone phreaker but without doing any actual haxxingz. =P

Haven't played any games with actual coding-coding in them though...

mrpier
12-10-2012, 03:51 PM
Minecraft, sort of. Has a programmable block and mods have added computers which I think you can program with forth.

deano2099
12-10-2012, 04:27 PM
http://www.tomjubert.com/irrational - Ir/rational teaches the basics of formal logic which underpin programming.

The combat systems in Final Fantasy XII and (to a lesser extent) Dragon Age let you set up really simple bots based of a sort of programming language. I'm sure there are examples of similar things in strategy games, where you effectively write the AI for units but can't think of which now.

MeltdownInteractiveMedia
12-10-2012, 08:12 PM
There is a game called Hacker Evolution that I know of...
http://www.youtube.com/watch?v=6dqrBW7ZOlI

Ritashi
12-10-2012, 09:53 PM
You can build a computer from scratch in Minecraft, without mods - I remember seeing a Minecraft in Minecraft vid a while back (simple 2d in I think an 8x8 grid, but it had gravity, physics, jumping, and block placement/removal). I've done a simple ALU myself, as well as designing some low level components for other machines. It's fun, and I had a great time in Computer Architecture class by building basic components in Minecraft as the teacher lectured about them - I made it a race to complete each part before she moved on to the next one.

pakoito
15-10-2012, 12:26 AM
Nobody cites Uplink? Ok, it's just minigames but still.

Danny252
15-10-2012, 12:44 AM
And Notch is planning on having a programmable computer in the space game he's working on, but I don't think many details have been released.

The spec for the CPU and other bits are out: http://0x10cwiki.com/wiki/DCPU-16

(Strange how I've gone from "so complicated!" 6 months ago to "my god how can you code anything with so few opcodes D:" now...)

Bobtree
15-10-2012, 01:37 AM
http://en.wikipedia.org/wiki/Core_War

Mohorovicic
15-10-2012, 06:51 AM
Programming != Scripting

Lukasz
15-10-2012, 07:01 AM
Programming != Scripting

explain please?

Rossi
15-10-2012, 11:59 AM
He says, Programming does not equal Scripting.

Well that depends. I am a software developer, I don't develop games (wish I did) but I write software for business/local government.

Depends how define it, a piece of programming code could be described as a script as it's something the computer follows and executes. I suppose scripting in this sense would be something that runs on top of existing program code which affects the outcome of said program. It's not something developed from scratch, rather just something that executes in tandem.

Kaira-
15-10-2012, 12:04 PM
Programming != Scripting

Programming is programming is programming. I mean, I do sneer at script languages, but they are programming all right. Now HTML on the other hand...

Rossi
15-10-2012, 12:06 PM
Programming is programming is programming. I mean, I do sneer at script languages, but they are programming all right. Now HTML on the other hand...

Yes. Beware of purists though. This conversation could get out of hand very quickly

Unaco
15-10-2012, 12:10 PM
Dark Signs or Dark Signs Online.

b0rsuk
15-10-2012, 12:48 PM
How about LEGO ? Here's the world's fastest Rubik Cube solver. Beats the human record by a fraction of a second.
http://www.youtube.com/watch?v=_d0LfkIut2M

Rotekian
15-10-2012, 01:10 PM
If your looking for programming games the best place to go is currently: http://programminggames.org/

Most of the games listed are pretty ancient though.

victory
15-10-2012, 02:32 PM
This genre is pretty much nonexistent for a simple reason - if you are the sort of person to whom programming is natural and fun, you will probably have more fun messing with real programs instead. If you aren't that kind of person, you won't like it in a game either.

I could see some appeal in a RTS or equivalent where the players can, within some (tight) limitations, script automatic behaviors for their units pre-game. But then, I am a programmer.

pakoito
15-10-2012, 06:39 PM
This genre is pretty much nonexistent for a simple reason - if you are the sort of person to whom programming is natural and fun, you will probably have more fun messing with real programs instead. If you aren't that kind of person, you won't like it in a game either.

I could see some appeal in a RTS or equivalent where the players can, within some (tight) limitations, script automatic behaviors for their units pre-game. But then, I am a programmer.Nero Two Point O
(http://nerogame.org/)

tomeoftom
15-10-2012, 07:16 PM
Uh, the most obvious one - I would think - would be Garry's Mod's Wiremod addon. It has chips that do either logic or a bunch of different simple operations (arithmetic, angles, vectors etc) and you wire them together and then to basically anything to make the most insane contraptions you want. That's very fun and feels very much like a game, especially since the chips are real physical objects that interact with everything else. I made a 4-digit PIN keypad out of the gates, and in multiplayer you could absolutely (and I did) set it up so that by analysing the layout of all the chips you could figure out the code, or subvert the wiring entirely with a couple of tricks.

On the next level, it also has an (awful) scripting language called Expression 2, which again runs through a chip but it's written in an in-game text editor and this chip can manipulate basically anything in the game world (move things, cast holograms, sense everything). That's a whole lot of fun on the engineering side but because of the lack of restrictions it becomes a bit pointless, since there's a far-too-easy route to doing anything particularly useful within the game world. (There's also Starfall, which isn't complete yet but runs it straight through Gmod using Lua and seems like it'll be restricted to processing only, rather than being a god-box.)

There's a big community around Wiremod, if you're interested. I kind of wish 0x10^c would use Lua, just so I'd have a nice way to learn it.

victory
15-10-2012, 07:51 PM
Nero Two Point O
(http://nerogame.org/)Eh, that's an AI dev sandbox. Even if we decide to call it a game, from the player's viewpoint it's more of a breeding game than a programming game.

What I was thinking of is an actual, polished game, with player controlling stuff as usual but being able to use a number of scripts to supplement their own actions. And the scripts would be limited to dead simple ones precisely so that the game doesn't devolve into an AI writing contest.

Jolima
15-10-2012, 09:56 PM
This made me remember an IF game I played years back, Return to Ditch Day (http://www.ifwiki.org/index.php/Return_to_Ditch_Day) which contained a non-required puzzle where you are presented with a box showing 8 (or so) digits and a button. You could set the digits and press the button and the number would change. There was an instruction to make it output something specific, or maybe it was to quine back the input again.

After playing around with it a bit, you could realize that each digit corresponded to basically an assembly instruction, which would take the next one or two digits as arguments and then move on to execute the next instruction (the previous first argument). Some instructions would change the digits, some would move the instruction pointer and so on.

So this was a basic computer with a few digits shared as both the instructions, the arguments and the registers which made for some fun but frustrating hours of trying to program it to do the right thing. Give it a try if you like programming and Interactive Fiction. (It was a few years ago, so I may misremember some details.)

Gray Guardian
15-10-2012, 10:26 PM
colobot
http://en.wikipedia.org/wiki/Colobot

deano2099
17-10-2012, 12:26 AM
What I was thinking of is an actual, polished game, with player controlling stuff as usual but being able to use a number of scripts to supplement their own actions. And the scripts would be limited to dead simple ones precisely so that the game doesn't devolve into an AI writing contest.

I'm sure I remember something like that but I can't find it. There's a few articles on games like that here: http://academiccomputing.wordpress.com/category/programming-games/ (though he's only done 3, and one is a board game).

Internet
17-10-2012, 04:11 AM
Space chem uses basic programming logic.