 |
Castle Paradox
|
View previous topic :: View next topic |
Author |
Message |
NayusDante

Joined: 18 Jul 2010 Posts: 15
|
Posted: Tue Jul 27, 2010 4:31 am Post subject: Different Sprite Sizes? |
|
|
Is it possible, through scripting or otherwise to use map sprites larger than 20x20? _________________
  |
|
Back to top |
|
 |
Bob the Hamster OHRRPGCE Developer

Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
|
Posted: Tue Jul 27, 2010 7:30 am Post subject: |
|
|
Through scripting yes, but it would be nearly as much trouble as re-writing the whole map system.
You could use a GridSlice and fill it with sprites, which would make it pretty easy to do other tile sizes-- however, that method would mean your maptiles would actually be sprites, and would be subject to the 16 color limitations of sprites. Also, I would expect it to run slowly if you made the map very large.
Probably more work than it would be worth.
I do think that SpoonWeaver is currently working on a game that uses slices to simulate *smaller* than 20x20 tiles.
At some point in the future, variable tile sizes might become a standard feature, but I can't predict how soon. |
|
Back to top |
|
 |
Moogle1 Scourge of the Seas Halloween 2006 Creativity Winner


Joined: 15 Jul 2004 Posts: 3377 Location: Seattle, WA
|
Posted: Tue Jul 27, 2010 1:42 pm Post subject: |
|
|
James Paige wrote: | Also, I would expect it to run slowly if you made the map very large. |
I can't see why that would be true. If I were implementing something like that, I'd store the map information in the actual map information, and only load enough sprites for the current screen plus a little buffer.
If anything, it'd be like reimplementing the display routines. You could even use all of the OHR's built-in functionality for NPCs and so on, just changing how it's displayed in your slice representation.
This actually sounds really easy to do, and curse you for making me think about it because now I sort of want to do it. _________________
|
|
Back to top |
|
 |
Bob the Hamster OHRRPGCE Developer

Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
|
Posted: Tue Jul 27, 2010 4:48 pm Post subject: |
|
|
Moogle1 wrote: | James Paige wrote: | Also, I would expect it to run slowly if you made the map very large. |
I can't see why that would be true. If I were implementing something like that, I'd store the map information in the actual map information, and only load enough sprites for the current screen plus a little buffer. |
Hmmm... well, the sprites are already cached, so there would never be an issue about having too many of them loaded... but what I was worried about was just having too many children for the grid.
Yes, you could make the grid only big enough for the screen, and repopulate it when you scroll, but I would be worried that repopulating it would be slow. I guess benchmarking would be the only surefire way to see what works and what doesn't.
Moogle1 wrote: | This actually sounds really easy to do, and curse you for making me think about it because now I sort of want to do it. |
Heh :)
*sends more evil idea waves* |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Wed Jul 28, 2010 9:45 am Post subject: |
|
|
Painting the map using slices is definitely going to be many times slower than the builtin map drawing, but on the other hand drawing a map layer takes a small fraction of 1% CPU time on any non-ancient computer, so it'll probably be alright.
However, I think you're both misinterpreting NayusDante and that he was asking about walkabout sprites. In which case my answer is: yes, it's possible, and in fact it should be really easy (though I don't know of anyone to actually do it for all NPCs and heroes!).
There are two pitfalls, however: wrap-around maps, and overhead map layers (if a walkabout sprite is too tall, its head could be chopped off when standing in front of a tree which uses a map layer to draw the top of the tree) _________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
Moogle1 Scourge of the Seas Halloween 2006 Creativity Winner


Joined: 15 Jul 2004 Posts: 3377 Location: Seattle, WA
|
Posted: Wed Jul 28, 2010 10:50 am Post subject: |
|
|
James Paige wrote: | Hmmm... well, the sprites are already cached, so there would never be an issue about having too many of them loaded... but what I was worried about was just having too many children for the grid.
Yes, you could make the grid only big enough for the screen, and repopulate it when you scroll, but I would be worried that repopulating it would be slow. I guess benchmarking would be the only surefire way to see what works and what doesn't. |
Really? Because my primary performance concern would be updating the onscreen locations of all the sprites, Z-sorting the NPCs (assuming NPCs are taller than tiles), and so forth. Even that shouldn't be a big deal unless you have a huge number of NPCs, but with a huge number of NPCs, you'll run into problems anyway (though this does exacerbate the effect).
Quote: | (if a walkabout sprite is too tall, its head could be chopped off when standing in front of a tree which uses a map layer to draw the top of the tree) |
And here's another advantage of my theoretical hack: stick the tree on the NPC layer and Z-sort it along with everything else. _________________
|
|
Back to top |
|
 |
Spoon Weaver

Joined: 18 Nov 2008 Posts: 421 Location: @home
|
Posted: Fri Jul 30, 2010 7:53 am Post subject: Re: Different Sprite Sizes? |
|
|
NayusDante wrote: | Is it possible, through scripting or otherwise to use map sprites larger than 20x20? |
I don't see why you'd need to. If you have a picture, or sprite that is bigger than 20X20 then just import the whole thing as more than 1 tile. 40x40 tiles are pretty easy to do but I can see where 30x30 might be difficult. You'll want to make a couple different tile types for this sort of thing to keept the pattern consistent. You get like 7 layers of tiles ( or sprites if you insist ) so it's doubtful that you'll run out of space.
IF, however, you're talking about walking on the tiles differently then, and only then, will you need to go into scripting. Not otherwise. |
|
Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|