Penjin Video Tutorials


It's quite slooooooow as most of my spare time stuff is currently. I've had to take on more shifts at the bar and basically have just the one full day off each week.


I'm currently writing the GL renderer of PenjinTwo - it's progressing, I have basic 2D shapes drawing from PirateBaby. I had a performance issue, which I needed to look into and also I'm writing the texture code.


Once I have that working, I'll get onto the stuff I wanted to focus on which is the 3d renderer.


It's all things I have previously done in Penjin, but I'm trying to rewrite in a more maintainable fashion.
 
Also in regards of PenjinOne, keep an eye out for strange engine draw or logic errors, as I personally would like to abandon PenjinOne slowly and switch over to PenjinTwo as it becomes more stable and feature complete, I am including some experimental and game-related changes in PenjinOne (the latter ones are wrapped in ifdefs though, just not very well commented).


I am doing some testing before any commit obviously, but you never know when things slip through. So just keep this in mind and feel free to contact me if you encounter any problem.


Also, I don't know if it has been mentioned in the video as I had no time to watch part three yet, there actually have been a few additions lately generalized from some of my projects.


I personally recommend using the SurfaceCache for loading ANY image (don't load it directly into the sprite), it will load a file for you and provide you with a pointer to the SDL_Surface, which in-turn can be loaded into a sprite.


Reasons to do this include proper error output when loading fails (including returning a valid error surface, so your program does not crash, but displays an error image instead), centralized loading and freeing (you always know what graphics are loaded and can get rid of unused ones) and shared surfaces (loading the same image multiple times will only occupy one instance of memory).


Loading process becomes slightly more complex, but in the end it's just one additional call and you should call SurfaceCache::cleanUp from time to time.


Feature requests are always welcome, too.
 
Hmmm seems I did not know, or had forgot about the SurfaceCache class... very useful. I've been thinking about similar functionality for PenjinTwo, intelligent ResourceManager, basically I want to implement something the unloads only unneeded resources on state change and then loads what's missing. Currently changing state is a clean slate operation.


In any case, down to news... the new video is up!

https://www.youtube.com/embed/Z_7jpuK4Ljs?feature=oembed
 
Hmmm seems I did not know, or had forgot about the SurfaceCache class... very useful. I've been thinking about similar functionality for PenjinTwo, intelligent ResourceManager, basically I want to implement something the unloads only unneeded resources on state change and then loads what's missing. Currently changing state is a clean slate operation.
I've not really looked at PenjinTwo. Do the developers allocate their own locals in their class? What you could look at is adding a "Resources" vector/list which has a Name/Type/Data to the State base class, and also to the Engine. Then you can load "locals" into the state's resources, and general stuff (ie fonts) into the engines Resources. Your base state class destructor could take care of cleaning state specific resources.

In any case, down to news... the new video is up!
I still need to finish the third video.


However, I was a little dishearted on Saturday night - Projector Games, who had the 16 player gaming setup either side of the stage, have some YouTube videos up of a game they are working on, which was almost the same as the game I was designing (it's called

https://www.youtube.com/embed/2P5dRyCnb-o?feature=oembed). Gutted? You bet I am :( :(
 
@pmprog, dont let that stop you from making your game after all there are lots of games out there that are very similar and everyone is fine with that.
 
I know, but whilst I have other alternatives, maybe I should consider them in lieu. I might throw a poll up in a different section of the board to see what people might be interested in.
 
Back
Top