Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Script Help Splitting cycles - best scripting habits.
Cranky Old Man Offline
Posting Freak

Posts: 986
Threads: 20
Joined: Apr 2012
Reputation: 38
#4
RE: Splitting cycles - best scripting habits.

(05-07-2012, 12:16 PM)Your Computer Wrote: Like other scripting languages, AngelScript parses scripts into bytecode before doing any further work with the code. This, obviously, makes things run a lot faster than, say, constantly searching through the source code for the required definitions. This allows programmers to spend less time improving their code and more time writing code. But if you're really worried about efficiency, then you should do research on DRY (don't repeat yourself) and KISS (keep it simple, silly).
Yes, well, say we have an object like a key. If I use an interact callback (with SetEntityPlayerInteractCallback()) and every object already comes with empty CallbackFunc properties, then I would be going against DRY by creating a whole new function without using the one already there.
I've decided to go with interact callbacks, and tie them all together into a single function later, but if this method is somehow deprecated in HPL3 because it wasn't how the developers figured it would be, then I'd have a hard time converting to the next engine.

Noob scripting tutorial: From Noob to Pro

05-07-2012, 12:35 PM
Find


Messages In This Thread
RE: Splitting cycles - best scripting habits. - by Cranky Old Man - 05-07-2012, 12:35 PM



Users browsing this thread: 1 Guest(s)