Showing posts from February, 2011

Using Threads in Visual Basic

Threads in Visual Basic are not commonly used because of complexity. In a 32 bit Windows environment (talking about Windows 95/98/NT) it has become a necessity to use more than one thread for each process. But is it true that creating threads in Visual Basic is tough? Not really! Visual Basic has its own feature of simplifying Windows 32 bit API calls. Think about a long backup procedure, which needs to be intervened in case the user wants to suspend or stop the backup procedure. If you have not implemented a separate thread for this copy purpose, you will not be able to stop the process until and unless you kill the process forcefully or you restart your machine (Windows 95 non-OEM versions might show endless blue screens). This is not a good idea for a professional grade application. Therefore let us talk about creating threads.
We will look at creating free threading model (and not apartment model of threading) in Visual Basic using the 'CreateThread' Win32 API call. T…

BSP Trees

This article explains how BSP (binary space partitioning) trees can be used in
a game such as DOOM as part of the rendering pipeline to perform back-face
culling, partial Z-ordering and hidden surface removal.
To explain the use of BSP trees, it is best to start with an example. Consider
a very simple DOOM level.
  |  |                                                                    |  |
  |  |                                            y                       |  |
  d1 |                                                                    |  b1
  |  |                               f'                                   |  |
  |  |                                                                    |  |
     |          C--------------------f-----------------------D            |
  |  |          |                    …

Let Us 'C'

struct Indian_female_professionals { 
    double styles;
    short skirts;
    long time_to_understand_problems;
    float mind;
    void knowledge;
    char non_co-operative;
} struct married_females {
    double weight;
    short tempered;
    long gossip;
    float hopes;
    void word;
    char unstable;
} struct engaged_females {
    double time_on_phone;
    short attention_on_work;
    long boast;
    float on_cloud_nine;
    void understanding;
    char edgy;
} struct newly_married_females {
    double dinner_invitation;
    short time_at_work;
    long lunch_break;
    void bank_balance;
    char hen_pecked;
} struct Indian_husband_wife_professionals {
    double income;
    short tempered;
    long time_no_see_each_other;
    void love_life;
    char money_making;

MacOS X on regular Intel compatible hardware

I think MacOS X running on regular Intel hardware is a great idea. Just think about the kind of interoperability that would offer. I guess I am biased because I think from the developer's point of view (being a developer myself). If MacOS X is able to run on regular Intel compatible hardware, then it can become as popular as Windows is today. And that would give developer motivation to write the same software the write for Windows. Just think about it. Today the best games come for the Windows platform first and then they are PORTED to the Mac. Now, since the Mac is using regular Intel compatible hardware, developers can target both platforms at the same time. Besides if MacOS X runs for regular Intel chips it also means it would run on those sexy AMD chips (which I am a great fan of). Compare to those many OSes out there, the MacOS X really stands out. Take a look. UNIX like core (Darwin), stability, features, performance, looks, it has it all. Not many people can afford the cost…