6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Thu Nov 21, 2024 11:20 pm

All times are UTC




Post new topic Reply to topic  [ 23 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Sat Sep 02, 2023 10:01 pm 
Offline

Joined: Sat Oct 09, 2021 11:21 am
Posts: 718
Location: Texas
Made another game, and it only took about 2 days of coding! It's similar to Galaga and Gradius, kindof. It's a vertical scrolling shooter where you can move freely around the screen. The longer it goes the faster it goes. Eventually it's in near turbo mode and your just fighting for survival. Bullets flying everywhere, enemies all over the screen, etc.

My phone doesn't do the colors justice at all. Here I am using nearly all of my 16 colors, and it helps make those enemies look really distinct and fun. They all have different AI behaviors, thus they all have a special personality it seems. And you, well... You just blow them up. :)

I'm getting pretty good at managing between the keyboard and the joystick for dual input sources. I am NOT getting better at pause buttons apparently, as that itself was not worth the time I spent on it. I am happy with the 6.29 MHz processor, as I can run this thing in the latest stages and not have any lag. I'm using the V-SYNC signal as a pseudo real-time clock to help manage processes within the code.

This takes about 3K in ROM, and I am sure I can optimize it a bit more. My next goal with this board is to push all of my games into the second bank of the ROM, and then start coding another game. I have even more ideas on how to use the colors to their full advantage. I've been pondering between Pacman, Rogue (using color text mode), or some version of the Oregon Trail. I think I have enough space shooters for now. :)

Thanks everyone!

Chad


Attachments:
20230902_164453.jpg
20230902_164453.jpg [ 1.21 MiB | Viewed 2472 times ]
20230902_164534.jpg
20230902_164534.jpg [ 1.28 MiB | Viewed 2472 times ]
Top
 Profile  
Reply with quote  
PostPosted: Sat Sep 02, 2023 10:35 pm 
Offline

Joined: Fri Jul 09, 2021 10:12 pm
Posts: 741
Great work Chad! It looks like there's a lot of activity on the screen there, what sort of frame rate have you managed and how much data needs to be transferred to move one sprite?

Have you considered using SD card storage rather than fitting lots of programs into one EEPROM?


Top
 Profile  
Reply with quote  
PostPosted: Sat Sep 02, 2023 11:26 pm 
Offline

Joined: Sat Oct 09, 2021 11:21 am
Posts: 718
Location: Texas
gfoot wrote:
Great work Chad! It looks like there's a lot of activity on the screen there, what sort of frame rate have you managed and how much data needs to be transferred to move one sprite?

Have you considered using SD card storage rather than fitting lots of programs into one EEPROM?


Thanks George :)

There is a lot of activity at times! When sprites are not drawn to the screen, I run NOP loops to compensate for an even framerate. I have 16 enemy sprites at 8x8 pixels each, 16 player bullets and 16 enemy bullets at 4x4 pixels each. I don't know an exact frame rate, it just updates when it can, but at higher speeds it is very smooth. On my simulator on the PC, it shows flicker when moving sprites, but on the real hardware it doesn't show so much. I'm not updating the screen during V-BLANK or anything, not professional work at all. All of this sprite and scrolling stuff is software based, I have no hardware support for any of this.

I have the SD card hooked up and working for that very purpose, and I should probably develop them on the SD card to begin with so there's less in-and-out with the socketed FlashROM. Still, my goal is to fit as much as I can on the ROM itself because it's much more... uh, sturdy. My children have been messing with my board and the SD card socket is now flimsy. It is much harder for them to pull a PLCC chip out of the socket!

Hope that answers questions! Thanks again George.

Chad


Top
 Profile  
Reply with quote  
PostPosted: Fri Sep 15, 2023 3:38 pm 
Offline

Joined: Sat Oct 09, 2021 11:21 am
Posts: 718
Location: Texas
And now a Rogue-like game! This is definitely 'coffee break' in scope, it is not very complicated. The idea is to escape from the caves, all while collecting items and defeating monsters. You start with very little light, hardly able to see in front of you. But later you get upgrades to make you see further, dig through the walls faster, and defend yourself against bigger monsters.

