Learning SFML for C++ Part 2

I’ve continued working on the project I started initially to learn SFML and have now added some basic projectiles along with vector-based movement. They’re currently just fired via the mouse and don’t do much besides blow up the terrain in a perfect circle, but it’s a start. A video showing off the additions and modifications to the terrain generator I’ve done since the last video can be found here:

Advertisements

Learning SFML for C++

So, as I’m taking a C++ course this semester I’ve decided it’s as good a time as any to learn a media API for C++. Therefore, I’ve started learning SFML. I found SDL to be a bit much (since loading sprites is quite painful.) I’m currently working on an artillery-style game. I have some basic map generation working now. It generates a random 1D heightmap  and then uses a mixture of linear and cosine interpolation on those points to create a smooth surface. After, the entire terrain image is drawn to a texture and rendered to screen for fast drawing.

Created pixel-by-pixel from an interpolated height map

A video showing a few more seeds:

Platformer 2 Improvements

I’ve redone the physics engine for the game using vector-based movement. This has resulted in a lot smoother movement (especially jumping) and should make implementing newer physics interactions a lot easier for the future. I’ve also added water pools into the level generation (although the physics aren’t anywhere near perfect for swimming yet) and one-way platforms that you can jump through from the bottom but land and stand on top of. So far progress is slow but steady. Tomorrow’s plan it to implement version 1.0 of the “icecap/snowy” biome graphics. Then I’ll probably work on adding some background graphical fluff to each distinct biome.

Future goals for the next two weeks are sloped terrain and moving platforms. These are both features the older engine did not have so I’ll be embarking into new territory in that regard. I don’t expect moving platforms to be too much of an issue but I fully expect sloped terrain to put up a fight.

Platformer 2

After losing the source code months ago I’ve finally conjured up the will power to start fresh. It’s coming along fairly well but this time I am developing with procedurally generated levels in mind. Here’s a screenshot of the forest biome:

A screenshot showing off the forest biome.

The idea is that the map will have 4 distinct biomes based on the height the player scales or descends to. The lowest will be the desert biome with palm trees and cacti and other spiky things. Second up is the cliff/rocky biome with boulders that can crush you and lava pools. Thirdly will be the forest biome shown here and lastly the icy peaks at the very top. These biomes are subject (and likely) to change but it’s the idea I’m going with for now. Each biome with be equally difficult but the difficulty will increase based on the distance the player survives in the X axis direction. Therefore biome = unique threats but of scaling diffulty. Some games will start out in the icy peaks and linger there for awhile while others may start in the rocky cliffs.

Revision 2 of the Text Based Game!

I’ve been fooling around with this quite a bit today. Everything is a bit more modular now and the project has grown to multiple source files as well! I don’t really have any end goals in mind for this game but that’s one reason why it’s fun to work on. Right now I’m just adding whatever I see fit and just building from the ground up. I’m thinking that there will be a story element eventually but I need to work on NPCs or something before that will be possible in a decent way.

Text-Based Casino Adventure?

So far, I’ve just been working on mostly generic things needed to write a text-based game. Ever since my game-playing days of youth in DOS and Windows 3.1 I’ve always had an attraction to text games. This is what I’ve been fooling around with today (in Python.) I probably should work on a project I have for school, but I find this to be more entertaining! My blog does look rather droll though with all these ‘white text on black background’ style images cropping up. I personally find the aesthetics of text based games interesting. You only have a limited character set but mixed in a certain way, it can incite the creativity in our minds.

Current source code is viewable here. I retain all rights to it, but I like to show my progress online.