Welcome one more week to our blog, Ecleptians!
Today we close the cycle of the monographic dedicated to the city. We have made a review of the main characteristics of the section, as well as the decisions we have been taking in defining it’s inner mechanics and aesthetics. What a better way to close this cycle than doing an interview with our programmer, Nigromance, where he will answer some very interesting questions about the development of the section.
without further ado, we leave you with the interview. Enjoy it!
What are the inherent complications of creating an isometric perspective map?
There are some, but I can tell you two good ones:
– The first is the cell to pixel coordinates relation. Can be a little messy when you are implementing positioning functions into the code, you have to be careful with that. Because sometimes the code need to know where a building have to be drawn (in pixels coordinates), which is asigned to a cell position on the map… and sometimes you have the center of a car in pixels coordinates, say 978,234 but you need to know the cell which belongs this pixel coordinates…
– Other complication is the draw order, not just the cells order but elements to draw into each cell. Because there are many elements to draw that cover more than a cell and could hide elements from cells already drawn. And not always you get the code drawing all the things right.
What was the funniest thing about working in the city?
For me the most funny stuff was design the data model to define the buildings. Because the buildings were something really challenging. Each building is unique and is created randomly by a code, using different defined parts, as doors, windows, facade, roof…
Also at the time the city grows the buildings gain more floors or change to bigger type one. Is amazing to see that working!
I can say the cars were something very funny as well, but something hard to make. The cars are handleled but theirself, each car knows what to do. To achieve that I had to design a system of indexed roads, like a roadmap. The cars read this roadmap and decide what way they want to get in each intersection. I can spend a lot of time just watching the cars driving along the city, stopping on red traffic lights and cross roads… I love it.
And the most difficult?
The hardest thing were the cars collisions. My god, for me was really complicated design a collision detection system for an isometric map with the best performance.
In a map that you see from the top, the easiest system is set a square around each car and check whether the squares are overlapped. But into an isometric map the square system doesn’t work and then you have to “draw” a graphic shape around the car, not very complicated either but not very efficient.
Graphics have a great proccessing cost. So I had to develop a simpler mathematical system which compares just some points of evey car depending on the trayectory they are following.
Dude, that was really hard to acomplish!
Why was the decision taken to create a map editor from scratch to set up the cities?
Well, all the things on a map are defined into data sheets, that means everything, and that is a lot of stuff. So if you thinking to write by your hand a data sheet, and set into every map all the elements into each cell… plus define all the characteristics of every element… and much more things! You are crazy.
We needed to build a tool to help us to define the elements and maps for the game. The map editor basically build the data sheets from the things you do on its interface. This meaned a great delay for the game, but a great quality improvement for the cities and so for the game as well, because at the beginning there was just a general city for everyone, but with the map editor we were able to build a lot cities which are combined randomly.. so now every player has a unique city.
Is there any surprise that you have reserved for the future of the city?
A lot!! As much as the people who support us could make it possible. Because we have big plans for this game, and the city is probably one of the most potential parts of the game, and to do that, we need all the time that supporters can give us.
For the moment I can ask you: What do you think the city lacks? People? Yes! there is no one on the streets, but this is not going to last long, as we are planning to set people in cities as much as the level of the city has.
And that’s all for this week, Ecleptians! thank you so much for your attention.
See you in Ecleptia!