Prisonscape is an adventure/RPG game that is taking place in prison. The player needs to survive in this harsh and violent environment. Inside you have to deal with such things as constant assaults, creating and using weapons, interacting with other prisoners and learning the trade inside the jail. The player can develop his character to be, for example, a strong, tough fighter or an intelligent, charismatic manipulator.

Post news Report RSS Rendering in Prisonscape

In this blog post we tell about the rendering engine of Prisonscape. We also tell about state of the alpha and other things.

Posted by on

Hello!

I'll be talking about our future plans and some tech stuff in this post.

It has been going slow for the past month, mainly because Pekka and I have been on vacation. Add some nice summer weather and there hasn't been much progress. I'm certain our productivity will return to normal levels when the weather gets shittier, which should be in approx. one month. :-D

We were originally planning to go to the Gamescom and Eurogamer conferences, but the game is still quite "alpha" so we decided to just save that time and keep working on the game. There aren't that many game mechanics missing however. Combat and trading are the major ones (combat version 1 is already done), after those I think we won't be adding new major features to the game. Minor ones we can add during alpha and beta testing. Replacing the "programmer UI" also needs to be done soon, David did some pretty sweet graphics for the new UI.

inventory-big

People who pre-ordered Prisonscape have been asking about the alpha testing and our response has been that we'll deliver the first alpha when the major components are in the game. Not to worry, when we're ready we'll contact all who pre-ordered and have access to the alpha.

As for programming stuff, I've been implementing an OpenGL based renderer as my latest task. I was originally trying to just use Java 2D, but it didn't cut it. I realized this when I bought a new laptop with "ok" specs, and the game's FPS started going all over the place. There should be no reason why a game like Prisonscape couldn't run at 60FPS all the time, so after digging and debugging for a while I decided to learn and implement OpenGL.

After a few days I got the basic rendering working and man, it's smooth now. The Java 2D renderer used to skip and glitch even on my beefy desktop PC, but now it scrolls beautifully. I'm fairly certain Pekka doesn't even recognize the difference, but I saw it immediately. Apparently programmers (esp. graphics) get this thing where they notice every little detail and glitch because they stare at the screen and animations constantly.

Also, JOGL (the OpenGL framework I'm using) implements V-Sync in windowed mode which saved my ass because apparently you could only get that in Java2D in full-screen mode. I don't think I'll implement a full-screen mode for Prisonscape unless there's great demand for it.

journal-big

Implementing OpenGL also sets some minimum computer requirements for Prisonscape. Your graphics card should support OpenGL 2 and 1024x1024 textures. That's the minimum I'm coding for and that should cover a huge chunk of laptops and desktops. I was originally gunning for OpenGL 1, but it seems the support has been dropped from JOGL. :-D No wonder, the OpenGL 1.1 spec is from 1997.

Of course changing the graphics context broke something else in the game. I had implemented our video cutscenes with JavaFX and it seems JOGL and JavaFX don't work well with each other. A little note on those video cutscenes: I originally tried to render them as just full-sized .PNG files, which turned to be really stupid. Memory consumption quickly jumped to 1GB during the intro cutscene - apparently it isn't a smart idea to render uncompressed PNG data. To solve this, I encoded the intro animation as a .flv file, but JavaFX only supports VP6 encoded .flv files, so I had to dig up a trial version of some Adobe software to encode it properly. Side note: Google owns the VP6 codec, but they don't offer new licenses for it, so who knows if you can actually even use VP6. Hopefully I can find a library which can playback Ogg Theora (.ogv/.ogg) files in a JOGL context (jmcvideo seems promising) so I don't have to hack some custom made video playback system together.

Seeing all this technical work and the troubles it brings one might ask "WHY DON'T YOU USE UNITY????" and my answer is that I'm planning to be a highly skilled game/graphics programmer ten years from now, and in my opinion you don't lay a foundation for your skills by using Unity or any other game engine. The reason John Carmack and Tim Sweeney are so good is that they put in the time to do the low level work of building game engines (and also because they had to). Yeah, it's slow, painstaking and financially not so sound. But if you commit to it and do the work properly, the rewards will come in due time.

Aaaand that's that. See you later!

Comments
xilefian
xilefian

I enjoyed reading this, I'm a graphics engine programmer by profession and I use GL3.3 on desktop and GLES2.0 on mobile, it's definitely better to learn a hardware accelerated rendering API than to use 2D software rendering for any game, it makes me happy to see someone else find this out too.

For your video problem if you're willing to go hard-core you might want to look up the ARB_pixel_buffer_object extension, these days it is a widely available extension for GL1.5+ devices, the idea is that you use a generic video decoder to decode to a buffer that is directly uploaded to a GL texture quickly, it is hard-core stuff though so there are not many tutorials, but if you're willing to invest the time it's worth investigating.

Good luck with everything!

Reply Good karma Bad karma+2 votes
rsdworker
rsdworker

and i thought i was on alpha team because i emailed you ages ago before pre orders was started

Reply Good karma Bad karma+1 vote
Prisonscape Author
Prisonscape

If you e-mailed and we replied with a 'yes', you probably are on the alpha list. Stay tuned.

Reply Good karma+1 vote
Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.

Follow Report Profile
Icon
Prisonscape
Platforms
Windows, Mac, Linux
Creator
Prisonscape
Engine
Custom
Contact
Send Message
Homepage
Prisonscape.com
Release date
Game watch
Follow
News
Browse
News
New
Post news
Report
Report
Share
Related Games
Prisonscape
Prisonscape Role Playing