The random rantings of a concerned programmer.

Archive for February, 2005

(Untitled)

February 24th, 2005 | Category: Uncategorized
  • Random Observation of the day!!
    If ########### is going to bitch like that someone should remind him that he is living in one of about 100,000,000,000 galaxies in the universe, and our galaxy is about 500,000,000,000,000,000,000 times bigger than he is

    (I’ve run out of material)

Yeah, so, uh… nothing really new. I’ve been reading Josuttis, ~100 pages/day, and he makes my current engine layout look like shit. I could have made my life a hell of a lot easier with some creative template classes, and *gulp* …STL.

Anyway, if I do reincarnate it (it would be the 3rd time) I’d make my own linked list structure that supports random access to speed up inquiries AND allow rapid sorting of elements. Which is necessary when the elements must be sorted to render properly, and their positions change.

My plan to achieve this would only be plausible for lists of class objects, because, well, I’ll explain:

// note - this is only psudocode
template <class T>
class VecList {

   // this is a list of all the elements themselves
   // where the actual data is stored.
   std::list<T> tehList;

   // this is a vector of pointers to the nodes. It
   // is sorted based on the order that the elements
   // were added. The internal structure of a list
   // provides the pointers to the nodes stay constant,
   // thus, we can store pointers at the loss of only
   // 1 byte/element. 
   std::vector<typename T*> tehVector;

   // the function by which the list is sorted. If I
   // were to make this for a collection of units in
   // an RTS, I'd be sorting by Y-Value, so that they
   // would draw in the right order w/o a z-buffer.
   bool (compFunction*)(T&, T&);

public:
   
   // add an element into the list, sorted
   typename T* addElement(T&);

   // add an element With Out Sort
   typename T* addElementWOC(T&);
   
   // sort the list, overloaded to sort with a different
   // comparison predicate.
   void sort();
   void sort(bool(newCompFunction*)(T&,T&));

   // and a special sort that only evaluates the position
   // of a single element. Useful if you're only moving one
   // but have to do it every pass (ie, moving a unit)
   void sort(int index);
   // although, if you're moving lots of units, it'd probably
   // be better to just call sort() once per pass.

   // and some accessors

   // get it based on a criterion
   typename T* getElement(bool(getFunction)(T&, void*), void*);
   
   // get it based on the index, which is basically what number
   // the element was when added. It _should_ be stored
   // internally to the element, but technically, could
   // just get the pointer at that index in the vector.
   typename T* getElement(int idnex);

   // and then we'd have all the other crap, so that we
   // could use some of STL's generic functions on our new
   // container.

   // don't forget operators

   // unary index operator - returns the pointer stored
   // at the specified index in the vector. Gives us
   // random access control.
   typename T& operator[](index);

   //and other crap
   typename T& operator=(T&, T&);
   bool operator==(T&, T&);
   //...etc

   // and finally, constructors/destructors. Do stuff here.
   VecList() {...};
   ~VecList() {...};
};


And that should give you a container that would autosort like a set, but have non-const values, be sortable after values change, like a list, and have fast random access, like a vector. Or maybe I’m just full of hot air, because Josuttis has brainwashed me with all this template STL-nonsense. Oh well. Screw it all.

Man, I’m starting to sound more like some tech journal from hell. I’ll have to think up something better to post ta morrow.

Comments are off for this post

Entry #82: AND I FEEEEELL….

February 23rd, 2005 | Category: Uncategorized
  • Random Observation of the day!!

AND I FEEEEEEEEEEEEEELLLLLLLLLLLLLL

The conversation that followed:

* Now talking in #EDITED
* hothead has joined #EDITED
<Mushu-san> ;_;
<####> =)
<Mushu-san> I missed one
<hothead> damn it
<####> aparently
* #### sets mode: +o hothead
<####> :-P~
<Mushu-san> . . .
<hothead> horray
* hothead sets mode: +o Mushu-san
* #### sets mode: +b *!*@wbar5.wdc2-4.16.149.60.wdc2.dsl-verizon.net
* ####sets mode: -o Mushu-san
<####> bad hot head
<####> no @ for mushu
<####> =)
<hothead> lol
* #### sets mode: -b *!*@wbar5.wdc2-4.16.149.60.wdc2.dsl-verizon.net
<Mushu-san> http://gbarex.free.fr/gougoule/gougoule2302/blondes/blonde.swf
<hothead> woah
<hothead> what's this?
<####> btw is that
<Mushu-san> I don't know
<Mushu-san> it was posted in
<Mushu-san> ...
<hothead> LOL
<Mushu-san> a place which does not exist
<Mushu-san> >_>
<####> thats great =D
<Mushu-san> I'ms till watching it
<Mushu-san> I don't know why
<####> u are teh cool
* #### sets mode: +o Mushu-san
<Mushu-san> yay
<hothead> that's fxcking awsome
* Mushu-san is still watching it
<hothead> so is
<####> =)
* hothead is too
<Mushu-san> I FEEEEEEL
<####> WHAP!
<Mushu-san> I'm just on the phone
<Mushu-san> and I feeeeeelll
<Mushu-san> Iiiiiiiiiiiii
<####> hopefully that was Design Patterns
<####> it would make it good =)
<hothead> LOL
<Mushu-san> lol
<hothead> dear god
<hothead> post that in your journal
<Mushu-san> Try to pause on the book
<hothead> ratings gallor
<Mushu-san> oh
<Mushu-san> I got it
<Mushu-san> Its too blurry to make out, though
<hothead> aight
* Mushu-san makes journal entry
<hothead> hey
<hothead> post this convo to
<hothead> lol
<Mushu-san> I was going to
<hothead> alright
<Mushu-san> Wow.. only entry #82
<####> she sounds like, european
<####> =)
<hothead> that's funny
<####> yer-rope-pe-on
<####> =)
<####> hehe
<####> like rice pudding
<####> and... 
<####> cricket
<####> =)
<####> speaking of which
<####> this calls for some ice-cream
<####> and some modeling
<hothead> some guy is telling me how good Java is *rolls eyes*
<####> =D
<Mushu-san> STOP SPAMMING
<####> OMFG JAVA IS TEH COUL!!!
* Mushu-san :P
<####> "whap!"
<####> =)
* Mushu-san goes to copy
<####> eh?
* hothead !
<####> YAR!
<####> =D
<hothead> link me to your journal post when you're done!!1one



