-
Notifications
You must be signed in to change notification settings - Fork 17
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
Improve 3D view (rounded, filled obstacles) #24
Comments
You might be able to cheat a little bit to achieve rounded effects by simply inserting a properly sized cylinder object at each corner. By sizing the radius properly you should be able to achieve a rounded effect without z fighting. Advantages to this approach over doing a custom rounded wall triangle mesh are simplicity obviously but also style. You could colorize and shade the corners differently than the walls which could get a really cool depth effect. I could also see a new type of game mode where you ONLY apply lighting to the corners. (or at least make the walls very dark). This would give the whole gameboard a black light effect and make it harder to navigate. Maybe this could be an effect that is triggered randomly or due to a hazard to make it more difficult. You could call it PacMan++ :-) |
Hi Sean, what an honor to get input from a real JavaFX expert :-) Thank you for all your ideas, I will think about them. I admit, the 3D maze always looked a litle bit cheap and I wanted to improve that already since a long time. In the recent months, I was busy adding the Tengen Ms. Pac-Man game variant which offers a large number of new mazes, some of which are really, as their name says, "strange". After having "completed" that (the 2-player modes are not implemented), I want to come back to finally improving the 3D view. To do so I reworked the representation of the obstacles so it should be no problem at all to replace the 3D corners by something more fancy. What I had in mind was using one of your F(X)yz library shapes, not sure which one would make most sense. That would, however, violate my silent requirement to not use any additional libraries (tinylog doesn't count :-) in my game implementation, just JavaFX out-of-the box. Of course, a prefabricated 3D model for all the known mazes would easiest to use and would look best, but unfortunately, I am completely untalented in using programs like Blender and the like. The current solution gives my a generic way of creating the 3D mazes from any (2D) map file and improving this is probably the way to go. Best regards from Germany Armin |
In a first try I placed cylinders in the corners and shortened the walls in the corner a bit. This already looks better. However, what I really want to achieve in the future are filled obstacles which look exactly like the 2D obstacles. |
give us some pics fam.... ;-p |
I started by adding cylinders to all corners (as you can e.g. see in the outer walls). This already improved the look a bit. Then I changed the representation of O-shaped obstacles as you can see in the screenshot. L-shapes and T-shapes will probably also not be a problem. For creating filled and rounded representations of general polygonal obstacles I probably need to implement some polygon decomposition algorithm like has been done here: |
I think this looks cool actually! I know you are showing wire frame for debugging purposes but its a cool effect. It would be cool if you had random chaotic effects that kicked in like all the obstacles and characters going wireframe temporarily for like 5 seconds for the long walls inside the maze, (not the outer walls) are you using a standard Box object? Another idea would be to make an animated box ... ie... its a custom class that reuses the original Box trianglemesh code but then adds code to animate the texture on the surface. Basically what I'm suggesting is that you could keep the wall structures as is but ALSO add image materials to it that you animate the UV coordinates of to simulate motion or some cool special effect. You could do that special effect only when a ghost or the pacman is near by. Maybe even have different material animations depending on which ghost. Here is an example I did for an animated box object in my Trinity software: The intent of the effect was that if you double clicked on the box it would rotate the material texture on the box vertically. It's intent was to simulate animated motion on a city street. You can do something fancy like this with your walls or anything you want technically. Or even draw on the texture directly using pixelwriter if you want to get super whiz bang. |
Wow, so much ideas (from your side) and so little knowledge (from my side :-) But honestly, thank you very much for all your ideas! Will see what I can realize. Today, I added support for basic L-shapes and T-shapes, see screenshot. Next, I will implement elementary U-shapes and cross-like shapes. I find this a useful path to follow for now. All the 3D shapes are just composed of cylinders and boxes by now. The internal obstacles you mentioned are also just Best regards |
3D view should use filled and rounded obstacles.
The text was updated successfully, but these errors were encountered: