Home » borg cube » Creator’s Journal: Holodeck Management System Progress

Creator’s Journal: Holodeck Management System Progress

Enter your email address to follow this blog and receive notifications of new posts by email.

Join 46 other followers

At about 7:30ish last evening, I was about to write a blog entry, when Starbuck’s promptly announced their nationwide closure due to computer issues, kicking everyone out.

It’s my belief that Starbuck’s is a sentient and intelligent entity.

And said: I’m done for today. Time for you all to go home!

WTG Starbuck’s!

Reviewing my list from two days ago:

1) Fix the 3D Sphere’s texture wrapping

I just figured out how to do this today, I will implement this tomorrow…. So adding this onto my manana list.
2) Fix the 3D segmented sphere

Fixed it. Was a problem with the initialization logic. Then broke it again when I went to add textures because of memory leaks the textures introduced. I have yet to test it as I have yet to clean up all the memory leaks the textures introduced.

Still on the todo list.

3) Create a texture class

Done. And boy does this look beee ewe tee ful.

So what I did was I created something called GLSkin.cs. a reusable object which cleans herself up when she’s done.

Here’s the header definition:


The constructor’s pretty easy to use, just pass it in a file name and it reads the file in, allocations the memory for the texture, and retains the information until delete’s been explicitly called.

Here’s an example constructor which prepared the rings from a file on the disk for my Saturn GL object;


Here’s an example usage for my GLSaturn object, where I set both the ring’s texture and the texture of the sphere itself, and promptly draw:


And I also added in a texture for the background, in this case, since Saturn’s clearly in space, I added a space based texture, named spaceskin.bmp here:


So when I am drawing the background for Saturn and – another one (I’ll get to it) – there’s actually a cool looking spacey background.

Check it out:


Beautiful, ain’t it?

Since this class is reusable, I tested it with different textures, refining the texture class to it’s current state – I suspect I still have some memory issues to work through, but I am keeping my eye on this. Check out the final working objects and associated textures:

The Borg Cube with Los Angeles in the background:


(Easily one of my favorites)

The CD Rom disk (Note this is a textured disk) in an office setting:


Alright, who threw it?

The slightly rotated Da Vinci Circle (The man was clearly a genius I might add) with a background setting in Da Vinci’s workshop:


I could almost hang that on the wall, making it look like it belonged in the scene!

The “Ice Cream” cone complete with cone texture with a background of an ice cream shop:


I should have put ice cream in it, I know!

The “Trash Cylinder” – a cylinder object with a flammable texture applied to it and a junkyard background:


I was still working on lighting on this scene.

The “Soccer Ball” – a sphere object with a soccer ball texture wrapped around it and a background of some soccer players:


Yeah, yeah, I know, the texture sucks. Nope. Wasn’t my fault on this one, just a poor texture choice which made it not wrap well around a sphere.

The Pyramid Object – a Four sided pyramid with a square base to it with pyramid style texture and in a Egyptian Giza backdrop;


And here we have – proof that Flat Earths actually exist! A texture Earth spread over a Square object with a space background (reuse, gotta love it baby):


Columbus, the world IS a sphere. AND there’s also FLAT versions and other versions out there!!!

As depicted below…

Finally, here’s the Segmented disk object BEFORE I broke it by adding in textures:


All of this is available to see – reacting to the keyboard input, before I applied textures, here (I am still utterly impressed with how cool the Borg Cube came out looking):


And that’s about it for textures.

I’ve still gotta do a double check on the deallocation of the memory to make sure I am losing the reference on that and other objects I am referencing on shut down. That’s on the todo list.

4) Add in positional and rotational methods into the base class

I added in the positional method and a class to manage positional information into the base class:


And created a 3D positional type to manage retention:


The GL positional information is obtuse, so I’ve abstracted it a bit so I can manage any changes to the base class management of position.

I have yet to do rotation in the base class, and yet to implement the positional information in the inherited classes.

Both added to the todo list.

4) Find textures of Venus, Jupiter, Saturn, Mars, Neptune, and Uranus to use in addition to Earth’s texture.

Found. And tested.I was rotating textures of all of these with the ‘s’ key before moving on, and after doing this, realized it would be more fun to find more appropriate textures for each of the objects rather than having them all be space based.

I mean. Mercury in a cone? Didn’t really look too cool.

5) Test out memory and the positional, rotational, and texture code by creating a whole boatload of 3D objects with different textures in different locations


Which is why I have plenty to do on my todo list..


1) Fix the 3D Sphere’s texture wrapping
2) Fix the 3D segmented sphere
3) work on rotation of pyramid
4) Check Memory allocation for all objects
5) Implement inheritance use of positional information
6) Create base class rotation information and implement rotation in the inherited classes
(For both 5 & 6 – these might be confined to base class implementations!!! would be nice)

This is what a homeless does for fun,…

Enter your email address to follow this blog and receive notifications of new posts by email.