Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


How to make a RTS game world that seamlessly wraps around on east-west axis


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Defotants   Members   -  Reputation: 114

Like
0Likes
Like

Posted 14 August 2014 - 04:18 AM

Many strategy games like Civilization or Supreme Commander have their game maps seamlessly wrap around. The camera can pan indefinitely in east-west axis, and object can traverse smoothly from one edge of the map directly to the opposite one. I want to implement that effect into my RTS game to emulate a cylindrical world on a flat map.

 

I have spent a few weeks to research on this matter and have a few ideas about this matter, but I need some advice from someone with more experience. Maybe there are a staple solution for my problem, and it will save lot of time doing experiment by myself. Graphical programming is not my trade, but I will learn more about it if necessary. I use Unreal Engine 4 for my game, that is one thing to put in concern. But even if a solution is not compatible with that engine, I still want to hear about it.



Sponsor:

#2 ikarth   Members   -  Reputation: 867

Like
1Likes
Like

Posted 14 August 2014 - 07:15 AM

At its most basic level, all you need for a map to wrap around is to have anything that goes past one edge of the map show up on the other side. If the position of something on the map is a set of coordinates, from, say, -100 to 100, going past 100 just wraps you around to -100. The graphics do the same thing, so if the camera is looking across the boundary, it shows stuff on both sides.

 

You can fake this by having visual duplicates of the map placed at the edges, and teleport anything that crosses to the opposite coordinates, but you have to be careful that this doesn't mess with the physics.

 

Unreal isn't really designed for dynamic map manipulation, so you may have to write some of this stuff yourself to handle the edge cases. It might be easiest to chunk the entire map into sections larger than the maximum camera viewing area, and then dynamically arrange where they are in space. (Ideally, this would only be changing their visual representation, and not their underlying representation in the physics.)

 

Here's an article that talks about some games that do this: http://simonschreibt.de/gat/1nsane-carpet-2-repetitive-worlds/


Edited by ikarth, 14 August 2014 - 07:16 AM.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS