Star Apocalypse is the reinvention of the 4X genre. The game is a real time game of intergalactic civilization, using the computation power of modern computers to run advanced simulations on cultural, technological and societal interaction and development.

Report article RSS Feed some experiments pt 5

Hey all, I've shown a map generator and viewer previous time. It was very buggy with glitches and all that. I've now built an improved version of this.

Posted by dirtbag007 on Apr 9th, 2010

I've shown a map generator and viewer previous time. It was very buggy with glitches and all that. I've now built an improved version of this.

The improvements include:
- A fixed (but expandable!) map size.
- No more graphical glitches.
- More efficiƫnt code (it doesn't render stuff which is offscreen).

Well, I didn't get there without problems. The first thing I've tried was a fixed 2-dimensional array which contained the items. While this was quite sufficient on a small scale, as soon as I hit over a certain size of the map, the lag became almost unbearable. So I resorted back to the old method of only containing a list of items which were actually generated.

This has several advantages. Firstly, it is more efficient if you have less than 100.000 items on the map. Secondly, you can have multiple items at one location.

Further improvements could be that you keep up 2 lists. One of the total items on the map, and one of the items nearby your current viewing position. You check the smaller list every time, but the big total list gets checked once every second or so. This could be an improvement, but I'm not exactly sure if this would work properly.

Here's a video of the application:


Download location of the source: here

Till the next time!
Roberto 'dirtbag007' Moretti

Post a Comment
click to sign in

You are not logged in, your comment will be anonymous unless you join the community today (totally free - or sign in with your social account on the right) which we encourage all contributors to do.

2000 characters limit; HTML formatting and smileys are not supported - text only

Icon
Star Apocalypse
Platform
Windows
Developer & Publisher
Darkmatter Development
Engine
XNA
Contact
Send Message
Official Page
Darkmatterdevelopment.eu
Release Date
TBD
Game Watch
Track this game
News
Browse
News
Report Abuse
Report article
Related Games
Star Apocalypse
Star Apocalypse Indie Single, Multiplayer & Co-Op 4X
Related Engines
Unknown
Unknown Commercial TBD
Related Groups
Darkmatter Development
Darkmatter Development Developer & Publisher with 6 members