Brilliant man - pacman clone

I wanted to learn WebGL and decided to make a simple game using babylon.JS.

I decided to make a pacman clone instead of something more original because I wanted to learn/practise the different programs/workflow. I was afraid that when I make something more original I would spend more time tweaking the game instead of the programming. I did stay reasonable close to my original goal, only things I added during the development was the camera chase mode and the multiplayer mode.

brilliantman1

Programs mostly used where 3dMax, substance painter and visual studio code.

You can play the game at www.bigredbox.nl//BrilliantMan/

I am happy with the result. But I do have some issues, if someone has an idea or an sollution I would be more then happy to hear it.

  1. lighting on tiles does not match when objects are rotated
    I use PBR materials and when the object is rotated the (fresnel?) light behaves different.


    the textures tile and the surface is flat, why does it matter how the object is rotated and how can I solve it?

  2. antialiasing seems course, can I improve this?

10 Likes

splendid !

Great work @notMe . Love it!

Love it!
To your questions:

For rotated tiles, how do you rotate them?

Pinging @sebavan

Also @notMe please add your game to our homepage:

You could also turn on MSAA by setting samples to 4 on the rendering pipeline. Aliasing happens due to the lack on AA on renderTargetTextures.

About tiling it looks like the texture can not be tiled correctly.

Yes thanks, the engine.setHardwareScalingLevel(0.5) works perfectly.
I did see SceneOptimizer in babylon which I have to figure out first before update. Game is already a bit heavy to run on a medium phone.

The tiles are simple rotated
var newClone = originalMesh.createInstance(prefix + x + “x” + y);
newClone.position.x = x;
newClone.position.z = y;
newClone.rotate(new BABYLON.Vector3(0, 1, 0), rot / 180 * Math.PI);

I will make a simple playground example from it with the resources I use. Not sure if its a mesh problem, texture problem or a setting in babylon. I will post this on a later date in the questions section.

Yes, this also improves the image quality. Maybe less performance impact then setHardwareScalingLevel. I will have to test.

1 Like

About your nm lighting issue, it’s probably due to something like that:

As the normal texture doesn’t tile, the light will not made smooth transition.

Another point, about gameplay: don’t forget azerty guys :cry:

3 Likes

Yes, it does look like bad tiling, but if I check in photoshop it does look good.


A) wall 1 is the straight wall (the one in the top image where i point with the blue arrows at the problem)
B) checker pattern to see what part goes where
C) the normal map with chekker pattern
D) the texture part which is the top flat part of the wall
F) same part 180 degrees rotated
G) both without the checker pattern

Where I can see an edge in the game between parts F and D I don’t see this in the normal map

I will change it that when you play single player you can use wasd and/or the arrow keys (hopefully in the weekend)

Indeed, your nm seems OK. Have you try to drag&drop the assets in another engine to see if the issue is also here?

This looks like a create game contest candidate for the Retro Challenge we held last year :wink:

And @notMe is from The Netherlands as well.

Nice work! Lots of fun! :ghost:

Q

I did add it to the homepage but I see its not used. Did I do it wrong?

Well I do not see it in the index.html

would you be kind to add it again? (we may have screwed something up :))