Jump to content
  • Advertisement

BertS

Member
  • Content Count

    54
  • Joined

  • Last visited

Community Reputation

136 Neutral

About BertS

  • Rank
    Member

Personal Information

  • Interests
    Production
    Programming
  1. BertS

    Question about Shared class behaviour

    I know it's not the exact type, but since these are properties I'm loading from a data file I was hoping I didn't need to use the exact type. IE AngelScript would be smart enough to downcast or get the implemented interfaces to match the function signatures. Looking deeper at the source this doesn't look like it'd be the case unfortunately. But aside from that looking at that comment, I think you're right and what I'm seeing is intended behaviour: All modules need to contain the types. I assumed these types would be shared across modules by default, but no such luck
  2. Hello, So I've been successfully using AngelScript in my personal project, but I ran into an issue which was unexpected. I have the following setup: [module A] shared interface IInterface { } shared class SBaseClass { } [module B] shared class SClass : SBaseClass { IInterface@ Prop { set { ... } } } [module C] shared class SomeClass : IInterface { } Now in my code I have a handle to an object of type SClass and I request the function ID of the Prop setter like this: const auto pType = hObject->GetObjectType(); if (pType) { const auto pFunc = pType->GetMethodByDecl("void set_Prop(SomeClass@)"); } Now this fails to find the method declaration, because it can't find the SomeClass type. That's because the script engine takes the module of the first method to start looking for the type (module A in this case) and it seems the modules only look in types directly registered with the engine or that were parsed inside the module itself. I would've expected shared types to be checked here too. I can work around this, but was wondering if this was intended behaviour, an oversight or if I'm simply missing something. Thanks for any and all help!
  3. I wouldn't include resource files inside the EXE like that. What you most likely want is a resource file like Doom's WAD files. You can find more info about WADs here: http://doom.wikia.com/wiki/WAD    Note that the WAD format is just an example file format, but it's a good example since it's easy to understand and implement. There's more advanced formats out there that include file compression and whatnot. 
  4. HL2 uses a standard righthanded coordinate system if I remember correctly. +X right, +Y forward and +Z up. Best to double check this in the SDK though.
  5. It's not weird, it's just a convention. Z being up is a result of Quake 3 using a righthanded coordinate system. If I remember correctly the Q3 coordinate system has +X pointing forward, +Y pointing left and + Z pointing up. Though that could very well be Q2 and Q3 is using +X right, +Y forward and +Z up. It's been too long since I've worked with either code bases [edit] Realised that this could be misleading people a bit. It's not because the coordinate system is righthanded that Z points up, but because of how the X and Y axes are laid out that forces Z to point up in a right handed coordinate system.
  6. BertS

    OpenGL Memory Overwrite

    Add a data breakpoint to img->height, that way you can see exactly where that memory gets overwritten. Can't tell you how to do it since you didn't specify which IDE you're using :) And if I had to guess I'd say you have to make sure your data array is large enough to hold your image data.
  7. Vertex interpolation is going to be faster than using bones. If you want it faster you can always offload the interpolation to a vertex shader (ie pass the frame position and next frame position as vertex attributes). The only problem might be memory consumption as it adds up fairly quickly as your models get more complex, you add more animations or you add more frames to your animations. You can always keep them compressed in memory and decompress in a vertex shader, but at that point it's probably better to switch to bones.
  8. BertS

    Deferred shading issues?

    As Wiegje said, you need to make sure all your data is in the same coordinate space. Store everything either in eyespace or worldspace.
  9. You shouldn't use floats for your timer value. Use integers.
  10. You can set the working directory in the "debugging" section in the project properties.
  11. Interesting game and survey. Really didn't see it comming :) Can I ask what you're studying at university?
  12. Quote:Original post by Dave Blake Actually I don't want to do anything as complicated as select items within the rectangle, just display a rectangle over my rendering that changes size as the user moves the mouse. It just defines a zoom area on my ortho app, e.g zoom into this area now. So yes Erik, that dotted rectangle is what I want, but over the previous rendering rather than white background.Quote:Do you also need the dotted lines to animate, as they do in some paint programs? No animation needed. Quote:AverageJoeSSU said... The only other thing you have to do is render the rectangle as desired.That is what I can't get my head around. Do I have to set a flag when the mouse in down, and keep re-rendering the entire scene including drawing the rectangle (when flagged) on every mousemove message? Is that it? I guess I am still thnking in a GDI way and it seems an inefficient way to do it. The scene is complex but static, just want to draw a dynamic box with the mouse on top somehow without rerendering it all. Yes you'll have to re-render the scene when your mouse moves. Or do as szecs said. To render the rectangle: glEnable(GL_LINE_STIPPLE); glLineStipple(1,0x0F); glBegin(GL_LINES); glVertex2f(x,y); glVertex2f(x+w,y); glVertex2f(x+w,y); glVertex2f(x+w,y+h); glVertex2f(x,y+h); glVertex2f(x+w,y+h); glVertex2f(x,y); glVertex2f(x,y+h); glEnd(); you can play around with the glLineStipple params to get something you like.
  13. BertS

    Particle blending

    When rendering the particles, turn off depth writes but leave depth testing on.
  14. Go to project properties; "debugging" section and make sure your "working directory" is set correctly.
  15. The Valve developer wiki is an invaluable source if you want help with modding HL2 : Click me It should answer all your questions.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net 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!