🎉 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!
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…
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…
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…
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…
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,…
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,…
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…
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…
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…
The way it should work is as follows:
Each window…
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 …
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 …
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 …
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…
I'm not convinced this will work too smothly to be honest. The texture gets up…
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…
So...
ID3DXSprite
D3DXCreateSprite
When you first create a sprite, with D3DXCreateSprite, it creates a vertex declaration with the following structure:
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…
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…
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…
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…
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 …
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 …
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 …
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 …
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'…
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…
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,…
My GUI factory is comming along, I've restructured it a bit,…
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…
My GUI window class will be using XML files for it's LoadFromSchema() functio…
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…
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…
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…
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…
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…
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…
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…
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…
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…
Apparently Scotrail aren't used to it either; one…
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…
Advertisement
Popular Blogs
Advertisement