🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

DruinkJournal

1,237 comments
557 entries
Advertisement
Evil Steve
August 24, 2006
Untitled
OH JESUS CHRIST

Ok, spot what's wrong with this line:
memcpy(pVertex, &m_vFrames[0].vVertices[0], m_nTriangles*3);

pVertex is returned from locking a VB.

That bug has taken me the best part of 2 hours to track down. At least my MD2 loading code works now...



Ok, here's a screenie of the engine so fa…
282 views
Evil Steve
August 23, 2006
Untitled
Random fact of the day
Passing 60.0f for the FOV to D3DXMatrixPerspectiveFovLH() gives you an upside-down scene

It took me about 45 minutes this morning to spot that bug. I was passing 60 degrees to a function that was expecting radians. I'm surprised it "worked" so well. Everything looked good, mayb…
337 views
Evil Steve
August 21, 2006
Untitled
2D code; done.
Eraserhead; O________O
Got book; Visual C# Step By Step

I feel weird.
234 views
Evil Steve
August 18, 2006
Untitled
Fucking cocks.

Ok, I warn you now - this is not game dev related, it's a semi-drunk post (I've had 6 Jack's and coke [Oh god, so many...]), and I'm mighty pissed off.

So, my frined (Niki), another friend (Catherine) and I were at a club in Edinburgh (Opium). We were there for a couple of hours or so,…
292 views
Evil Steve
August 17, 2006
Untitled

[grin]


Click to Enlarge
[grin][grin][grin]

So yes, I have my font manager working with word wrap now. And my font manager uses textures much more efficiently. Hooray!
223 views
Evil Steve
August 17, 2006
Untitled
I tightened up my graphics. My font manager now squishes all the glyphs together onto the texture instead of listening to the GDI's text metrics (Which fucking lie) and using 64x64 regions for each glyph. The GetTextMetrics function says that the widest glyph in the 12pt ariel font is 62px wide. Wt…
297 views
Evil Steve
August 15, 2006
Untitled
Ok, I'm a lazy bastard. Not only did I go for the lazy way of getting the window Z order to work, but for text alignment I create the glyphs as if they were left aligned, then after they're created, I change the X coordinate. They're not visible anyway (I.e. not in the scene graph), so there's no p…
280 views
Evil Steve
August 14, 2006
Untitled
Well, text drawing is done and working. I'm reworking my GUI manager which keeps a stack of active windows at the moment. There's something a bit odd going on there, but I'm not sure what. It's a bit of a mess anyway, and could do with a good tidy up.

The way it should work is as follows:
Each window…
240 views
Evil Steve
August 10, 2006
Untitled
Yay, my font renderer is rendering glyphs to the texture sheet. All that working in about 3 hours total work, which isn't bad.

Screenshot time:

Click to Enlarge

I got it working eventually by using CreateDIBSection to create a DIB, and then rendered onto that. One really nice thing about that is that …
282 views
Evil Steve
August 10, 2006
Untitled
The MSDN lies.
Quote: CreateCompatibleDC:

A memory DC exists only in memory. When the memory DC is created, its display surface is exactly one monochrome pixel wide and one monochrome pixel high. Before an application can use a memory DC for drawing operations, it must select a bitmap of the correct …
335 views
Evil Steve
August 08, 2006
Bugger
Well, my font manager isn't as clever as I thought it was. I just realised that it's storing a new texture in the texture manager for each text item on screen, not once for the font object. So I'll have to look into that.
I'm not convinced this will work too smothly to be honest. The texture gets up…
277 views
Evil Steve
August 07, 2006
Eww, ID3DXSprite. Eww.
So, I'm digging around inside D3D's innards just now so I thought I'd look at how D3DX objects work.

So...

