CodeWalrus

Featured Member Projects => Walrii Games (TI/HP/PC/2600) => Topic started by: DarkestEx on December 31, 2015, 04:17:57 PM

Title: Walrii6510 - The walrii game on the C64
Post by: DarkestEx on December 31, 2015, 04:17:57 PM
Hey everybody!

So I will be participating in the Walrii contest but on a very unusual platform that I got for christmas:
The Commodore 64!

Yes- CW will hopefully get their own retro game on an awesome machine. I have never done any 6510 assembler so I have three options:
- Program it in C; yes I can do efficient C and there is a good little C compiler for this very machine
- Learn 6510 assembler quickly (I (badly) know Z80 assembler yet and I also have designed and partially programmed my own assembly language too so learning shouldn't be *that* hard as the understanding is mostly there)
- Learn some more Basic and do it with the builtin Basic interpreter (is reasonably slower but should work in any case)
Title: Re: Walrii6510 - The walrii game on the C64
Post by: kegwaan on December 31, 2015, 08:06:21 PM
Seems interesting... Good luck!  :thumbsup:
I think your best bet would be to program it in C, Basic isn't that fast really on any platform, and learning Assembly might slow you down. Also, you never said what the game is about. Deciding that might help you decide how you should program it.
Title: Re: Walrii6510 - The walrii game on the C64
Post by: alexgt on December 31, 2015, 10:02:57 PM
I would side with kegwaan and head down the C route, I wish you luck ;)
Title: Re: Walrii6510 - The walrii game on the C64
Post by: Dream of Omnimaga on December 31, 2015, 10:17:49 PM
If you go the C64 route, you should try to make some old school platform puzzle game where you collect keys to unlock the door to your meal or something like that, like those old school platform games that had no scrolling. Of course I assume that ASM is faster, though, right, and could allow more elaborate games? Regardless, I am curious about what you will come up with, and I'm glad that you got your hand on a Commodore 64 :)

Good luck!
Title: Re: Walrii6510 - The walrii game on the C64
Post by: DarkestEx on January 03, 2016, 08:40:30 PM
Quote from: kegwaan on December 31, 2015, 08:06:21 PM
Seems interesting... Good luck!  :thumbsup:
I think your best bet would be to program it in C, Basic isn't that fast really on any platform, and learning Assembly might slow you down. Also, you never said what the game is about. Deciding that might help you decide how you should program it.
Yes, I never really wanted to use basic either as I am not a particular fan of it. It's slow and messy.
But as you say learning 6510 (basically 6502 but with some changes) assembler takes too much time. There is no need either and my uncle who knows a lot about this also says that assembler is dead and should not be used. Well optimized C is way more worth it.

Quote from: alexgt on December 31, 2015, 10:02:57 PM
I would side with kegwaan and head down the C route, I wish you luck ;)
Thanks; actually after working with 6510 C, I can say it really works great. Even on the 1 MHz of the C64, my first experiments run very fast.

Quote from: DJ Omnimaga on December 31, 2015, 10:17:49 PM
If you go the C64 route, you should try to make some old school platform puzzle game where you collect keys to unlock the door to your meal or something like that, like those old school platform games that had no scrolling. Of course I assume that ASM is faster, though, right, and could allow more elaborate games? Regardless, I am curious about what you will come up with, and I'm glad that you got your hand on a Commodore 64 :)

