Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Have Landblocks load all scenery during start up and store it for use in the physics engine. #642

Merged
merged 1 commit into from
Feb 19, 2018

Conversation

gmriggs
Copy link
Collaborator

@gmriggs gmriggs commented Feb 19, 2018

Here is the first attempt at the landscape scenery generation. It's performing the same calculations that the original client does to build the scenery objects, although it's still not matched up perfectly yet.

The scenery is defined on a per-cell basis, which gets mapped through the region file to the actual scenery data. Instead of placing individual shrubs and trees on each cell though, the game uses something akin to perlin noise generation to move scenery objects around the grid in a non-uniform way.

https://imgur.com/a/wyQRt

Todo:

  • It appears there is more scenery generated than the original game, even though the functions should be matched up exactly with the client. I will need to investigate more to find out what could be causing any differences.

  • Scenery items should not spawn on roads or anywhere near other objects. The collision detection is currently just using a basic bounding box, but in acclient this is performed by the physics engine.

  • Scenery items should also not be placed on steep terrain that can't be traversed by the player. This should ideally be done by storing normals for each triangle in the landscape mesh, and performing the slope checks based on that.

@Mag-nus Mag-nus merged commit 9737375 into ACEmulator:master Feb 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants