Home | Rules and Guide | Sign In/Create Account | Write a Post | Donate | #ludumdare on irc.afternet.org (Info)

Ludum Dare 23 — April 20th-23rd, 2012 — 10 Year Anniversary!

Ludum Dare 22 :: December 16th-19th, 2011 :: Theme: Alone

[ Results: Top 50 Compo, Jam | Top 25 Categories | View My Entry ]

[ View All (Compo, Jam) | Warmup ]


First Time

Posted by
April 28th, 2011 3:00 pm

Language: C++

IDE: Depends on the operating system. I’ll primarily be using Windows (which means VS 2010 Express), but in the last hour or so I’ll probably port it to OS X (XCode).

Libraries: SFML and possibly Box2D depending on the theme that gets picked. I would be using DirectX, which I’m more familiar with, but DX doesn’t port well to OS X.

Graphics: MsPaint && Paint.NET

Sounds: Sfxr, maybe Audacity to record whistling as music in the game.

The formatting is borked, but this is the “base code” I’m going to be using.

#include <SFML/System.hpp>
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>

#pragma comment(lib,”sfml-system-s.lib”)
#pragma comment(lib,”sfml-window-s.lib”)
#pragma comment(lib,”sfml-graphics-s.lib”)

sf::RenderWindow App;

int PASCAL WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR szCmdLine, int nCmdShow)
{
bool exitgame = false;
bool isWindowActive = false;
App.Create(sf::VideoMode(640,480,2), “Title”, sf::Style::Close);
while(!exitgame)
{
sf::Event event;
while (App.GetEvent(event))
{
if ((event.Type == sf::Event::Closed) || ((event.Type == sf::Event::KeyPressed) && (event.Key.Code == sf::Key::Escape)))
{
exitgame = true;
break;
}
if (event.Type == sf::Event::GainedFocus)
isWindowActive = true;
if (event.Type == sf::Event::LostFocus)
isWindowActive = false;
}
App.Clear(sf::Color(192,192,192));
App.Display();
}
App.Close();
return EXIT_SUCCESS;
}

Leave a Reply

You must be logged in to post a comment.


All posts, images, and comments are owned by their creators.

[fcache: storing page]