2 comments

Entry #81

February 12th, 2005 | Category: Uncategorized
  • Random Observation of the DaY!!
    CHICKS DIG GIANT ROBOTS!

Okay – here’s my gameplan:

Quote:
<Mushu> OKAY! I know what kind of game I’m going to make
<Mushu> hold on – let me close my door
<Mushu> this is so sweet
You are now AFK, type anything to come back.
Mushu goes AFK
Mushu comes back to keyboard
<Mushu> back
<Mushu> Okay – so it takes place in the Magi Era of Japan
<Mushu> you know, with swords, guns
<Mushu> and NINJAS
<Mushu> So you start out as a single swordsman
<Mushu> and you get an army of ninja swordsmen
<Mushu> and kill zombies and shit
<Mushu> and as the game goes along
<Mushu> you can get gunpowder units and shit
<Mushu> and eventually you’ll be able to build a GIANT ROBOT
<Mushu> and the robot will look like Maegas (from XRL)
<Mushu> *XLR
<Mushu> and when you build it, the XLR theme plays
<Mushu> and in multiplayer, everyone can hear the theme
<Mushu> so its like
<Mushu> dum
<Mushu> WATCH OUT
<Mushu> badadada
<Mushu> dum
<Mushu> badadada
You sing: YOU DIG GIANT ROBOTS
You sing: WE DIG GIANT ROBOTS
the Alchemist sings in a bad voice: living here in jersey
You sing: CHICKS DIG GIANT ROBOTS
the Alchemist sings in a bad voice: fiting bad guys from afar
<Mushu> and then you’re like shitshitshit
<Mushu> because Maegas and ninjas and zombies and shit are attacking
the Alchemist sings in a bad voice: you got to put first gear
the Alchemist sings in a bad voice: in your giant robot car
You sing: YOU DIG GIANT ROBOTS
You sing: WE DIG GIANT ROBOTS
You sing: (SOMETHING) DIGS GIANT ROBOTS
You sing: CHICKS DIG GIANT ROBOTS
<Mushu> badadum
<Mushu> NICE
<Mushu> Yeah, so then you’re all like, fuck, where’s tha giant robot?
<Mushu> and then it comes an rapes your base
<Mushu> and then its all like
<Mushu> “ALL YOUR BASES BELONG TO US!!!’
<Mushu> 111
<Mushu> one


THIS GAEM IS GINONG TO ROXXOR UR SOXXORS!!!

3 comments

Entry #70-ish

February 10th, 2005 | Category: Uncategorized

  • Random Observation of the Day!
    Yeah – I’m back. I don’t care what TANSTAAFL says about crack – the GDNET addiction is much harder to break.

Oh – and STL is evil. Veeeerry evil. And before you yell at me to use STLPort – the problem was in <fstream>, which doesn’t come with STLPort. So I wrote my own, using the C/ANSI stream crap. And guess what? It works great!

Now I can only blame bugs on my faulty code. Ahh… dammit.

(Random Observation #2: this is more like 80-ish than 70-ish, but the 70s were cooler than the 80s, so I guess its okay to leave it that way)

5 comments

Entry #80!!

February 02nd, 2005 | Category: Uncategorized
  • Random Observation of the Day!!!
    Hïtlar? or Hitlär?
    (in response to John Hattan’s comments)

Okay, so as promised, I present to you:
Mushu’s Approved Journals of Awesomeness!!
Okay, so if you’re not on a list, don’t panic – there’s always the next time I rate all the journals. And, uh, these are in no particular order; well, they are, it just kind of depends on how far down the journal selection screen you are at this very moment, because that’s what I’m reading from. ANYWAY! THE WINNARS ARE…

  • Gaiden’s Scroll! It’s pretty well-written, and well, it has cool pics/videos so I don’t have to read anything..

  • Noaktree Roots Again, I’m just looking at the pictures, and these are almost better than pr0n. I mean… just look at those reflections!
  • Exclamation in progress, standby… Some funny stuff (it’s Pouya)
  • Reminisiencence He ripped me off, but that’s cool, because almost every post has a random picutre after its apparent random nonsense…
  • and finally… The Code Zone Developer Diary Makes me wish I had money to spend… and, come on? 26K hits? I’m SURE that’s hacked, but oh well… can’t argue!

A big round of applause for all the contestants!! [clap]

I’ll write up the honorable mentions tommorrow, but don’t worry – if you’re not on the list, it might be because you’re on the honorable mentions list!!! (or maybe not)

In a couple of weeks I’ll compile the top Q journal commentator/peanut gallery list, which a lot of my regular readers will probably find their sardonic names.. uh, sardonically scrawled in arial/times/the default font of your current board theme.

UNTIL THEN!

5 comments

Next Page »