Monday, November 17, 2008

Tuesday, October 21, 2008

My first Attempt at OpenGL

LECTURE
This week's lecture is about the size and the difference of colour in computer graphics. For example a pixel takes about a byte and that colour is more or less human perception not. for example the colour is actually the same in a bunch of tiles, but the eye perceives it differently.

Question -My artist are told they have a maximum of 32MB to use for textures. How many textures can they use if they are limit to 256 x 256, with a 24bits palette of 8bits color depth?

(32*1024*1024)/((256*256)*(24/8)=170

LAB
Question 1 – Define a Callback function?
A callback function is a function that is called through the pointer of a function. The address of the pointer is passed as an argument to another, when that pointer is used to call the function it points to it.

Question 2 - When exactly is myDisplay()called? How do you get to your findings?

It is called after the initialization of the program window. It can be seen in debug mode. Set a breakpoint at the point when it calls for myDisplay().

Question 3 – List the process to access the VRAM.

It first obtains the memory pointer to VRAM. Then it obtain double buffer memory. It then clears double buffer memory. There after, modify double buffer memory, Copy double buffer to VRAM. aand then clear the double buffer memory again.

Question 4 - What color format are we using here i.e. 8 bits, 16 bits, 24 bits or 32 bits?

8bits.

Question 5 - How much memory have we allocated?
800*600*1= 480000bytes


Question 7 – Describe what has glDrawPixel() done.
It begins the command to draw the pixels on screen. This line is initialised before the image appears on screen.


For the practical, it is the first encounter to opengl. thus it was the first time we got a particular art on the screen. after drawing a couple off lines i experimented with the code and created some of the following.

Here is some screenshots from the lab practicals.






Tuesday, October 14, 2008

Command & Conquer Red Alert 3

Title of the Game: Command & Conquer: Red Alert 3

Platform of Game: Available on the PC, Xbox360 & Play Station 3

Genre of Game: Real Time Strategy

Developer: Electronic Arts Los Angeles

Product Model Year: 27 October 2008

Game Requirements: OS Windows XP SP2, Windows Vista (32-bit)
CPU Any Intel Core Duo machine,
XP: Intel Pentium 4 2.2 GHz or better, AMD Athlon XP 2100+ or better,
VISTA: Intel Pentium 4 2.6 GHz or better, AMD Athlon XP 2800+ or better
RAM 1GB or more
VIDEO NVIDIA GeForce 6800 or better, ATI Radeon X800 or better
SOUND DirectX 9.0c compatible sound card
DISC DRIVE 8x DVD drive or better
HARD DRIVE At least 10 GB of free space
Internet connection required to install (Cable, DSL, or faster connection)

Description of the game: Red Alert 3 is the next epic sequel to the Command And conquer franchise. It is the brainchild of the then, Westwood Studios. The game continues where Red Alert 2 left off. However with a new plot twist. With the soviet union backed up in Moscow facing almost total loss, on all fronts, A general(Played as Andrew Divoff), the leader(played as Tim Curry), and a scientist(played as Autumn Reeser), went back in time to erase Einstein from history. They return to the present finding themselves with an altered time line where nuclear weapons were never created and where the allied forces have freeze rays and the new faction, the rising sun. The Franchise is famous for its well known cheesy yet exciting Full Motion Video, with this time round, a full star studed cast.

• Gemma Atkinson (the UK's Hollyoaks)
• Tim Curry (Rocky Horror Picture Show, The Hunt for Red October)
• Andrew Divoff (LOST)
• Kelly Hu (X2, The Scorpion King)
• Jenny McCarthy (Scream 3, former Playboy Playmate of the Year)
• Ivana Milicevic (Casino Royale)
• Jonathan Pryce (Pirates of the Caribbean)
• J.K. Simmons (Spider-Man, Juno)
• Autumn Reeser (The OC)
• Peter Stormare (Prison Break, Armageddon)
• George Takei (Star Trek, Heroes),
• Randy "The Natural" Couture (former UFC Heavyweight champion)
• Gina "Conviction" Carano (Undefeated Elite XC fighter, American Gladiators)

The game is famous for its’ over the top acting where the actors take it so seriously it’s almost a joke in itself. The game sprouts random humor as it progress and allows players to enjoy it.

Game Play: The Game features Full Motion Videos by real life actors before and after the game play itself in story mode. The campaign is built around the ability for you to bring your friend along with you as you play the campaign. Unlike previous spin-offs, multiplayer now plays a key role in story mode. This changes the whole aspect of game play, where you can now drag in a friend. Alternatively, if you rather play yourself, you can choose one of 12 commanders all of which are smart enough to not require hand holding but dumb enough to not win the game for you. Each of these commanders are also voiced and acted by real actors, thus bringing a new aspect to the genre. Each unit has now 12 quotes when you click on them and they now interact among one and another when you put them close to other units. From what I’ve seen, the soviets appear to take subtle humor into the game more than the allies, but this remains to be seen.

Naval Warfare is now a key in the game, where many fans previously state that naval warfare was ignored, now, the sea plays important strategic role in the game. Buildings can be built on the water and tanks are now amphibious. I almost laughed aloud when I found out that tesla coils and tesla boats are in the water, with it almost bothering on insanity.

Graphics: Graphics Wise, the game breaks no new barriers, with its’ modified SAGE Engine, it is practically a clone of the then Red Alert 2 game. It does give reminisces of the C&C: Generals Engine, however the outline of the game is more humorous then serious, thus the graphics tend to look a bit cartoony, however the water in the game is Fantastic.

Sound : With the Star-Studed cast sharing both their voice with the game and their bodies(no pun intended), Sounds are definitely a step up. With unit interaction and the subtle jokes and chit chats among soldiers spilling into my speakers, I was giggling like a little girl everytime they made a subtle joke.

Every Explosion and battle sound effect, it almost feel like you are fully submersed into the game.

Conclusion: With EA’s announcement that they are hiring movie directors to create games, this is a good step into their line. Another promising sequal to one of the most longest running series, Command And Conquer.

Wednesday, May 14, 2008

Abit Of detailings

Here's The latest bot design.

Saturday, May 10, 2008

Latest Bot Upgrade

I humbly present MY latest work. I will have to think of a creative name other than dreadnaught now since it has been modified and based off 4 different robot designs, namely, the CNC 3's GDI juggernaut, Battlefield 2142's T39 Bogatyr and L5 Riesig, and ultimately the dreadnaught from warhammer 40000.
Not much comment or creative writing for now since it's still a work in progress.

Edit:
after some critics from some people, i have changed things quite abit... The new bot looks like this
Yeah, the previous design had a flaw, the canons were solid, so they could not be kept, in this version i broke the canons into 3 segmented barrels. The rockets were resized to be larger and the gattling gun is resized to be smaller. Also, i added the exhaust pipe back, since it was missing, but shrunk it for the 13inch guns.

Friday, May 9, 2008

Industry Review

So, for some people who know me or may not know me, i'm intending to make it big in the game industry, but i'm not looking at working for a big time or big name firm in the game industry. Well, it's either the GEN Y push that's making me have this drive since i was small or my experiences in working. Eitherway, one thing i can compile to make a successful business i intend to build.

Firstly, there should be openess. There will be a time to slack and there will be a time to work. They should not go together, unless, well, you consider work to be slacking, heh. Which in some ways will work. For me i enjoy modelling as a part time thing, but i don't intend to do it forever. so yeah.

Secondly, your problem is my problem. If you're not happy, i'm not happy. Simple enough to understand. If you are not happy it would not be in my interests to keep you unhappy, since you would probably do crummy work.

Thirdly, inspiration can come from anywhere. In this industry, we actually incourage people to have extended vacations and what nots as it gives opportunity to relax and at the same time have an inspiration to do other things.

Fourthly, try everything, and choose something you like. If you like rock climbing, why not incoperate that as an idea.

Fifth, one of the important things, ETERNAL FREEDOM, it's something i define as. The freedom to choose where to work, to choose what you want to work on, though sometimes you have to do things you don't like, the freedom to give something a chance.

Sixth, money should not be a factor or a driving force, it should be passion. If you love it, you will work for it, if not then it's not worth working for.

Lastly, and the most important, and is my personal philosophy, if you like your work, you will excell. No point on working on something you don't like. it doesn't make any sense. Have the dream and work towards it.

Mine has always been to be a leader. To create a company well known for games that step out of the boundary and make it big. That is something most companies lack these days. Even yes, dare i admit? Big companies. They neglect proper gameplay for graphics. Which in someways, maybe good, but in others, that just makes the game more of an eyecandy than anything else.

I love games and i love business, that's why i want to merge my both my loves together and making something big in the future. Who knows, perhaps it may grow into something successful.

C++ Loops...

Well, the more people i showed this blog to on the C++ lessons, the more they want me to keep an up-to-date blog on the lessons made.... lol. okay, i can only do that if i understand. And i guess if i do a write up the more i'll understand better, and in a way it's my notes too. okay, so this week the discussions was on loops... so let's have an indepth look at loops.


So, how do i begin.... okay... picking off where we left off from switch,

cin : Ask User What sex is he or she
switch(userinput)
{
Case 'Male': Tell him he is a man

Case 'Female': Tell her she is a woman

default: user did not input what he is
}

So, let's say we want to keep on asking the user to input something that is either male or female. so here we can use the loop statement.

while(expression)
{
...
}

which in this case we can do,

-Declare what is USERINPUT.
-Declare what is TRY.

set TRY to FALSE

while(if try is FALSE loop again)
{
cin : Ask User what sex is he or she
switch(USERINPUT)
{
Case 'Male': Tell him he is a man
Set TRY to TRUE

Case 'Female': Tell her she is a woman
Set TRY to TRUE

default: Tell user the entry is invalid and to try again
Set TRY to FALSE(Or not since it is FALSE by default)
}
}

So, that would work in that form. So what happens is that when the user starts this program, it will ask the user to key in their sexual state. lol. And have to type in either MALE or FEMALE. If the user keys in anything else, it will just repeat the same question over again.

One of the dangers of using the loop statement is the eternal loop that can follow if it is missused. What happens is that, it will continue the loop as no one defined where it should stop. so let me show you an example.

Define User

While(if user is human loop again)
{
ask user what user is
}

That is an obvious thing. Since only humans can use the internet. It will keep on asking the user what he is. Also, since it's in this state, the program is still running so it will keep on asking this question over and over again. an endless loop that the user can only terminate by an ALT-F4 or by restarting the computer. In extreme cases it's the latter choice.

So the important thing is always to keep the expression in the while statement up to date, unless you want it to keep on annoying the user on something. There should be a point in which it can break the loop. That is the most important in coding.

Okay, now that we have looked at the simple way of coding, now let's look at the more streamlined way to do it. This way is better as firstly it's alot more cleaner, makes you look pro and beats writing alot more code... which i will show you in a while.

for (initial statement;loop statement;update statement)
{
...
}

...hmm... this part i'm not exactly sure right now, so i'll leave it down here for now, i'll be back when i properly understand this part, and then i'll continue this lesson.

Edit: Okay so after some deliberation....

basically what the above means is:


for (set ask to 0; if cheese is yes or if "ASK" is 3, exit;increment "ASK" by 1)
{
Ask if user likes cheese
}
switch(cheese)
{
case 'Yes' :
Output YAY CHEESE!~
break loop;

case 'No' :
Boo to you.....you suck
}

See? That would work. what basically is happening is that, at the start by default the program will set ASK to 0 since it needs to be defined. Then what happens is, if the user tried the program and typed in no, it will loop again, for 3 times before displaying you suck. on the other hand, if the user types in yes, it will print yay cheese.

Basically that's all there is to it in loops. i hope you took back something from this. =)

ARGGGGGHHH.....

That's really a catchy tittle. haha. Well... let me do it again..... ARRARRRRGGGHHHHhh...... Finally that's out, well what happened is that i accidentally overwrited my work on the dreadnaughts. And my back up is 3 weeks old, that was the very first version. So no point starting from there. Eitherway, i had wanted to work on the body again, so i decided to rework the whole thing again. In fact, i did it during my VART period which was 4 hours and i managed to produce a working, semi complete product.


And my lecturer thought that the pictures i showed her in my blog was someone elses work, so this is an...IN YOUR FACE JAMIE... haha. lol. This is my pro-ness...face it. haha. Well anyways, in this new version i decided to frankenstein parts from other robots and improve on it's design. Notice that i took a new approach on it's legs. also, i remodelled the rocket pods to be able to hide into the shoulder.

Well, during yesterday's break, i was bored, i decided to work on a small project, and one thing led to another and i made this...



Yeah it's my version of ironman's jerico missile... haha.. it so pwns you... haha. For the background i used one of the OS's wallpaper... can't remember whose. if someone finds out, please tell me. I used it as a kind of backdrop. anyways, back to work, the bot's dateline is next week.

Wednesday, May 7, 2008

C++ Arguments

Personal comments: I'm bored enough to actually do this write up... so yeah lol.

C++ is not a particularly favourable language for me, but it does have it's benefits. In short the language is used for Object Oriented Programming. So it would make alot of sense to use it to design games, though other languages are equally capable of doing so. However this little write up is basically not about the arguments on different languages, instead it is an arguement on what suits where in C++ programming.

Since in class we recently covered if else and switch, my first argument is when each is suitable and why certain if else codes can simply be replaced with a switch. Most people seem to find ifelse to be highly difficult to utilise, which i see as more of an utter lack of understanding for fundalmentals.

if(...)
{
....
}
else
{
...
}

that is a simple if else statement it's like saying..

Ask user if he is boy or girl
if(user is boy)
{
tell him he is a boy
}
else
{
tell her she is a girl
}

simple enough? Yup, now let's look at switch, usually it's more efficient to write in that situation,
like above, but what if you want to write another add on, like if the person asked is a man or woman. You would see this:

Ask user if he is boy, girl, woman or man
if(user is boy)
{
tell him he is a boy
}
else
{
if(user is girl)
{
tell her she is a girl
}
else
{
if(user is woman)
}
tell her she is a woman
{
else
}
if(user is a man)
{
tell him he is a man
}
}

that was quite a code... imagine if you had to code it like that... that would be madness...well.. perhaps if you wanted to add another one which would be child aged 1 to age 9..... We can use something called a switch, which is,

switch(variable)
{
case 1: ...

case 2: ...

case 3: ...

case 4: ...

default: ...
}

now let's try the first one again with the switch way.

user inputs what he/she is
switch(userinput)
{
Case 'Man': Tell he is a man

Case 'Woman': Tell she is a woman

case 'Boy': Tell he is a boy

Case 'Girl': Tell she is a girl.

default: user did not input what he is
}

See? see how simple the code is now and how short it is? if you want to go one step furthur, you could just combine it with the ifelse, which i won't show it here. So you see certain situations the if else would do well, but in other situations, where possible, use the switch.

Tuesday, May 6, 2008

Dreadnaught MKIII

After furthur development at the labs, I have designed the next generation walker that will dominate battlefields. Introducing...

Dreadnaught MK III Variants
This latest design was based off the original design and have improved armour plating. The previous design was strictly melee and long ranged with the rockets add on. Now the latest variant has an added Bolter which with penetration powers of up to 1500km/h, it can take care of the troops and vehicles that plague the general battlefield. The stabilisation systems have also been improved with added weight shifted to it's center of gravity. the core which have always failed and exploded at very unpredictable circumstances, has been replaced with a new Mercury-Plutonium mixture, in which the the core will no longer blow up with catastropic losses.

After furthur deliberation, i have decided to phase out the melee only variant and introduce the MARK IIII.

Dreadnaught HBV-MkIIV
This latest update has new and improved rocket pods, which are now on a swivle. The previous designs had been static, which cause the controllers of the robot to be inaccurate at firing the missiles. The missiles previously had to be upgraded to be fitted with a heat seeking capability, thus with the new upgrade, the missile costs can be downsided in place with a more powerful armament. The bolter have shrunk slightly to allow easy targeting of enemy vehicals.

Wednesday, April 30, 2008

VART Assignment

I thought i would begin documentation of my work here,
for the first Visual Art Assignment. Basically the task was to model a robot. I choose the warhammer 40 000 series, dreadnaught. I revised it three times, till now, well actually alot more times, some undocumented. SO far i have put in more than 8hours on this project.

Dreadnaught Proto
This is the most earliest primitive design of the dreadnaught. There is no detailings yet, it's main design was to recreate the based off design in it's early stages. Basically it lacks any sort of functional weapon and can only be used in melee combat.

Dreadnaught Model T
The following is the first version of my dreadnaught.
Well, from the first design, the most difficult to model is the legs, at this time, the legs are very stubby and the design is basically flawed. the shape on the far right that was left out is supposed to be part of the robot which eventually is scrapped. There is extensive detailings yet in this version.











Dreadnaught HV-MKI

The next version is the hellfire variant. Which i call the Dreadnaught HV-MKI. This version is similar to the legacy version, but it has an added rocket pod which houses the Hellfire Tridant Missile. It can carry up to 6 in each pod, which altogether houses 8 missiles. The missiles are all tipped with an advanced Uranium-Helium combination which makes it even more deadly. The missile beside the variant is a blown up version. Notice the tilted angle of the fletches, it's designed to spin the missile while airborne.

Nope, i have yet to remodel the legs.


Dreadnaught HV-MKII
The most recent version is the Dreadnaught Hellfire Varient MKII. Finally i remodelled the legs. It now has more stronger stabability thanks to the new neuron fluids injected directly to the appendages. During battle tests, the previous versions worked well under urban conditions, but on planets that has a high volume of vegetation the dreadnaught would tip over and the space marines would have to pick it up and set it right again. The latest variant would make it almost unstoppable, with the latest advanced pure Itanium shielding and cybertronic neuron stabability systems



The following are top secret blueprint direct from the Emporer's Research techpriest labs.

Saturday, April 12, 2008

Power of Simplicity

Technology has come a long way since the years of monochrome computers and computers the size of zapplins. Languages used in programming have also changed. Fromt he years of Fortran and other low level programming to C, C++, C#. Basically if you take both the codes side by side and compare, things have taken a new turn. Simplicity has become the keyword.



Now look at google. Yep, when you think of simplicity, what other company can you think off that has a functional site, that is so simple. Much of google's success comes from this simplicity. Its a good example to show how the internet has changed. One does not need to go far to figure it out.

Then we look at microsoft. Alot of people will argue that microsoft isn't exactly simplicity. Truth be told, they arn't. But the point i'm trying to drive at is that, microsoft built their OSes with the end user in mind, people who are not programmers or "geeky" enough to figure out the dos commands. So that's when the GUI was king. people didn't need to remember bucket loads of commands to get something easily done. Non computer literate users didn't need to remember the series of commands to be keyed in for the OS to do something simple like, moving a file.



Then perhaps another company would be in mind when the word simplicity is mentioned. The almighty apple. nope i'm not talking about the one that fell on newton's head, I'm talking about steve jobs's Macintosh. Yes, you die hard apple lovers would purr at the thought of an apple, but it all comes down to the end user. Since most people are now more computer literate, their requirements of their computers have also expanded. People do not want to only see a movie, they want to see it in high definition, thinking about music? Dolby surround is the way to go. Email? Secure outlook express. (lol)

But seriously, simplicity has it's way to some time fowl up. The more advanced users want more functionality. Microsoft has a way to make the most simplest of tasks difficult. Think about the shut down function. You can either press the power off button on the pc and the system will initiate the shut down procedure, or, click on start, shut down, Turn off. Now, does anyone see a problem here? To shut down, you need to click a menu which says shut down, then click on turn off. That's like, menu in menu. What's so streamlined about that? Even the most simplest of tasks is so time consuming.


What has the computer age done? Have you adapt to your computer? OR your computer adapt to you? Simple questions which requires simple answers. If you're a long time windows user, think about it. have you been so used to clicking on start then programs then that office application, that when you see a mac and actually tried it, you feel awkward? The simplicity bestowed upon us is now a curse. Simplicity for the sake of the programmers in the company, while the poor shmucks relentlessly flip through manuals and forums trying to figure out what is wrong.

Then there's Linux, oh yes how can we not talk about that. Linux, is also not well known for it's simplicity....oh boy is it not. But recent developments have made linux dare i say it? More simple then pressing a remote. Take ubuntu for example. It has come a long way. Based of debian's unstable branch, it has become something more than just another distro. Nope this not a "OMGawd Linux Pwns 1337 @ss" discussion. Linux does have it's faults. Want to update your system? go to synaptic or whatever updaters that distro uses and search for the update. What about configuring an application? For some reason I can't because of administrator settings, what's that? Not everyone knows that some of those things are for their own good and they tend to realise that linux just isn't for them. It's too complex, even with all it's coolness, like compiz and it's lack of viruses & spyware.

So where do we draw the line between functionality and simplicity?

-----------
Credits to images:
Google Homepage: http://www.techcrunch.com/wp-content/google-video-homepage.png
Windows 3.0: http://www.edwardsamuels.com/illustratedstory/chapter%204/windows.jpg
XP Shutdown image: http://content.answers.com/main/content/wp/en/5/5e/Windows_XP_Shutdown.png
Ubuntu Desktop: http://www.productwiki.com/upload/images/ubuntu_7_10_screenshot_1-510-375.jpg

Start Up Blog

Hi, yeah, i opened up this blog to document my studies in computer game programming and design, since i was told my seniors did this and got extra credits .... so yeh i'm doing it too. Stay tuned for writeups i'll be making on this line.