HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: Learning HSL: a discussion on how to approach learning HeroScript  (Read 4540 times)

mcacciatore116

  • General Accounts
  • *
  • Posts: 4
    • View Profile

Hey guys, it looks like I am going to be the only programmer on my project because my other programmer on my team had to take some time off for personal reasons (school, girlfriend, etc.)  and I was just wondering what is the best way to learn HSL for someone who doesn't know C++?  Would it help me to learn C++ so that I can learn the basics of that language and then finally dive into the HSL wiki to actually start coding for the game?

If this is not the best way to learn then what would be?  When I look at the HSL wiki for beginners I can make the script, but I dont know why I typed what I typed other than "the tutorial told me to." I haven't coded anything in about 3-4 years so I'm a little rusty.  Thanks!

-Michael

« Last Edit: Jan 23, 13, 11:03:31 AM by HE-Cooper »
Logged

JMurdick

  • General Accounts
  • *
  • Posts: 54
    • View Profile
Re: Learning HSL
« Reply #1 on: Nov 29, 11, 01:12:26 PM »

I wouldn't recommend learning another language to help you with HSL personally.  I'd just recommend learning HSL.  Read lots of the wiki, look at how scripts are written in HJRef, etc.
Logged

Tythin4

  • General Accounts
  • *
  • Posts: 39
    • View Profile
Re: Learning HSL
« Reply #2 on: Nov 29, 11, 01:13:41 PM »

And dont forget to attempt to write your own
Logged

HE-ANDY

  • World Owner
  • ****
  • Posts: 169
    • View Profile
Re: Learning HSL
« Reply #3 on: Nov 29, 11, 01:56:30 PM »

Most importantly, be willing to spend 40 hours a week (or more) practicing your new craft of programming and design.

Get a book on programming challenges, start with the simple ones that "everyone gets right" and work at it until you get them right, too.
Logged

mcacciatore116

  • General Accounts
  • *
  • Posts: 4
    • View Profile
Re: Learning HSL
« Reply #4 on: Nov 29, 11, 02:57:41 PM »

Awesome, thanks for the input! As for the book, do you recommend a specific one or would any one be good?
Logged

HE-ANDY

  • World Owner
  • ****
  • Posts: 169
    • View Profile
Re: Learning HSL
« Reply #5 on: Nov 29, 11, 03:26:09 PM »

I have several thousand books, of which about 100 compose my professional library of programming books that I will refer to in the course of my job in a year's time.   (I have fun reading books, and have reached a point where, in most books or online articles, I can nitpick the errors from the text.)

None of these are beginning-level books, unfortunately.

Logged

HE-ANDY

  • World Owner
  • ****
  • Posts: 169
    • View Profile
Re: Learning HSL
« Reply #6 on: Nov 29, 11, 05:31:11 PM »

You may find this site useful for building up your programmer-fu:

http://projecteuler.net/problems
Logged

mcacciatore116

  • General Accounts
  • *
  • Posts: 4
    • View Profile
Re: Learning HSL
« Reply #7 on: Nov 29, 11, 08:04:14 PM »

Thanks so much! Really appreciated
Logged

HE-CHRISTOPHER

  • HeroEngine
  • *****
  • Posts: 424
    • View Profile
Re: Learning HSL
« Reply #8 on: Nov 29, 11, 09:26:06 PM »

Try following the various tutorials on our wiki...

http://hewiki.heroengine.com/wiki/Scripting_Tutorials

As mentioned, solving problem is one of the best ways to learn.  With regards to HeroScript specifically, other scripting languages will provide a level of insight but are not precisely analogous to HSL.  There are similarities to C# and some to Python, but really HSL is simply a high level scripting language and you can pretty much dive into it.

However, once you understand the basics you can accelerate your way towards mastery by reading.  Read books, read documentation on open source projects, read code, read blogs and then think about it all.

For anyone aspiring to producing professional code, even though these are not specific to HSL reading these will make you a better programmer in any language because they make you think about what code is/does and what kinds of trade-offs might be involved with some architectural choices.


Read these...thank me later
Code Complete: A Practical Handbook of Software Construction version 2 by Steve McConnell (just read it)
Design Patterns: Elements of Reusable Object-Oriented Software by Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides (also known as the GoF "Gang of Four")
Head First Design Patterns by Elisabeth Freeman, Eric Freeman, Bert Bates and Kathy Sierra (easier to read than the GoF, but you score less geek points)

Well worth the time because they make you think about how YOUR language handles the same problems...
Effective C++ by Scott Meyers
More Effective C++ by Scott Meyers
Effective STL by Scott Meyers
Exceptional C++ by Herb Sutter
More Exceptional C++ by Herb Sutter

Senior Engineers...
Large-Scale C++ Software Design by John Lakos (dated in some respects, but full of stuff a senior engineer should know)

Websites related to Game Development...
http://gamedev.stackexchange.com/ (reading other people's questions and the responses will help you think about your problems, also the other stackexchange subcategories such as math, stackoverflow, and physics can be useful too)
http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/  (interesting and worth the read for ideas, please do not read this as a specific recommendation to use this architecture for your game)

For laughs...

http://coderoom.wordpress.com/2010/03/19/5-stages-of-programmer-incompetence/

Understand the things you do not know and be willing to acknowledge those holes, perform research and ask for help.

Also, just because someone on the internet says "THIS IS THE ONE TRUE WAY!" does not make their solution appropriate for your problem.  Take the time to understand the design requirements and trade-offs made by potential solutions before using them.

Lastly, shipped code has a quality all of its own.
« Last Edit: Nov 29, 11, 09:36:32 PM by HE-CHRISTOPHER »
Logged
Christopher Larsen
CTO
HeroEngine