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

OpenGL display terrain and sky #44

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

y4my4my4m
Copy link

Do not merge, for your debug eyes only.

The code is in playground mode and cleaning is required.

image

Terrain

Terrain is being displayed, however each chunk has the same texture, it's not properly assigning the right texture to each polygon.

Texture flip doesn't work yet either, these were all manually done through the 8b/32b scanline.

Sky

Sky is all wrong, but it's prettier than white or pink. Basically I'm taking the pink color from the sky texture and making it blend with the clearbuffer. What really should be happening is that it should take the palette and color values and dynamically assign them to the textures...
The 8b/32b code is manually injecting the values during scanline process.

Hopefully this can help anyone fiddling around with this project.

@psi29a
Copy link
Member

psi29a commented Mar 30, 2020

This is very cool work, thank you. :)

@psi29a psi29a requested a review from kcat March 30, 2020 07:05
@kcat
Copy link
Collaborator

kcat commented Mar 30, 2020

I'm not really able to give much of a review, unfortunately. I never understood the code terribly well, and it's been a while since I last worked on it (if it's even the same codebase I'm thinking of).

On a general level, I can say that the patches seem to be adding a good bit of dead code, which makes it hard to follow what it's doing and what it's supposed to do. It might help other people if you try to keep dead code to a minimum, and put comments describing what a piece of code should be doing and what's a temporary hack.

@y4my4my4m
Copy link
Author

@kcat yes, you are right.

I plan on cleaning up the code and adding more commits. That's why I wrote a "Do not merge!" warning at the top :)

This Pull Request is just so others can see what I'm doing.

It's fairly complicated because he wrote his entire scanline renderer (impressive work tbh) and a lot of the core functions regarding the textures are embedded in it.

I'll keep adding more~

@psi29a
Copy link
Member

psi29a commented Jun 17, 2020

Any more work? :)

@psi29a
Copy link
Member

psi29a commented Jun 17, 2020

@y4my4my4m https://github.com/kcat/opendf <-- have a look here by the way, a more Daggerfall exclusive project.

@y4my4my4m
Copy link
Author

@psi29a unfortunately no...

Thanks for the link to opendf, looks interesting!

Originally, actually, I simply wanted to modernize Skynet/Terminator game, which apparently was the basis for the engine that Daggerfall used.

@psi29a
Copy link
Member

psi29a commented Jun 18, 2020

@psi29a unfortunately no...

Thanks for the link to opendf, looks interesting!

Originally, actually, I simply wanted to modernize Skynet/Terminator game, which apparently was the basis for the engine that Daggerfall used.

Perhaps OpenDF can be leveraged to do both? It's just an 'engine replacement'.

@y4my4my4m
Copy link
Author

@psi29a

Thank you, i've tried to build it can't seem to.
I've opened an issue for it.

Seems promising though.

@psi29a
Copy link
Member

psi29a commented Jun 18, 2020

It should work with OSG 3.2; not sure about OSG 3.4 or 3.6 I don't think it has been updated since then. Paging Dr. @kcat

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.

3 participants