• Advertisement


  • Content count

  • Joined

  • Last visited

Everything posted by diablos_blade

  1. looking for simple megaman example

    If you've already developed the game in another language, why do you need to be shown how to make it again in C++? The differences in code will be largely syntactical rather than algorithmical, you'll just be able to pretty much copy exactly what you've done already.
  2. [iPhone] Unmasker

    It crashes for me on start-up with a 2nd-gen iTouch. =/ I'm in the office though so I'll give it a go on one of the development iPhone 4's we have kicking about later on.
  3. UNITY 3D Script

    I don't quite understand the question. I assume you've already built the game for web? Otherwise you wouldn't have the output HTML file Unity generates for you. To use the new script you must add it to the game before you build it and do what you want with it in code (either C#, Unity-Script or Boo). You can call functions on objects which already exist in the built file from JavaScript in the HTML file you're given, but you still need to add the new script before building. Does that help? We need more information to give you a better answer.
  4. Shadow Mapping Without Shaders

    Sure. Everyone in [url="http://www.gamedev.net/topic/611537-shadow-mapping/page__p__4866358#entry4866358"]your previous thread[/url]. They'd love to help It basically boils down to: You can't, use stencil shadows/shadow volumes instead.
  5. deferred rendering: lighting stage

    [quote name='Danny02' timestamp='1317214844' post='4866775'] there are two methods I know atm. [list=1][*]use light volums (sphere, box what ever) to mask with the stencil buffer only the pixels which are affected by the light.(just search for stencil and deffered lighting, same technique as in stencil shadows I think)[*]use a grid over the screen to merge lights in those screen cells and render for example in one cell 18 lights and in the other only 2 ( there are some presentations from DICE, they used this in Frostbite 2)[/list] [/quote] There is the third method, very similar to the stencil one mentioned above, which is to simply render the bounding shape of the light, with depth testing set to GEQUAL. The fragment shader for the bounding shape will then be run for all fragments which might be affected by the light, you just need to find out which screen fragment you're rendering. There will be wasted pixels computed (i.e. You look directly at a wall, 10m behind the wall there is a light with only a 5m radius. The stencil test would basically ignore this light, the depth test will not.) but it only requires a single pass, where the stencil-test requires either 2 or 3 passes (I haven't done it myself, so I can't be certain. I do know you can remove a pass by doing the two parts of the stencil test in one go), so it might balance out. Obviously one light per-pass should only really be done for shadow casting lights in a final version, non-shadow casting lights should probably be batched together into a single pass (as in option 2 mentioned by Danny above).
  6. Unity Compiling

    The Unity GUI system uses pixel co-ordinates rather than normalised view co-ordinates, which poses a few problems when using different resolutions. My guess is you've laid out everything perfectly when in the editor, but the editor is a different resolution to your game when running standalone. (It looks like you're running at 800x600 when built, but I doubt the editor Game View can be that size and fit the rest of the editor on screen.) I tend to prefer to roll my own simple GUI system (Buttons, sliders, checkboxes etc) using meshes and the OnMouse* events rather that use the Unity built in system to get around this sort of thing and allow for a lot more optimisations. (i.e. The UnityGUI doesn't allow for batching of draw calls, whereas mine does)
  7. Loading an Image in a class

    It's because Content is not a menber of ball, nor is it a global variable. It belongs to the Game class (which your main game derives from) so you should send it into your loadstuffs method to access it. My XNA is a bit rusty, but it should look like this. [code]class Ball { public Texture2D image; public int stuff; public Ball () { } public void loadStuffs (ContentManager contentManager) { // i want to be able to load an image here without having to pass it via parameter image = contentManager.Load<Texture2D>("ball"); // this is whats not working } } // Then inside the MyGame class. void FunctionName( ) { ball.loadStuffs( Content ); } [/code] Edit: Apparently the code tags don't like being copy & pasted from. Yay whitespace issues.
  8. Either that or [url="http://en.wikipedia.org/wiki/Tone_mapping"]Tone Mapping[/url].
  9. DX11 Mesh appears to be transparent

    It just looks like you're missing a depth buffer (a.k.a Z-buffer), lot's of people make that same mistake at first. I haven't really tried D3D in a while though, so I can't tell you how to make one.
  10. Best library for doing text in OpenGL

    I've had good experience with [url="http://www.freetype.org/"]FreeType 2[/url], it's under a pretty nice license too from what I remember.
  11. Ah, yes I believe it is just for forms. I never had to use the Application class when I was making my own tools. However, why is your Application having Shutdown called? Which is why the Exit event is raised. If you are calling it explicitly yourself, then either consider asking for the user to save before calling Application.Shutdown (probably the easier option), or instead set Application.Shutdown mode OnMainWindowClose and call Form.Close on your main form if you have one. If Shutdown is being called because the system is shutting down or logging off then you should respond to the [url="http://msdn.microsoft.com/en-us/library/system.windows.application.sessionending.aspx"]SessionEnding[/url] event instead, which can be canceled and delayed while you ask the user a question.
  12. [quote name='cmasupra' timestamp='1311894692' post='4841903'] Now if someone could help me solve #1, overriding the close button, that would be awesome as well! [/quote] Have you managed to solve this yet? If not I'd recommend looking into the [url="http://msdn.microsoft.com/en-us/library/system.windows.forms.form.formclosing.aspx"]Form Closing Event[/url]. It's been a while since I used it myself, I haven't set up many Forms recently, but it should be something like this: (Disclaimer: Mostly done from memory, may need a bit of rejigging.) [code] protected override void OnFormClosing(object sender, FormClosingEventArgs args) { if ( !saved ) { switch( MessageBox.Show( "Alert", "Save first?", MessageBoxButtons.YesNoCancel ) ) { case DialogueResult.Yes: Save( ); break; case DialogueResult.No: //Do nothing break; case DialogueResult.Cancel: args.Cancel = true; break; } } } [/code]
  13. hasn't posted a status in a while.
  14. toymaker or directxtutorial?

    By ToyMaker I assume we're referring to [url="http://toymaker.info/"]toymaker.info[/url]? My personal opinion would be to use that over DirectXTutorials. I've read nothing but negative comments regarding DXTutorials and my experience with ToyMaker was very good. I should point out though that my opinion is biased due to ToyMaker being written and maintained by a former lecturer of mine and was pretty much part of our core reading and reference material. It has been a few years since I was referencing it however, so it may be a little out of date, but there is frequent mention of error checking (how to error check is only shown once and you're supposed to use a bit of common sense to figure out for yourself where to best check for errors, but it is mentioned in the closing paragraph of most chapters I remember), and teaches you all the basics, and several advanced steps, required to get something drawing on your screen. Everyone has different tastes when it comes to what helps them learn best though, neither DXTutorials or ToyMaker may fit your style. The SDK documentation might be the perfect place for you. The only way to know really is to try them out. I would first ask yourself if this is the right direction for you however. At this stage of the learning process, do you really want to learn how to manage all the graphics hardware yourself, or do you just want to make a game and worry about that later? If that's the case, then finding a good 2D game engine might be a better choice for you.
  15. So you thought Crickets were tough to switch to a different container? Try Locusts.
  16. If it's likely people around you would suspect you of self-harming, I wouldn't recommend owning a Bearded Dragon. Especially not one who's idea of "exploring" is "attempting impossible jumps."
  17. ...Why have I been sent every letter of four different fonts as a separate PSD file? Especially when that PSD only contains one layer which has been flattened, so has no use as a PSD.
  18. I just did some actual work on my website. o.O
  19. I'm in Eyemouth. Who else is here?
  20. Well that's a shitty ludum dare theme... if I can think of anything decent in the morning, I might still enter.
  21. Merry Chocolate Day!
  22. Error when trying to bring my engine (lib) to my exe

    [quote name='TheSphere' timestamp='1303235330' post='4800427'] I am having a linking error when I try and attach my engine to my executable. I have one error left and I have put _DEBUG in the preprocessor of both projects I have looked a lot of different places to try and find the solution. (it may be something simple I missed ><). The error is: error LNK2038: mismatch detected for '_ITERATOR_DEBUG_LEVEL': value '0' doesn't match value '2' in main.obj. I also looked on different places and it said that one of my projects is release and the other debug but they are both building debug as active so I am perplexed at the moment. [/quote] Adding _DEBUG to a project does nothing more than activate a preprocessor value. _DEBUG specifically probably won't do a lot more than enable some asserts. Take a look at other places in the library build settings for an iterator debug level value (off the top of my head, I can't remember where that is.) and change that in the debug build to match the value used in your application.
  23. Brace yourself everyone. Something amazing has just happened... we have just received art work from a client which is actually usable. This is unprecedented.
  24. Luabind to access classes.

    [quote name='JesseWerner' timestamp='1301738220' post='4793437'] After searching exhaustively for the answer to this, I have found no results. I have decided to ditch luabind and create my own structure for binding classes on top of lua. If anyone has any suggestions or resources let me know =) [/quote] __init requires a self parameter and returns nothing. Update probably requires a self parameter too. If you really want to create objects this way, I suggest something like this: [code]// Will call the global function called "name", which, from lua-side, acts as you'd expect a "obj = new Object( )" to work luabind::object myObject = luabind::call_function<luabind::object>( name )[luabind::adopt(luabind::_return); myObject["update"]( );[/code] The function calls might not be exactly right, but should give you an idea. However, I've had a few crashes lately with luabind not keeping references to objects alive which were created lua-side but stored C++-side. Although this was also using lua-side specialisation of classes, so your case may not be affected.
  25. building Google's v8 could not have been any more tedious if it tried...
  • Advertisement