TNT Basic Forums > Programming Q&A
How to make structures?...and path finding?
< Last Thread     Next Thread >
Thread        Post A Reply

12-12-2002 11:18

Posted by:

Click Here to Email Davincho   Find more posts by Davincho


i'm thinking a strategic game and my first tool are tntbasic (my second preference is realbasic using class)..but i find some quetions:

1.- How i can "simulate" a data structure? (typedef struct {...} C/C++ style)...or tntbasic can make structures? SOme examples?

2.- Someone wrote one a-star algorithm with tntbasic?

thanks in advance and regards!

12-16-2002 20:24

Posted by:

Santa Rosa, Ca

Click Here to Email Holmes   Find more posts by Holmes

TNT basic doesn't support structures like that, but its no biggy since structures really only help you organize your data. You just gotta be careful naming your variables is all.

And pathfinding shouldn't be to hard. Just set an x and y variable for where the object is, and one for where it should be. if xposition < xwhereitshouldbe then xposition=xposition+1, if xposition > xwhereitshouldbe then xposition=xposition-1. Same deal for Y. You can make it more complex from there.

All times are GMT        Post A Reply

Forum Jump:
< Last Thread     Next Thread >

< Contact Us - TNT Basic >

Powered by: vBulletin Lite Version 1.0.1 Lite
Copyright © Jelsoft Enterprises Limited 2000.