New answers tagged

1

The other approach I've seen is to use a generate & test (aka trial & error) approach. Basically, a rule is selected & if the result would be valid, it is applied. If the result is invalid (I.E. overlapping rooms) usually it is discarded & a new rule is attempted. Other times, it may be possible to modify the results. In a sense, both of ...


2

Most instances I've seen of graph rewriting for map generation solve the collisions problem (I.E overlapping rooms) by restricting the graph nodes to regular, modular components. For instance, this example, taken from Procedural generation of dungeons uses rooms that are laid out on regular intervals:


0

I'm not sure about in Slick2D, but in Unity this sort of problem can be caused by the engine not assigning indices to wholly transparent blocks. For example, if tiles 2-4 are totally transparent, Tiled would assign the fifth block as index 5 but Unity would assign the 5th block as index 2. Work-arounds may include slicing a dummy image with a solid color ...


2

The difference between ScreenSize and WorldSize is part of the brilliance of graphics systems like OpenGL. ScreenSize is the actual size of the window in pixels. When the user grabs the window handles and resizes the window, then ScreenSize will change. WorldSize is the size of your game level or "World". It is completely arbitrary. In a 2D game, 1 unit in ...


0

I am not aware of an easy way of doing this. The way I'd do this is the following: Determine XY position of click on texture (x = 0..1, y = 0..1) How to do this depends on where you use it, but will likely require raycasting. Go to the camera that sends the image to the texture. Assuming the camera uses perspective projection: Calculate the 3D ...



Top 50 recent answers are included