Hi Randall,
what a shock !
This is absolutely incredible script and module!
Profi layout, fast execution, even helpfile !
I will check the repaint / font problems ... but this are just details comparing to work you did.
Terrific!,
Petr
Hello All,
I've been pretty quiet lately because I've been busy learning thinBasic and how to develop a module. I now have something to show, as my first attempt. I will welcome your criticism of it, as I will learn from what you have to say. Perhaps others will learn from your comments as well.
This is a very simple application. You draw a maze on the screen, pick starting and ending points, and let the computer try to find a path through the maze. There are some sample maze files included to get you started.
The path-finding is accomplished using the A* (A-Star) algorithm, which is provided in a module for speed reasons. The module was coded in "C" using the DevC++ IDE.
To install, uncompress the zip file into your thinBasic UserScripts folder, and copy the thinBasic_ASTAR.dll file to your LIB folder. The SDK folder has the source files the module was compiled from.
I'm not a "C" programmer, so please let me know if I did something wrong in my module.
Known Problems:
I developed this application at home on a Windows 2000 Pro OS, I just ran it at work on XP, and it seems to act a little differently.
I'm having problems with the fonts in the Help About dialog box. Sometimes they render correctly, othertimes they do not.
I'm also not clear on how to handle the WM_PAINT message. I tend to get multiple repaints of the screen when I only want one.
The module is not very well developed. If there is sufficient interest, I will develop it further and make it more useful. I'm not a game developer, so I'm not sure what you guys would want.
Thanks for taking a look!
Randall
Updates:
- 2007.10.06 main window is now resizable and mazes will adapt to winwow client area
Hi Randall,
what a shock !
This is absolutely incredible script and module!
Profi layout, fast execution, even helpfile !
I will check the repaint / font problems ... but this are just details comparing to work you did.
Terrific!,
Petr
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
Regarding fonts,
it seems to me like some resource leak or something.
It should be correct to do something like
[code=thinbasic]
DeleteObject(hFont2)
DeleteObject(hFont3)
[/code]
... when exiting about proc. Maybe something similar for painting, but I am not very good at raw SDK paint functions, so maybe somebody else will know better
I must play with your script again and again. Really nice !
Petr
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
Randall,
what a present
Nice idea, perfect module, professional script complete and well written in all parts. You have spent a lot of time on it, I'm pretty sure about that. I have no words because you have showed to me once again the many possibilities thinBasic and especially thinBasic modules can have.
Regarding refresh rate and some strange %WM_PAINT firing, I'm quite sure it is a problem in UI (User Interface) module. In today released thinBasic preview 1.4.0.1 I have changed some code on how internal UI Windows message pump handle %WM_PAINT message. It makes some positive difference for example with previous one version when window goes outside screen and return, covered area does not get repaint while with current online one it des. But I need some time to understand what I'm doing wrong with %WM_PAINT. So for the moment do not worry about that or at least not too much. I will use this script for testing.
Regarding fonts, I need some more time to study your script and see how things are done.
Thanks again for this present.
I'm sure it will focus the attention for some big time
Be prepared to implement thinBasic_ASTAR module
Ciao
Eros
www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000
Randall,
as we are used to do for interesting complete projects like this one, I have created a dedicated forum named AStar and moved your posts into it.
You are also moderator in this forum. Being a moderator doesn't mean anything other than you have some more forum power over posts. So feel free to do what you prefer with your new creature here.
Ciao
Eros
www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000
Great man! I will still release my path module, the more the better. I will have a close look at yours. Again thank you very much!
Excellent looking program Randall, really interesting.
Operating System: Windows 10 Home 64-bit
CPU: Intel Celeron N4000 CPU @ 1.10GHz
Memory: 4.00GB RAM
Graphics: Intel UHD Graphics 600
Randall, I am just amazeD
It is so quick and clever. I couldn't fool it yet, probably won't but I will keep trying. Very cool idea for a game and also of course what looks like a neat module to study!!
THanks so much!! Really really neat!!!
Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server
Thank you all so very much for your kind comments!
I was only able to create it because of all the sample code and forum posts you all have so graciously supplied. Anytime I wasn't sure how to code something, I could either find a sample program or code snippet in the forums that showed me the way. My thanks go out to all of you for unselfishly sharing your code and expertise. I am honored to add my code alongside the excellent code already posted on this forum site.
Thanks again,
Randall
Thanks Michael,Originally Posted by Michael Hartlef
If you would like to incorporate my code into your path module, please feel free to do so.
Randall
Bookmarks