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 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 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
 ;_;
<####> =)
 I missed one
 damn it
<####> aparently
* #### sets mode: +o hothead
<####> :-P~
 . . .
 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
<####> =)
 lol
* #### sets mode: -b *!*@wbar5.wdc2-4.16.149.60.wdc2.dsl-verizon.net
 http://gbarex.free.fr/gougoule/gougoule2302/blondes/blonde.swf
 woah
 what's this?
<####> btw is that
 I don't know
 it was posted in
 ...
 LOL
 a place which does not exist
 >_>
<####> thats great =D
 I'ms till watching it
 I don't know why
<####> u are teh cool
* #### sets mode: +o Mushu-san
 yay
 that's fxcking awsome
* Mushu-san is still watching it
 so is
<####> =)
* hothead is too
 I FEEEEEEL
<####> WHAP!
 I'm just on the phone
 and I feeeeeelll
 Iiiiiiiiiiiii
<####> hopefully that was Design Patterns
<####> it would make it good =)
 LOL
 lol
 dear god
 post that in your journal
 Try to pause on the book
 ratings gallor
 oh
 I got it
 Its too blurry to make out, though
 aight
* Mushu-san makes journal entry
 hey
 post this convo to
 lol
 I was going to
 alright
 Wow.. only entry #82
<####> she sounds like, european
<####> =)
 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
 some guy is telling me how good Java is *rolls eyes*
<####> =D
 STOP SPAMMING
<####> OMFG JAVA IS TEH COUL!!!
* Mushu-san :P
<####> "whap!"
<####> =)
* Mushu-san goes to copy
<####> eh?
* hothead !
<####> YAR!
<####> =D
 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:
OKAY! I know what kind of game I’m going to make
hold on – let me close my door
this is so sweet
You are now AFK, type anything to come back.
Mushu goes AFK
Mushu comes back to keyboard
back
Okay – so it takes place in the Magi Era of Japan
you know, with swords, guns
and NINJAS
So you start out as a single swordsman
and you get an army of ninja swordsmen
and kill zombies and shit
and as the game goes along
you can get gunpowder units and shit
and eventually you’ll be able to build a GIANT ROBOT
and the robot will look like Maegas (from XRL)
*XLR
and when you build it, the XLR theme plays
and in multiplayer, everyone can hear the theme
so its like
dum
WATCH OUT
badadada
dum
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
and then you’re like shitshitshit
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
badadum
NICE
Yeah, so then you’re all like, fuck, where’s tha giant robot?
and then it comes an rapes your base
and then its all like
“ALL YOUR BASES BELONG TO US!!!’
111
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 , 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 »