Author Topic: Tilesets, Autotiles, and Charasets...How??  (Read 4523 times)

Offline Calintz

  • Guardian of Chaos
  • ********
  • Posts: 3803
  • LV: 108
  • Gender: Male
  • A Pixel's Worst Nightmare
    • View Profile
Tilesets, Autotiles, and Charasets...How??
« on: February 01, 2008, 01:51:46 AM »
How does the game split the graphics, like tilesets being 32 x 32...How does the game do it?? and what syntax would i use to do it??

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20016
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: Tilesets, Autotiles, and Charasets...How??
« Reply #1 on: February 01, 2008, 02:02:54 AM »
Tilesets in RMXP are internally defined. Max width is 256, max height is any number dividable by 32. Autotiles are 96x128, animated autotiles are 384x128.
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline Calintz

  • Guardian of Chaos
  • ********
  • Posts: 3803
  • LV: 108
  • Gender: Male
  • A Pixel's Worst Nightmare
    • View Profile
Re: Tilesets, Autotiles, and Charasets...How??
« Reply #2 on: February 01, 2008, 02:06:56 AM »
I know,  I mean, to make an animated sprite of my own in a script...

>> I think I would have to have the game look for the bitmap, and set rect.new, and do block transfers, right??

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20016
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: Tilesets, Autotiles, and Charasets...How??
« Reply #3 on: February 01, 2008, 02:34:15 AM »
Yeah.
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline Calintz

  • Guardian of Chaos
  • ********
  • Posts: 3803
  • LV: 108
  • Gender: Male
  • A Pixel's Worst Nightmare
    • View Profile
Re: Tilesets, Autotiles, and Charasets...How??
« Reply #4 on: February 01, 2008, 02:42:08 AM »
Lol, got that much then...Now to figure out how to do it!! Haha

Offline Sally

  • Sallygirl :P
  • Chaos User
  • ******
  • Posts: 1283
  • LV: 12
  • Gender: Female
    • View Profile
Re: Tilesets, Autotiles, and Charasets...How??
« Reply #5 on: February 01, 2008, 04:23:03 AM »
so u want tilesets to be animated?
wow.. thats cool

Offline Calintz

  • Guardian of Chaos
  • ********
  • Posts: 3803
  • LV: 108
  • Gender: Male
  • A Pixel's Worst Nightmare
    • View Profile
Re: Tilesets, Autotiles, and Charasets...How??
« Reply #6 on: February 01, 2008, 04:23:34 AM »
No, but thats a thought that I like!!

Offline Fantasist

  • Lexima Warrior
  • *******
  • Posts: 2223
  • LV: 146
  • Gender: Male
    • View Profile
    • Blog
Re: Tilesets, Autotiles, and Charasets...How??
« Reply #7 on: February 02, 2008, 08:04:47 AM »
If you want an animated tileset, ...don't ask me, I don't know :/
If you want to animate, say, something like a character graphic (which has frames stacked together and you want to use those frames the way you like), you need a sprite,
@da_sprite = Sprite.new
You need to set the bitmap to the graphic
@da_sprite.bitmap = RPG::Cache.picture('Charset_experiment')

Then, you need to keep changing the source rectangle (src_rect) to suit your needs, like this:

@da_sprite.src_rect.set(x, y, w, h)

where x and y are the coordinates of the top-left corner of the required rectangle, w and h are also obvious. You might want to check the 'update' method of the class 'Arrow_Base' in the default scripts. There, the battle cursor blinking is done in the same way. The spurce rect is changed every 8 frames. You can get a clear idea.
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)

The best of freeware reviews: Gizmo's Freeware Reviews



Offline Calintz

  • Guardian of Chaos
  • ********
  • Posts: 3803
  • LV: 108
  • Gender: Male
  • A Pixel's Worst Nightmare
    • View Profile
Re: Tilesets, Autotiles, and Charasets...How??
« Reply #8 on: February 03, 2008, 01:35:22 AM »
I think I'm understanding, Thank you very much Fantasist!! You came closest to answering my wuestion.

Offline Calintz

  • Guardian of Chaos
  • ********
  • Posts: 3803
  • LV: 108
  • Gender: Male
  • A Pixel's Worst Nightmare
    • View Profile
Re: Tilesets, Autotiles, and Charasets...How??
« Reply #9 on: February 03, 2008, 04:59:40 AM »
I can't get it to work...This is my line of code:
(click to show/hide)

**But I always get this error >>
(click to show/hide)

Offline Fantasist

  • Lexima Warrior
  • *******
  • Posts: 2223
  • LV: 146
  • Gender: Male
    • View Profile
    • Blog
Re: Tilesets, Autotiles, and Charasets...How??
« Reply #10 on: February 03, 2008, 04:57:30 PM »
@menuactor is supposed to be a sprite, not a number. src_rect is a property of a sprite, not a number (the 'Fixnum' roughly means the numbers class). You use another variable to control the counter, like @count or something. It should be like this:


(click to show/hide)

Another thing. Instead of
"else
 if"

You can directly use "elsif" like this:
(click to show/hide)

