Jump to content


Photo
- - - - -

8-Directional RPG Engine


  • Please log in to reply
16 replies to this topic

#1 Kylo

Kylo

    GMC Member

  • GMC Member
  • 118 posts

Posted 23 September 2010 - 05:07 PM

  • Title: 8-Directional RPG Engine
  • Description: Text box that types, advances the text with an input, and allows embedded code actions.
  • GM Version: GM8
  • Registered: No
  • File Type: .gmk
  • File Size: 125.5 KB
  • File Link: http://www.box.net/shared/d7492z4rk4
Additional Info

This is a little walkabout engine I made that comes with basic NPCs, 8-directional walking with running as well with the Shift key, and a text box that types like in Pokemon. But there's a lil twist with the text box: you can insert code into the dialog and have it execute as it's being typed! For example, you could do like Master Roshi does in Dragonball Z Abridged using simple code like this:
say("$object.sprite_index=sprCrunch;%Now it's a Nestle Crunch bar!#$object.sprite_index=sprGummy;%Now it's a gummy bear!#$object.sprite_index=sprNappa;%Now it's Nappa!");

The way this works is simple. The $ represents the start of a code snippet. When this is hit, the txtbox will stop entering text into the display and instead add it into a code string. Then when % is reached, the code is executed, and the text entry goes back to normal. The one drawback is you can't put nested strings into the code because if you use " you have to use ' for the internal string, and vice-versa. Since GM doesn't support \", nesting strings of the same quotation can't be done. An example of this is shown in the tut where a sign will turn a guy into a tree when you talk to it.

The # still acts as a newline character, and the | is a cls character. I think that's all now. I realize the text box's word wrap isn't the best, but the only other version I could find was one where the word was printed and then moved to the next line, which didn't look right to me. I'll work on something better and update later. K, that's all.
  • 4

#2 xot

xot

    GMC Dismember

  • Retired Staff
  • 4772 posts
  • Version:GM:Studio

Posted 01 October 2010 - 05:45 PM

This is pretty nice! Great features and the embedded code allows almost anything imaginable.
  • 0

#3 BrennerCampos

BrennerCampos

    GMC Member

  • New Member
  • 16 posts
  • Version:GM:Studio

Posted 03 October 2010 - 03:45 PM

awesome awesome awesome :lol:
  • 0

#4 B Factory LLC

B Factory LLC

    We're awesome!!

  • New Member
  • 511 posts

Posted 03 October 2010 - 04:17 PM

This is great. I'll fool with this for a couple hours.. Maybe we could make something!
  • 0

#5 lasttea999

lasttea999

    GMC Member

  • GMC Member
  • 290 posts

Posted 04 October 2010 - 12:38 AM

Very cool! It's so smooth!
  • 0

#6 B Factory LLC

B Factory LLC

    We're awesome!!

  • New Member
  • 511 posts

Posted 09 October 2010 - 10:18 PM

Just curious; where are the sprites from?
  • 0

#7 Candlejack

Candlejack

    GMC Member

  • New Member
  • 96 posts

Posted 10 October 2010 - 04:27 AM

Wow. Great job man, the embedding code in the text box was a wonderful idea!
  • 0

#8 Desert Dog

Desert Dog

    GMC Member

  • Retired Staff
  • 6409 posts
  • Version:Unknown

Posted 10 October 2010 - 05:12 AM

Hey, this is pretty cool! I'm going to have to see about having the text speed up when you hit space-bar, though. Otherwise, really like it.
  • 0

#9 FlashMario

FlashMario

    GMC Member

  • New Member
  • 3 posts

Posted 27 October 2010 - 12:43 PM

Great, im maybe going to use this in my games! :D
  • 0

#10 lbweb151

lbweb151

    GMC Member

  • New Member
  • 87 posts

Posted 29 October 2010 - 04:37 AM

Nice example. And perfect if you are going to use Reiner's sprites.
  • 0

#11 Kylo

Kylo

    GMC Member

  • GMC Member
  • 118 posts

Posted 06 September 2011 - 02:55 AM

Hey, this is pretty cool! I'm going to have to see about having the text speed up when you hit space-bar, though. Otherwise, really like it.


For that, I'd say increase the room speed then while space is pressed, set the delay to 1, else set it to 2.

Just curious; where are the sprites from?

The characters are from Pokemon Ranger. I don't know where the trees are from.
  • 0

#12 goldage5

goldage5

    GMC Member

  • GMC Member
  • 152 posts

Posted 07 September 2011 - 04:53 PM

it says unregistered....but when the game starts up...i get this error message:



___________________________________________
EXECUTION ERROR in creation code of room room0
In script scrInit:
Error in code at line 4:
FONT=font_add_sprite(sprFont,33,1,2);
^
at position 7: This function is only available in the Pro Edition.


and...when i try talking to someone..its just a blank textbox.
  • 0

#13 acidic055

acidic055

    GMC Member

  • New Member
  • 249 posts

Posted 11 September 2011 - 02:16 PM

This tutorial/example is great! Nice and smooth and versatile. Except, for the fact that there is no way to call on a variable within text? Is there ANY way around this?
Another question, I can't seem to find where you put in text for the guy that speaks for ages.....or any of the other people speaking except for the video game guy :P
Overall, very good. I may use this if I can call on variables "in text" somehow. Thanks :)
  • 0

#14 turgon

turgon

    VP Studios

  • GMC Member
  • 445 posts
  • Version:GM:Studio

Posted 20 March 2012 - 03:31 PM

Great tutorial. Very useful and excellent idea!
  • 0

#15 ghest1138

ghest1138

    GMC Member

  • New Member
  • 4 posts
  • Version:GM8

Posted 20 April 2012 - 07:12 PM

very nice, although the text color was set to white, so it did not show up in the text box.

it says unregistered....but when the game starts up...i get this error message:



___________________________________________
EXECUTION ERROR in creation code of room room0
In script scrInit:
Error in code at line 4:
FONT=font_add_sprite(sprFont,33,1,2);
^
at position 7: This function is only available in the Pro Edition.


and...when i try talking to someone..its just a blank textbox.






I managed to fix that. like i said below, the text color was set to white, so you need to set it to black or something. also, about the pro edition error, just delete that line. it won't alter the gameplay at all.
  • 0

#16 Silver Scratch

Silver Scratch

    GMC Member

  • GMC Member
  • 166 posts
  • Version:GM8

Posted 20 April 2012 - 08:59 PM

Wow! Very awesome! Keep up the good work!
  • 0

#17 bowlda

bowlda

    GMC Member

  • GMC Member
  • 21 posts

Posted 11 May 2012 - 03:50 PM

just a newbie here, but i was wondering, what code actually shows when to change the player's sprite based on the direction he/she is moving? Thanks!
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users