Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1]   Go Down

Author Topic: External Rooms & Objects (GM7)  (Read 4624 times)

0 Members and 1 Guest are viewing this topic.
External Rooms & Objects (GM7)
« on: October 08, 2007, 04:45:57 pm »
  • ZFGC Founder
  • *
  • Reputation: +2/-0
  • Offline Offline
  • Gender: Male
  • Posts: 470
Download:
external.zip (11.7KB)

I first create a room then set the size to 16x16 (just to keep it small). In the creation code of the room:



That's all I need to do in the .gmk file, now onto the externals.

The init.txt file contains gml code that is executed.


I have a small sprite with 7 tiles inside

I could have up to 224 tiles inside if I'd like to, as I'm using a sprite based font to tile the room. I use ord('A') as the first character so my sprite based font goes from A-G.

As you can see inside this file, I create a room and execute the code inside of the .txt file


I also set the caption and execute an object file.


Inside the objRoom0.txt file, you can see a long string of A's, etc. with #, my 256x224 pixel room is made up of 16x14 tiles, each represented by a tile in the sprite based font.

When laid out, these lines look like this


And when ran, the .gmk file looks like this.


You can edit this file to use as many layers as you'd like, just draw them in order in the object. You can also use this as a method to create spawn points for objects.
« Last Edit: December 27, 2007, 08:09:15 pm by 4Sword »
Logged
Re: External Rooms & Objects (GM7)
« Reply #1 on: October 08, 2007, 05:07:21 pm »
  • Fear my Blades
  • *
  • Reputation: +3/-0
  • Offline Offline
  • Gender: Male
  • Posts: 562
That's a rather unique way of going about it.  Any reason you went with a sprite based font rather than actual tiles besides than not having to convert the text from the file?

It's also important to note that executing an external text files is a huge security risk to your game.  Anyone with decent knowledge of GML could alter them to make your game do whatever they want, including dumping all your scripts, and resources to external files.
Logged

I've done it (sorta)!  Bloom Lighting in GameMaker, and 3D mode too!  Check out the awesome Screen Saver.
  • Kousou Games
Re: External Rooms & Objects (GM7)
« Reply #2 on: October 08, 2007, 05:08:50 pm »
  • ZFGC Founder
  • *
  • Reputation: +2/-0
  • Offline Offline
  • Gender: Male
  • Posts: 470
You can encrypt the external files, if you'd like. I went with sprite based fonts because you can have unlimited layers.

EDIT: The tutorial is just for ease of use.
« Last Edit: October 08, 2007, 05:12:48 pm by TheRealMethuselah »
Logged
Re: External Rooms & Objects (GM7)
« Reply #3 on: October 08, 2007, 06:31:12 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 6206
Awesome tutorial as always! you use this for OOT2D?
Logged
Re: External Rooms & Objects (GM7)
« Reply #4 on: October 08, 2007, 07:32:20 pm »
  • Don't Worry Sir, I'm From The Internet.
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 2339
Wow, very nice...I'm so glad you are back XD You always have awesome sprites and awesome programming skill.
Logged
Grimace is the demiurge, the creator. From him all things in McDonaldland have sprung. He is not a sin, he's not a menu item, he's just Grimace. He exists. He rolls his lidless eyes and flaps his lipless mouth, formless and terrible, a protean idiot thing from the depths of pre-history.
Re: External Rooms & Objects (GM7)
« Reply #5 on: October 08, 2007, 08:06:31 pm »
  • ZFGC Founder
  • *
  • Reputation: +2/-0
  • Offline Offline
  • Gender: Male
  • Posts: 470
Awesome tutorial as always! you use this for OOT2D?
Yep, with 4 layers.

Wow, very nice...I'm so glad you are back XD You always have awesome sprites and awesome programming skill.
Thanx kylink, I appreciate that.
Logged
Re: External Rooms & Objects (GM7)
« Reply #6 on: October 08, 2007, 08:55:44 pm »
  • Don't Worry Sir, I'm From The Internet.
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 2339
Awesome tutorial as always! you use this for OOT2D?
Yep, with 4 layers.

