http://asawicki.info/ Graphics programming, game programming, C++, games, Windows, Internet and more...
.net algorithms c++ competitions compo demoscene directx engine events flash fractals gallery games ggj graphics gui hardware homepage humor ideas igk java libraries life linux literature math mobile music networking philosophy politics productions redmond rendering scripts shopping software software engineering stl studies teaching tools video visual studio warsztat web webdev winapi windows
Simple 3D game developed in Unity during Global Game Jam 2014.
Simple 2D game developed during Global Game Jam 2013, for Windows.
|FX Batch Compiler 1.1|
This Windows application supports compilation of FX effect files and HLSL shader files using fxc command line compiler included in DirectX SDK. You can compile many files at time or one file with different settings.
My first Flash game. Coded with FlashDevelop in ActionScript 3.
Universal library for C++, created especially with game programmers in mind. Includes: math module (vectors, matrices, quaternions, planes, rich set of collision functions and more), string operations, conversions, smart pointers, configuration files handling, date and time module, exception class hierarchy for error handling, file system handling, stream class hierarchy, FreeList - free memory allocator, complex logger, profiler, library for threading and synchronization, tokenizer, wrappers for compression with zlib.
Language: C++. Platforms: Windows and Linux. License: GNU LGPL. Optional support for Unicode. Optional integration with D3DX. Documentation made with Doxygen.
|Aqua Fish 2|
Game for children - clone of PacMan. Player swims as a fish and collects points, as well as special items. Player also have to run away from enemies or destroy them. 60 maps in 6 different titlesets. Low hardware requirements. See also YouTube videos: , . Game was published by Play Publishing company.
Calculator for game programmers. Basic data unit is a vector of 1-4 floating point numbers, which can be treated as (x,y,z,w) vector or (r,g,b,a) color. Next to basic calculations like addition, multiplication or sinus, vector operations are also available, e.g. vector normalization, conversion between degrees and radians, color conversion between RGB and HSB, finding linear an quadratic function coefficients and much more. Instead of entering single number, here you can see all the history of your calculations in form of stack and all operations are performed on that stack. Data can be entered and retrieved in different formats, like "D3DXVECTOR4(0.0f, 0.5f, 0.752f, 1.0f)" or "0xFF0080C0". Platform: Windows. Language: C#. License: GNU GPL.
Using Google Test in Visual C++ 2012
As always with any library in C++, it's not that easy as just download the sources, compile and use it. Here are my experiences with making it work in Visual C++ 2012:
1. Visual Studio solution is already prepared in msvc/gtest.sln. You just need to confirm upgrading to new version and ignore report with warnings.
2. You only need "gtest" project. It compiles a static library. That's the way I decided to use it. Alternatively you could just include all library sources to your project.
3. The library uses tuple from new C++ that requires variadic templates. Visual C++ doesn't support this feature, so to make it compiling without errors, you need to globally define following macros (in project properties > C/C++ > Preprocessor > Preprocessor Definitions, in both Debug and Release configurations, in both library and your client project):
4. If your project uses different way of linking to the standard library than gtest, you will get linker errors like:
1>gtestd.lib(gtest-all.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MTd_StaticDebug' doesn't match value 'MDd_DynamicDebug' in MyTestApp.obj
1>msvcprtd.lib(MSVCP110D.dll) : error LNK2005: "public: __thiscall std::_Container_base12::_Container_base12(void)" (??0_Container_base12@std@@QAE@XZ) already defined in gtestd.lib(gtest-all.obj)
1>msvcprtd.lib(MSVCP110D.dll) : error LNK2005: "public: __thiscall std::_Container_base12::~_Container_base12(void)" (??1_Container_base12@std@@QAE@XZ) already defined in gtestd.lib(gtest-all.obj)
That's probable as default setting for new project is to link it dynamically, while gtest project links it statically. It should be same in both gtest and your project. To change it to linking dynamically, enter project properties > C/C++ > Code Generation > Runtime Library and choose Multi-threaded Debug DLL (for Debug) and Multi-threaded DLL (for Release).
After setting it up, usage of the library is very easy. You just need in your project:
1. Add "include" subdirectory to include directories.
2. #include <gtest/gtest.h>
3. Link with "msvc/gtest/Debug/gtestd.lib" (in Debug) and "msvc/gtest/Release/gtest.lib" (in Release).
4. Write your tests, like:
EXPECT_EQ(4, 2 + 2);
EXPECT_EQ(10, 3 + 7);
5. Write main function:
int main(int argc, char** argv)
There is also a GUI application available, called Guitar (Google Unit Test Application Runner) or gtest-gbar, which allows running your testing application and browsing results in a window instead of console.
Game Programming Blogs
I use RSS/Atom to read news. It's a great technology because I can have news from many different websites displayed in a single browser and formatted in one style. I used desktop reader applications, then moved to Google Reader and after it has been closed, moved to The Old Reader. Now The Old Reader changes rules so that free account can have maximum 100 feeds. I had more than that because I used to add feeds from all the interesting blogs I came across over the years. I don't have enough time to read everything what's new in all of them, so today I've just exported the list of these blogs and I'd like to share it with you here. These are mostly developer blogs about game development, graphics programming (rendering) or just C++/native programming, geometry/math etc. Some of them are updated frequently and some left inactive for a long time. Some are written by professionals and some by amateurs. You can also find more such blogs and other websites under rendering tag in my Pinboard bookmarks. Here are my exported feeds:
Global Game Jam 2014
Last time I wrote about our game Ball-B, and today I'd like to say few words about the Global Game Jam in general. For those of you who don't know: It is a worldwide one-weekend event about making games. But it's not just a virtual event where people stay at home and communicate via the Internet. Different organizations around the world share their place so people come to meet and work together as teams. There were 6 sites in Poland. In Warsaw for example, PolyJam 2014 was organized by Poloygon interest group in Warsaw University of Technology. Our site in Gdańsk, called 3city Game Jam (see homepage, entry on globalgamejam.org, Facebook page), was in the office of gamedev studio Playsoft. It was the biggest site in Poland and - according to page Jam Sites by Size - 38th in the world our of 488 with 111 participants. And there was also a waitlist of those who didn't register on time because of limited capacity of the office!
Organizers encouraged us to use Chronolapse to record a time-lapse video from screenshots taken from our desktops in the background. That's an interesting program - I didn't know it before. Unfortunately it didn't work after I connected external monitor to my laptop (despite it claims it supports dual monitor), so finally I didn't use it. They also recorded a time-lapse video from all 48 hours in the office, but I guess it isn't posted on the Internet yet.
The theme this year was a sentence "We don't see things as they are, we see them as we are." It's so general it could be interpreted quite freely, but many games were about changing a point of view by e.g. switching between different types of characters or some references to psychology. In our site the event had a form of a competition. Voting was using the system just as it's usually done on Warsztat compos and IGK conference - everyone had to choose 3 games (except his own) and give one of them 3 points, one - 2 one - 1. My favourite games were:
While the winners were:
Ball-B - Our Game at Global Game Jam 2014
Here is the game we made during this year's Global Game Jam. It's called Ball-B. The goal is to defend the base at the center of the arena. You are rolling a physically simulated ball (using arrow keys or WSAD) of one of 5 kinds, each one (except the green one) having a special ability activated with Space. ESC key shows menu.
The game is made in Unity, so it works on the web page (if you have Unity Web Player installed) and can be build for multiple desktop as well as mobile platforms.
Windows Binary: Ball_B_Windows.zip (8.78 MB)
Source Code: Ball_B_Source.zip (20.4 MB)
See also Ball-B at globalgamejam.org
One week before the jam I decided to learn Unity a little bit instead of make a game using custom C++ technology, as I always did before. Arek, who is doing 2D graphics at work, also a week ago decided to learn making 3D graphics. So it was a new and interesting experience for both of us. We made our game in same team as last year, only without Klamacz (who now lives in Czech Rapublic and works in Bohemia Inteactive). Our roles were:
I was the only programmer in the team and I didn't try to be the leader of the team or a designer, so I could say the game was artist-driven - most of the time developed considering how things should look like. Which is a good approach. Of course not everything went right and there are many things we could have done better. But it was fun to participate. In the competition at our site we scored 3rd place.
Global Game Jam 2014 - Next Weekend
Next weekend - 24-26 January 2014 - there will be next edition of Global Game Jam - probably the biggest game development competition in the world. Well, it's not actually a competition. But it's about creating games with given theme, in teams, in 48 hours. Any technology can be used - programming languages like C++, game engines like Unity. You can even make a board game!
May sites around the world host this event. Sites registered in Poland this year will be in: Łódź, Poznań, Cieszyn, Warszawa, Kraków and Gdańsk. The one in my city - Gdańsk - is called 3City Game Jam and it's organized by Playsoft Games in their office, just like the year before.
It's always fun to do something creative together, so I really encourage to leave the work earlier next Friday (or skip some lessons) and go spend that weekend programming/drawing/modelling/designing/drinking coffee and participating in this event. Last year we created a game called Octovirus :)
CppDepend 4 Pro for Free
It looks that they've just released a new major version of CppDepend - great static code analysis tool for C++. What's New in CppDepend 4 page lists several improvements. What is more important though is that they've decided to give away Pro license for free to open source C/C++ contributors. They say:
To apply for this free license, Please make sure that you meet the following criteria:
I think it's worth trying to apply for that. See also my review of CppDepend.
(PL) Pisząc kod natywny C/C++... - Prezentacja
Zapraszam do obejrzenia slajdów z mojej prezentacji zatytułowanej "Pisząc kod natywny C/C++, czyli nie taki diabeł straszny", którą pokazałem dzisiaj podczas targów Kariera Programisty.
Silly Venture 2013 - My Photos
8-11 November 2013 there was another edition of Atari demoscene party - Silly Venture 2013. Click on the image to see my photos from this event (quite big gallery this time :)
If I had to summarize the party in just one sentence, I'd say that even if you - just like me - have nothing to do with Atari computers and just like demoscene, it's definitely worth visiting Gdańsk in November to go to this party. This scene is big. There were total 113 compo entries this year! (graphics + music + intro + demo + game + wild, in many different categories, for different Atari platforms).
There is also: