Also looking for a game

Page 6/7
1 | 2 | 3 | 4 | 5 | | 7

By pitpan

Prophet (3145)

pitpan's picture

26-02-2004, 09:50

Welcome back!

Yes, despite the english surname I am spanish. About randomly generated mazes there are a lot of algorythms out there and most of them check if the labirynth can be finished or not. There are also some algorythms that solve the mazes and they work great. And, lucky you, most of them are in C/C++, so they should be easily ported to MSX.

Kind regards,

Ed Robsy

By anonymous

incognito ergo sum (116)

anonymous's picture

26-02-2004, 10:09

Good luck porting C++ to MSX!

By Arjan

Paladin (747)

Arjan's picture

26-02-2004, 12:09

there are also maze generation algorhythms that always produce solvable mazes Smile

By BiFi

Enlighted (4348)

BiFi's picture

26-02-2004, 13:55

There was a Dutch MSX/SVI magazine in the 1980's that published a Basic listing of such a maze generator.

By ronin

Supporter (13)

ronin's picture

26-02-2004, 19:34

Thanx Ed Robsy Smile. Well about the randomly generated mazes I found some algorythms that checked if the maze has an exit and other facts such as if it doesnt have infinite loops or inaccesible areas... but the one I liked the most is one where you generate it moving from the exit and following some rules to avoid all the not desired effects (like loops) until you fill the whole thing, its 100% effective since you keep moving through the maze until all the spaces are filled so it is always solvable, and more difficult to solve since you keep movin from exit point not from the starting one, and I tested it doing a prog in a basic language and works great Smile, now I "only" have to find my way to port this to msx ^^;. Btw im also spanish Smile, wasnt there a spanish version of the msx.org?

Edit: I forgot to say that the maze code can be done in plain C so there is no need to use C++... dunno how difficult could it be to port from pure ansi C tho

By anonymous

incognito ergo sum (116)

anonymous's picture

27-02-2004, 20:54

AFAIK Hitech C is ANSI compatible.
It still might be difficult, depending on the source code, because a lot of programmers wrongly assume an 'int' to be 32 bit, or large enough to store a pointer. In Hitech C case, the int is 16 bit, as is the pointer (but theoretically it could be different Tongue ).
One of the things you can do is test on a PC first by changing all the int's to short's. If it still works, the original (not the modified) code has a large chance of compiling as-is on Hitech C.

By thinlizzy

Champion (259)

thinlizzy's picture

01-03-2004, 18:34

AFAIK Hitech C is ANSI compatible.
It still might be difficult, depending on the source code, because a lot of programmers wrongly assume an 'int' to be 32 bit, or large enough to store a pointer. In Hitech C case, the int is 16 bit, as is the pointer (but theoretically it could be different Tongue ).
One of the things you can do is test on a PC first by changing all the int's to short's. If it still works, the original (not the modified) code has a large chance of compiling as-is on Hitech C.

all good C programmer knows int type must not be used in data structures. char, short or long must be used, instead

int is a word and must be used in loop or temp vars because the optimizer likes to map it on a register

By anonymous

incognito ergo sum (116)

anonymous's picture

01-03-2004, 19:32

b*llsh*t

By thinlizzy

Champion (259)

thinlizzy's picture

02-03-2004, 16:51

b*llsh*t

why? Smile

By anonymous

incognito ergo sum (116)

anonymous's picture

02-03-2004, 18:06

'coz what you write is simply not true.

1. Learn about how CPUs work internally.
2. Learn about C.
3. Learn about how compilers work internally.
4. Come back here and laugh at your own statements.

Page 6/7
1 | 2 | 3 | 4 | 5 | | 7