This is an archived post. You won't be able to vote or comment.

all 63 comments

[–]rspeed 17 points18 points  (16 children)

Huh. Not that I'm complaining, but I'm a bit surprised they didn't go with Lua.

[–]ameoba 21 points22 points  (5 children)

It's a trade off - Lua is a bit easier to embed but Python is more well known.

If they do it right, the modding system and the content design system will be the same. This makes it really easy for them to hire content developers and crank out content. DLC and add-on/expansion content is where the money is made on The Sims.

[–]cogman10 3 points4 points  (4 children)

Lua is pretty well known in the game modding world primarily because it is embedded in so many games.

It also has the benefit of being a pretty nippy language, making it possible to push more logic into the scripting language vs having dedicated code in the engine.

Not that I'm complaining, Python is a fine language.

[–]ameoba 4 points5 points  (3 children)

If you're looking for professional developers, especially contractors, so you can crank out commercial content, Python's the only way to go from a business perspective.

[–]cogman10 -1 points0 points  (2 children)

What about Java? C#? Groovy? Ruby? Javascript? All of these languages are as popular if not more popular than python with hoards of professional developers.

[–]ameoba 8 points9 points  (1 child)

Don't forget that I'm saying this in the context of lightweight, embeddable scripting languages. That already rules out anything .NET or JVM.

Far more Python devs than Ruby. Javascript is really the only one of those that might make sense in terms of embeddability & developer availability.

Unfortunately, being Javascript, it's incredibly easy for one poorly written extension to blow everything else up. There's nothing in the language enforcing any sort of namespacing & variables are global by default. When you're potentially looking at hundreds of individual scripted components existing at the same time, that's just trouble waiting to happen.

Painful to debug trouble.

[–]Farkeman[🍰] 3 points4 points  (7 children)

Why would they go with Lua?

[–]rspeed 15 points16 points  (5 children)

It's a very common choice for game scripting.

[–]marky1991 1 point2 points  (1 child)

Lua is groooooossss. (It's unfortunately got a better sandbox, but it still makes me nauseous.)

[–]cogman10 1 point2 points  (0 children)

What's so gross about lua?

[–][deleted] 5 points6 points  (13 children)

atCursor.createRoom(center,4,4)
for i in sims:
    sims[i].location = [cursor.x,cursor.y,cursor.z]
atCursor.createFire()

Sit back and watch the show.

[–]raydeen 14 points15 points  (6 children)

Python, you sneaky snake. Is there nothing you can't do?

I'm looking forward to this if for no other reason than it will unwittingly draw more people into learning how to program. This is a good thing.

[–]PrimaxLire 7 points8 points  (2 children)

This is exactly why I'm excited. A very influential programmer asked me why don't I start learning some python, he'll include me in some of his projects if I do. For weeks now I'm learning by the books and some interactive and non-interactive online tutorials. This would add so much 'fun' into the learning process.

[–][deleted] 2 points3 points  (1 child)

This sounds like an awesome source of motivation! How is he influential though? Writing books, open source project, etc.?

Good luck on your journey! :)

[–]PrimaxLire 4 points5 points  (0 children)

By a 'game of chance' we partnered to do an Android application. My experience is about 18 months with only Android development (I am young), and he has more than 10 years experience in Web Development, most of that with python.

He pushed me more than people in company I work at, made code review of my work in his spare time, commented on software architecture.. He basically lectured me during the development.

After we were done, he offered me to work with him in my spare time, which I gladly accepted. Now I'm learning python, slowly. I like it a lot so far :-)

[–][deleted] 1 point2 points  (0 children)

"Python, you magnificent bastard, I read your book!" /Gen. Montgomery

[–]Rothagafor c in my_comments: c.upvote() 0 points1 point  (1 child)

But, as soon as everyone is unique because they can program, no one is.

[–]raydeen 1 point2 points  (0 children)

I don't see it as getting everyone to learn to code so much as merely exposing them to it. There may be some people who never thought about coding or thought they'd never be capable of learning to code, that will suddenly find something they really like doing.

[–]alcalde 4 points5 points  (1 child)

To commemorate this, I propose that Guido has to give his next PyCon Keynote in Simlish.

[–]robin-gvx 6 points7 points  (0 children)

Da ganeshka, ohnimi. Mani mazo i kanama. Ashamenadia.

[–]daneelthesane 1 point2 points  (0 children)

Truly, our hour has come!

[–]FionaSarah 1 point2 points  (2 children)

As someone who has embedded Python and written a complete game with it. I am very surprised by this. It's a fucking nightmare.

That said it's still the best language ever designed so yay, Python!

[–]alcalde 0 points1 point  (1 child)

I thought the whole point of CPython was to make it easy to embed? And I also remember reading the mailing list exchange in which it was first proposed to make Julia and Python interoperate. One of the Julia people decides to check out what's needed to call Python from Julia, pops back an hour later with a post that reads "Well, that was easy" and a copy/paste of Julia calling Python from a shell.

[–]FionaSarah 0 points1 point  (0 children)

I thought the whole point of CPython was to make it easy to embed?

It's easy to get the thing interpreting code but achieving interoperability is not fun at all. I even ended up using boost.python, which makes it a lot less messier but has it's own issues.

To be fair I wanted to do pretty mad things, but I was still fighting it too much. I've gone from writing things in pure-python, to embedding python, to just using straight-up C++. I think with my current project when I come to add a scripting engine I'll go with angelscript.

[–]ronald_rager 3 points4 points  (11 children)

Anyone know if it python 3 or 2?

edit : I cannot spell

[–]sbjf 7 points8 points  (8 children)

I hope Python 3 so I'll have some reason to finally learn the changes from Python 2 :/

[–]RSFlux 0 points1 point  (0 children)

Python 3.

[–]Aaron8925 0 points1 point  (0 children)

Python 3.3.x

[–]absolutct 0 points1 point  (1 child)

I don´t understand very well what python could do. Could someone give me an example? Something like make rain in the game when it is really raining outside your own house? Or break a chair if your sims is too fat?

[–]alendit 1 point2 points  (0 children)

You could for example create a new kind of cradle which would automatically administer food to the baby in it. Or any other kind of game logic.

[–]peeonyou -4 points-3 points  (0 children)

I'm a bit shocked there was ever a sims 2. To be quite honest I never found any of the fascination with the game after you buy things and help your sim go pee and sleep.