Tower defense on Msx

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

Par Edwin

Paragon (1182)

Portrait de Edwin

01-01-2011, 01:30

Leo> No I meant four pokes. Separate vpoke's are still slow.

Par ARTRAG

Enlighted (6445)

Portrait de ARTRAG

01-01-2011, 23:57

leo, try to paste you source here, maybe we can suggest some trick to improve the speed

Par Leo

Paragon (1236)

Portrait de Leo

02-01-2011, 07:33

yep, remember it is a quick trial , normally i would code .rom in pure asm , what is nice here is that i could quickly get a decent speed with smal effort.
after that more effort , more time , more speed , but i am unsure to have that time ..... Smile
so rewriting very slow basic command in asm is ok but then changing all the structure to have an array for sprite update , then it is better to recode
from scratch in asm a kind of .rom then it is like cooking a msxdev entry ....

i can put a.dsk image here :
http://iledefra01.free.fr/msx/tdef.dsk

there are 3 files :
run"td1" is long like several minutes and generates the "td-g.sc4" with data in VRAM for sprite , board , crappy gfx, and trial trajectory for monster
then
run"tdef" launch the game
you can run directly "tdef" since "td-g.sc4" is already generated. some can generate other gfx , i include the td1 just if some wants to generate
other gfx of level with different monster trajectory.
enjoy !

i tried save "tdef",a in blue msx in a mounted dir but apparently i can only read from a mounted win7 dir ....

Par Leo

Paragon (1236)

Portrait de Leo

09-01-2011, 09:47

now with enemies that dies :
http://www.youtube.com/watch?v=yPmCeREWVgQ

Par NYYRIKKI

Enlighted (5595)

Portrait de NYYRIKKI

09-01-2011, 10:24

Nothing really good improvements comes to mind when I look this source. This is very good written BASIC.

Here are my 5 cents:

ADD:
10 DEFINT A-Z
... and remove all the "%" signs with search & replace.
This saves some space that is now used to store the source (and makes the source more readable, if you ask me)

ADD:
132 DIM SX(8),SY(8)
133 FORI=0TO2:SX(I+2)=8:SY(I+4)=8:SX(I+6)=-8:SY(I)=-8:NEXTI:SWAP SY(0),SY(8)

Replace lines 450-490 with
450 A=STICK(0):cX=cX+SX(A):cY=cY+SY(A)

This gives better controls.

Par Leo

Paragon (1236)

Portrait de Leo

09-01-2011, 10:37

thanks, will do the changes !

Par Leo

Paragon (1236)

Portrait de Leo

10-01-2011, 19:41

And now with lives count bar on the right of the board, each ennemies that make it path to the bottom of the screen decreses your lives:
http://www.youtube.com/watch?v=3W6PViHZjDA

Par NYYRIKKI

Enlighted (5595)

Portrait de NYYRIKKI

11-01-2011, 19:11

You didn't copy correctly. You still have only 4-way controls. Tongue

Ps. Instead of writing:
140 DIM X(12):DIM Y(12):DIM T(12):DIM TX(6):DIM TY(6):DIM SJ(6)

... you can just write:
140 DIMX(12),Y(12),T(12),TX(6),TY(6),SJ(6)

(Yes, I know... who cares)

Par JohnHassink

Ambassador (5468)

Portrait de JohnHassink

11-01-2011, 19:17

(Yes, I know... who cares)
They should! This kind of thing can cross that brittle little line between the dreaded "Out Of Memory" and a working program. A lot of small ones make a big one. Smile

Par NYYRIKKI

Enlighted (5595)

Portrait de NYYRIKKI

11-01-2011, 19:39

I think there are some thousand lines to go before "Out Of Memory" Big smile Then you can start removing those extra spaces between commands. Tongue (Yes, I tend to write very bad looking BASIC)

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