EFileTahi-A

Members
  • Content count

    17
  • Joined

  • Last visited

Community Reputation

130 Neutral

About EFileTahi-A

  • Rank
    Member
  1. Thank you guys for the precious info!
  2. Thanks for the reply.   I already knew those links. The first one doesn't explain how having the mouse at the middle-top of the screen translates itself to 0,0 isometric coordinates. wtihout knowing this the colored tile is useless. As for the second link, I'm affraid that math is too advanced o me...
  3. After browsing the web and reading dozens of examples and tutorials I still can't figure out how to translate mouse X;Y screen position in pixels to X;Y isometric tile index. All the examples I tried returned strange values.   The attached picture shows exactly the tiles' redering order. The Zig-Zag  rendering mode was so simple to implement with the help of a colored coded tile. But this diamond shapped design is really giving me a hard time.   I guess the formula involves the following variables:   - MousePos.X - MousePos.Y - TileWidth - TileHeight - ScreenWidth - ScreenHeight   Now I just need to know how to put the pieaces the together as I really can't see any logic behind it.   Thank you very much for any possible help.
  4. DvDmanDT they are familiar but lack tutorials. Anyway, I've discovered Gorgon lib, it seems it does exactly what I need. Fast 2D in a simple and easy way. I'm going to try it today, once I get home.
  5. I really miss Managed DirectX [img]http://public.gamedev.net//public/style_emoticons/default/sad.png[/img] If only I knew Managed DX libs would continue to function for some years I would still use them.
  6. Thank you all for the replies! Postie: I tried already SlimDX but the lack of examples pushed me away. The small differences they state for the "easy" translation between DirectX and SlimDX tutorials are enough to don't let me achieve nothing. Although SlimDX seems to have a solid development rate, I prefer to loose time with something even more certain like a gfx lib from a bigger corp (aka Miscrosoft). Nonetheless I'm the one to blame for my poor DirectX skills. Dynamo_Maestro / DvDmanDT: I actually did tried XNA yesterday, but after a huge battle on how to render it on a panel I gave up. I need to build an engine capable of rendering to a panel inside the editor and into a form for the game's output. These conditions are non-negotiable. I know its possible to do this but the examples I tried were too confusing for me. laztrezort : Yesterday, late in night, and after testing SlimDX and XNA, I managed to increase the render speed of GDI+ drastically. It turns out that if I pre-render the full map into a huge BMP and then if I just render a cropped area into the screen the efficiency is absurdly increased! I even tried rendering a 4800x4800 map into a estimated 2500x1100 screen size (the editor's form stretched between my 2 screens) with an average speed of 50fps! This is definitely more than enough! Since my tiles have fixed sizes 48x48 they don’t overlap, making constant map updates scarce. I just need then to draw the units and other interactive objects over the cropped map. Just out of curiosity, what would you say about Silverlight and WFP for simple 2D games? And just to finish, if I actually needed a step-by-step example on how to deploy a XNA device into a panel would someone care to do one? Because, I might had found a solution for now regarding GDI+, but I now in future it won’t be enough, I guess…
  7. Scene Transitioning Solutions

    I would do this way (I actually don't know if this is the best approach): 1- Clear the screen black or with any other color u wish to fade to. 2- draw the publisher image with opacity decreasing each loop. 3- when it reaches to zero, begin drawing the title screen with opacity increasing within each loop. I hope it helps.
  8. GDI+ is clearly not fast enough for me. I really don't understand why .NET has such library capable of doing so much with such low performance. Having said that, I now seek a new graphics library for my project which is a tiled 2D game, being developed in C#. SDL .NET I've browsed the web and I've found some interesting things like the SDL lib. There is SDL C# wrapper for .NET which seems rather nice. After I tried it I realize it would not compile on x64 architectures. So I went to their forum just to look at its scary inactivity. There is one post over there that actually describes my problem, unfortunately it has not been answered, not even after almost an year. SDL C# last update was in 21 November 2010, so I can sadly assume it is pretty dead. Moving on. OpenGL I want to do simple things like drawing images and text, something that is quite hard to achieve with OpenGL's .NET wrappers I've come across. I really don't need that much performance just something simple to use, for the very own simple things I mentioned above. SDL C# was very easy to work with, too bad it is gone... DirectX I still didn't get it. Managed Direct X was discontinued, does this means June's DirectX SDK does not support it? Does not support it but still includes their libraries? I'm using some libraries that came with it. Are those managed? They are inside a folder named: DirectX for Managed Code. The most recent library seems to have the version 1.0.2911.0 last updated on 31-03-2006. Can someone please clarify if these are the libs that were discontinued? I really don't want to use stuff at the edge of dying. Anyway, I just need a simple solution for drawing 2D graphics inside multiple .NET controls, namely panels and forms. I really don't care if it does not support advanced 3D features or 3D at all, all I need is a solid 2D gfx lib with good support and easy to work with. I wouldn't mind at all using DirectX since I'm a bit familiar with it. But a solution like SDL would be the key. XNA seems to be quite different from those-libs-I'm-not-sure-if-they-are-managed. So I'm avoiding it. Thank you very much for any possible help in this issue. I'm a developer eager to develop in my not-so-available-spare-time and I have this project I want to share with the rest of the world, but the beginning seems to be challenging already.
  9. I need to read the pixels' colors inside a the locked surface and return their ARGB value. But I don't have a clue on how to do it, I've posted in other forums but with no luck... This is what I've learned so far: int pitch; Surface s = dxDevice.GetBackBuffer(0, 0, BackBufferType.Mono); GraphicsStream gs = s.LockRectangle(new Rectangle(0,0,32,32), LockFlags.None, out pitch); From what I've read, I think the GraphicsStream object will get then a single long number which contains everything from the backbuffer, but I don't understand how do I access a x,y pixel and return their ARGB value from this long number. Thank you for any help
  10. Managed DX - C# - Pixel collision

    I just actually need to do what I described. Thanks for the reply anyway m8.
  11. Hello, I need to return the pixel color of my backbuffer from a given x,y position, but I don't have a clue how to do it. well, I know I have to get the buffer from the device: Surface s = myDXDevice.GetBackBuffer(); And then lock the surface and use pointers... but how? This is C#. Thank you
  12. Thanks for the response. But I managed to do it, some friend of mine made it work :) We do this: Matrix.Scale(...) * Matrix.Translaction(...) Where Matrix.Translation Should include the correct position values of the sprite :) - THREAD CLOSE -
  13. Hello, I need to apply scaling to a smoke effect I'm doing for some game I'm currently developing. Sure, scaling, no problem at all, except for the 'small' side effect. Whenever I scale the sprites their original position is also readjusted (as demonstrated bellow): http://img.photobucket.com/albums/v698/EFileTahi-A/scale.png Here is the code of the looping which draw all the sprites. I read something about translating, is this related with this problem? If so, could please someone show me how to do it? for (int i = 0; i < VAR.lActiveExplosions.Count; i++) { c_explosion c = VAR.lActiveExplosions[i]; c.Process_AddNewSmokeSpriteIfPossible(); for (int n = 0; n < c.lSmoke.Count; n++) { sprite3.Begin(SpriteFlags.AlphaBlend); sprite3.Transform = Matrix.Scaling(1.0f, 1.0f, 1.0f); sprite3.Draw((Texture)c.htGfx[c.lSmoke[n].sSpriteNum], new Rectangle(0,0,6 4,64), new Vector3(0, 0, 0.1f), new Vector3(c.lSmoke[n].fPosX, c.lSmoke[n].fPosY, 1.0f), Color.FromArgb((int)c.lSmoke[n].fAlpha,255,255,255)); sprite3.End(); c.Process_TransformAndKillSpriteIfPossible(n); } } Thank you very much for any possible help! [Edited by - EFileTahi-A on January 19, 2008 12:52:15 PM]
  14. 360 degrees shooting, how to.

    Well, I think I will need a tutorial to do this... Or a full working example (that would be awesome). Does anyone know about any website capable of describing what I intend to do? Thank you.
  15. 360 degrees shooting, how to.

    Thanks for the post jyk! :) Are you familiarized with c#? In order to get the traveling direction I will need to acquire the mouse's x,y location and the x,y of the shot's departure location right?. So is the following correct?: int iMouseX = Mouse.X; int iMouseY = Mouse.Y; int iSourceX = 400; int iSourceY = 300; int iDirectionX = iMouseX - iSourceX; int iDirectionY = iMouseY - iSourceY; Anyways, I will try to recreate my function once I get home based on what you described. PS: You know where can I read more about this topic? Thanks again!