Good luck!
That would be fun :)
I am not that sure about what type of game I'll make yet, but I will hopefully come up with a good idea.
Assembler is not really worth it actually. Even though the C64 runs at about 1 MHz, C is the better choice as it prevents errors and when its optimized for speed, it is almost as fast as true hand written assembler. I tested this quite a bit and my conclusion is, that I will be able to make a good game with C. Still, I need to optimize my code by hand and using the compiler whereever possible.
Having a real unit to test on is awesome. Especially the sound is so great  :love:
Title: Re: Walrii6510 - The walrii game on the C64
Post by: Dream of Omnimaga on January 04, 2016, 04:47:26 AM
What about something like Androides, Lode Runner or a Mario-like game with no scrolling? That would stick to the C64 style, but introduce walruses in it. Good luck!
Title: Re: Walrii6510 - The walrii game on the C64
Post by: DarkestEx on January 04, 2016, 01:50:14 PM
Quote from: DJ Omnimaga on January 04, 2016, 04:47:26 AM
What about something like Androides, Lode Runner or a Mario-like game with no scrolling? That would stick to the C64 style, but introduce walruses in it. Good luck!
Hmm, I am not yet sure. I never really programmed anything for the C64 yet so I should start small. I'll see what I manage to learn and do until the deadline.
Title: Re: Walrii6510 - The walrii game on the C64
Post by: alexgt on January 04, 2016, 02:25:13 PM
I hope you can finish something since the deadline is the 19th :-/
Title: Re: Walrii6510 - The walrii game on the C64
Post by: novenary on January 04, 2016, 03:39:18 PM
Yeah, with only two weeks left you'll be a bit on the short side for time to do anything.
Title: Re: Walrii6510 - The walrii game on the C64
Post by: alexgt on January 04, 2016, 04:31:41 PM
Yeah, I have to do the AI but that will be really simple, even so it will take a while to debug <_<
Title: Re: Walrii6510 - The walrii game on the C64
Post by: DarkestEx on January 04, 2016, 04:51:17 PM
I did the last game in 6 hours before the deadline. This time I have more time so it should work better.
Title: Re: Walrii6510 - The walrii game on the C64
Post by: Dream of Omnimaga on January 04, 2016, 05:55:45 PM
Good luck! Also will you be able to show screenshots?
Title: Re: Walrii6510 - The walrii game on the C64
Post by: DarkestEx on January 04, 2016, 07:15:53 PM
Quote from: DJ Omnimaga on January 04, 2016, 05:55:45 PM
Good luck! Also will you be able to show screenshots?
Sure that does pose no problems.
Title: Re: Walrii6510 - The walrii game on the C64
Post by: novenary on January 04, 2016, 08:20:23 PM
Quote from: DarkestEx on January 04, 2016, 04:51:17 PM
I did the last game in 6 hours before the deadline. This time I have more time so it should work better.
Yeah indeed, start working on it now to avoid doing the same as last time. :P We won't make an exception twice for the late submission.
Title: Re: Walrii6510 - The walrii game on the C64
Post by: DarkestEx on January 06, 2016, 03:07:55 PM
Quote from: Streetwalrus on January 04, 2016, 08:20:23 PM
Quote from: DarkestEx on January 04, 2016, 04:51:17 PM
I did the last game in 6 hours before the deadline. This time I have more time so it should work better.
Yeah indeed, start working on it now to avoid doing the same as last time. :P We won't make an exception twice for the late submission.
Haha, yea. I will start soon :)
I am still learning the basics of this computer and it's graphics capabilities, so I can't start with the actual game yet, but yea, I can't skip the learning.
Title: Re: Walrii6510 - The walrii game on the C64
Post by: Dream of Omnimaga on January 06, 2016, 06:40:48 PM
Yeah, good idea. A lot of people in contests in the past started their entry at the very last minute. :P I hope the language isn't too complicated for the C64 >.<
Title: Re: Walrii6510 - The walrii game on the C64
Post by: DarkestEx on January 06, 2016, 06:45:12 PM
Quote from: DJ Omnimaga on January 06, 2016, 06:40:48 PM
Yeah, good idea. A lot of people in contests in the past started their entry at the very last minute. :P I hope the language isn't too complicated for the C64 >.<
Yea.
About the language, considering that the C64 can actually run Java (yes, somebody ported the VM), it runs C fine.
Title: Re: Walrii6510 - The walrii game on the C64
Post by: Dream of Omnimaga on January 06, 2016, 07:34:30 PM
Rally? O.O It must be ultra slow compared to C, though.
Title: Re: Walrii6510 - The walrii game on the C64
Post by: novenary on January 06, 2016, 08:50:12 PM
Depends, if it's well optimized and the standard library is lightweight enough it can be decently fast. That machine runs BASIC after all.
Title: Re: Walrii6510 - The walrii game on the C64
Post by: Dream of Omnimaga on January 06, 2016, 08:50:57 PM
True, but isn't BASIC from back in the days much more primitive than Java these days? Java was designed for modern platforms, right?
Title: Re: Walrii6510 - The walrii game on the C64
Post by: novenary on January 06, 2016, 08:58:49 PM
Well Java is a virtual machine, which makes it inherently simpler than an interpreter since there's a lot less parsing to do.
Title: Re: Walrii6510 - The walrii game on the C64
Post by: p4nix on January 06, 2016, 09:00:31 PM
Also a thing to consider: Imagine how fast our computers nowadays would be if they where optimized like those machines back then.
Title: Re: Walrii6510 - The walrii game on the C64
Post by: novenary on January 06, 2016, 09:06:23 PM
Well believe it or not, compilers are so good at optimizing nowadays that they can beat humans at it. That said, you still have to write efficient algorithm, otherwise the compiler's effort is void. Also there are some things to keep in mind with modern architectures.See this for a great example: https://stackoverflow.com/questions/11227809/why-is-processing-a-sorted-array-faster-than-an-unsorted-array.
Title: Re: Walrii6510 - The walrii game on the C64
Post by: DarkestEx on January 06, 2016, 09:51:35 PM
Quote from: Streetwalrus on January 06, 2016, 09:06:23 PM
Well believe it or not, compilers are so good at optimizing nowadays that they can beat humans at it. That said, you still have to write efficient algorithm, otherwise the compiler's effort is void. Also there are some things to keep in mind with modern architectures.See this for a great example: https://stackoverflow.com/questions/11227809/why-is-processing-a-sorted-array-faster-than-an-unsorted-array.
Where have we gone to?!
The C64 is such an awesome machine. Yes it is slow and old and has no web browser, but it is relatively easy to program and you can use POKE's and PEEK's to do all sorts of wired and wonderful things. And it is so much less complex.
Title: Re: Walrii6510 - The walrii game on the C64
Post by: p4nix on January 06, 2016, 10:01:02 PM
Yeah, that might be true. But I'm always impressed how people solved problems on such limited platforms :)
Title: Re: Walrii6510 - The walrii game on the C64
Post by: Dream of Omnimaga on January 10, 2016, 08:47:33 AM
This is why so many people loved programming calculators in the past and perhaps why they could become vintage platforms like the C64 in the future. People did not code much for the Nspire because they either wanted to push outdated platforms to their limits, which was more entertaining on the 83+/84+/89 series, or they wanted full-scale power, such as smartphones and computers.