ID3DXSprite
D3DXCreateSprite
When you first create a sprite, with D3DXCreateSprite, it creates a vertex declaration with the following structure:
  • D3DDECLTYPE_FLOAT3 = D3DDECLUSAGE_POSITION
  • D3DDECL…
  • 451 views
    Evil Steve
    August 07, 2006
    Untitled
    Nothing much to say, so I'll just gibber a little while I wait for this thing to compile.

    I've set up MSVC on my server with VC2005 Professional from my MSDN stuff (Thanks to jollyjeffers for reminding me it existed). Still trying to get it to compile though, see My Thread about it.

    I got the ID3DXFo…
    278 views
    Evil Steve
    August 04, 2006
    Fun with ID3DXFont
    Well, I've been playing with ID3DXFont a bit, and I've found that it really doesn't do anything fancy render-wise at all.

    I implemented my own ID3DXSprite to pass to ID3DXFont::DrawText(), because initially I wanted to do Z-sorting. Then I realised that I could just capture all the draw calls, buffe…
    423 views
    Evil Steve
    August 04, 2006
    LOL. SPAM.
    My forum has been getting more and more spammers recently, so I'm going to do something to the phpbb code this weekend (Well, in theory). I'll put one of those "Please type the letters you see above" validation things on the posting page for guests, and on the register page. I've never written one …
    289 views
    Evil Steve
    August 03, 2006
    Untitled
    Hnng. Damn std::set.

    I found that I kept getting asserts all over the place when TEH MMORPG!!1 shut down, to do with objects not being found in my scene graph. Since I'm using an almost RAII technique for adding/removing objects in my scene, I didn't know where this problem was comming from.

    Well, I …
    317 views
    Evil Steve
    August 01, 2006
    Untitled
    Yay, my GUI code is all nicely working (Still). I can load irregularly sized textures now, and apply them to windows, and I fixed the small problem with transparent bits in windows (I had Z-writes on). I also discovered that it's faster to render my GUI back-to-front with Z-write off than it is to …
    286 views
    Evil Steve
    July 31, 2006
    Untitled
    Thanks to Programmer16, I have a sexy new UI theme; BlueMesa. And speaking of UIs, my GUI code is now in a much more functional state. I can now drag windows around, and click on buttons. Clicking on text causes the click to go to the parent object, because they're locked - which is exactly what I'…
    236 views
    Evil Steve
    July 31, 2006
    Untitled
    Yay, GUI objects can now move nicely. I'm happy. Next up, I want to modify my tecture manage slightly so I can fit irregular objects into it (E.g. a 200x150 texture gets turned into 32x32 blocks and stuffed in one of those sheets). I'm not sure how well that'll work, or if it's worthwhile, but we'l…
    231 views
    Evil Steve
    July 30, 2006
    Untitled
    Yay, GUI stuff seems to be working pretty well now. So here's a picture:


    (Click to enlarge)


    And here's the XML file that describes it:

    "1.0" encoding="UTF-8"?>
    "1024" h="768">

    "0" y="0" align="left">I like cakes. Here's some Chinese: 世界有很多语言

    "1…
    248 views
    Evil Steve
    July 28, 2006
    Untitled
    I finished my TinyXML wrapper class, and it works pretty nicely. Particularly since I only need to support tag names, attributes and text. And it works perfectly with UTF-8. I can now load and render Chinese and Russian if I feel the need.

    My GUI factory is comming along, I've restructured it a bit,…
    219 views
    Evil Steve
    July 27, 2006
    Untitled
    TinyXML is nice. It's pretty much exactly how I'd write an XML parser - nice and OOPy. I'm making a light wrapper class around it, since there's some functionality I don't need, and other bits I have cleaner ways of doing.
    My GUI window class will be using XML files for it's LoadFromSchema() functio…
    259 views
    Evil Steve
    July 26, 2006
    Widgets galore
    So, I started work on my GUI system yesterday, and it's coming along quite well. Everyone seems to be doing GUI stuff just now, such as Programmer16 and ravuya.

    My GUI system isn't really anything special. The highest level element is a window, and all windows are managed by the GUI manager. A windo…
    337 views
    Evil Steve
    July 24, 2006
    Untitled
    ANSAR MY QWESTYIN PLOX

    Yes, I got around to posting it. I also very nearly lost todays work. I forgot to check the files out last night, so I just made them all non-read only with the intention of checking the files out, copying over the versions Perforce gives me with my edited versions, and submit…
    279 views
    Evil Steve
    July 24, 2006
    Untitled
    I now have my code slightly better seperated into engine and game code. Still the same project, since I can't be bothered making it that seperate. I want to get some more work done on the editor soon, I intend to make it produce at least 2 files instead of just one. One for the map tile information…
    243 views
    Evil Steve
    July 21, 2006
    Untitled
    Yeah, I should have called in sick today. There's 3 people awol somewhere...

    I got my sprite manager cleaned up, and the rest of the code too. Scene objects now add themselfs to the scene graph when they're set to visible. That way the application doesn't have to do it. It also means that sprites ca…
    252 views
    Evil Steve
    July 20, 2006
    Untitled
    While I'm still not happy with my sprite manager, my texture manager is now fearsome. I expanded my tilesheet manager to do any square textures < 256x256 (I.e. every texture my engine supports). It now breaks the master sheet (which is something like 2048x2048) into 256x256 blocks. Each block ca…
    270 views
    Evil Steve
    July 18, 2006
    Untitled
    I got about an hours sleep last night, and then I nearly died today in the heat. I was on the verge of calling in sick today, despite us having Beta due on Wednesday. I'm not used to this stupid temperature, and Glasgow is even hotter than Edinburgh.

    Apparently Scotrail aren't used to it either; one…
    253 views
    Evil Steve
    July 17, 2006
    Untitled
    OH GOD IT'S TOO SHITTING HOT

    It's 9pm, and it's 34'C. In Edinburgh... What the fuck?


    In other news, 5 of my CDs arrived today. Yay.
    273 views
    Evil Steve
    July 16, 2006
    Untitled
    Working Sundays sucks. It wouldn't be so bad if Scotrail didn't totally fuck up the train times. During the week, it takes me 1h 15 mins to get from my house to Glasgow. 50 mins on the train, and 25 mins to get to the station by bus. Today it took me 3 hours. I got on the bus at 10am, and didn't ge…
    248 views
    Advertisement

    Popular Blogs

    shawnhar
    Generalist
    101 Entries
    12 Followers
    15 Entries
    12 Followers
    johnhattan
    Programmer
    1,277 Entries
    48 Followers
    ApochPiQ
    Generalist
    628 Entries
    43 Followers
    dgreen02
    Generalist
    338 Entries
    55 Followers
    Advertisement