And of course, don't forget to do this in the initialize method:
(click to show/hide)
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)

The best of freeware reviews: Gizmo's Freeware Reviews



Offline Calintz

  • Guardian of Chaos
  • ********
  • Posts: 3803
  • LV: 108
  • Gender: Male
  • A Pixel's Worst Nightmare
    • View Profile
Re: Tilesets, Autotiles, and Charasets...How??
« Reply #11 on: February 03, 2008, 11:19:26 PM »
Alright!! See now I understand!! Thank you Fantasist!

>> I've been tinkering with this script snipplet for some time now, and I still haven't been able to get it to work, is it because I'm trying to use it in a window, which is constantly refreshing itself?? The Arrow_Base doesn't have a single refresh methos in it's coding...

Is it possible to call an @"whatever" from a different class, so long as they are in the same script??

For reference, say I just wanted to sexperiment with this snipplet, where would I use it?? In a window, or a scene or what?? Where does this code go??
« Last Edit: February 04, 2008, 12:15:15 AM by Calintz16438 »

Offline Sally

  • Sallygirl :P
  • Chaos User
  • ******
  • Posts: 1283
  • LV: 12
  • Gender: Female
    • View Profile
Re: Tilesets, Autotiles, and Charasets...How??
« Reply #12 on: February 04, 2008, 03:11:37 AM »
can someone make a script that makes tilesets animated? and add it to tons :P

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20016
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: Tilesets, Autotiles, and Charasets...How??
« Reply #13 on: February 04, 2008, 03:28:08 AM »
How about using autotiles and auto animated events? -_-
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline Calintz

  • Guardian of Chaos
  • ********
  • Posts: 3803
  • LV: 108
  • Gender: Male
  • A Pixel's Worst Nightmare
    • View Profile
Re: Tilesets, Autotiles, and Charasets...How??
« Reply #14 on: February 04, 2008, 03:33:03 AM »
I don't understand what you mean Blizzard...

BTW, you think you might be able to shed some light on the subject being discussed??
« Last Edit: February 04, 2008, 03:35:11 AM by Calintz16438 »

Offline Blizzard

  • This sexy
  • Administrator
  • has over 9000 posts
  • *****
  • Posts: 20016
  • LV: 651
  • Gender: Male
  • Magic midgets.
    • View Profile
    • You're already on it. (-_-')
Re: Tilesets, Autotiles, and Charasets...How??
« Reply #15 on: February 04, 2008, 03:48:08 AM »
You can have animated autotiles like the water tile. And how about using events to animate stuff like flowers. A fully animated tileset could be possibly made by modifying the tileset swap script. In any of those cases the lag would increase pretty much.
Check out Daygames and our games:

King of Booze      King of Booze: Never Ever      Pet Bots
Drinking Game for Android      Never have I ever for Android      Pet Bots for Android
Drinking Game for iOS      Never have I ever for iOS      Pet Bots for iOS
Drinking Game on Steam


Quote from: winkio
I do not speak to bricks, either as individuals or in wall form.

Quote from: Barney Stinson
When I get sad, I stop being sad and be awesome instead. True story.

Offline Calintz

  • Guardian of Chaos
  • ********
  • Posts: 3803
  • LV: 108
  • Gender: Male
  • A Pixel's Worst Nightmare
    • View Profile
Re: Tilesets, Autotiles, and Charasets...How??
« Reply #16 on: February 04, 2008, 04:07:59 AM »
I'm not concerned with animated tilesets, I use charactersets for animated events. I'm more concerned with the animated charactersets being shown in windows...

Offline Nortos

  • Has earned a custom title
  • Chaos User
  • ******
  • Posts: 1303
  • LV: 20
  • Gender: Male
  • Celestial Bomb my Digital Ass
    • View Profile
Re: Tilesets, Autotiles, and Charasets...How??
« Reply #17 on: February 04, 2008, 07:04:05 AM »
he was answering Susys question not yours than Calintz
(click to show/hide)
Nortos's Stealth System
UltaFlame's Storyline Service
Blizz ABS - The Ultimate ABS!
My Resources

Offline Calintz

  • Guardian of Chaos
  • ********
  • Posts: 3803
  • LV: 108
  • Gender: Male
  • A Pixel's Worst Nightmare
    • View Profile
Re: Tilesets, Autotiles, and Charasets...How??
« Reply #18 on: February 04, 2008, 07:05:42 AM »
I know...

Offline Fantasist

  • Lexima Warrior
  • *******
  • Posts: 2223
  • LV: 146
  • Gender: Male
    • View Profile
    • Blog
Re: Tilesets, Autotiles, and Charasets...How??
« Reply #19 on: February 04, 2008, 04:51:51 PM »
Quote
I've been tinkering with this script snipplet for some time now, and I still haven't been able to get it to work, is it because I'm trying to use it in a window, which is constantly refreshing itself??
Depends on whether you're updating the window in the scene's update.

(click to show/hide)

(click to show/hide)
Do you like ambient/electronic music? Then you should promote a talented artist! Help out here. (I'm serious. Just listen to his work at least!)

The best of freeware reviews: Gizmo's Freeware Reviews