January 2009
2 posts
Valve's take on materials →
Jan 7th
UML
Suddenly occured to me that I may have drawn the UML diagram in my PS2 report with the generalisation arrows the wrong way around :O Oops. Anyway, ArgoUML is going pretty well. About as many bugs as Umbrello but it has some nice features and runs under Windows at least.
Jan 7th
December 2008
57 posts
Tasks
Implement Queries Implement Actions Display better errors and warnings with line numbers - seperate file?
Dec 15th
Queries
isBigger[A,B] ? A:size > B:size -> if (a.size > b.size) { } isScarier[A,B] ? A.scariness > B.scariness -> if (a.scariness > b.scariness) { } isInitimidating[A,B] ? isScaries[A,B] & isBigger[A,B] -> if ( (a.size > b.size) && (a.scariness > b.scariness) ) { } action_Attack[A,B] ? isIntimidating[A,B] & A:aggression > 40 ->...
Dec 14th
Case Sensitivity
Orignally I also wanted this language to be case insensitive so I may need to add functionality to take all new names and convert them to lower or upper case. Should be a tolower function in the ctype header.
Dec 14th
Errors
It would be good to get some better error reporting - have something to count line numbers and have a few functions which deal with error logging, possibly to a file.
Dec 14th
Tools Progress
Ok, I have one linked list working. Easier than I expected. First tasks for tomorrow: change file names to something more meaningful. Linked list to something symbol table related. animalfuncs to something animal related. Implement a linked list for animals start writing function for when new animals are created etc The solution looks something like this list of animals, and meta animals,...
Dec 14th
Better Linked List →
Dec 13th
C Linked List →
Dec 13th
Also
this means I don’t need to make children of the animals class - just instances of it :)
Dec 13th
Oops!
I forgot how my language works - it queries *any* two (or three, or more) animals, not two specific animals. So it doesn’t matter if an animal has been declared before the query or not. Animals can be defined anywhere in any order :D This makes everything much simpler :D
Dec 13th
Project
So, Tools coursework is: yacc file lex file header & c file with functions for yacc Producing animals.cpp and animals.h animalmanger.cpp and animalmanager.h
Dec 13th
PerGen
Ok, so parser generator has a 16-bit installer, which wont work uder 64-bit Vista :/ Hope just copying it works, or I’ll have to use a VM or work from my laptop
Dec 13th
Singleton Some More
I’m going to modify my cam/light classes so they only return data, and have no functions to set it (apart from possibly resetting it). Whilst less flexible, this will maintain data integrity within these classes, and ensure there is only a one-way data flow from them.
Dec 12th
Oh dear god I am a MONSTER
Lamps->getEntity(i)->getEntity(1)->setWorldMatrix(S*T);
Dec 11th
Meh
Vector - fine. Random Access - seems fine. Clones -  not fine.
Dec 11th
Random Access
Looks like I will need to access individual items in my tree after all :( Vector time I guess.
Dec 11th
Clone Wars
Added functionality for leaves/composites to clone themselves, might need to overwrite the function in child classes though to ensure data isn’t loaded into memory more than once.
Dec 11th
Bob: "Hey Fred, how do I model a Loop?"
Fred: "Easy! Make a Loop class."
Bob: "OK. What operations should it have?"
Fred: "Um, lemme look. Prolly give it a parent, and instantiate it with a number of iterations and a stopping point."
Bob: "Wow, this OOP solves everything! What code should I put in the doLoop() method?"
Fred: "I think that's where you instantiate it"
Bob: "That's so cool, it's almost... confusing."
Fred: "Make sure you make it a Singleton. I've never seen a reason not to."
Dec 11th
I Can Change, I Swear →
Dec 11th
Texture Manager
Ok, so even after reading the previous article I made my texture manager singleton. I figure the need toonly have one instance and access the texture manager from multiple locations outweighs the problems with creating a global class. Also, it should be noted that data only flows one way, from object classes to the texture manager, not in two directions. Which makes things not so bad somehow. ...
Dec 11th
I'm HEARTBROKEN →
:O
Dec 11th
Naming Patterns →
“Anyway, you shouldn’t be using singletons anymore anyway.” :O - makes sense, given that suddenly you have global access to a whole class (which always seemed a little dodgy) but at the same time surely sometimes they are relevant? Will have to look further into the reasons behind this comment. “Composite - “One of the goals of the Composite  pattern is to make clients...
Dec 11th
References
I’m not sure entirely how much I need to reference. I mean there are some books/websites which have had an obvious influence on the project - those that solve a specific problem or provided me with background info on patterns. At the same time though, there are the websites which helped in the background, such as those on SVN. Obviously I found them useful, but using svn isn’t really...
Dec 11th
Prototype
Since I wont need to change the numbers of objects shown onscreen at runtime (I’m just rendering a 3D scene) it won’t be necessary to implement a manager for prototype objects - I can know for sure that I wont delete any classes objects which have made clones of themselves until the game is ended. If the scene was to be expanded to be included in a game, it would probably need to...
Dec 11th
GoF
Nevermind; borrowed from Phil and my parents have a copy. Read almost half so far. Disappointed, but I guess that’s just because Head First actually did a decent job of selecting the most important points and summarising them. Definitely wouldn’t want to be reading this one first though :/
Dec 11th
Class Names
Naming classes forming the composite patterns with names more specific to my problem was probably a bad move. Changing the names to reflect those traditionally associated with the pattern would make it obvious to anyone familiar with it what it being done.
Dec 10th
GoF
Christmas Present maybe?
Dec 10th
AHA! THIS! YES! Composite with Clone(); →
That’s exactly what I want, and as ever stupidly simple now I look at it. I just have the “Object” class implement a clone object which returns an identical object to itself, and Composite move through the tree calling it.
Dec 10th
Maybe Helpful on Composite/Prototype →
Dec 10th
Facade Example →
Looking at this example, the class acting as a facade seems to simply forward data to other classes and manage it between them, but not actually perform any actions relating specifically to a class which already exists. The one place in SceneManager where this is not the case is with input and controls. Perhaps abstracting this power from SceneManager would enhance my solution.
Dec 10th
Rules Of Thumb
(from the previous link) Facade defines a new interface, whereas Adapter uses an old interface. Remember that Adapter makes two existing interfaces work together as opposed to defining an entirely new one. This is true here, SceneManager defines a completely new interface for setting up and rendering the scene. Whereas Flyweight shows how to make lots of little objects, Facade shows how to make...
Dec 10th
Facade Pattern →
So what is the difference between this and a God class? How do you stop it becoming one? I don’t think my scene manager knows any more than it should - this is demonstrated by the fact the it simply calls functions and preforms action previously left in main, thus grouping actions and creating a single, simplified interface. It is still flexible in that it is not the only point of call for...
Dec 10th
SVN Revision Specifiers →
Dec 10th
SVN
AArgh tortoise svn apparently doesn’t include all new files when you commit by default… and the one time I forget to check the box to get them I actually need to use the repo :( I could recreate the lamp class but not the model :( Guess I’ll find something else to do until I get back.
Dec 10th
No-one showed up...
to the C++ lab so I’m getting PS2 stuff done I guess :/ I still don’t have the solution to my problem and I don’t have my notepad to make some notes, which is annoying.
Dec 10th
Not sure I actually need anything that complicated tbh :/
Dec 8th
Prototype Design Pattern →
Dec 8th
Looks like I need moar patterns :/
need to create allow entities to clone themselves I guess - create an virtual “clone()” function which can be implemented by subclasses. Sure there must be examples of composite+prototype patterns used in conjunction somewhere since it’s apprently common practice…
Dec 8th
“Designs that make heavy use of the Composite and Decorator patterns often can...”
– (GoF, p126) - http://en.wikipedia.org/wiki/Prototype_pattern
Dec 8th
grr
p = iterator to pointer to Entity *p = pointer to Entity **p = Entity &(**p) = Address of Entity temp = &(**p) = address of Entity need to use this to copy entity :(
Dec 8th
POINTURS
GWAAARR MY GAWD WUT IS HAPPENING!? have a class class has a list of pointers, to objects need to make a copy of the class need to make new instances of the objects the pointers in the list point to WUT?
Dec 8th
Composite Pattern (It isn't what you think) →
This looks interesting will read it later
Dec 8th
Dec 8th
Lamps
alright, so I started some work on the lamps. Got texture blending with the wall working fine, and it all plays nice with my framework. Need to add sn ms3d model, and maybe get point lighting to work.
Dec 7th
So...
at worst I guess this means I can render the whole scene again upside down under the floor :P
Dec 7th
Dec 7th
Dec 7th
Linux for PlayStation 2 Community →
w00t
Dec 7th
No Transparency for *anyone*
loi            0                                    ; Load 128 and put it into the alpha value lol wut?
Dec 7th