We would like to build a community for Small Basic programmers of any age who like to code. Everyone from total beginner to guru is welcome. Click here to register and share your programming journey!


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
LD3DMazeGame
#1
Hi

This is a work in progress of LD3DMazeGame.sb porting to C# but without ILSpy.

[Image: 1.jpg]

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
Reply
#2
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.
[-] The following 3 users Like litdev's post:
  • AbsoluteBeginner, stevantosic, z-s
Reply
#3
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
[-] The following 1 user Likes stevantosic's post:
  • litdev
Reply
#4
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.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)