• Advertisement

Illumini

Member
  • Content count

    561
  • Joined

  • Last visited

Community Reputation

205 Neutral

About Illumini

  • Rank
    Advanced Member
  1. I think your misunderstanding the discussion that was going on about inline assembly and runtime parameters. That is an alternative way to do it. You by no means need to use inline assembly. In fact, this would work just fine.... std::vector<string> responses; //Create the responses responses.push_back("Red"); responses.push_back("Blue"); menuFormatter("What is your favorite color?", responses); Yea, I know what you are thinking... But hey that's what happens when you let "C++ heads" (and I mean that in the kindest way) help you write code :) You might want to change the terminology a bit, but basically your on the right track. Here's some psuedo code of a function to display a menu based on whats in the current "room" function displayMenu(room): menu = Menu("What do you wish to do?") if (room.hasExit(NORTH)): menu.showChoice("Go North"); if (room.hasExit(EAST)): menu.showChoice("Go East"); if (room.hasExit(SOUTH)): menu.showChoice("Go South"); if (room.hasExit(WEST)): menu.showChoice("Go West"); foreach (monster in room.monsters): menu.showChoice("Engage " + monster.name) foreach (item in room.items): menu.showChoice("Take " + item.name) return menu.waitForInput() end I really don't know what your design is for your game, but something like this gives you the idea of how to deal with a dynamic lists (could be vectors) of items/monsters etc.... You could use your autonumber system here as well for the choices.. The last line is just something I tossed in, it would be implemented as a loop that kept getting input from keyboard and seeing if it was a valid choice. When a valid choice was entered it would terminate, returning the value.
  2. XACT is too big!

    Yea XACT still has some issues that need to be worked out, a good place to go would be the official XNA forums. There are alot of helpful MS MVP's and such there who can suggest work arounds to the current limitations of XACT / XNA / etc.
  3. Ogre3D and Irrlicht only for C++?

    Axiom is a port of Ogre to C# as well, I'm not sure how maintained it is these days. Similarly there is an OgreDotNet (or was back in 1.0), which is a managed binding for the C++ version of Ogre so that you can use it in C# and other .net languages.
  4. Designing Game Engines

    No articles to point you towards but three things I always try to keep in mind while designing game engines. 1. Write the least code possible. 2. Write the clearest code possible. 3. Never be afraid to rewrite code. These are all of equal importance in my opinion. They arent necesarily guidelines for general game development, since time constraints and other things factor in, but for learning to design good things, they are crucial.
  5. Problems Converting a Fullscreen Game To Windowed

    That will do him a tremendous amount of good since he's using DD7... :P EDIT: Anyway looking at your problem more closely I'd imagine that your issue is that your offscreen surfaces are still being stored as 16 bit even when your primary surface chain is 32bit (because the user is in 32bit mode), the way to solve this is ask DD to create those offscreen surfaces in the same format as the primary surface, that way when you copy from them to the backbuffer things dont get screwed to hell. If you want to post your surface creation / bitmap loading code I'll try and point out what you need to change.
  6. Quote:Using C# for this project would not be ideal right now, from what I've read on XNA it still doesn't have a way of allowing other people to play your games besides with the source code unless things have changed. (Please provide proof if I'm wrong.) False, this is only true for Xbox360 deployment, you can still use XNA to create windows games that function just like any other .Net application. Quote:They will need .NET framework 2.0 and XNA framework True, this is the overhead of XNA at the moment. Up to date windows pc's will have the former, but most likely not the latter. XNA Framework itself is rather small and can be bundled into your application's installer. Quote:their video card must meet a requirement for pixel shader and other things which is pointless for a 2D game that is simple. Going with C# will cut programming time but that means nothing if no one can play your game and needs a 3D Video Card. (Not everyone who likes Old School 2D RPG's had a 3D Video card that has pixel shader 2.x) The only requirement is shader model 1.1, which is fairly old at this point. Your only other options are direct draw (which others have mentioned is deprecated), or your own implementation of 2D rendering using the fixed function pipeline in either D3D or OGL (I'm assuming this is what Jettoz is suggesting, since your implementation couldnt use shaders and be any better off than XNA in the hardware requirements). I'd carefully consider your expected userbase and determine if they will still be running pre-shader model 1.1 cards when your ready to actually release your game. I've personally considered it for my current project and decided that the ease of XNA and C# far outweigh any lost users due to the requirements I'd place on them. It really does make that big of a difference.
  7. Quote: I see your problem, and I think I understand what's causing it, but I'm not sure if your implementation or Bloom's design is to blame. Here are my thoughts: If you alter the rendering pass of each splat to include one more tile in each direction, then you'll be guaranteed to catch the transition to alpha-zero, right? Yes one extra set of tiles per batch would fix my problem, but I was trying to stick to the bloom method, since thats the only article I found, and it seemed to be pretty reputable. Quote: Edit: I refer you to this paragraph, straight out of Bloom's paper: Quote: I should note that the base texture and the alpha maps both have the "usual problem" with chunked textures, that is, there will be seams at the chunk boundaries due to bilinear filtering problems. This can be fixed the usual way, by duplicating the pixels along the boundary and making the uv's [sic] start half a pixel into the texture (instead of at 0,0). This quote is refering to seems between chunks, currently I only have one chunk, and my problem is seems between splats. Quote: I guess my main problem with this method is the need to subdivide each tile and have so many alpha values to deal with. It seems to make much more sense to keep alpha samples at the vertices, where they belong; and not at tile-centres, where they don't. It certainly worked for me. I agree, I think a 33x33 alphamap would be much better than the 64x64 one that bloom suggests. I think this is the route I'll take. Quote: Bloom's method is outdated and overaly complicated anyway. The best way to do texture splatting is to use blend textures... could be alpha channels, or a seperate rgba texture. Of course your blend textures need a different tex coord than your detail textures. Just use each greyscale channel as a blend value for a shader lerp function like: lerp(finalcolor.rgb,grass.rgb,grass_blend); I'm not sure I understand your example, what is grass_blend?
  8. Basically, based on my understanding of the article, I've implemented a system where the interpolated texture coordinates at the tile vertices land between the the texels that store the alpha data. The end result is that the fringe vertices on the fringe tiles of a splat are given a alpha value that is the average of the closest textels to it. The problem is that these fringe vertices need to have 0 alpha for the transition to completely fade off.
  9. 62 views and 0 replies... :( Is there anything I could do to explain my problem better?
  10. Named the thread to get some attention, but I'm sure these kind of questions get asked here alot. Basically I've implemented something similar to the bloom article on texture splatting. It all looks pretty good, except on certain edges where the alpha transition apears to be too "slow", resulting in a transition fading to gray instead of black. Here is an example of this http://img113.imageshack.us/img113/7461/exampleti0.jpg [I rendered my alphamaps to the screen to demonstrate the problem more clearly] My theory on this follows. The article instructs you calculate weights in the middle of each of four quadrents of a tile (ie at (-0.25, -0.25), (0.25, -0.25), etc, relative to the center of a tile). These samples are then saved to an alphatexture (twice the size of my terrain chunk) and my texture uv's are set such that tile[0,0].upperleft = (0.0, 0.0) and tile[w-1, h-1].lowerright = (1.0, 1.0); Now with my limited understanding of textel sampling I imagine it's doing something like this for an individual tile/quad 0,0-------.5,0------1,0 | .5 .25 | 0 0 | | | | | .5 .25 | 0 0 | 0,.5-----.5,.5------1,.5 | .5 .25 | 0 0 | | | | | .5 .25 | 0 0 | 0,1-------.5,1-------1,1 In the diagram above the texture coordinates are at corners and each tile contains four samples. This would all work fine of course if the two right tiles were actually rendered with terrain texture/alphamap. The problem is that in this example none of these four tiles is actually the type of terrain I'm currently rendering. All four are grass lets say, now not shown in my diagram are the snow tiles to the left. Because the two left tiles in my diagram border the snow they will be rendered along with the snow using the alphamap shown and the snow texture. However, the two tiles on the right are not adjacent to snow in the original tile map, and as per bloom would not be included in the snow render pass. So based on that understanding I'm guessing that when the linear texture sampler (usinga tex2d lookup in my pixelshader if that matters) gets an interpolated coordinate for say the far right side of the upperleft tile (at 0.5, 0.25) it does some kind of average of the near by texels to find the value of the alphamap at the current pixel. Thus the alphavalue assigned at (0.5, 0.25) is something like 0.125, when infact I need it to be 0, because this is the last tile I will render with the Snow texture, and if it doesnt go to 0 then the snow will end aburptly instead of transitioning smoothly as intended. Thanks for reading my rather length post... Any ideas on how to correct this problem I'd love to hear.
  11. Subclasses in generic lists.

    You cant remove elements from a list using a foreach loop, so perhaps you should be a bit more specific with your example, source code even. Here's a simple test program it works as expected using System; using System.Collections.Generic; using System.Text; namespace Test { class Entity { } class Box : Entity { } class Sphere : Entity { } class Program { static void Main(string[] args) { List<Entity> list = new List<Entity>(); list.Add(new Sphere()); list.Add(new Sphere()); list.Add(new Box()); list.Add(new Sphere()); list.Add(new Box()); Console.WriteLine("Elements in list: {0}", list.Count); list.RemoveAll(removeMatch); Console.WriteLine("Elements in list: {0}", list.Count); } private static bool removeMatch(Entity entity) { // could do processing here to see if elements are selected // in a listbox or what not return true; } } }
  12. Frame work for DirectX

    Most likely: RegisterWindowClasses, DoInit, DoPreFrame, DoFrame, or DoPostFrame return FALSE. Add some error checking instead of just breaking out if they return FALSE, just 1 line of output per possible failure will do the trick.
  13. LNK2001 errors = 4hrs of frustration

    That is where you declare it. He asked where its defined. Normally in a cpp file of the same name is where you implement (define) member functions for a header. EDIT: There ya go :P
  14. Should beginners start with C++?

    Quote:Original post by ivarbug no no no. Sorry, but you are wrong again lol. I know that was an overstatement. We(except the op maybe and those who are not) are here just to argue about stuff, to spam and to prove that others are wrong and I'm right. And of course to confuse beginners and ourselves. Anyway that .net vs win32 api war is too offtopic here. I think(guess) that "which language" isn't that important for starting. Very basic stuff is simlar in most languages. Threads like this can be "retarding the ability to learn", almost always it will turn into a "little war". So I'm wrong on the points I listed, but instead of addressing them you simply say that these threads are about spamming an opinion and do not help anyone learn. Well, with a post like that I guess you right. I'll agree we are a offtopic (somewhat) by this point, but we were brought here by someone (BringBackFuturama), who legitimately doesn't understand why it's better to use one thing vs. another in certain situations. I came into this thread to poke him a bit on his ignorance, but I'll gladly stay and explain why .Net is better for making windows apps than the Win32 API is. I really don't think you need me to explain it though (as I stated in my last post, I'm assuming your rather intelligent).
  15. Should beginners start with C++?

    Ivar, I was exagerating a bit with my metaphorw but it dont think you can argue any of those points very well. The .net Framework is newer, better designed, and easier to work with than the Win32 API. The piece of junk was just a bit of color I added to the metaphor. Trust me though after youve used the .net framework you would probably think the same thing about the Win32 API.
  • Advertisement