Tag Info

3

Try using the perspective() command to set a greater far drawing distance.

2

Your file is not a binary file. It contains ASCII text, starting "1e"... The value of which is 65 31 in Hex (Little endian encoded), Or 25905 in Decimal. 1e44(ascii)= 34 34 65 31 (hex) = 875849009 (dec)

2

Many 2D games are actually 3D with most objects fixed in certain planes (Unity 2D for example). If this were the case, you could quite literally just move the camera backwards as a quick fix. However, you mentioned processing! Processing utilizes affine transformations, and has a built in transformation stack. It's hard for me to remember exactly what the ...

1

It appears to me that you're having a problem because you're not doing any ray tracing, you are trying to simplify the "all purpose calculation" into a "specific" calculation that can hit vertical walls. First, obtaining a 3d ray direction should not come from an angle; but from the vector that links the current iterated pixel to the camera. After that, ...

1

You have a logic problem in your code here if(x>oldx) { x=oldx; x-=2; } if(x<oldx) { x=oldx; x+=2; } The reason why it only works for left and top is because you are overriding the x value in the second if statement. When going right x will be greater than oldx. You then set x to oldx - 2, the second if checks if x is lower than oldx which in ...

1

You can use just the camera() method to change the perspective more easily. To use it, you probably want two variables: rotationAngle and elevationAngle. Moving the mouse sideways changes rotationAngle between 0 and TWO_PI. You can then set variable centerY to sin(rotationAngle) and centerX to cos(rotationAngle). Moving the mouse up and down would change ...

1

Since the comments made clear you're looking for a general solution, I'll describe that process here. Note the code is to show the principle, you will need to translate it to the framework you're using. I also assume you are familiar with projection, view and world matrices- and their role in 3D graphics. 3D Mouse picking The idea is to create a ray from ...

1

This is not a full answer, but these are the general steps to go through to get what you want Create a mouse-viewport ray, this is a line segment that starts from the camera eye position and shoots out into the scene through the mouse position. Ray-plane intersection, use some maths to check if and where the ray intersects the infinite plane defined by a ...

1

This is a really broad question. Unity is a very powerful and feature-rich game engine. It provides you with several tools which can help you to create unique procedural graphic effects: Programming your own shaders gives you a lot of freedom to develop graphic effects on the GPU The Mesh class gives you access to the vertex and UV coordinates of your 3d ...

1

You cannot load and use images from other domains with HTML5 canvas. Make sure to serve your images from the same domain/server as your processing code. Alternatively, enable cross origin access on the server which is serving your image. Read more here: https://stackoverflow.com/questions/22097747/how-to-fix-getimagedata-error-the-canvas-has-been-tainted-by-...

1

The comment from DMGregory made me realize that it was the compiler that was processing the new added file. This however only happens outside of playmode and only in the editor. With this came the other knowledge of the Resources folder not being editable in a build. And for me this would be a huge issue since players need to be able to add their own custom ...

1

I'm not familiar with processing, only with java, but that shouldn't matter. How I'd do it is to have an infinite array (in java an ArrayList) of vectors, each marking a position of a snake tile. When the snake wants to move, you first create a new vector in the heads new position, add it to the array, then check if it collides with any of the other snake ...

1

Generally for generating terrain(either 2D or 3D), you need a base "random" factor, something you can base your terrain of. There are several nice algorithms and tutorials for generating those, and with some arithmetic calculations you can easily customize them for you own needs. Some examples are the Perlin noise or the Simplex noise. Do a bit of research ...

1

Well, you are on the right track. You can do this with keep in minds something. You must have a texture with read/write permission. You can do it easily by selecting it and change its Texture Type to Advance. Don't forget to mark check on Read/Write Enabled Second thing is you must have a Material in your script on which you'd modify its texture so the ...

1

Most games use quadtree structures to manage the colisions, you should read about it. Anyways, if you are having lag after X levels is possible that you are storing all the objects and checking them out every loop, and not just the object in the current scene or level.

1

You have to write your own collision checks and solve collisions when they occur. Processing has no build in collision checks. Solving collisions can mean several things: Mostly it means, that you cancel the movement that created the collision. Or you modify the movement to another direction eith lower magnitude in another direction. (Imagine running ...

Only top voted, non community-wiki answers of a minimum length are eligible