Оберон-клуб «ВЄДАsoft»
https://zx.oberon.org/forum/

Roguelike with strategy
https://zx.oberon.org/forum/viewtopic.php?f=10&t=125
Страница 1 из 3

Автор:  slenkar [ 04 июл 2013, 00:13 ]
Заголовок сообщения:  Roguelike with strategy

Изображение

Making a random dungeon

Автор:  Zorko [ 04 июл 2013, 01:13 ]
Заголовок сообщения:  Re: Roguelike with strategy

Looks pretty nice! 8-) We'll wait for a runnable demo. :)

Автор:  slenkar [ 05 июл 2013, 22:10 ]
Заголовок сообщения:  Re: Roguelike with strategy

thanks
W is for Wall and F is for floor
Изображение

Автор:  slenkar [ 06 июл 2013, 04:40 ]
Заголовок сообщения:  Re: Roguelike with strategy

I think I ran out of RAM,
I added some functions to give the rooms numbers and it now resets the speccy

If I remove the functions it works

Автор:  Zorko [ 06 июл 2013, 09:13 ]
Заголовок сообщения:  Re: Roguelike with strategy

Check the RAMTOP (and code address) set to low value. Check data address too. Sometimes, especially when work with arrays or real numbers, SDCC generates a fat binary.

In fact, code address may be 25000, data address calculates approximately and placed higher. For example:
Код: "WINBATCH"
@SET CodeAddr=25000
@SET DataAddr=60000
@SET Lib=..\..\..\ZXDev\Lib
 
sdcc DWoods2.c -mz80 --code-loc %CodeAddr% --data-loc %DataAddr% --opt-code-size -I "." -I %Lib% XDev.lib

Автор:  slenkar [ 06 июл 2013, 17:13 ]
Заголовок сообщения:  Re: Roguelike with strategy

ok I placed the data at 35000 and it worked thanks,

The compiler gives you a warning when the data and code overlap

I wasnt telling the compiler to put the data anywhere, in the manual it says the data goes at 0x10 but thats ROM so I dont know how that was possible.

It would be nice if the compiler told me how much RAM the code takes up and how much the arrays take up.

Автор:  Zorko [ 06 июл 2013, 21:07 ]
Заголовок сообщения:  Re: Roguelike with strategy

slenkar писал(а):
I wasnt telling the compiler to put the data anywhere, in the manual it says the data goes at 0x10 but thats ROM so I dont know how that was possible.
SDCC is designed not only for ZX Spectrum-like machines, and for any Z80-based (for example, Philipp Klaus Krause uses it for development for Coleco Vision), therefore it is possible to place data by default to any address - RAM may be there.

slenkar писал(а):
It would be nice if the compiler told me how much RAM the code takes up and how much the arrays take up.
You can see this info in SDCC-generated .map files:
Код: "EMPTY"
Area                                    Addr        Size        Decimal Bytes (Attributes)
-------------------------------- ---- ---- ------- ----- ------------
_CODE 0000B000 000001FB = 507. bytes (REL,CON)
 
_DATA 0000F800 00000009 = 9. bytes (REL,CON)
Also there is a list of all used libraries, procedures, etc.

Автор:  slenkar [ 06 июл 2013, 21:18 ]
Заголовок сообщения:  Re: Roguelike with strategy

oh yes thanks, it says my code takes up almost 10kb
It was a lucky guess that I put my data at 35000
my data is only 5kb, so I have plenty of room :mrgreen:

Автор:  slenkar [ 10 июл 2013, 18:54 ]
Заголовок сообщения:  Re: Roguelike with strategy

Used my pathfinding function to make corridors between rooms

Изображение

Автор:  slenkar [ 12 июл 2013, 02:16 ]
Заголовок сообщения:  Re: Roguelike with strategy

Изображение

Страница 1 из 3 Часовой пояс: UTC + 2 часа
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/