vicer1234

Member

92

115 Neutral

• Rank
Member
1. Projection from point to line

thank you for replying Is it Line.pos + Line.direction * dot_product(Line.direction, Point - Line.pos) I know what is dot product, cross product, knowledge of trigonometry etc but I find it confusing to apply in problems ( in way of programming ie construction functions to calculate) like: 1) Given a point and a line to find out whether it is on the left or the right side of the line 2) Find angle between a line and a plane ... etc Is there any tutorials or any weblinks where I can find these sort of problem for practise/learn. Any guidance or suggestion is welcome
2. Projection from point to line

Hi, I want to find projection from a point 'P' on a line 'L' if line is given as: struct Line { vec3 pos; vec3 direction; } and the point is vec3(a,b,c) I am trying to form a function like: vec3 ProjectionToLine( Line, Point);
3. Perlin Noise + tile mapping

Thanks for the reply. I am working on same logic as you have mentioned for the 3) part I just wanted to know the parameter (X,Y) which is passed to PerlinNoise() function how they are determined ie X and Y is it characters world position?
4. Perlin Noise + tile mapping

I am still working on it....But I hope the question I put forward is understandable and it also make sense!!! Note:(Just a polite update)
5. Perlin Noise + tile mapping

Hi, I am trying to build a 2d platformer, in that I want to have procedural maps generation using Perlin noise. The idea is to have a Terraria type of game environment. For that purpose I have created a Perlin noise function and it generates random values when passed two values (X,Y) But I am confused about the next step to be taken for the implementation: My doubts are: 1) Whats the logic for the tiles (procedurally the map ) to get displayed as the CHARACTER moves left,right, down, and up. Is it like taking the co-ordinates of the character as a REFERENCE which is moving at any point of time for example like the character is at (200,100) and the map width is 1024 X 768 then using that point (200) as a reference and generate map 1024 width wise && using (100) as reference generate map 768 height wise. 2) If my map is 1024 x 768 ie equal to the game window at any point of time then do I need to pass each pixel value and generate the noise values and store it ie for(int i = 0; i < 1024; i++) { for(int j = 0; j < 768; j++) { NoiseGenerated [ ] = PerlinNoise( i, j); } or is it like taking that area only where the tiles will get displayed. I mean if the tiles are displayed in area like width: X' min starting from = 0 and X max ends at = 1024 height 'Y' min starting from = 0 and Y max ends at = 384 ie 768/2 Then the noise is generated for (1024 = X, 384=Y) Is this the way of doing it???? 3) How to relate the value generated from Perlin noise to tiles ie I have tiles of GRASS, WATER, STONE ETC I hope the questions which i have asked make sense !!! All suggestions are welcome
6. 2d World Generation

HI, Thanks for the replies. I want to know from where should I start coding about 2d procedural generation in order to understand it in a step by step manner. Any recommended tutorials are there please do suggest it.
7. 2d World Generation

Thanks. But is there any visual in that webpage, as I am not able to see anything, I can see the source.
8. 2d World Generation

Hi, Any idea how terraria has gone about generating world maps? Is it done using noise algorithms for side scrolling type of game?
9. OpenGL 2d World Generation

Hi, I am trying to implement 2d world generation similar to that of minecraft and Terraria. There should be grass, trees, dirt, caves etc. I am using C/C++ and OpenGL I am not sure how to approach this problem with reusable/efficient code that can be integrable with other game engines for future use. Does it need to be done using some random number generator or using perlin noise algorithm. I am not sure whether Noise algorithm will be suitable for 2d side scroller type of game with lot of different sprites to be generated. All suggestions are welcome.
10. Portfolio website Feedback

Hi, Done some changes to the website. Working on more areas to improve the look and feel and add more content.
11. Portfolio website Feedback

Thanks for the feedback. I will try to improve on it. Looking forward to more suggestions
12. Portfolio website Feedback

Hi, I have put up my portfolio website https://sites.google...ameprogramming/ It would be really helpful if professional game developers and other game enthusiast can have a look into it and suggest the areas of improvement in: 1) The portfolio website layout and contents 2) Resume structure 3) All type of corrections. All suggestions are welcome Ps: if such posting regarding portfolio is not allowed then do let me know and I will remove the post.
13. Moving Image in circular motion

This is too vague, can you elaborate a bit? Maybe post your code. Are you centering your x coordinate around the center of where you want the circle to be, or just using the pixel x value of the mouse? [/quote] To give a better view about what i am trying to implement, just run this application in browser http://phet.colorado...n/bending-light Click the Prism Break section and see just how the laser is moving according to the mouse movement. In that you can see both the rotational and translational movement. Are you centering your x coordinate around the center of where you want the circle to be, or just using the pixel x value of the mouse? [/quote] I am using the pixel x value of the mouse
14. OpenGL Moving Image in circular motion

Hi, I want to move an image in a circular motion ( not rotating the image like using glRotatef() in Opengl) while moving the mouse. I am able to move the image in translational way using mouse motion. But I am not getting on how to move it in a CIRCULAR MOTION where the image moves in a fixed radius. what i mean is when the user clicks on the image and decides to move it in circle, then as the user drags the mouse the image starts to move around in circular motion. I tried using circle equation for it like after getting the 'X' position from mouse position I calculated the 'Y' position using the circle equation like newY = sqrtf( abs( ( r*r) - (x* x) ) ); // x*x + y*y = r*r where r=radius. I have kept the radius constant like r=100.0, since the random mouse position varies in range from ( 1024, 768 ) ie the screen width and height. then using the 'X' and the 'newY' I use glTranslatef(X, newY, 0.0); to move the image, but its not giving the correct behavior. What should i do for it. I am using C/C++ and Opengl All suggestions are welcome.
15. Snells law

Hi, I am trying to implement Snells law as a simulation. Snells law: Sin A/ Sin B =V1/V2 = n2/n1 Couple of things I am thinking as possible implementation method are: 1) Showing ray of light using LINE. 2) After calculation I am thinking of showing the refraction or reflection by another line. Taking the angle into calculation. let me know whether the above assumptions are right of doing Also one major doubt is: How to calculate the angle when line( Ray of light ) hits at any random surface of the object. I am using C++ and Opengl for implementation All suggestions are welcome