I would hardly call this 'finished', I have made rogue-likes with all kinds of neat features before. But here I ran out of room! I was able to squeeze it into my second ROM bank with all of the other games. This one is about 3K in size. I plan on optimizing some code, from all of games, and get enough space to add a few more features into this one.

Like all of my other games, you can use the keyboard or the Sega Genesis controller. Unlike my other games, this one is using 4-color text mode instead of the usual 16-color graphics mode.

Looking around on my first ROM bank, I still have about 6K left. I plan on making one more game there, something bigger and more visually appealing.

Thanks everyone!

Chad


Attachments:
20230915_102900.jpg
20230915_102900.jpg [ 2.35 MiB | Viewed 2363 times ]
20230915_102819.jpg
20230915_102819.jpg [ 1.94 MiB | Viewed 2363 times ]
Top
 Profile  
Reply with quote  
PostPosted: Fri Sep 15, 2023 4:27 pm 
Offline

Joined: Fri Mar 18, 2022 6:33 pm
Posts: 491
I think your cave semigraphics look really good. Is that a randomly generated dungeon, or did you hand-make it?

_________________
"The key is not to let the hardware sense any fear." - Radical Brad


Top
 Profile  
Reply with quote  
PostPosted: Fri Sep 15, 2023 10:29 pm 
Offline

Joined: Sat Oct 09, 2021 11:21 am
Posts: 718
Location: Texas
Paganini wrote:
I think your cave semigraphics look really good. Is that a randomly generated dungeon, or did you hand-make it?


Thank you, my wife really likes them too :)

Randomly generated. It's actually a true 'random walk' and your character starts at the beginning and the stairs are at the end. After it digs out some set amount of blocks, it stops wherever it is, thus you are always able to reach the stairs.

It was actually tricky to get a better randomizer. My 'random number generator' was simply: Current = 5 * Previous + 17. I had been using that forever, running it while waiting for keyboard presses and stuff to make it more randomized. But I was noticing that it would leave certain patterns that were previously unseen because I had just not used the code in some particular way that would show that.

Next I used the T2 timer on the VIA. I had previously wanted to use it for sound capability, but I was mistaken about high and low bytes. So, I figured using it as a random number generator was a good idea, as I heard about it from Garth at some point. But then I saw a new problem arise: Because I would call random numbers back to back sometimes, it would always give very particular patterns as well. It was always X cycles between calls, thus it was always Y amount different, and so it wasn't really worked out again.

In the end I combined both of the procedures together. I think it's now: Current = 5 * Previous + 17 + T2_Timer. And that works really well actually, have had no visible repeating patterns or anything. I used to do a lot of ROL A's to get "more randomized" values, but I don't even see the need for that anymore really.

Anyways, hope that little bit helps out the next guy wanting some random numbers. Thanks for asking Nathan :)

Chad


Top
 Profile  
Reply with quote  
PostPosted: Fri Sep 15, 2023 11:06 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8543
Location: Southern California
sburrow wrote:
Next I used the T2 timer on the VIA. I had previously wanted to use it for sound capability, but I was mistaken about high and low bytes. So, I figured using it as a random number generator was a good idea, as I heard about it from Garth at some point. But then I saw a new problem arise: Because I would call random numbers back to back sometimes, it would always give very particular patterns as well. It was always X cycles between calls, thus it was always Y amount different, and so it wasn't really worked out again.

What I have advocated a few times including my several posts in this topic is using the timer as part of the algorithm to derive the random number, not using the timer reading itself as the actual random number.  Other things that may go into getting the random number will include previous results, and then you can do rotates, bit-swaps, etc., even multiplications and doing a MOD if you have the time.

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Fri Sep 15, 2023 11:42 pm 
Offline

Joined: Sat Oct 09, 2021 11:21 am
Posts: 718
Location: Texas
GARTHWILSON wrote:
What I have advocated a few times including my several posts in this topic is using the timer as part of the algorithm to derive the random number, not using the timer reading itself as the actual random number.  Other things that may go into getting the random number will include previous results, and then you can do rotates, bit-swaps, etc., even multiplications and doing a MOD if you have the time.


Ah, well I guess I missed that part. You indeed were right! Thank you Garth.

Chad


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 23 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

Users browsing this forum: No registered users and 48 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: