Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: LCS coding tips?  (Read 1375 times)

Keigan

  • Bay Watcher
  • Death or Liberal
    • View Profile
LCS coding tips?
« on: September 26, 2013, 05:21:43 pm »

I've just started to script recently It's hard to learn the lanuge etc., Would anyone give me some tips or tricks to help me get along with it? Thanks!
Logged
- A Fat Liberal

Liberal Elitist

  • Bay Watcher
  • I'm more liberal than you are!
    • View Profile
    • The Liberal Crime Squad wiki
Re: LCS coding tips?
« Reply #1 on: September 27, 2013, 04:46:29 pm »

It's written in C++, so I'd recommend learning C++. There are many websites where you can learn C++.

Anyway, just read this tutorial here, it explains most stuff you need to know, and isn't very long to read. And yes, you'll want to read the whole thing, as pretty much all features of C++ explained in that tutorial are used in the code of Liberal Crime Squad. So you'll need to know all of the stuff in it if you want to make sense of the code.

Hope that was helpful. ;)

Oh yeah, one last thing... that tutorial explains the standard C++, standardized in the 1997, and revised very slightly in 2003. There is a different version of C++ that came out in 2011 with a bunch more features. Nowadays some C++ projects use the good old-fashioned C++97 (like Liberal Crime Squad), while other C++ projects are written in the newer version with more features, C++11 (called that because it came out in 2011). So if you find a reference or tutorial that is about C++11 rather than about C++97, DON'T READ IT, because half the stuff it tells you about won't work and this will be misleading to you and also frustrating. Just read references or tutorials about C++97 because that's what this game is written in. The reference I linked to above is a perfectly acceptable reference that tells about C++97 and not about C++11, I recommend reading it. Any C++ reference or tutorial written prior to the year 2011 should be fine. I am only warning you about this C++11 business because I had trouble with this problem myself. Some references and tutorials are available for BOTH versions of C++, the 1997 and 2011 versions. If you select the 1997 version in those you'll be fine.
Logged
The Liberal Crime Squad wiki is your friend.

Quote from: Lielac
Edit: Figured it out via a little bit of trial and error and oH MY GOD WHAT IS THIS MUSIC WHAT IS THIS MUSIC WHAT THE HECK IS IT SPACEBALLS MUSIC? WHATEVER IT IS IT IS MAGICAL

Keigan

  • Bay Watcher
  • Death or Liberal
    • View Profile
Re: LCS coding tips?
« Reply #2 on: October 02, 2013, 07:07:15 am »

Thanks! Sorry for the late reply I'll read it now though!
Logged
- A Fat Liberal