memento_mori

Members
  • Content count

    65
  • Joined

  • Last visited

Community Reputation

100 Neutral

About memento_mori

  • Rank
    Member
  1. C++ new operator and delete

    Quote:Original post by Hacksaw2201 After seeing prior conversations about node types and vectors and other C++ Gobble-D-Gook, I decided to write my own. Why? IT Dept - Ease of use for all levels/types of programming Marketing - Could get it done faster this way and out to the public sooner Management - Could get it done faster this way cutting cost Legal - Does this need a copyright? Myself - Maybe I should teach "I don't think it's a good idea to write your own containers (Linked Lists, Hash tables, Array lists, etc...) use STL" Does Mac, IBM, HP, DEC, Java have STL? by the way(btw) if you are thinking about getting into computer programming, memento_mori's repsonse is typical in the field .... an immediate critique. 26 years later ..... I don't miss it a bit. heh i didn't mean it in an offensive way... i was just being practical: if you're going to write everything from scratch and go THAT down, you may never start working on the actual game, thats what i meant.
  2. C++ new operator and delete

    Question or Answer? I don't think it's a good idea to write your own containers (Linked Lists, Hash tables, Array lists, etc...) use STL, they're probably more optimized and complete... good job anyway.
  3. Compiler for linux?

    try KDevelop with the gnu c++ compiler of linux.. the best. Eclipse is nice too.
  4. Scene Management

    i think i read a post by Yann somewhere on this forum that you should have both a scenegraph and an hierarchical scene representation (octree for example) and neither could replace the other and not we're not supposed to mix those two ... i'll find the link... is that wrong?
  5. Camera question

    Hello, I have a camera class that is basically transforming vectors to be used with gluLookAt later... I am trying to turn the camera using mouse events... Here is a very basic idea behind the code, (PS: I'm just testing, this is not the real implementation...) int x = LOWORD(msg.lParam); int y = HIWORD(msg.lParam); if (x > width/2) c->TurnCamera((float)-x/500); else if (x < width/2) c->TurnCamera((float)x/500); if (y > height/2) c->CameraLookUp((float)-y/500); else if (y < height/2) c->CameraLookUp((float)y/500); SetCursorPos((float)width/2,(float)height/2); c is a pointer to camera x and y will represent the x and y of the mouse on screen each frame... each frame i center the cursor using SetCursorPos ... Now I am assuming there's nothing wrong with my camera methods because, when I remove this part: if (y > height/2) c->CameraLookUp((float)-y/500); else if (y < height/2) c->CameraLookUp((float)y/500); the camera will just turn perfectly... and when I remove this part: if (y > height/2) c->CameraLookUp((float)-y/500); else if (y < height/2) c->CameraLookUp((float)y/500); again everything works fine and the camera will look up and down.. but when I combine both transformations, it works ALMOST fine, but looks as if the camera has been rotated around the Z axis.. After thinking about this for a while I have concluded that I should rotate the camera around the Z axis manually and with a Delta Angle of arccos (x/y) ... But of course it didnt work... Anyway can help on this? Thanks in advance
  6. perspective projection matrix question

    Hmm that cleared things alot for me... thanks for your fast reply. and since my parameters (camera distance, FoV, screen width, height, etc...) are fixed atm, i'll do as you say and let Direct3D create my matrix and steal it :D:D:D :P just hope it works. cheers and thanks
  7. Hello, I am currently writing a very (extremely) basic software renderer for a uni project. For now it is only supposed to render vertices as dots on the screen and apply some transformations. Here are the steps I'm following to do that: (please let me know i'm doing anything wrong): a) Get points from cartesian system (x, y and z coordinates), add w component with a value of 1 b) Multiply this vector with transformation matrix (I'm only doing rotation ATM) c) Finally multiply the resulting transformed vector with Projection matrix. d) The result should be a 2D point. Render the point. My question is: How do I compute the Projection matrix, and how can the multiplication of a 4x4 matrix with a 1x4 vector return a 1x2 vector (did i miss something, i suck at linear algebra :P) Please if anyone can point me to a good article on this that would be great. Thanks
  8. New to 3D

    i wouldn't suggest writing a software renderer... you will never use it; granted you will learn the basics of 3d graphics and the graphics pipeline but since that work is handled by your graphics accelerator and the API why bother? i suggest you start learning an API (directX or OpenGL) and start working your way from there. Alot of books are suggested here @ gamedev and most of them are really good. You could also get OpenGL RedBook for free and it's the best way to start Opengl IMHO As for graphics there are some tools that are free (or almost free) for 3d modelling such as Blender or Anim8tor, and there are some tutorials that teach you how to use them.. Also you could use other game's models and textures (since you're only doing that for fun and not going to publish your game as a commercial product). Example to taht would be Quake 2 or Half Life (md3 and mdl file format).
  9. OpenGL window

    I meant: choose Win32 Application (and not CONSOLE APPLICATION) and then pick Empty Project. I assume you're using VS2005 (express) go to Project -> Properties -> Linker -> Additional Dependencies and add (opengl32.lib, glu32.lib)... add any other libraries you might be using... or if you prefer do this: add these lines to your source right before including gl.h and glu.h #pragma comment(lib, "opengl32.lib") #pragma comment(lib, "glu32.lib") those libraries are used in the Nehe Tutorials. If you already did this and still no result... then this Tools -> options -> Projects and solutions -> VC++ directories and make sure the path to the INCLUDE files And the LIBs are correct and they lead to your OpenGL libs and headers... if not add them. We really can't help you much if you don't give us a detailed explanation of your problem... When you try to build ths project what errors do you get? Copy paste the output here and I'm sure then we can help you better. Good luck
  10. Can you import 3dmax models into other 3d software?

    it depends on the format to which you are exporting your models. most formats are compatible with different software, some formats are proprietary. some 3d modelling software provide the ability to write plugins and scripts that could allow them to import and export additional or custom formats.
  11. .cpp or .h? And 2d depth

    Quote:Original post by Chad Smith Only time you should put implementation in header files, is when you are working with templates. Because, I am pretty sure that it is hard to have template definitions in CPP files. There is also a reason why they are in header files also. Chad didn't know it was even possible to split templates into CPP whats even suckier is that Visual Studio doesn't really recognize .t files as templates and you'd be like adding bastard files to your solution :P:P
  12. .cpp or .h? And 2d depth

    Quote:Original post by Reckoner This isn't correct in the general case. If you define an entity with external linkage in multiple translation units (which would occur if the definition was placed in a header included in multiple source files) you would be violating the one definition rule and would probably get linker errors (though there are exceptions, see ISO 14882 section 3.2.5). #ifndef HEADER_H #define HEADER_H blahblahblah #endif
  13. Very stupid suggestion, but is it possible that you forgot to add the libraries to link?? #pragma comment(lib,"SDL.lib") #pragma comment(lib,"SDLmain.lib")
  14. OpenGL window

    Could you be more specific? What errors/warnings are you getting? Are you sure you included all the libraries (opengl32.lib, glu32.lib) etc... Also, make sure you're using the correct type of project (win32 application without console).
  15. .cpp or .h? And 2d depth

    Quote:Original post by yurian Oh. And suddenly a huge load of work is dropped onto my head =( Thank you very much =D So does that mean I can't say in .h files if(blahblahblah = false) { wakkawakkawakka(); } I still cannot figure out the depth and flickering problem... yes you could... in fact you could write the whole implementation inside the .h files but it's not good practice... if a method is very short (like a get or set function) consisting of few lines it's okay to write it in the header file... the point is: the header files will be included in your source files so class and function prototypes MUST be there... As for the actual implementation of the function, it doesn't matter where it is... you could write it all in the header file or you write it in the CPP file. It's not an obligation but you will want to put it in the CPP eventually when your source files start to grow uncontrollably. this was created to actually make your life easier. you'll get used to it after a while don't worry ;) oh and by the way: if(blahblahblah == false) { wakkawakkawakka(); }