[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4688: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4690: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4691: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4692: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3823)
IceBlinkEngine.com • View topic - Illusion of seamlessness

Illusion of seamlessness

Tutorials that explain how to make maps (for use in the game) in various software (profantasy, dundjinni, GIMP, Photoshop, hand drawn and scanned, whatever)

Illusion of seamlessness

Postby youngneil1 » Tue May 05, 2015 8:18 am

While toying around a lot with building a city here, I stumbled upon the thought of making the maps connect seamlessly.

A turn map by 180 degree, than mirror vertically operation on a clone map e.g. allows me to easily make the leftmost square column of map a to appear as the rightmost square column of the clone map b. Same can be done with according operations for all other sides. This allows for seamlessly fitting maps, yeah :D !

Problem now is the transition mechanism. As it is of now the arrival/target square of a transition operation cannot be itself a transition back in opposite direction. This would lead to an infinite loop (cannot test right now, but that's a least my memory of it).

Now, I think this can be easily remedied by placing all these cross map border transitions into a logic tree for starters (via area rransition script). The call of all those cross border transition script will be conditional though. They will only be called if a map specific global int justArrivedOnMapXYZ is set to 1. Each map will have its justArrivedOnMapXYZ set to 0 by default. Only the starting map of the module will have it set to 1. When the logic tree for transition is called and the justArrivedOnMapXYZ has been 1, (1) the transition takes place AND (2) justArrivedOnMapXYZ of the map that has just been left is set to 0.

Now, what is still lacking is setting justArrivedOnMapXYZ on the target map to 1. This obviously has to happen after the tranisition logic tree event. It could happen in event number 2. This event will not be called (or so I hope) on the the map that has just been left - but will be called on the arrival map.

Must toy around more with this later. Ideally I would do a template map with all border squares prepared with such transitions towards neighbouring maps. The only thing I would have to individualize for each new maps are the target map names for each of the four map sides. Mayhaps the doTransition script even accepts a globalstring as placeholder for the mapname, then the effort would be minimized to actually changing four globals per map :D .
User avatar
youngneil1
Backer
Backer
 
Posts: 5078
Joined: Sat Dec 08, 2012 7:51 am

Re: Illusion of seamlessness

Postby youngneil1 » Tue May 05, 2015 3:44 pm

First little test was very promising: when the first event is a transition element it looks like the second event is not fired. That's great! Gonna build a template map later - will also make use of the parm(n) functionality to pass relevant data to the logic tree on trigger level already. Should make map individualisation even easier (will not have to edit the logic trees themselves to make adjustments, but instead just exhcnage the relevant parm(n) that carries the target area name).
User avatar
youngneil1
Backer
Backer
 
Posts: 5078
Joined: Sat Dec 08, 2012 7:51 am

Re: Illusion of seamlessness

Postby youngneil1 » Tue May 05, 2015 5:02 pm

Hahaha, foolish me :roll: :lol: . My 180 degree, then mirror technique left me with a mirror inversed image of my transition squares columns. Mmmhhh, yes, obviously. Nonetheless, I learned a little more Photoshop touch in the process and can now make pixel perfect copies and inserts here. So, I will just clone map a to map b, copy the relevant 50x800 border column of map a and insert it in the right, i.e. shifted, place into map b. That's my starting point then for further developing map b (erasing most parts cloned from map a, keeping some for consistency and as color/shape pool).
User avatar
youngneil1
Backer
Backer
 
Posts: 5078
Joined: Sat Dec 08, 2012 7:51 am

Re: Illusion of seamlessness

Postby youngneil1 » Wed May 06, 2015 4:27 pm

User avatar
youngneil1
Backer
Backer
 
Posts: 5078
Joined: Sat Dec 08, 2012 7:51 am

Re: Illusion of seamlessness

Postby youngneil1 » Wed May 06, 2015 4:41 pm

Yes :D !

Tested the above two logic trees solution with two transitions pointing at each other on the same map. No infinity loop. Only after leaving and reentering the target transition square B, the transition to the starting transition square A took place.

This effectively allows to have arrival and departure from and to a map on the same square. Also an easy to make mistake (infinity loop) is eliminated this way. Will prepare a whole template map later with all borders being transistions to corresponding squares on neighbouring maps.

Kduos for thisarea functionality, logic trees with unlimited parms upfront and local variables... all powerful tools indeed and it pays off big time to have them :D .
User avatar
youngneil1
Backer
Backer
 
Posts: 5078
Joined: Sat Dec 08, 2012 7:51 am

Re: Illusion of seamlessness

Postby slowdive » Wed May 06, 2015 7:34 pm

Awesome work there Karl. Look forward to hearing more about how it works out.
User avatar
slowdive
Site Admin
Site Admin
 
Posts: 3174
Joined: Wed Nov 21, 2012 11:58 pm

Re: Illusion of seamlessness

Postby youngneil1 » Fri May 08, 2015 3:44 pm

Got a full map with corresponding conditional transitions now (they form an outer ring on all the border squares). Works great!

Just a had a crazy thought: What if I move my transisition ring more to the center of the map, so that the transition occurs already three squares away from every map border? Would the player notice any chnge at all? Sigh, another repositioning of triggers and adjusting of target squares, but to tempting to not test it...

One problem is likely a player stepping back directly after map transition or stepping back while running along the transition ring. Mayhps if could relocate the triggers for that moment... off to tinkering.
User avatar
youngneil1
Backer
Backer
 
Posts: 5078
Joined: Sat Dec 08, 2012 7:51 am

Re: Illusion of seamlessness

Postby youngneil1 » Fri May 08, 2015 10:10 pm

Yes! I think I have got the theoretical solution for the perfect illusion of seamlessness:

1. Neighbouring maps have 7 identical grapically cloned squares on their neighbouring sides.
2. Four squares away from map border runs the inner transition ring, which does a condtional transition to the graphically identical square on the neighbour map and therewith onto the neighbouring maps inner transition ring. This will not result in an infinite loop thanks to the conditional nature of the transitions (see above).
3. Three squares from map border runs the outer transition ring. It can only be entered directly from the inner ring (obviously). It will transition to the graphically identical square on the neighbouring map, i..e. the fifth square, counted from the border of the neighbouring map.

This system should completely blend out that a map has been changed at all. From a player perspective it should feel like a giant, very varied map. Running along the transition ring itself - which is only possible right after a transition anyhow - will cause transitions each step, but these wont be noticed by the player. Moving from transition ring towards outer map border - which is only possible right after transition or after having walked along transition ring without leaving it after arrival - will lead via outer transition ring back to the old map (again seamlessly). Please note that the inner transition rings (square 4, counted from map border) point at each other on each map side, while the outer transition ring (square 3, counted from map border) will transition onto the opposite, that is inner side, of neighbouring maps inner transition ring (square 5, counted from map borde).

For the illusion of seamlessness it's important that the border is always at least three square away from the arrival point of the new map. This leads to the requirement of three identical fields from player position to border. Player position itself is the fourth identical square needed. In movement direction, i.e. towards center, two squares additional are theoretically enough as the third field displayed onscreen is unveiled due to the move anyway. Still, due to the two way nature of the scenario we wills till need seven identical squares.

Now I have to test that one (likely sometime on Sunday, sadly not much time beforehand). Maps will need to be 6 squares (the 3 squares behind the inner transition ring cannot really, be used, except for outer transition ring, this is true in both opposing direction of each axis) larger in x and y to maintain the same number of truely playable squares. Would 22x22 maps run on medium to high end devices? Exciting times :D .
User avatar
youngneil1
Backer
Backer
 
Posts: 5078
Joined: Sat Dec 08, 2012 7:51 am

Re: Illusion of seamlessness

Postby youngneil1 » Sat May 09, 2015 9:33 am

Hehe, I think it's even easier:

1. Only one transition ring on square 3, counted from border. Normal, default transition, no logic tree magic.
2. Target square of the transition is square 4 on target map, counted from map border.
3. Original and target map share 6 graphically identical squares, counted from border.
4. Note: Square 3 on original map and square 4 on target map are graphically identical.

That's it. Gets more complicated when a map can be reached from 2 or more neighbouring maps.

For better grasping look at this.

Square count from border (biold is transition square, italic is destination): 654321 | 123456
Graphical content of squares______________________________________: ABCDEF | ABCDEF

C and D are perfectly shifted, beautiful by default :D .
User avatar
youngneil1
Backer
Backer
 
Posts: 5078
Joined: Sat Dec 08, 2012 7:51 am

Re: Illusion of seamlessness

Postby youngneil1 » Sun May 10, 2015 2:09 pm

New little problem popped up: view range. I would need one more square of view range to make the illusion perfect (the black square pattern on edge of view is different after transition). In IBPc there was an area property for it iirc, which is missing in IBAndroid. Mayhaps a gaSetViewRange.cs script?
User avatar
youngneil1
Backer
Backer
 
Posts: 5078
Joined: Sat Dec 08, 2012 7:51 am

Next

Return to Map Creation

Who is online

Users browsing this forum: No registered users and 1 guest

cron