Author Topic: Scripting  (Read 3408 times)

Uhfgood

  • Regular
  • **
  • Posts: 26
    • AOL Instant Messenger - Uhfgood
    • View Profile
    • Indie Flux
Scripting
« on: 2006-01-25, 12:26:34 AM »
I noticed alot of messages where people say they try to avoid scripting, and also where Mr. Marty says he can't understand why people won't give it a chance.  One of the things I did before starting on the tutorial is to read all the documentation including the docutorial on the vb script as related to SGDK.  From the example of the "SIMPLE" bullet shooting via script I can tell you that it's not so simple.  I'm a programmer, and have been for a while now (try over 10 years) however i've only programmed in Pascal, BlitzBasic, and C.  Nothing to do with OO languages (I'm just starting to learn c++ now).  But I'll have to admit the scripting with gamedev seems a bit complex.

Short Answer - Half if not most of the people making games with this are probably not programmers (from what i've gathered, i've been reading before I registered).  Those that are probably don't want to be bothered by learning yet another language.  As scripting is indeed programming, some people don't want to learn a whole new language just to make the games.  This is why your kit is so popular is because no programming is necessary.

A suggestion would be to make a series of tutorials that start with the simplest chores to the more complex.  This way someone could learn how to "program" the SGDK and not be pained to learn vb script.

Keith W. II aka Uhfgood
Keith Weatherby II
http://www.gamesafoot.com
Uhfgood -at- verizon -dot- net

Dr Obvious

  • Regular
  • **
  • Posts: 53
    • View Profile
    • http://www.drobvious.net
Re: Scripting
« Reply #1 on: 2006-01-25, 01:25:08 AM »
I think either very basic tutorials or better documentation would help.  Even with programming experience (my BS in computer science and even the other programmers who are actually quite good) the documentation isn't clear.  It takes quite a bit of work to figure out what goes where and the shooting script tutorial really doesn't help much unless you actually know what you're looking for and then it still doesn't help a lot.  I think maybe simple tutorials on sprite frame, shooting script, and raising special events with special funtion tutorials would help ease people into scripting and give them a base in which they could take further to better script their games.  Of course that's just me being random and sleep deprived.   :-\

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Scripting
« Reply #2 on: 2006-01-25, 06:20:00 AM »
For the record, I was the first to admit that the scripting documentation was woefully incomplete ;).  This was after I released the scripting reference but before the docutorial existed.  The docutorial may have helped a little ... it at least provided some more sample code that people could copy and paste from, but there's so much more to know.  For example, there is still no complete documentation of each object/function/property in the object model, and most of those functions probably don't have any sample code anywhere to demonstrate them.  But I just don't have the energy to write documentation that complete.  So I still rely on samples and forum questions/answers to be able to provide the answers people are looking for, which at least to some extent seems to have been working well for GuildHall teams.

I don't think I've ever been confused about people's hesitation to write script, but rather confused about people's hesitation to use it.  I know scripting isn't easy.  But if we provide the script that you can just copy/paste into your project, why would you hesitate to resort to script to solve a problem when scripting is an easier way for us to answer a question than thinking of a way to accomplish a task without script?  That's the part I don't understand.  Scripting may not be easy, but connecting an existing script to a project should be relatively easy by now.

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Re: Scripting
« Reply #3 on: 2006-01-25, 08:24:30 AM »
There are several "sample scripts" that could also help with what already exists in the form of the docutorial and scripting refference to help people understand scripting a little more.  And it's not like it's learning a completely new language.  It's just BASIC, which most programmers know as well as a lot of other people who you wouldn't peg as computer literate (i.e. my dad.  Arts administrator)

Scripting Examples
Edward Dassmesser

Uhfgood

  • Regular
  • **
  • Posts: 26
    • AOL Instant Messenger - Uhfgood
    • View Profile
    • Indie Flux
Re: Scripting
« Reply #4 on: 2006-01-25, 04:59:08 PM »
One thing I noticed when going through the tutorial, where you create a script to use spacebar to drop bombs.  Doesn't seem quite so difficult now.  Although it would still take me a while to get the hang of.  By the way how does the script wizard make scripting easier?

Keith
Keith Weatherby II
http://www.gamesafoot.com
Uhfgood -at- verizon -dot- net

cbass

  • Expert
  • Regular
  • *****
  • Posts: 97
  • script this
    • View Profile
    • Squest RPG
Re: Scripting
« Reply #5 on: 2006-01-25, 07:54:10 PM »
For all those that want to make "scripting" much much easier: :)

frankly, notepad sucks to write and debug code in.
if you are going to ever edit or write a script use this:
http://notepad-plus.sourceforge.net/uk/site.htm

It will at least give you line numbers for debugging, recolors different kinds of text different colors for easy reading. helps you indent, and a couple other things that are just better.


If you really want to make "scripting" easier, pick up a copy of Visual Basic 6.0 ( you should be able to get it free somehow if you are a college student.)  This will basically do everything notepad++ will do, but so much more.  It will auto-fill object hierarchies for you, which is probably the most confusing part of scripting for the beginner (either new to programming or just new to scripting SGDK.)  It really can't be understated how much of a help this is.  Literally, all you have to do is type "GdPlayer." and you have the whole engine at your fingertips.

Also, You will get much more detailed error messages and be able to step code to find errors easier without restarting the project.  It also makes objects much easier to deal with sense you don't have to worry about that .hostobj command for vbs.  Another benefit is you can split your code up among modules instead of having one big script file to have to scroll up and down on.

If you have visual basic and want to try it

Look at this thread for download of a fully working example and how to use it:
http://gamedev.comdel.net/index.php?topic=658.0

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Re: Scripting
« Reply #6 on: 2006-01-25, 09:38:35 PM »
The scripting wizard does the scripting for certain functions for you.  If you take a look, you can specify what you want to do, and it will generate a script to do it for you for three different categories right now:  Player Shooting, Record and Playback, and a Radar.  The original idea was to make an easily-modifyable program so people could make other categories for the scripting wizard.

So basically it makes scripting easier by doing it for you. (But only for certain things).  We make the scripting easier for you by doing it for you for the rest :P
Edward Dassmesser