Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

150 Neutral

About GeekSharp

  • Rank
  1. Hello In my application, I'm going to have strings of HTML that I will want to preview in some sort of HTML control. I've found lots of this type of thing on the internet, but they all seem either really involved (like liking to IE's dll and such), or only for previewing files. I'd have thought glorious C# would have a built in HtmlControl. Could someone recommend a way to preview some strings of HTML in a generally small window? Thanks
  2. Neat, I'll give this a whirl in the next few days and let you know how it worked out for me. =)
  3. Hello, I'm trying to develop something like the Visual Studio C# IDE where I can drag items from a list onto another control, and that control (like a window) will new display them. Anyone know how to do something like this? They don't have to be buttons like in the idea, maybe just a list box where I can drag the items onto the page. When I release on the panel (or custom control I guess) that control needs to show the item below the last item dragged onto it. Hopefully you get the idea. Example: Each list item might refer to a custom control that is a combination of other controls. When I drag the list item onto the form, that set of controls that list item refers to should be displayed below the last item. I am fairly new to windows programming, and I'm not sure how to tackle something like this. I've got a diagram to hopefully clear things up.
  4. Hrm, well this sucks. I'm quite comfortable with C++ but not for my current project. I tried doing a DrawImage(...) with a source size of 32x32 instead of 25x25 and it didn't seem to make a difference. I know with DirectX, and other graphics APIs that sprite size is a big deal, but how so is that true in GDI? I wanted to draw each tile individually so I could implement random map generation. However, it seems now I'll have to settle for background maps with tile data ontop, so one DrawImage will do the whole map and I can just drop a few sprites ontop.
  5. Yeah, I've thought about that. Are there any tricks to implementing it? See if you had a character standing on a floor tile, and then the floor tile cracks, then the tile would be redrawn but the character hasn't changed himself, so he wouldn't get redrawn. Then the tile would be drawn ontop of the guy. How do you get around stuff like that?
  6. Hello, As the topic says, I'm writting a PacMan clone in C# and using the GDI+ library. So far it has been going fairly well. I have sprite data loading from xml files and animating beautifully, a state machine managing game states and user input. However, my GDI+ 2d "engine" dies when it draw the map. it's 28x22 25 pixel square tiles. That's 616 tiles. The way my engines works, is it just clears an internally stored Image object with my default backgroudn color, then it loops through all IRenderable objects registered with it (each visible game object, including tiles) and calls their Render() method and passes them the graphics object to draw to it's Image buffer. Then, at the end of that loop it just returns the Image and that's set to the background of a panel that I call Refresh() on. The tile render code is as such: [source=C#] public override void Render(System.Drawing.Graphics graphics, System.Drawing.Image image) { if(_source != Rectangle.Empty) { graphics.DrawImage(_background, Destination, _source.X, _source.Y, _source.Width, _source.Height, GraphicsUnit.Pixel, ImageAttributes); } else { graphics.DrawImage(_background, Destination, 0, 0, _background.Width, _background.Height, GraphicsUnit.Pixel, ImageAttributes); } } It's setup so that if the tile is on a sheet of tiles it uses the source co-ords, but if not then it just uses the entire sheet dimentions. Now, I have ANOTHER program that can draw the same amount of tiles using the same redraw-each-time method, but it draws the tiles using DrawRectangle and methods like that, not from an Image. Is this DrawImage method what's killing me? And does anyone have any suggestions? I know this might all seem overkill for PacMan, but I'm making everything so that I could reuse it for any 2d arcady game I want to make later. Thanks,
  7. Hello, Do you need to lock a simple type like an int, if two threads assign to it? or are the base types threadsafe? int myInt; lock(myInt) { myInt = 0; } // Executing on some other thread somewhere... myInt = someCounter; Seems a little overkill.. Thanks,
  8. GeekSharp

    Bone movement

    Skinned mesh is not the same as simple animation at all. There is no bone example for Managed, but it's fairly similar to the C++ example. Have you defined your MeshContainer and Frame and loaded your hierarchy? If not, that's a good place to start.
  9. Hello, This is the second issue I have had when developing on a RADEON card and testing it on a GeForce. The first one was rather minor but this seems a little more problematic. I have two meshes on the screen and I'm using indexed skinning. GeForce doesn't support HW palette, so I've rigged the RADEON to use a SW palette so that I know that isn't causing this problem, they are both skinning and rendering the same way. With the RADEON in my Intel I get On the using the GeForce with an AMD I get Earlier I had a rather complicated dragon mesh rendering perfectly on both systems. So if that dragon works on both, I can't for the life of me figure out why this cylinder is being massacred. The diference between the two scenes is that the cylinder scene has two meshes. But I don't see how that would change anything, they are completly seperate entities in my program. Thanks
  10. Hello, I'm just curious, anyone know what the first line in a .x file means? "xof 0303txt 0032" Thanks =)
  11. GeekSharp

    Replacing a mesh container in a model

    Hello, The proper was is the way you were doing it first. Clone the pMesh and set it to the pointer of the original mesh container. Then, you need to replace both pMaterial and pTexture. You only mention copying pMaterial in your post. If you only copy the one then you would still render with the old image file. If you did change the pTexture already and just forgot to mention it, or if you do it and it still doesn't work, then I can find you an example. Good Luck
  12. Not quite, Halsafar... Quote: D3DFVF_TEXCOORDSIZE2(0) for example sets the second set of texture coords to the regular uv coords. The two in the macro does not mean the second set. It's the zero in the brackets which tells you which set we are editing. In this case the first set (since an index of 0 would be the first position of an array). D3DFVF_TEXCOORDSIZE2(0) Think of this macro as a function like SetTexCoordSize2D(int indexPosition) where you pass the index of the set you whish to modify to 2D. Then you can apply the same thinking to the other versions. D3DFVF_TEXCOORDSIZE3(1) or SetTexCoordsSize3D(int indexPosition) Now you are giving the macro a set index you wish to convert to 3D tex co-ords. So in your original example: #define D3DFVF_BLENDVERTEX (D3DFVF_XYZ | D3DFVF_TEX3 | D3DFVF_TEXCOORDSIZE2(2) | D3DFVF_TEXCOORDSIZE2(1) |D3DFVF_NORMAL | D3DFVF_TEXCOORDSIZE2(0) ) We can see that the first set (set index 0) is being set to 2D (D3DFVF_TEXCOORDSIZE2(0)), the second set (set index 1) is being set to 2D (D3DFVF_TEXCOORDSIZE2(1)), and the third set (set index 2) is being set to 2D as well (D3DFVF_TEXCOORDSIZE2(2)). And this makes sense, since that vertex you defined only has UV texture coords, and you'll notice that you defined MAX_MATRIX_INDEX as 2... all 3 positions in that array you have defined as 2D through those macros. Hope this is a little clearer.
  13. You should look at your caps with the Direct3D Caps Viewer to see if it supports hardware indexed matrices (a MaxVertexBlendMatrixIndex of 0 means it isn't supported, > 0 is good). Your reasoning about the Mesh Viewer is flawed. The Mesh viewer tests this cap and if you don't support it then it uses system memory and stores the matricies there instead and you end up doing software vertex processing even though it doesn't TELL you that you are. Instead of placing the matrix palette into managed GPU cache it gets stored in the system ram. Everything else about indexed processing remains the same, so it's not nearly as slow as full software blending but it's not quite as fast as real hardware indexing. But as long as you support shader blending then your good GeForce cards will work great. Indexed and non-indexed will handle older cards. Software... not worth the trouble.
  14. Well that problem was easy to solve. His card doesn't support indexed pre-vertex skinning. It's a ChainTech GeForce 6600 GT, so that's supprising. My generally inferior ATI RADEON 9600 supports a palette size of 38. I guess it's an Nvidia thing? So I'll probably work on Shader skinning now, and non-indexed. Software seems almost useless to me. The dragon alone runs at 60 fps. Throw in a few more and a world and you're finished!
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!