Archive

Archive for the ‘Programming’ Category

Game development Update

August 31st, 2009

For the last couple of days I’ve been playing around with panada3D game engine. So far with out much problems I’ve been able to create 3D sound, landscape collision, 3rd and first person camera. I have also been messing around with blender and been able to UV map my models that I make useing it. This means that my boaring white meshs are all nice and colourfull see;

UVMapThe orb of Azumanga spins!!

Pete Programming, StarQuest , ,

Set start_point for Panda3D useing Blender

August 30th, 2009

How to create a start point position for your maps/models useing blender and Panda3D. When I was following the Roaming Ralph sample code I was unable to recreate the world model to use the start point value. This is how to do it.

Step One:
Create a Vertex or plane, any thing, in the place where you want your start_point to be.

Step Two:
Make sure that you are in Object Mode not edit. Press F7 which will take youto the Object Panel (See Left) and change the name of the object to “start_point” (See Right)

Step2Step3

Step Three:
Export useing chiken to egg, and check to see if it worked by pressing “Shift + L”, check the command line to see if it says something like,  PandaNode start_point T:m(pos -6.71705 9.45356 5.36108)

You should now be able to get the position of the start point by doing something like this. self.environ.find(“**/start_point”).getPos()

With help from here and here. Hope this helps someone. Comments welcome ^_^

Pete Programming, Tutorials , , , ,

Frame rate independent movement in PyGame

August 19th, 2009

To make sure that your game runs the same on all computers that can handle it. You will need to make sure that your actions are independent from the frame rate. To do this in python you can put this code above the game loop

framerate = 60 #frames per second
clock = pygame.time.Clock()

and then at the end of your game loop put

timepassed = clock.tick(framerate)

This should help with makeing the game more playable ^_^
Hope this helps.

Pete Programming , , ,

Stale Desktop Environments

June 28th, 2009

I am board of all the same desktop environments, they all look the same. They all have the same flat 2D display. since the release of Vista they have all gone flashy and shiny, that’s great but it is still the same as the old ‘95 desktop, it has a menu at the bottom and flat 2D windows. Yes there are some desktops that have some sort of 3D or 2.5D display but these are all still fundamental the same thing.

What I am trying to say is that we need to have a good long look at the current desktop and see what we can do to make it new and exciting. I shall prove my point with these images.

I mean they are all the same, I know Bump Top is different but its still not that different to what we have at the moment.

Basicly I’m looking for something completely different, yet simple to use and has an innovative user interface.

More Information and references

Windows 3.1x XFCE 4.0 Windows 98 Windows XP GNOME Windows Vista KDE Windows 7

Pete Information, Programming , , , ,

JScrollPane back to top

May 1st, 2009

If you want to make your JScrollPane return to the top once you have enter some text, try this:

myTextArea.setCaretPosition( 0 )

It places the curser back to zero and in turn makes the JScrollPane go back to the top.
Worked for me, hope this helps someone.

Pete Programming, Tutorials ,

MMORPG Update #2

March 9th, 2009

Okay so after a very long time here is a MMORPG Codename Starquest Update.  This only contains some basic images, which have been created useing the IrrLicht engine and varius other applications such as 3D Studios Max, Blender, Earth Sculptor and Photoshop.

Below shows the lightmapping test on a room mesh.

Lightmap created useing images

The lighting was created useing irrEdit, it generates the light effect and creates an image to be placed over the mesh.  There are other lighting effects called Per Pixel Lighting and this is created dynamicly by the application.  Below is an example of such effect.

Spaceship mesh with per pixel lighting

I have also be anble to crate an appliacation that uses 3D Sound, the engine is irrKlang, this means that depending on where you are, or in this case the camera, in the 3D world it will change the position of the sound source.  I have also created a nice 3D landscape useing Earth Sculptor, a simple to use 3D Landscape application.

Landscape, with skydomeLandscape wth skydome diffrent location

These landscapes have been created with a skydome, which is an image that you can see in the sky and will allways see no matter where you are located in the 3D world.

So this is a nice update for the development of Codename Starquest.  I will continue on creating and developing, so we shall see what happens.  The plan is to create a small working First Person game, then third person.  I will update you when this happens if at all ^_^

Pete out.

Pete Programming, StarQuest , ,

Programming Variables Very Basic

September 12th, 2008

A variable is data that is stored in the computers memory. A variable can be a number (Integar, Float) or just one letter or number (Char) or it can be a string of letters or number (String) in some programming languages like Java and C/C++ you need to declare and initialize the variable, this means that you have to say what type it is and what it is called.  With some scripting languages like Python and PHP you don’t have to declare them which means that you don’t have to say what type they are you just give them an name.

How to declare and initialize in Java:

int foo;

foo = 15;

String foo1;

foo1 = “String”;

How to declare and initialize in Python:

foo = 15

foo1 = “String”

This is a very basic introduction, hope this has helped someone.

Tracking GIR!

Pete Programming, Tutorials