Follow TV Tropes

Following

Coding/Programming

Go To

Aprilla Since: Aug, 2010
#1201: Jan 25th 2015 at 7:19:35 PM

Python is a good starter language. You can make some decent games with it, but you obviously shouldn't expect something along the lines of a AAA Ubisoft game. I just finished my Python course last semester and I'm making a second go at C++. C++ is a considerably more difficult language, but it's also much more versatile.

Alichains Hyaa! from Street of Dreams Since: Aug, 2010 Relationship Status: Sinking with my ship
Hyaa!
#1202: Jan 25th 2015 at 7:21:23 PM

I have a question is there any advice for learning Ruby?

ch00beh ??? from Who Knows Where Since: Jul, 2010
???
#1203: Jan 25th 2015 at 10:30:26 PM

We code up about 60% of our backends with python. I am not best friends with the language, but it is plenty powerful for the real world. When you need high performance, you can drill down to C or assembly, but you are actually more productive when writing the other 90% of your code with a high level language.

"Never let the truth get in the way of a good story." Twitter
ArsThaumaturgis Since: Nov, 2011 Relationship Status: I've been dreaming of True Love's Kiss
#1204: Jan 26th 2015 at 6:01:39 AM

Regarding Python, if you get a decent engine that uses Python as a scripting language—I use Panda3D, myself—then you might be surprised at the quality that can be achieved.

(That said, it might be worth noting that as far as I'm aware, Panda's internal workings are handled by C++. Additionally, highly intensive features—elements that involve fast iteration over thousands of objects, for example—might be better handled on the C++ side, too.)

edited 26th Jan '15 6:02:03 AM by ArsThaumaturgis

My Games & Writing
ch00beh ??? from Who Knows Where Since: Jul, 2010
???
#1205: Jan 26th 2015 at 8:24:41 AM

Thousands of objects are fine with python. I have never found python code to be the constraint before network or database I/O became a problem.

"Never let the truth get in the way of a good story." Twitter
ArsThaumaturgis Since: Nov, 2011 Relationship Status: I've been dreaming of True Love's Kiss
#1206: Jan 26th 2015 at 9:06:12 AM

It might depend on the machine, and what other constraints you have. I haven't dealt much with databases or networks in my own projects, but do seem to recall having large loops, repeated on each update, slow things down a bit in the context of a game. That was on a somewhat weak machine, I will admit.

For the sake of clarity, I should perhaps mention that a once-off (or infrequent) large loop may well be fine; attempting to implement a particle engine in Python might be a bit much if required to iterate over thousands of particles each frame, I feel, especially if paired with a non-trivial game taking up at least some CPU-time.

edited 26th Jan '15 9:08:30 AM by ArsThaumaturgis

My Games & Writing
Tangent128 from Virginia Since: Jan, 2001 Relationship Status: Gonna take a lot to drag me away from you
#1207: Jan 26th 2015 at 2:18:53 PM

For learning programming, something like Scratch might be useful. It uses snap-together blocks so you don't have to worry about typos at first, but still uses variables, expressions, etc, in a traditional manner.

As far as practical languages, I am a solid fan of the Lua+C combo. (Lua makes writing modules in C very straightforward.)

Do you highlight everything looking for secret messages?
ArsThaumaturgis Since: Nov, 2011 Relationship Status: I've been dreaming of True Love's Kiss
#1208: Jan 26th 2015 at 2:46:26 PM

@Tangent: I haven't used Lua, let alone in combination with C: does the combination reduce the complexity, and handle the low-level issues (pointers, etc.) that usually come with C? My concern is that, as I recall it, C is not a wonderfully beginner-friendly language.

My Games & Writing
Tangent128 from Virginia Since: Jan, 2001 Relationship Status: Gonna take a lot to drag me away from you
#1209: Jan 26th 2015 at 5:56:11 PM

Mostly, yes. When Lua calls into your C functions, it's set up such that Lua "owns" pretty much every pointer you deal with, so if you use it idiomatically, then everything is garbage-collected by Lua for you.

