On Sunday 30 June 2002 16:36, Patriek Lesparre wrote:
> Maarten ter Huurne wrote:
> >I wouldn't recommend using assembly unless you absolutely need it, to get
> >maximum performance or to get maximum control over the system.
>
> Spoken like a true PC-programmer :/

I used to code everything in assembly, but I've learned a few things since 
then. I now see assembly as an optimisation strategy. There are some widely 
accepted rules about optimisation:

1. Only optimise if you need more performance. There is no point in spending 
effort to decrease CPU usage if your game already runs at full frame rate. Or 
to take 10ms off a loading routine.

2. Optimise the code that is called most often. If you make code that is 
running 1% of the time twice as fast, the program as a whole becomes 0.5% 
faster. If you make code that is running 50% of the time only 10% faster, the 
program as a whole becomes 5% faster.

3. Don't start optimising before the algorithm is working. Optimised code is 
usually harder to read and to maintain. I often programmed routines in BASIC, 
tested and improved them until they worked correctly and then wrote an 
assembly version.

Development in assembly will take longer than in a higher level language. If 
it's not necessary to write a certain part of a program in assembly, why 
would you spend your time doing so when you could be doing something more 
useful or more fun?

> IMO, with the state of Z80 cross compilers and/or native MSX compilers and
> given the power of the 3.58MHz Z80, it's hardly practical to program in
> anything higher than assembly for serious projects.

Much of Uzix is written in C and I would certainly call that a serious 
project.

On Sunday 30 June 2002 16:42, Frederik Boelens wrote:
> Ofcourse, you are right about the 'fact' that higher level languages are
> easier. but does it also
> counts on msx? Raymond had nothing but troubles implementing the mbwave
> replayer. And to make
> a good playable game with Turbo Pascal on msx seems very hard to me.

Raymond had problems getting an assembler compiling the MWM replayer. None of 
the problems mentioned were caused by Turbo Pascal, as far as I can tell.

> Ofcourse assembly (and the algorythms) can be hard to learn to.. especially
> if you want to make demo's like "Almost Real" ;) But with some important
> preprogrammed routines you can make some nice things already very fast.

Indeed we couldn't have written Almost Real in anything but assembly. But if 
the focus of a demo would be graphics, music (Impact) or jokes (Snout), it 
can be written in a higher level language as well.

> This doesn't go for all type of games, but don't you think most of them do
> need assembly to get a good gameplay?

It depends on the type of game. If you have a turn-based puzzle or strategy 
game without a CPU-intensive AI, assembly is not necessary. Simple action 
games (Pacman, Athletic Land) could work as well. Or adventures like 
Snatcher.

Things you probably want to do in assembly are the music replayer and the 
graphics decrunching.

Bye,
                Maarten

--
For info, see http://www.stack.nl/~wynke/MSX/listinfo.html

Reply via email to