| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | Re: Looking moremore optimizations! |
On Saturday, November 10, 2018 at 12:10:24 PM UTC-5, Pekka Takala wrote: > Also, creating the game as modules helps you if you exceed the usable > memory. You can then split things if they do not depend on each other > and load them from disk/tape/cartridge when needed. If the code is in > one big snippet, the splitting is WAY more difficult to do if needed. > Well, the game currently *is* modularized. In fact, the executable is currently split into multiple parts, but, currently, all parts are loaded in at once. The main executable loads first, then two stubs loaded into the first k, then some strings and misc. data behind the I/O and kernal ROM to be accessed using my cc65 Hidden64 library. > Commenting is important- what does what. The comments DO NOT take any > space after compiling, the compiler just skips them completely. It helps > you to read the code afterwards and makes guessing less needed. And > also, if you make the code as modules, you can support various hardware > easier since you can load various pieces to memory depending on hardware. > I used to comment extravagantly but recently stopped. I don't know why. :( > And, when you have tasks those are common, in their own files, you > lessen the trouble of getting hard-to-repair bugs. You can parametrise > the functions so that you can use same code to little various tasks, > still being similar. For example, you can read keyboard with its own > function. If parametrised, you can restrict the keys needed to read, so > you do not need to check them in later code since the keyboard code does > that for you already. This method makes the code less prone to exploits, > although on commodore platform the exploit avoiding is not so important > than on platforms those are connectable to Internet. Still practicing > this makes you better coder on other platforms also. Well, I have my own input routine called AltInput for cc65. It is a front-end to my CBMSimpleIO library. Both are at https://sourceforge.net/projects/cc65extra/files/ui/. --- SoupGate-Win32 v1.05* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3) SEEN-BY: 57/0 153/250 267/800 317/2 393/68 633/0 267 280 281 412 712/848 770/0 SEEN-BY: 770/1 3 100 340 772/0 1 210 500 @PATH: 770/3 1 633/280 267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.