This post will cover how to use flash in your 3D games in a really fast and easy way. The library that we are going to use is gameswf (pronounced “game swiff”) and it is open source. Of course, this is not the only solution available, there is also a commercial middleware called Scaleform but this time I want to focus on the open source solution.
What is GameSWF ?
Gameswf is designed to be used as a UI library for computer and console games. To show that it is possible to integrate it with any engine I have implemented 2 solutions, the first one uses GLUT and, in the second one (in another tutorial) I have integrated it with Irrlicht.
Why I am writing this post? Because I don’t want any other programmer feels that there is not enough information in internet about using Flash in your 3D games! I have been working with this library lasts months and the results are pretty good, it can render shapes, text, gradients, sprites and it is even compatible with ActionScript (very basic actions). The only difference you will see between this solution and the original Flash Player is the aliasing. If you want antialiasing then you will have to either improve it or rewrite it.
Read the rest of this entry »
Have you ever been confused about the different strings types?
Today, I’ve had some free time and I have been researching and gathering information. The result is this cheat sheet with information about some (all of them would be crazy) well-known string types.
C Language
- char* : This should be null terminated. You can use encoding such as UTF-8 but generally each byte corresponds to one characters.
- wchar_t* : Basic Unicode string type null terminated. Generally it indicates UCS2 encoding.
- TCHAR* : A null terminated array, contains wchar_t if UNICODE is defined, otherwise uses chars.
- LPSTR : Win32 typedef for char*.
- LPWSTR : Win32 typedef for wchar_t*.
- LPTSTR : Win32 typedef for TCHAR*.
- LPCSTR, LPCWSTR, LPCTSTR : Const versions.
C++ Language
- std::basic_string<T> : The native C++ type. This is just a template.
- std::string : Class that contains an array of bytes. It assumes that you’re looking at ANSI here without any encoding.
- std::wstring : Contains an array of wchar_t. UCS2 encoding is assumed.
Managed C++
- System::String^ : I know this is not C++ but If you’re working with Managed C++ (I do), you can use this UTF-16 string.
Welcome to the first tutorial of these series of learning in 20 minutes. The aim of this tutorial is to show the basics of new technologies related to computer science. We all know that the people who are working in this business have a lack of free time to discover new technologies. So that, this is the objective of these series of tutorials, fill these little spots and introduce you to new concepts. With all this new information you will be able to detect whether or not it is interesting for your project.
1. What is AJAX ?
Let’s try to explain it fast. However if you already know jump to the next section, don’t waste your time.
AJAX was created by Jesse James Garret and it means Asynchronous JavaScript And XML. Basically, AJAX will allow you to execute instructions on the server side without reloading the page.
2. What is AJAX made of ?
AJAX is not a programming language, it is just a web development technique used for creating interactive web applications, so basically it is a way to do things. Read the rest of this entry »