Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Mr. Spawn's image to panorama script.

Hello, i posted a few days ago with a request about using an image as a world map. As luck would have it, i stumbled across this script by sephiroth spawn, in response to a similar request, with instructions as to how this should be done. Here it is...

"Yes, you can do this. In Spriteset_Map, change the line:

CODE

@tilemap = Tilemap.new(@viewport1)
# any other lines dealing with @tilemap

# Change them to
if $game_switches[switch_id]
# Put all the previous @tilemap lines here
else
@tilemap = Sprite.new(@viewport1)
@tilemap.bitmap = RPG::Cache.picture($game_variables[variable_id])
end

Simple eh? For the people on this forum, probably. However, I'm new to all this. Like, completely rubbish. My problem is, i don't know exactly what to do with the script.
do i just change the line "@tilemap =Tilemap.new(@viewport1)" and all other lines containing "@tilemap" in the spriteset map script to "if $game switches[001]", or whatever, then put all of those lines containing "@tilemap" i changed underneath this line, followed by "else..." and end? And then activate the switch? Can someone tell me if this is correct? I found the link here: http://forums.rrrevolution.com/lofiversion/index.php?t5632.html

Thanks for reading, and/or responding. Cheerio.
 

knmt

Member

Flawless! Works like a charm! May the blessings of a thousand sunrises be upon you, knmt!

haa..

actually, hold on...

How do i set the teleport events so that they can only be entered either horizontally or vertically, depending on which edge of the map they are on? See what i mean? No? Well, if the teleport event is to a horizontally adjacent map, if the line of teleport events is walked up vertically, every time the character walks up a square, the map changes. So the teleports to a horizontally adjacent map should only teleport when entered horizontally, and teleports to vertical maps only vertically.

Can this be done?

Actually I've already thought about this before and fortunately RPGXP is powerful enough to do almost everything :) .

Here's how to do it :

Open up transferring events , add new command "Conditional branch..." , on the third tab choose "Character : Player - Facing :...your desire facing of your character" . Finally put the transferring code into this conditional branch .

You don't really need to do this . There's a simpler way , by placing transferring events on map1's edge in column x and those on map2's edge in column x+1 ( or x-1 if you prefer ) ( this is example for horizontal transfer ). This way will prevent player from vertically transferring when it's supposed to be horizontal...

Tomorrow I will make another demo for you to show off all the features you would get with this solution , you know , reality is better than words haa...

BTW , from what you've asked me from the beginning of this thread I guess that your knowledge of RPG maker XP is not yet complete , for easier game making you should read more tutorials , I really suggest you doing that because it will make making games much more enjoyable :) .

EDIT : What is your computer's specs ? I could use a 256x4000 tileset flawlessly but if you have more powerful computer I think you can use a 256x" the largest " tileset .
 
Well, that sorts that out then. I think i prefer to insert the conditional branches than have the teleports in different places as this would probably confuse me because then i'd have to change the sizes of the overlapping sections of map, would'nt i? like, some portions would be 32 pixels smaller, or something?

But, maybe your demo will convince me otherwise, eh? I am most excited about the prospect of getting another present over the internet, as this is still a new experience for me.

As you guessed, my knowledge of RMXP, and computers, is very poor. But to answer your question, my computer is 3.4GHz, 1Gb ram, and seems to manage up to a 256 x 40,000 pixel tileset quite well. Which is lucky, because my map, divided into 25 equal rectangles each split into 256px strips, gives 25 strips just under 35,000pixels each. Add the overlaps, and it just about will manage it i think.

Well, thanks again for the help and advice. I shall read some more tutorials, but really, i've been concentrating on my map so much that i have neglected the mechanics of the engine. It is something i mean to rectify soon!
 

knmt

Member

Oh! Sorry for my late demo , here it is :

Code:
http://mihd.net/3wijm9

Something suddenly came up so I couldn't keep my promise yesterday . Anyway , enjoy the demo to its very end , I think the demo would be perfect for your map haa...

To say the truth my computer's specs is 800MHz and 128MB ram ToT...

BTW , could you please tell me the exact size of your map ? in pixels and game's grid please.
 
Hello, thank you kindly for the demo. I shall go and try it out.

BTW, is the script "test", located above "main", essential for this process to work? What i mean is, will this method work without your test script? Is "test" just to show me how it works, or is it essential? If i were to guess, it looks pretty essential.

Oh, and my map is now exactly 12800x16000, which makes it exactly 400x500 I have made 25 sets of tilesets, and now i am going to add the "extra" bits to each tileset for the overlapping sections.

Thanks again for the valuable help!
 
Oh, i have some more idiotic questions. I see your new "Teleport" script, and i see that in the north of your map you have used a call script event. So, er...does this call script event use the teleport script? I am not exactly sure how to use it. Also, what advantage does this have over just putting a load of standard transfer player events along the edge of the map(i expect there are some)?

I think that's it. I think your demo is brilliant!
 

knmt

Member

TRy it! Try IT! I'm right here! haa...

As you play the demo you will know that test does nothing haa...I forgot to remove it , it's just Mr.Mo's menu tutorial ...press C if you want to see it :) .

400x500 Okay , I don't have to worry any more...:)

haa...yeah the event calls the script "Teleport" to add information .

Transfer = Teleport.New(4,$game_player.x,103)

this will set the destination for your character :

4 : Map_id : the forth map .
$game_player.x : your current x-coordinate ( as a vertical transfer , this variable is fix )
103 : new y-coordinate on map 4.

That's IT!:D

As you can see , if your edge is about 50 gameblocks , you will have to create 50 events , using the scirpt , you only need to create one! ( if you're lazier , there's a way that you don't need to create anything haa... but I suggest creating at least one event for easier modifying )

Good luck !
 
That's a very good script! I see what you mean now. I didn't realize that the single event caused map transfer all along the x axis. I can see by your explanation how to generalize this script! I thought at first that this solution would be very difficult, but now it actually looks rather simple! Thank you so much for all of your help, knmt!
 

knmt

Member

I really want to help you haa...

Have fun making the map ! Btw, I want to be the first one to test the map if ya don't mind haa...

Okay, I'm outta here...if you have more problems feel free to post it here , I'm always ready to help you !

EDIT : hey wait , do you have any water in your map ? I mean the ocean . What are you going to do to animate the ocean then ?
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top