@DarkestEx have you gotten any luck with C64 developement so far?
Title: Re: Walrii6510 - The walrii game on the C64
Post by: DarkestEx on January 10, 2016, 12:01:43 PM
Quote from: DJ Omnimaga on January 10, 2016, 08:47:33 AM
This is why so many people loved programming calculators in the past and perhaps why they could become vintage platforms like the C64 in the future. People did not code much for the Nspire because they either wanted to push outdated platforms to their limits, which was more entertaining on the 83+/84+/89 series, or they wanted full-scale power, such as smartphones and computers.

@DarkestEx have you gotten any luck with C64 developement so far?
Yes indeed.

Well about the development, I haven't made any progress yet. I had to learn how everything works and I am still not done with that part. Also had I to buy some devices to be able to play my games from SD card on the actual C64 that I own. For development I use an emulator but I really like testing my progress on an actual device too.
Then school starts for me tomorrow again :(
Title: Re: Walrii6510 - The walrii game on the C64
Post by: Dream of Omnimaga on January 10, 2016, 07:38:18 PM
You might want to develop the game on PC instead for now, using Commodore graphics and palettes, scaling up the sprites and keeping gameplay simple, such as a puzzle exploration game, then once the contest is over, re-use the idea for an actual C64 game.
Title: Re: Walrii6510 - The walrii game on the C64
Post by: DarkestEx on January 25, 2016, 11:24:49 PM
Hmm, I should work on the or any C64 game again. My dad even bought me old assembler tutorial books from 1986. I should look through them and also try to get C working.
Title: Re: Walrii6510 - The walrii game on the C64
Post by: Dream of Omnimaga on January 26, 2016, 07:05:26 AM
I wish you luck with C. It would be cool to see a Walrii game for C64, especially now that JWinslow is making Atari games. :)