@hit9918 Thanks for the fast tutorial, I suposse that you suggest jump to ASM but I really prefer high level languages. I'm very used to them and they are reasonably easy to learn for me, so is my best option. My first option was MSX-Basic but in my actual project I've facing a lot of limitations with the 10Kb turbo block size.
With TP 3.3f you can also make use of Memman and GIOS. However, it is not mandatory. I prefer not to use Memman and GIOS, as it will cost additional memory and CPU performance. I would recommend to use TP 3.3f (with or without making use of GIOS and Memman) instead of any older version.
With TP 3.3f you can also make use of Memman and GIOS. However, it is not mandatory. I prefer not to use Memman and GIOS, as it will cost additional memory and CPU performance. I would recommend to use TP 3.3f (with or without making use of GIOS and Memman) instead of any older version.
What is Memman and GIOS? Thanks.
P.D: ok i read about it
Memman is a Memory Manager and GIOS is a TSR. TP 3.3f has several functions that need Memman and GIOS to be active in memory. It makes a lot of things easier, but it will cost you some memory and CPU.
@AxelStone, but the objects rack thingy I told is not about asm, it is language independant!
I can't keep track, many of these topics recently were going on in that corner.
"I want the pset() in C".
"we need a nice asm tutorial".
and what runs my head is "if I could help them out of their BASIC PRISON".
A thing to note is ... my first asm game was the same crap as done in BASIC. You might do asm and still sit in that prison.
And then the other way around, that lesson that I promote can be done comfortable in BASIC.
The more I think of it, that "game objects rack" lesson is best one ever.
Because there actualy is not much to it.
But it is so much outside of what one did as a beginner.
I mean it serious, it makes you jedi programmer who with just one gesture moves a dozen sprites wild
The topic can be explored in BASIC because the issue is FUNDAMENTAL.
create datastructures. indexing, addressing datastructures.
the universe is not made of plenty if then if then, but of plenty things in a structure.
And then. Before you said "in asm you need to 'control all chips', wohoo the voodoo!".
Afterwards you say "pah, that vram is nothing but an array. the sprite attribute table is nothing but an array. fucken trivial".
Ok I thought I write a little tutorial code about the objects rack.
Tutorial is language independant!
When I switched from BASIC to asm, I would have been glad to know this.
It is just whole different capabilities than the stuff I came up with as a BASIC coder.
"... will take you about 2 years to learn"
When you understand what is going on in the code, maybe it shaves some time off that estimation.
by putting thinking in some direction.
for similar reasons there is no put sprite(), but "directly programs the chip"
step 1. understand the relatively little BASIC code.
step 2. tutorial homework:
Ok I am sorry but this tutorial has homework
these sprites move because of a scroller (well just imagine).
when the objects leave the screen, kill them.
write a destructor for every id type. let the scrollmove code call them.
get a player into the objects rack. his x y is better in there.
the reason is that sprite engines know a list of sprites and nothing else.
but now the scroller move code moves the player. make that he doesnt move.
well and then the player code via cursor could tell that scrollermovecode where to move.
maybe after some time you can't stand that crawl anymore and think: I'm outa here, it must be asm or C or something
then you should to do things with a struct instead the BASIC array style.
struct obj { char id, char y,char x,char p,char c };
10 dim id(32) 'id(i) = 0 means slot is empty. 20 dim y(32) 30 dim x(32) 40 dim p(32) 50 dim c(32) 60 dim dx(32) 'not used 70 dim dy(32) 'not used 100 color 15,1,1 : screen 2,2 110 sprite $(0) = "jahjaahjashjajhsjahsaasjsahjsah" 120 sprite $(1) = "skdjhsdjksjsskjkjsdkjjdksksjksk" 200 for i = 0 to 3 'create some example objects 210 x = rnd(2) * 256 : y = rnd(1) * 192 : c = 4 + i 220 a = i : gosub 10100 : i = a 'rotten basic 230 next 300 for i = 0 to 3 310 x = rnd(1) * 256 : y = rnd(1) * 192 320 a = i : gosub 10400 : i = a 330 next 500 'main loop 510 x = -4 : y = 0 : gosub 10300 520 gosub 10500 530 goto 510 10000 'alloc. find a free slot in the objects rack and return result in i 10010 for i = 0 to 31 10020 if id(i) = 0 then return 10030 next 10040 error 0 10100 'constructor type 1 10110 gosub 10000 10120 id(i) = 1 : x(i) = x : y(i) = y : c(i) = c : p(i) = 0 10130 return 10300 'sprites of all id get moved by a scroller 10310 for i = 0 to 31 10320 if id(i) = 0 then 10350 'empty slots untouched 10330 x(i) = x(i) + x 10340 y(i) = y(i) + y 10350 next 10360 return 10400 'constructor type 2 10410 gosub 10000 10420 id(i) = 2 : x(i) = x : y(i) = y : c(i) = 13 : p(i) = 1 10430 return 10500 'dump sprites 10505 n = base(13) 10510 for i = 0 to 31 10515 if id(i) = 0 then 10560 10520 vpoke n, y(i) and 255 : n = n + 1 10530 vpoke n, x(i) and 255 : n = n + 1 10540 vpoke n, (p(i)*4) and 255 : n = n + 1 10550 vpoke n, c(i) and 255 : n = n + 1 10560 next 10565 vpoke n,208 'end of list marker 10570 return
@hit9918 I see you are a staunch supporter of ASM
. I'll bet for Pascal: I''ve found good documentation, good libraries and I love this language. Perhaps not tomorrow, I'd like to be able to finish my game in Turbo Basic, but if 10Kb limitation doesn't allow to me, I'll port the game engine to Pascal and will continue de game.
I hope to show progress soon
@Axelstone,
what part did smell like I am badly pushing for asm?
Now your language choice is pascal for a library. What can it do?
I was trying to get something across with that uncommon mini tutorial.
It is for anyone who wants to go to a new language.
Any questions, anyone?