Work on the game is ongoing! Since my last posts about evolving cities, I've done a lot of work improving the game - especially the evolving cities, clouds and overall performance. I can now run the game in ultrawide resolution at 30fps on planet surfaces, which are the most costly scenes to render. This is a major achievement for my game engine, and will unblock the development of many features…
The Bright Future “So, ya really want to know what the future was like? Alright, I’ll tell ya. It was awesome. Spaceships everywhere. Antigravity? Solved. Lightspeed? Solved. Repression, Warfare, Greed, Corruption? Well, ... ya know there’s some things that humans didn’t learn neither.” 21st Century Gentech In the early 21st Century humans discovered how to modify their DNA. This revolutionary…
For now, I've finished my work on simulating the economies of planets. Population and wealth grows and shrinks over time, players have the ability to influence their planets' growth via governmental policies. Mines consume resources, factories produce goods from raw materials. The overall desirability of the planet's economic indicators drives natural immigration to the planet or incites the…
Simulating a Planet's Economy from Inception The prototype economic simulation was seeded with a 'pre-rolled' population and wealth, and aimed to create some kind of stable consistency up or down in growth, given a decent start. Each planet began with generous conditions - say 3 billion population and 60 billion credits of wealth. The real aim for the game however is to simulate each planet's…
Planetary Economics This week I started writing the galactic economic simulation. Each game year the universe evolves and each planet's economy grows or shrinks based on factors such as government type, stability, population size and natural resources. Eventually you'll not just be limited to governing planets by controlling tax rates and setting government policy, but by waging intergalactic…
I play Pegwars far more often than I work on it. To be honest, most of the time when I sit down after-hours to work on the game, I simply don't know where to start. I have so many 'backlog items' and ideas and the scope of the game is so huge that it's often really hard to choose exactly what to do. The "burden of choice" as they say. So more often than not I'll simply hop in a spaceship, fly to…
"Infamous for its abundant micro-climates and irradiated soil, Asta is a planet that is relatively unimportant." A city on the planet is perched around a field of luminescent crystals, providing it not only abundant resources but untold wealth and unsurpassed natural beauty. Commander Kroton sets his ship down gently in a garden just outside the city outskirts. He rents a modest but sunny…
Volumetric Raymarching can be Very Costly Volumetric Raymarching can be very costly as many 100s of ray-marching operations are performed on the GPU each pixel for each frame. A standard HD screen of 1920x1080 contains over 2 million pixels. In the case of my atmosphere + cloud shader, this high fill-rate cost brings the game's frame-rate to its knees. In order to play Pegwars with cool new clouds…
Finally, after around 3 months of hacking away late at nights, throwing up my hands in frustration and throwing away the first 3 implementations, I've finally made the volumetric cloud + atmosphere shader that I've dreamt about ever since starting this project. The shader uses raymarching to render a volumetric noise field, and a rayleigh and mie scattering simulation to provide the lighting.…
Happy 2020! Games take a lot of work, especially ones like Pegwars with the enormous scope of being a universal sandbox. Although I haven't made any blog posts in quite a while, I have indeed been working hard throughout 2019 on fixing many bugs and implementing various new features. Highlights for the year are : - A beautiful procedural volumetric cloud system, fully integrated into the…
New Nebulae Recently I began replacing the old particle-based nebula standin with proper volumetric nebula shaders. The nebulae need to be many and varied, and so I want to procedurally generate them like the rest of the universe. After being introduced to some awesome volumetric nebula examples on ShaderToy, I thought I'd too have a play around with ray-tracing a noise field to create procedural…
I hope you all had a great 2018! I've been hard at work on Pegwars whenever I get the time, which is not as often as I would like, and have made some great improvements that I'll detail over the coming weeks. One such feature I have working now and would like to present a teaser of is Planetary Installations. Planetary Installations Imagine purchasing and equipping your frigate with some heavy…
Over the last 6 months I've been working almost exclusively on new adding gameplay elements to enrich the overall game environment. Some are general concepts, applicable to the main universal sandbox. Others are more specific and fill out the lore of the gameworld. Others such as missions, factions etc. are still to come. Here are the last 6 months worth of gameplay concepts, in alphabetical…
Here's a quick look at a prototype dashboard for spaceships. Like everything else in the game so far, the artwork is 100% prototype. In Pegwars, spaceships are like future cars, so I've modeled the prototype from an 80's classic sports car. The 80's really was the bomb, I love it how car designers tried to get so futuristic for a period of time. The gauges, from left to right : - Hull Integrity -…
One of the central tenets of the Pegwars universe is that the future is not so dissimilar to what we are familiar with now. Spaceships are not outlandish things, they are merely futuristic cars. Most are low-cost, practical and plain people-movers, most people just need transportation and will pay the lowest amount they can get away with for a vehicle that ticks the right boxes. Some spaceships…
Still doing work on my Atmosphere Shader, however it's proven to be quite the resource hog! The current implementation is a fairly typical screen-space shader. It ray-traces the light from the sun through the atmosphere until it hits the current pixel fragment, calculating the sun transmittance along this ray. Then it marches that ray towards the camera, blending it over the background performing…
I've made a lot of progress recently focusing on refining my procedural planets and atmospheres. Added into the mix are multi-core particle systems, procedural nebula and AI. I'm almost ready to post videos but am excited that I have now fully tied in the galaxy to the rest of the engine, meaning totally seamless travel between every star in the galaxy all the way from warp-drive-speeds down to…
I've started work on the procedural planets, here are some initial screenshots. Like everything in Pegwars, it all has to be seamless, from flying in outerspace to orbiting planet and moon surfaces to landing and running around. Each planet's geometry is formed by tessellating an icosahedron. This shape was chosen to help make each vertex as equidistant as possible in the final mesh; tessellated…
A seamless universe is important to the Pegwars experience, and that means procedural atmospheres you can see from outer-space all the way down to the ground. The Pegwars atmosphere shader is drawn in screen-space, and composited over the screen using the depth information from both near and far depth textures. The shader itself simulates Rayleigh and Mie Scattering by ray tracing through and…
Finally I have implemented the Pulse Laser onboard system. This was an exciting build, as it leverages a number of features I've been wanting to play with. Ship System Each Pulse Laser attached to the ship is a ship system, and has a power capacitor which draws energy from the main power unit. When you fire, it fires continuously until the capacitor runs out of juice. After that, the rate of fire…
There's still a lot of work to do to get the rift running smoothly, specifically I can't seem to get the thing to focus properly in fullscreen mode (but works great in windowed!). I found the SDK alright, but a little basic. The examples and API itself use a RH (right handed) coordinate system, which is not what DirectX uses, and I wish they supported both out-of-the-box instead of me having to…
One of the best things about working on a game is graphics bugs. No, not the kind that make you spend a week delving beneath the covers of hideously complicated interactions between CPU API GPU RAM ETC. No, the serendipitous kind! Engage warp drive! Funnily enough I was thinking about making some kind of FTL effect one day Playing around with SSAO, I got some kind of cubist painting look Ooops,…
Hell yeah...Oculus Rift is coming my way. Lucky I've been working hard on getting pegwars ready! - User Interface now working, displays on consoles in virtual cockpit. From day 1 I've tried to stay away from on-screen UI, and I think that'll be vindicated when using the Oculus. Immersion is key! - 'Star trails' object which is not really star trails, but a detail object that helps give the…
Planets are now becoming well-formed. They have a placeholder atmosphere object, but will get a dedicated scattering shader. Their atmosphere detects entry and the Planet Flight App Module is instigated. This sets up the rendering pipeline slightly differently. Flags are set on the spaceship physics model, for atmospheric flight. In future this app module will also begin the streaming of planet…
I have to get back into blogging this thing, so this update is just a refresher to remind me how to log in to blogger etc. Here's a screenshot of the cityscapes these days : What we've got here is A tile-based city that is read streamed from a bitmap. The tall building you see in the centre is an example of specific placement of buildings - it's not just a procedurally generated cityscape. This is…