![Wink ;)](./images/smilies/grayscale_wink.gif)
[LOOM] Loom - A Mystical Adventure Game
Moderator: MaxCoderz Staff
-
- Calc Master
- Posts: 1089
- Joined: Fri 17 Dec, 2004 9:53 am
-
- Calc King
- Posts: 2195
- Joined: Sun 27 Mar, 2005 4:06 am
- Location: sleeping
- Contact:
- L4E_WakaMol-King
- Maxcoderz Staff
- Posts: 342
- Joined: Tue 01 Nov, 2005 6:34 am
Just thought I'd post a screenshot so you can see how the scene scripting engine is going. It's not much to look at yet, but it gives you the general idea.
![Image](http://img84.imageshack.us/img84/1750/ptiani17ii.gif)
![Image](http://img84.imageshack.us/img84/1750/ptiani17ii.gif)
![Image](http://img222.imageshack.us/img222/3711/forumsig6ww.gif)
- L4E_WakaMol-King
- Maxcoderz Staff
- Posts: 342
- Joined: Tue 01 Nov, 2005 6:34 am
Sure, though it probably won't be of any use to anyone else. ![Confused :?](./images/smilies/grayscale_confused.gif)
The way it is set up is as follows:
call script_name
.db parameter_1, parameter_2, etc...
When a procedure is called, it does a "pop hl" and reads in the parameters for the function. Then it increments hl and pushes it, so that when the function hits a "ret" statement, it will jump back to the instruction after the parameters. This was the most space efficient and convenient method I could devise.
Right now I only have a handful of script procedures, and I probably won't need very many in the end. Here's a rundown in psudocode:
- Create Character (location, normal sprite, talking sprite)
This creates a "character" that is represented by the sprite normal sprite. It draws the character at location.
- Character Talk (character number)
This sets up an animation so that the character's sprite toggles back and forth between normal sprite and the talking sprite. Then it calls the Display function.
- Wait (cycles)
Does nothing for cycles number of animation cycles.
- Set Text Pointer (text label)
Sets the text pointer to the next block of text.
- Display
Displays a block of text pointed to by the text pointer.
There's little variations on these for convenience... like a wait_1 method that waits only 1 cycle and display methods of different langths (for sentences that take longer to read)... but you get the idea.
Adding animations into the scenes is going to be tricky. That's what I tackle next.
![Confused :?](./images/smilies/grayscale_confused.gif)
The way it is set up is as follows:
call script_name
.db parameter_1, parameter_2, etc...
When a procedure is called, it does a "pop hl" and reads in the parameters for the function. Then it increments hl and pushes it, so that when the function hits a "ret" statement, it will jump back to the instruction after the parameters. This was the most space efficient and convenient method I could devise.
Right now I only have a handful of script procedures, and I probably won't need very many in the end. Here's a rundown in psudocode:
- Create Character (location, normal sprite, talking sprite)
This creates a "character" that is represented by the sprite normal sprite. It draws the character at location.
- Character Talk (character number)
This sets up an animation so that the character's sprite toggles back and forth between normal sprite and the talking sprite. Then it calls the Display function.
- Wait (cycles)
Does nothing for cycles number of animation cycles.
- Set Text Pointer (text label)
Sets the text pointer to the next block of text.
- Display
Displays a block of text pointed to by the text pointer.
There's little variations on these for convenience... like a wait_1 method that waits only 1 cycle and display methods of different langths (for sentences that take longer to read)... but you get the idea.
Adding animations into the scenes is going to be tricky. That's what I tackle next.
![Image](http://img222.imageshack.us/img222/3711/forumsig6ww.gif)
-
- Calc Master
- Posts: 1089
- Joined: Fri 17 Dec, 2004 9:53 am
- L4E_WakaMol-King
- Maxcoderz Staff
- Posts: 342
- Joined: Tue 01 Nov, 2005 6:34 am
Yeah, I really should lol.
Sorry there have been no updates lately. It's exam time for summer classes, plus I have 3 big projects to work on and 2 jobs that I am doing for pay. To be honest I probably won't be able to do much more work on Loom for about 2 - 3 weeks. After that, I will be done with most of my projects and all of my exams, and I won't be in school for a month, so I will be back to my normal rate
.
Sorry there have been no updates lately. It's exam time for summer classes, plus I have 3 big projects to work on and 2 jobs that I am doing for pay. To be honest I probably won't be able to do much more work on Loom for about 2 - 3 weeks. After that, I will be done with most of my projects and all of my exams, and I won't be in school for a month, so I will be back to my normal rate
![Wink ;)](./images/smilies/grayscale_wink.gif)
![Image](http://img222.imageshack.us/img222/3711/forumsig6ww.gif)