Uploaded May 2019 | Updated September 2026, 2 hours ago
All done in Excel using only formulae, with the only use of macros made for the inputting of key commands (e.g. wasd etc).
This shadow casting approach uses line equations rather than the typical ray-casting techniques that you see when researching this topic online. It works very well in large scenes, and I've been able to use many optimizations when applying this in a coding environment.
This is the exact same technique I used in my Dungeons and Flagons game - this video should look very similar: youtu.be/AEh6tQSSTPU
I've fast forwarded the video as the model isn't the fastest ;p but it runs at a reasonable enough speed - remember, this is Excel after all!
You can find the model on GitHub, here: github.com/s0lly/Shadow-Casting-Excel
Please ensure that you read the readme and run through the accompanying notes before using the file.
Hope you enjoy!
Interesting Resources:
If you are interested in learning how to use line equations in coding in general, and how I've approached this problem in particular, this video by Chili explains the topic very well: youtu.be/l-u6uxnOmH0 - it has many useful applications.
I was introduced to shadow casting by this very well-explained video by javidx9: youtu.be/fc3nnG2CG8U - but I do not use the same approach in my version, as mentioned above
Acknowledgements:
Music by Eric Skiff, song "All of Us" for the intro and "09 Come and Find Me - B mix" for the main sequence. (Available at EricSkiff.com/music)
All done in Excel using only formulae, with the only use of macros made for the inputting of key commands (e.g. wasd etc).
This shadow casting approach uses line equations rather than the typical ray-casting techniques that you see when researching this topic online. It works very well in large scenes, and I've been able to use many optimizations when applying this in a coding environment.
This is the exact same technique I used in my Dungeons and Flagons game - this video should look very similar: youtu.be/AEh6tQSSTPU
I've fast forwarded the video as the model isn't the fastest ;p but it runs at a reasonable enough speed - remember, this is Excel after all!
You can find the model on GitHub, here: github.com/s0lly/Shadow-Casting-Excel
Please ensure that you read the readme and run through the accompanying notes before using the file.
Hope you enjoy!
Interesting Resources:
If you are interested in learning how to use line equations in coding in general, and how I've approached this problem in particular, this video by Chili explains the topic very well: youtu.be/l-u6uxnOmH0 - it has many useful applications.
I was introduced to shadow casting by this very well-explained video by javidx9: youtu.be/fc3nnG2CG8U - but I do not use the same approach in my version, as mentioned above
Acknowledgements:
Music by Eric Skiff, song "All of Us" for the intro and "09 Come and Find Me - B mix" for the main sequence. (Available at EricSkiff.com/music)






![2D Game Engine in C++: [8] 2D Normal Maps
This video demonstrates 2D Normal Maps - a technique used to create directional lighting / shading based on the relative location of a LightSource to the drawn object in question. The end effect produces shading which gives even more of a 3D effect to the graphics engine.
The process that Ive used to do this is to create two versions of the tree sprite, one being the simple sprite, and another image (which I call the normal map) which is exactly the same as the original sprite, but with its red, green, and blue colours changed. These are changed to represent the intensity of light that should impact the sprite depending on the direction of the LightSource. These three colour channels represent horizontal (x-axis), vertical (y-axis) and depth (z-axis) coordinates respectively.
For example, a normal mapping of the sprite will have a red colour of 255 (the maximum) if the light intensity is brightest when a light is to the extreme right of the object. So, for the tree, this would be the right hand side of the tree trunk, and any right hand side of the individual leaves. The opposite can then be done for the left hand side of the tree. This gives a nice shading effect to the tree depending on where the light is coming from - although the lighting can be a bit blocky given that we are working on very low-res images!
I will release all code on GitHub once Ive finalised the engine - and have nice looking code to boot!
Using the Chili Framework: http://wiki.planetchili.net/index.php... - thanks Chili! 2D Game Engine in C++: [8] 2D Normal Maps](https://i.ytimg.com/vi/k-Z7wIuZfnA/mqdefault.jpg)
![2D Game Engine in C++: [5] Alpha Blending
This video illustrates an useful addition to the planes concept, that being alpha blending / transparency.
Critically, this will allow effects such as clouds in a top down / isometric game, see-through ghosts in a side-scrolling game, or smoke (as displayed here) in any type of game. It could also allow for effects such as creating see through areas of closer planes to make sure that the playing area is still visible.
I will release all code on GitHub once Ive finalised the engine - and have nice looking code to boot!
Using the Chili Framework: http://wiki.planetchili.net/index.php... - thanks Chili! 2D Game Engine in C++: [5] Alpha Blending](https://i.ytimg.com/vi/kF2RAxFV7qs/mqdefault.jpg)


