spacechase0

LD23

Participating

Guess I’ll try to make something for this for once… I’ve read about this before, but never really looked into it. 馃槢

I’ll pretty much be using C++ and SFML. I’ve actually been using both for a few years, but I usually don’t ever finish anything. 馃槢 The first thing that actually got finished was Warehouse Panic (and my friend, u9, did most of the work), and I really haven’t finished anything since. I’ve gotten a couple of things close, but most things that I’ve finished are private tools for one of my parents.

This is going to be interesting since I’m going to be out of town for the whole thing (minus a few hours), and the laptop I use (Mac) isn’t exactly my favorite for programming… Oh well. I can still try. 馃槢

I have some extra code lying around that I’ll probably reuse (like this), but needs to be separated from the actual project first.

Comments

16. Apr 2012 路 00:13 UTC
Haha, that’s awesome. I will be using SFML to, I wish you luck in finishing the ludum dare it will be a challenge for me to finish also.
16. Apr 2012 路 19:35 UTC
Thanks. :) You too.

Game Base

Not really a whole lot, but still: Click. It’s for C++/SFML2. Make sure C++0x/C++11 is enabled.

You’d put all your game code in scenes/GameScene, with your variables as member variables and then your normal loop stuff throughout the five functions: initialize( SceneChangeEvent& ), terminate(), update(), update( const sf::Event& ), and render( sf::RenderWindow& ).

  • initialize( SceneChangeEvent& ) is called the frame after a scene is activated. More on SceneChangeEvent later.
  • terminate() is called when the scene is deactivated. This, like initialize( SceneChangeEvent& ), is called at the beginning of the frame after a scene change is requested. This is to avoid various bugs I’ve encountered in the past (which I don’t remember). 馃槢
  • update() is called X times a second, where X is equal to Game::UPDATE_RATE (default 50). If it somehow gets behind, it will try to catch up.
  • update( const sf::Event& event ) is only called when update() is called, but is only called if we get an event from SFML. So, you could get 5 of these in one frame, or get none for several.
  • render( sf::RenderWindow& ) is called Y times a second, where Y is equal to Game::RENDER_RATE (default 50). This is just a call to sf::RenderWindow::setFramerateLimit( unsigned int ). If this gets behind, oh well. 馃槢

SceneChangeEvent is my way of passing information to a different scene when you change scenes without having to do something like std::dynamic_pointer_cast( game.getScene( "Options" ) )->setSceneChangeData( someParameterA, someParameterB, ... ). Basically, if you need to pass some data, you would add an entry in SceneChangeEvent::Reason (like GameSaveSelected), and then add a struct to the union, like this. Then, just create an instance of SceneChangeEvent, set the data, and change scenes. :)

ResourceManager is just a convenient way of getting resources without having to declare them, loading them, checking for errors, etc. all the time. For instance, to get an sf::Texture, you would run ResourceManager::getTexture( "image.png" ), and it will return the texture, or an empty pointer if loading failed. If loading fails, it also prints out to std::cout.

Now, you can either stuff every bit of code into the default scenes/GameScene, or you can be nice and separate your main menu, splash screens, etc. into their own Scenes. 馃槢

Progress

So far this is what I have:

It’s going to be some type of farming simulator. 馃槢 The interesting part is going to be trying to fit the theme in…

LD24

Participating

Kinda forgot to post earlier. Is these posts necessary? 馃槢

Using C++/SFML 2.0 for the Competition like last time, with this and this, also like last time.

My schedule is a little bit better this time, too… Hopefully this time I’ll finish, and it be related to the theme, too. 馃槢

LD25

Participating

Not exactly a theme I like… And I’m kinda busy this weekend…

I’m using C++, SFML (2.0), my utility library, etc. etc.

I’ll try keeping all my code in a single file and see if it’s faster for development for a rough game…

This isn’t going to turn out so well, is it? 馃槢

Beginning

Well, it isn’t much, but it’s a start.

0

I’m going to try to go without any image files, since I’m not good at any part except programming. 馃槢

For now I’m thinking you’re running away from the police or something… Probably not very original though.

Basic Level Generation

So I’m going to try procedural level generation:

1

Scary!

Now, off to bed. 馃槢

Obstacles

Kinda glitchy right now.

2

Obstacles, part 2

I’ve been kinda busy today, but I finally fixed the glitches. The difficulty system seems to work well.

2.5

Implementing Failure (part 1)

After a few more unrelated things around the house, I implemented the player lives and obstacle collisions:

3
The player flickers for an invincibility period, and those partially transparent green circles shoot outward when you hit an obstacle.

Next I need to make it do something when you run out of lives.

Distractions

This isn’t the time for a theological debate. 馃槢

But I can hack what I have into being a game, so oh well.

It鈥檚 a game!

Managed to get some more time, and I can finally call this a game now (even if a boring one):

4

Broken AI

So my AI (if you can call it that) is slightly broken, and the speed is a little too fast.

What is the result? Police cars that fly around like birds.

http://www.youtube.com/watch?v=NTh1N112hw8

(How do I embed that? I thought WordPress would accept the HTML…)

Main Menu

Yay. :)

6

So next I need to finish up the game over session, and then more polish (and maybe add a feature…?).

Interesting Glitches

I think I broke something when I added the pause code…

6.5

That kinda makes me want to make the trail stay like that though. Maybe I’ll add an option for it afterwards.

More Polish

7

Last update for the day. 馃槢 Once I’m done and get access to the internet) I’ll submit it.

On the Run Submitted

Well, I didn’t get a chance to work on it more today like I wanted, but luckily it was at a pretty good state yesterday. Just skip the intro screen, nothing happens. 馃槢

s538.1
(Click that screenshot.)

On the Run Post-Mortem

So this is probably the first time I’ve gotten something fun in a few years. 馃槢 I usually end up with playable prototypes, but slowly stop working on the project for one reason or another.

Theme

This theme was probably the worst one there could be. I don’t like playing as the bad guy. 馃槢 I did think of a cheesy workaround, but I never put it in the game, as the “” implies.

This is also a problem for voting… A lot of the games seem to involve killing people, and also seem to have blood. I don’t exactly like those a lot. 馃槢

What went right

  • Graphics. When I was playing around with my prototype Friday night, I just started with a circle. Until I added the trail, it was hard to see what direction the player was going in. so, I changed the point count of the “circle” to 5 to make a pentagon. After adding a small pentagon in the front, I had a little “car” to move around. (See progress/0.png)
  • Gameplay. Although I was planning on adding a few more things to the gameplay, the game itself was pretty much finished on Saturday. I also had been polishing things as I went along. Both of these were important considering the last point of “What went wrong“.
  • No organization. Seriously, if you look at that code, your eyes might fall out. I specifically tried NOT organizing my code (and not using good practices… :P) to see if I would make more progress, and it seemed to work. Eventually I need to organize this though…
  • Difficulty + “AI”. Implementing difficulty levels was really simple. I have some base values for Easy, and then some multipliers used for harder difficulties. The “AI” is really just some random numbers for distances the cars should follow you, when they should speed up or slow down, etc.

What went wrong

I pretty much was just low on time. I was only able to work on this a few hours on Friday, and then most of Saturday. Sunday… not so much. 馃槢

What’s new

  • Sounds. Already done.
  • Better levels. The levels that generate are stillterrible, but I’ve tweaked it some to make it slightly better.
  • Finished the intro screen. Already done.
  • Highscore screen. Already implemented.

The entry is here, with downloads for both the compo and post-compo version. :)

LD26

Progress

ld26