LD3DMazeGame - Printable Version +- Small Basic Forum (https://litdev.uk/mybb) +-- Forum: Small Basic (https://litdev.uk/mybb/forumdisplay.php?fid=1) +--- Forum: Extensions (https://litdev.uk/mybb/forumdisplay.php?fid=3) +--- Thread: LD3DMazeGame (/showthread.php?tid=61) |
LD3DMazeGame - stevantosic - 05-02-2024 Hi This is a work in progress of LD3DMazeGame.sb porting to C# but without ILSpy. Configuration file (room1.txt): About: maze3d using litdev extension a=coffee.png;b=bug.png;c=head.png;d=Tree.png;e=whitePawn.gif;f=whiteRook.gif; 1=wall.jpg;2=stones.jpg;3=water.jpg; XXaXbXcXdXCXeX XXXLXXXZLXXZXf XXXX LXXXa LX XXX XXCXXb XXLXXcXXSLXXdX XXXcXCXXeXX Just an idea for end (non programmer) user to have a feature to make a gaming room by text file and images. Running: LD3DMazeGame2 room1.txt A little bit from source code (got from original litdev's code): // Create a world based on layout // X is an empty room // L is a room with a light // C is a room with a rotating illuminated cone // S is a room with a rotating illuminated sphere // Z is Zeb // a-z is a custom wall images in config file Where is a good place to share code? Maybe should be reviewed by litdev before publishing? st RE: LD3DMazeGame - litdev - 05-02-2024 This is great. One of my hopes for LitDev extension was that it would act as a taster for what could be done and act as a bridge to C# or other languages. For code sharing and version control get a free GitHub account, where you can save private and public code projects. This integrates into VS and otherwise there is a free Windows GitHub Desktop version. One thing about most languages including C# is that there are solution and project configuration files as well as resources and code, so ad-hoc file sharing can be painful. This is my account for example https://github.com/litdev1. All resources are free for almost all levels of software development, just check any licensing before 'borrowing' code, but almost all is opensource - there is a big opensource community that are very keen to keep things open. MS now even uses GitHub in favor of its own version and .Net itself is opensource - opensource means it gets developed faster and can be virtually guaranteed to not be malicious as loads of coders can and do look at all the code. To use external libraries dowload from other peoples GitHub code. Also use Nuget to get external pre-built libraries which again integrates into VS and SharpDevelop (although I did have some issues with this). I am very happy to help any of you get started on this journey beyond SB and I hope you can help each other. RE: LD3DMazeGame - stevantosic - 05-03-2024 Thanks litdev There is a challenge in mixing SmallBasic and C#. File FormTestHarness.cs (github.com/litdev1) is essential to me for understanding this connection. Beside, when I run Turtle example for the first time in C# it was great achievement. st RE: LD3DMazeGame - litdev - 05-03-2024 Cool, the TestHarness project is so I can call small segments and debug through the LitDev extension. With similar code you could also debug through SmallBasicLibrary.dll or LitDev.dll to see how stuff works. Because Small Basic and extensions use the Primitive type (this is one thing that really limits SB) and we need to use Reflection to access the core SB environment like GraphicsWindow extensions can be quite convoluted. Another challenge would be to write something simple like the turtle in C# without referencing SmallBasicLibrary at all. The code could then be free from the Primitive type and all the Reflection code. GraphicsWindow is just a Canvas control sitting in a Window. |