memory limitations

Basic and Machine Language

Moderator: Moderators

Post Reply
adric22
Vic 20 Hobbyist
Posts: 143
Joined: Fri Mar 11, 2005 6:54 pm

memory limitations

Post by adric22 »

Okay.. need opinions. I've decided to start working on a new game for
the VIC-20. I've never done any serious VIC-20 programming, instead
always going for the C64. But I've decided this would be a good game
for the VIC. The game will essentially be a port of Flash Attack,
only much better than the original PET version. For those
unfamiliar, it will be a down-looking 2-dimensional platform game with
a large world map.

Now, I realized the VIC-20 is going to require the 32K RAM expansion
in order to make this game possible to live up to my expectations,
mostly due to the size of the map. I figure the world will be at
least 128x128 characters, but possibly more. I may limit the number
of map objects to 16, which would allow me to use only a nybble for
each item on the map, putting me closer to a theoretical 240x240 sized
map.

But, lets say I decided to make the program work with different sizes
of memory expansion. For example, a 16K expansion, I would have two
choices.. Either half the size of the map, or cut the number of
object types in the map down to 4.

Keep in mind that map objects will be separate from player objects
which will be stored in a different manner. So map objects will be
things like grass, water, mountains, etc.

So, the question remains, which would most people rather sacrifice for
playing on less RAM? Map size, or map complexity?
Vic20-Ian
Vic 20 Scientist
Posts: 1214
Joined: Sun Aug 24, 2008 1:58 pm

Post by Vic20-Ian »

Neither.

Use an Final Expansion and make use of the 512KB!! ;-)
Vic20-Ian

The best things in life are Vic-20

Upgrade all new gadgets and mobiles to 3583 Bytes Free today! Ready
rhurst
Omega Star Commander
Posts: 1371
Joined: Thu Jan 31, 2008 2:12 pm
Website: https://robert.hurst-ri.us
Location: Providence, RI
Occupation: Tech & Innovation

Post by rhurst »

Yes, memory expansion on VIC is less of an issue nowadays. Mega-Cart, Final Expansion, and of of course, emulators make it a non-issue. Obviously, code efficiently and compress data whenever possible.

Good luck on your endeavor -- keep posting and don't be shy about asking questions either.
Any technology distinguishable from magic is insufficiently advanced.
https://robert.hurst-ri.us/rob/retrocomputing
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

Is the whole map required to be loaded in memory, or could you develop some dynamic loader that will fetch blocks from disk drive as needed? It is true that 128*128 = 16384, which in theory would leave you 11.5K left for code and custom graphics if using 24K expansion memory. You can go for 32K as well, but remember the last 8K is non-continuous so you may have to think about how to use it.

Screen matrix and custom graphics need to be within the internal 4K, $1000-$1FFF. Some emulators have and may still fool you on this, but once you try it on a real VIC-20 you will find out if you made a blunder or not.
Anders Carlsson

Image Image Image Image Image
adric22
Vic 20 Hobbyist
Posts: 143
Joined: Fri Mar 11, 2005 6:54 pm

Post by adric22 »

carlsson wrote:Is the whole map required to be loaded in memory, or could you develop some dynamic loader that will fetch blocks from disk drive as needed? It is true that 128*128 = 16384, which in theory would leave you 11.5K left for code and custom graphics if using 24K expansion memory. You can go for 32K as well, but remember the last 8K is non-continuous so you may have to think about how to use it.
I think it would run really slow if it had to pull from the disk drive. Plus that is a lot of extra coding work when I believe it can be done without doing that. Yeah, I've been thinking about the non contiguous memory. I think I'm going to shoot for the regular 24K expansion instead. I'm probably going to be aiming for a map size of 180x180 using 4-bits for each unit of the map.
Screen matrix and custom graphics need to be within the internal 4K, $1000-$1FFF. Some emulators have and may still fool you on this, but once you try it on a real VIC-20 you will find out if you made a blunder or not.
That is good to know, because I was unaware of that and I will be using Power20 and VICE for my development and testing.
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

Perhaps though the map can be compressed and uncompress on demand? I suppose you will store new things in the map while the game goes on so it is not static.
Anders Carlsson

Image Image Image Image Image
Post Reply