Wow, very nice...I'm so glad you are back XD You always have awesome sprites and awesome programming skill.
Thanx kylink, I appreciate that.
Don't mention it. ;)
Logged
Grimace is the demiurge, the creator. From him all things in McDonaldland have sprung. He is not a sin, he's not a menu item, he's just Grimace. He exists. He rolls his lidless eyes and flaps his lipless mouth, formless and terrible, a protean idiot thing from the depths of pre-history.

BuffaloBurgers

U B DA WAT!?
Re: External Rooms & Objects (GM7)
« Reply #7 on: October 09, 2007, 01:04:32 am »
  • *
  • Reputation: +7/-0
  • Offline Offline
  • Gender: Male
  • Posts: 535
Just an FYI, this is basically how maps were stored in the Genesis/SNES days. Basically, you have an array which holds data for your map. The data points to your objects, allowing you to create a map.
Logged


EEE HUNG HUNG HA HA

COLORADO 27 - OKLAHOMA 24

Giverny

Christ on Acid
Re: External Rooms & Objects (GM7)
« Reply #8 on: October 09, 2007, 02:12:28 am »
  • Bitte Scheiße
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Female
  • Posts: 1159
Wow, this is a nice technique. Other than the security risk, that is.
This'll become useful for Final Memory. I'll definitely credit you for this.

~LynkW
Logged
THEGivernyPROJECT
~LynkW-Surrender Global
  • Surrender Global Forums

Mamoruanime

@Mamoruanime
Re: External Rooms & Objects (GM7)
« Reply #9 on: October 09, 2007, 05:07:34 am »
  • ^Not actually me.
  • *
  • Reputation: +9/-0
  • Offline Offline
  • Gender: Male
  • Posts: 9786
Nice script TRM ^_^

As for the security risk, meh its not THAT big of a deal--- I dunno if the ability to dump scripts is a new feature though; lol I dont think I've seen anyone do that (nor have I really bothered to try such function); so I'm not particularly worried there :P
Logged
Re: External Rooms & Objects (GM7)
« Reply #10 on: November 23, 2007, 03:07:26 am »
  • ZFGC Founder
  • *
  • Reputation: +2/-0
  • Offline Offline
  • Gender: Male
  • Posts: 470
Thanks, sorry, been gone a while
Logged

Antidote

>.>
Re: External Rooms & Objects (GM7)
« Reply #11 on: December 02, 2007, 03:25:19 am »
  • In all seriousness who's serious?
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1485
Just glad to have you back TRM  :) Although this script isn't as new as you make it seem <.< you posted one so similar to this it isn't funny a long time ago. Nice script though.
Logged
  • Axiomatic Data Laboratories

Giverny

Christ on Acid
Re: External Rooms & Objects (GM7)
« Reply #12 on: December 02, 2007, 06:42:38 am »
  • Bitte Scheiße
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Female
  • Posts: 1159
Heres something I'll try with this engine: try to make a walking engine out of it, using a modified goodnights engine, with collision mapping.


~LynkW
Logged
THEGivernyPROJECT
~LynkW-Surrender Global
  • Surrender Global Forums
Re: External Rooms & Objects (GM7)
« Reply #13 on: December 05, 2007, 12:06:43 pm »
  • Personal Text
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1229
This is great and all... but is there anyway to actually map the room in the default map maker, rip it out of the game into hex code, and then import it externally through hex?
Logged

Mamoruanime

@Mamoruanime
Re: External Rooms & Objects (GM7)
« Reply #14 on: December 05, 2007, 12:33:20 pm »
  • ^Not actually me.
  • *
  • Reputation: +9/-0
  • Offline Offline
  • Gender: Male
  • Posts: 9786
Nah, it'd have to be made in a seperate program altogether... GM needs a room export function...

But TRM set this up pretty much the same way that the GB zeldas have their maps; I suppose it might be possible to rip that hex from the GB zelda games :P but eh
Logged
Pages: [1]   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.175 seconds with 67 queries.