Lua itself is a pretty high-level language, first-class functions and all. It uses a single complex data type for everything, the "table", which is basically a key-value map. Use integer keys if you need an array, store functions in it if you want an object with methods, it actually works pretty well. ("metatables" let you intercept undefined mappings for more classical object-class behavior.)

So basically, take the good pats of Javascript, remove most of the wtfs, give it Pascal syntax, and code the interpreter to run on almost every computing platform in the world.

edited 26th Jan '15 6:00:11 PM by Tangent128

Do you highlight everything looking for secret messages?
ArsThaumaturgis Since: Nov, 2011 Relationship Status: I've been dreaming of True Love's Kiss
#1210: Jan 27th 2015 at 7:14:49 AM

Ah, that's pretty cool! Without having seen it myself I'm hesitant to recommend it, but based on your description it does sound like it could be pretty beginner-friendly. ^_^

My Games & Writing
Fluid Since: Jan, 2001
#1211: Jan 31st 2015 at 1:19:37 PM

One thing I REALLY had to get used to when writing Python was the importance of whitespace. Every other language I write in just ignores it.

ArsThaumaturgis Since: Nov, 2011 Relationship Status: I've been dreaming of True Love's Kiss
#1212: Feb 1st 2015 at 6:22:31 AM

Heh, that can take some getting used to—but I do like it, and think that it may make Python especially good as a language for beginners by virtue of instilling a habit of indenting one's code.

edited 1st Feb '15 8:42:31 AM by ArsThaumaturgis

My Games & Writing
ch00beh ??? from Who Knows Where Since: Jul, 2010
???
#1213: Feb 1st 2015 at 1:54:06 PM

i don't like the whitespace thing because a tab is interpreted differently than spaces but you can't see the difference with your eyes.

"Never let the truth get in the way of a good story." Twitter
Linhasxoc Since: Jun, 2009 Relationship Status: With my statistically significant other
#1214: Feb 1st 2015 at 5:07:36 PM

I actually just taught myself a bit of Python just now. I wrote a program to give me a list of Green Stars to get in a playing session each time I run it.

edited 1st Feb '15 5:08:00 PM by Linhasxoc

ArsThaumaturgis Since: Nov, 2011 Relationship Status: I've been dreaming of True Love's Kiss
#1215: Feb 3rd 2015 at 6:32:24 AM

i don't like the whitespace thing because a tab is interpreted differently than spaces but you can't see the difference with your eyes.
That's fair enough, although it seems like something that a decent IDE could take care of, either converting spaces to tabs (or vice versa) or simply marking out the whitespace, perhaps with a subtle dot between each.

I actually just taught myself a bit of Python just now. I wrote a program to give me a list of Green Stars to get in a playing session each time I run it.
Well done! ^_^

Heh, you remind me of little applications of Python that I've made in the past, in particular a brute-force approach to solving a particular word-puzzle from The Fool's Errand, and printing out a set of steps to solve a larger Towers of Hanoi puzzle than I cared to solve by hand (which was presented in another game)...

My Games & Writing
ch00beh ??? from Who Knows Where Since: Jul, 2010
???
#1216: Feb 3rd 2015 at 8:49:50 AM

Vim is my primary driver and while it can do that, the reason I learned vim was because at my previous job, I was spinning up a new virtual machine every few hours for testing and had to play with them over ssh rather than through a gui. At that point you force yourself to be as lean as possible.

Same deal at my current job, kinda. If I want to whip up a script on one of our production read boxes or someone else's dev machine, I don't want to install anything beyond what is already there, nor do I want to touch any settings.

It's kind of a weird reason, but yeah. between that, the inconsistent naming in fire core libraries, the obnoxious ternary statement, and various other things, I'm not really friends with python, but I am otherwise okay with using it every day.

"Never let the truth get in the way of a good story." Twitter
ArsThaumaturgis Since: Nov, 2011 Relationship Status: I've been dreaming of True Love's Kiss
#1217: Feb 3rd 2015 at 3:09:46 PM

Fair enough, that makes sense, I believe.

In my case, I use Stani's Python Editor—not perfect, but quite usable, I've found. I think that I have it set to automatically convert tabs to spaces.

