SoaringTortoise

Members
  • Content count

    491
  • Joined

  • Last visited

Community Reputation

130 Neutral

About SoaringTortoise

  • Rank
    Member
  1. My country is broken!

    Quote:Original post by Flarelocke South Africa's poor too. Zimbabwe has a GDP of 24 billion, South Africa has a GDP of 460 billion, while the US has a GDP of 11,000 billion. Oh, and South Africa's official unemployment rate is something like 40%, so if they're a superpower, it's probably because the unemployment rate doesn't mean much. And FWIW, we tried to give an assload of grain to Zimbabwe, but they refused it. Wally. On this continent, SA is a super-power. And double-wally... read what I said. The government is using FOOD AS A WEAPON! Of course THE GOVERNMENT will reject offers of grain
  2. My country is broken!

    You think you're in trouble!!! I come from a country where the president is actively engaged in trying to kill (KILL!) all political opposition. We're talking about genocide here. Within the next year it is estimated that approximately 48% of the country's citizens will die from starvation. This starvation is brought about purely by the political will of the ruling party, whose policies have: 1) Cut farming production by 80% in three years. 2) Shrunk the economy by 30% a year over the same time period (unemployment is now wavering at around 60%... officially, so you can probably safely assume it to be more around 90% because these pr*cks lie like you can't believe). 3) Caused a flight of capital and skill to the point where if you get sick you can't purchase any medication (there's no foreign currency for the pharmacies to buy any), and the quality of medical care, even in private hospitals, is so bad that you're pretty much better off performing your own surgery with a hacksaw and a bottle of cane spirits (except there isn't enough money to buy those two simple things most of the time anyway). And even worse, our neighbouring country (a super-power on the continent) is ruled by a bunch of guys who refuse to even say, "This is wrong," let alone provide any material support to the suffering millions. Let me just say this again, to make it really clear: My government is persuing an active campaign of terror against its political opponents. If you ever voted for, or are even suspected of having supported, the opposition you can be almost certain that you will be picked up and tortured, your familly will be denied food, and you can fully expect to be denied access to basic resources such as clean water and medicine. Your sole hope for survival rests on the support from outside countries who will never provide it because it is politically "embarrassing" for them to admit that a fellow 'anti-colonial' country has failed. You, like your friends around you, will most likely resort to eating grass and tree-bark to stay alive, in spite of the debilhitating cramps and headaches that this type of 'food' provides. But hey, it's all good right? Only around six million people are going to be killed by their own government. No biggie. Remind me again about that holocaust thingy. So... the next time you're feeling a bit blue about the greed and idiocy of your leaders, just thank the gods that you're not living in sunny Zimbabwe.
  3. Transformed and Lit questions

    Yes! That works. So long as my z position is in the range 0-1 everything works perfectly. The smooth text scrolling is A1, plus the word-wrapping correctly sizes the container.
  4. Transformed and Lit questions

    OK, but then what's the depth range of a TL vertex? AFAIKnew, the Z was ignored, but you reckon not? If it's not, then for sure I can use the completely transparent write to the z-buffer to do clipping of the text - just render a quad at depth-1 to fill the buffer, then render the text at depth+1... zbuffer should clip whatever's beneath the transparent quad. Going to go play around a bit.
  5. Howdy, just 2 questions about TL drawing (UI/HUD stuff). 1) Is there a way to draw stuff beneath other stuff without changing the order in which they're drawn in code? The reason being that I'm writing out text paragraphs within a frame, but until I've run the text-drawing, I don't know how big the frame should be. I can create a function (GetTextSize()), but it's more efficient to calc that during the draw code, since both the draw and getsize would have to loop through the text to cater for word-wrapping. 2) How can I clip text to create something like a scrolling text-box? I could obviously use line-size scrolling, just changing which rows get rendered, but it would be nice to have pixel-smooth scrolling too. I was thinking about rendering a couple of transparent quads around the frame to fill the z-buffer, but then I thought, "Ooops, doesn't work for TL stuff."
  6. Map Quad Drawing Logic

    OH, and using chunks the size of the screen isn't going to be efficent (Wicked Ewok's post). As you scroll towards the edge of the screen you're going to have to draw an entire screen-size chunk to fill the edge of the screen, but you'll see very little of it - too much stuff sent to the video card that isn't useful. THE most efficient way to handle this would be to dynamically create the VB on the fly using some kind of rectangular culling so that at most you're only drawing at most parts of a redundant triangle per tile. However, IMHO, that's a hassle, and simply using chunk-sizes 1/2 - 1/4 the screen size provides a good balance between unnecessary rendering and hassle. I'm greatly in favour of a *little* performance loss for reduced coding. Having said all that, most modern cards are exceptionally efficient at culling geometry outside the view frustrum so the performance hit rendering an entire screen-sized chunk is going to be very minimal. On older cards the problem becomes more pronounced.
  7. Map Quad Drawing Logic

    I don't think you should treat the 2d any differently from a 3d game in terms of the map creation and rendering. Use a single VB for the map, but choose an appropriate striping method so that you can cull areas that are off-screen. For example: Create your tiles as chunks of 10x10 tiles, but put them all into a single VB. This way each chunk contains a 10x10 area of the map, but the VB is ordered like this 1 2 3 4 5 6 7 8 910 etc This would represent a 'world' of 50x20 tiles. Your view program would then just use an offset and span to draw chunks 1,2,6 and 7 if you're in that area (this is, I think, a pretty common 2d mapping scenario). Also, use a 3d camera but set the projection to Orthagonal. This will make the view appear like a standard 2D game, but it would simplify your rendering code - you just move the camera and draw any chunk that is nearby. As for the most efficient. Each card make and version has a different optimal buffer size. The limiting factor is the memory required and the speed of transfering that memory, vs the cost of switching buffers. So, a low-mem card would be happier with smaller buffers, an nvidia geforce3+ would like large and an ATI 9700 would like massive (once again, depending on make and version). There is an upper limit to the number of vertices you can put in a VB, and that's dependent on the vertex format (16/32 bit), but you shouldn't be reaching that. If you try to stick to around 1k-2k poly's you should satisfy most cards. If you like, you can create a flexible VB that varies according to the card (which you'll detect at start-up) and builds the VB's according to the card's optimum set up, but that gets really messy and bogs you down.
  8. Shadow volume optimisation - comments?

    1) Yah, just a directional light. All I'm really trying to do is get some depth information into the scene, so I'm not too concerned about the hard-edges. I suppose I could try to grab the stencil and blur it (or something), but that may be overkill. 2) Drat! 3) The majority of them will be floor tiles (ground aligned, low profile), but there are quite a few walls and pillars and so on. I can quite easilly build a database of what's low-profile and ground-aligned, but... well, I'm feeling a bit lazy about that kind of thing right now. Anyway, looks like I'll have to do the database thing afterall. The near-to-ground shadow casters are causing havoc with the the z-buffer's accuracy (hashing all over the place)
  9. I'm considering using shadow volumes for ALL the objects on my terrain (no light-map, just shadow-volumes). The only part that would be exempt would be the terrain itself. Just a couple of questions and thoughts about this: 1) The terrain is VB, but all the objects on it are meshes. Most of the objects don't move, so presumably I could use a static shadow-volume created during map-load for most of these things. I was thinking about creating a database of all shadow volumes, and if there is already an entry for the same mesh at the same scale and rotation, it will use the existing volume rather than create a new one. Then I can set the world matrix at render-time to render each similar volume at the correct translation. Does that sound like a reasonable plan of action? Would it be better to just create a shadow volume for each and every model and use that (no translation required, but a larger database). For mobile/animated models I'd obviously have to create the shadow volume at run-time, but I can easilly flag those. 2) Can you use a two-sided stencil in DirectX 8?(saves having to render the shadow twice) 3) Some, in fact most, of the objects will be ground-aligned and with a low height profile, making their shadow practically invisible. Should I handle these as special cases (i.e. check their profile and altitude) and not render their shadow volume, or will the z-buffer make this largely irrelevant? (I'm a little unclued about how the stencil and zbuffer are going to interact). Thanks
  10. Hardware Vertex Buffer code, is this ok?

    Umm, I don't think it's a problem per se, but the sdk does mention performance impact of using non ^2, and I thought maybe there was a connection (especially perhaps on older cards). But seriously: 1) The problem appears to be a problem with the geometry so- 2) Either the VB isn't being understood (^2, strides, etc) or - 3) A render-state is causing ATI to mis-interpret the geometry (culling mode, FVF flag) It's also important to check that you have no 'unallowed' render state combinations. I once was using a combination of texture states that worked fine on Nvidia but completely failed on ATI (because nvidia was detecting a bad render-state combination and reseting to a default position). Much more than that, I wouldn't know where to look. For debugging, just start culling out sections of code until you revert to a useable state
  11. Hardware Vertex Buffer code, is this ok?

    I don't use tri-fans (in dx8 they're normally a bad idea), but according to the sdk docs you have to render each fan in its own VB, or its own render call. So, if your VB contains (e.g.) 10 fans, you would need 10 render calls, with each render call using a specific offset and count. If your offset is miscalculated (or perhaps not a power-of-2), Nvidia may have some smart correction in the driver while ATI doesn't (sounds a bit far-fetched to me, but you never know what a driver-coder thinks is a good idea or not... e.g. the nvidia driver may automatically enforce a power-of-two offset size, while ATI doesn't, or vice-versa). Actually, this power-of-two sounds like a good candidate to me. Some of the older cards had major hassles with texture sizes not in ^2, and the SDK for VERTEX optimisation does recommend using ^2 vertex sizes.
  12. Shadows through a solid object

    Hmm, that almost sense except that clipping the shadow volume by all the other receivers is quite expensive (the receivers can be very complex geometry). I suppose the trick would be to resolve the other receivers into simple clipping planes and snaffle the volume that way.... but that's also far too expensive surely? [edit: receivers, not casters]
  13. Hardware Vertex Buffer code, is this ok?

    Ow! I don't know DX7, but the only time I've seen anything like that is when I inadvertently told the API that my vertexbuffer stride was 18 instead of 20 (it was trying to color info from the previous vertex as vector info for the current one). The app didn't crash, but it got very seriously messed around. But hang on... the character's face looks a little weird... is it rendering inversely (like the inside of a mask instead of as a face)? It may be that your culling order is wrong.
  14. Umm, is there a really cheap way to stop a shadow volume from projecting through a solid object? I've got a bridge over a river, and the shadow shows up on the bridge as well as below it.
  15. Shadow volume visible????

    No worries. Just got a bit of a shock though, forgot that the colorwriteenable isn't a boolean.... set it to 1 and everything went PINK! Total freak-out, but it has given me a neat idea for some special effects.