I'll confess that I looked up the ternary operator (my terminology may be a little rusty ^^; )—I take it that you mean the "?:" operator? It's not one that I would be likely to use—I find it a little counterintuitive, I suppose—but, having looked it up, I do think that I see what you mean, in that it seems to be rather different to the usual syntax.

My Games & Writing
Meklar from Milky Way Since: Dec, 2012 Relationship Status: RelationshipOutOfBoundsException: 1
#1218: Feb 3rd 2015 at 4:31:38 PM

For the record, I recommend against starting with Python. It has a special syntax that isn't really shared by any other language, and it hides a lot of rather important stuff inside black boxes. The latter might not be such an issue for someone who just wants to do simple game programming and doesn't care about the more intricate parts of computer science and algorithm design, but both characteristics will make it harder to move to any other language later on.

Join my forum game!
ch00beh ??? from Who Knows Where Since: Jul, 2010
???
#1219: Feb 3rd 2015 at 11:47:19 PM

I'm curious about which black boxes you mean.

personally, I find I learn best when I see what a wheel is supposed to do before I try to reinvent it. Or sometimes I just want to learn how to build a cart.

"Never let the truth get in the way of a good story." Twitter
Meklar from Milky Way Since: Dec, 2012 Relationship Status: RelationshipOutOfBoundsException: 1
#1220: Feb 4th 2015 at 2:43:04 PM

I'm curious about which black boxes you mean.
I've hardly used Python at all and I don't remember all of the terminology. But the last time I looked through a tutorial for it, I noticed that there were a lot of ready-made data structures provided, with high-level default methods oriented towards particular styles of usage, and no indication of how they're implemented or what their performance properties are. The assumption seemed to be that you're supposed to use these without even thinking about trying to understand them.

Join my forum game!
Linhasxoc Since: Jun, 2009 Relationship Status: With my statistically significant other
#1221: Feb 4th 2015 at 4:29:38 PM

I think it depends on your philosophy towards teaching programming and/or computer science. I lean towards the school of "start with the high-level concepts, then make your way down as you go." So for an aspiring programmer, I'd start out with something that doesn't make you think about low-level details like Python. (Java is OK too, but it has some issues.) Once you've mastered the high-level concepts I'd move on to something like C, and from there a bit of computer architecture. Once you get the whole picture, you can then better understand more advanced topics.

Yes, that exactly how my college's CS department structured their curriculum, why do you ask?

ch00beh ??? from Who Knows Where Since: Jul, 2010
???
#1222: Feb 4th 2015 at 8:07:18 PM

There are, but the same can be said about java, and java is pretty accepted in the classroom. even c++ comes standard with the vector structure.

"Never let the truth get in the way of a good story." Twitter
ArsThaumaturgis Since: Nov, 2011 Relationship Status: I've been dreaming of True Love's Kiss
#1223: Feb 5th 2015 at 6:42:47 AM

I'm inclined to agree with Linhasxoc, I believe: it seems to me to be a good idea for a beginner to start with a language that allows them to learn the fundamentals of programming without having to worry about too many various low-level concerns; to start with a relatively simple environment in which to work. Thus, when they move on to more difficult languages they already know the basics and can concentrate on picking up the complexities.

(And yes, that was how my Computer Science degree taught it too, starting with Java before moving on to C++, as I recall.)

edited 5th Feb '15 6:43:04 AM by ArsThaumaturgis

My Games & Writing
KylerThatch literary masochist Since: Jan, 2001
literary masochist
#1224: Feb 5th 2015 at 7:18:24 AM

It almost seems like people are making their suggestions based on how they personally learned to code. tongue

Except for me, it would be the opposite. I actually picked up C first, then C++, then Java, then Python (not in college, but from a startup company I was involved in part-time).

edited 5th Feb '15 7:19:31 AM by KylerThatch

This "faculty lot" you speak of sounds like a place of great power...
Tangent128 from Virginia Since: Jan, 2001 Relationship Status: Gonna take a lot to drag me away from you
#1225: Feb 5th 2015 at 7:38:52 AM

I started really learning with Forth and Javascript.

Anybody who knows Forth will find that a probably hilarious combination, but it was effective tongue

Do you highlight everything looking for secret messages?

Total posts: 1,462
Top