Jump to content

Photo

Re-Started Frenzy / Berzerk :)

Frenzy Berzerk

338 replies to this topic

#26 mimo OFFLINE  

mimo

    Preppie!

  • 6,816 posts
  • It's easy living in a bubble

Posted Tue Jun 25, 2013 3:55 PM

PAL PAL PAL PAL PAL PAL PAL PAL!!!

#27 PacManPlus OFFLINE  

PacManPlus

    River Patroller

  • Topic Starter
  • 4,764 posts
  • Atari 7800 & NES Developer
  • Location:Florida

Posted Tue Jun 25, 2013 4:38 PM

Thanks again guys, it's really appreciated.

I'm used to the 5200's hardware collision registers. Do you handle this on CV via "hit-box" logic - checking stored X,Y values and ranges for each enemy, and I guess the walls too - true ?

I assume you mean the 7800, not the CV ;) but yes I use bounding box for everything.

If so, could you break up the logic to be performed across multiple frames? After all, whats the difference if collision is checked at 1/60 of a second or 1/30 of a second or even 1/15 of a second?

Frame 1 - check collision with walls
Frame 2 - check collision against enemies 1-5
Frame 3 - check collision with walls
Frame 4 - check collision against enemies 6-10+


I'm actually doing that to process the player / robots (broken into 4 frames). Believe it or not, the issue isn't really with the robots (because it only moves 1 per frame - and it only goes through the entire list of objects once), it's the *shots* that are the issue. On every frame, I have to check up to 7 shots against 32 other objects. Taken by itself, it probably would be ok (I have to use each frame for every shot, as they move fast (4 pixels / frame) and if I skip any frames, there is a potential for a shot to go through an object.

Any ideas are welcome. I *will* make this work. (This kind of a challenge, I like) :D

Bob

#28 PacManPlus OFFLINE  

PacManPlus

    River Patroller

  • Topic Starter
  • 4,764 posts
  • Atari 7800 & NES Developer
  • Location:Florida

Posted Tue Jun 25, 2013 4:50 PM

I think I got it!!!!

I was sitting in the bathroom :ponder: and I thought about taking all seven x and y coordinates of each shot and moving through the entire object list only once, checking against the x and y values of each shot. What makes this easier is I only take the tip of the shot, so there is a single set of x and y coordinates for each shot object to check against.

:)

I need to try this.

Thanks,
Bob

#29 Raccoon Lad OFFLINE  

Raccoon Lad

    Moonsweeper

  • 473 posts
  • I Like Pixels
  • Location:The Caverns of DEATH ...and Pineapples

Posted Tue Jun 25, 2013 5:01 PM

I always loved Frenzy.
If I recall correctly, the Colecovision version of Frenzy had a nicer death animation than the arcade, as well as a few extra musical cues in the game. Those would make a nice addition/option for this game if you were to add those in as well.

Another nice game option would be to have the rooms arranged in a specific order, and once the player shuts down the special rooms (power plant, factory, giant otto, etc.), you win the game, then restart with the rooms re-arranged and harder.

Just a suggestion.

#30 DocEss OFFLINE  

DocEss

    Chopper Commander

  • 150 posts

Posted Tue Jun 25, 2013 7:48 PM

I think I got it!!!!

I was sitting in the bathroom :ponder: and I thought about taking all seven x and y coordinates of each shot and moving through the entire object list only once, checking against the x and y values of each shot. What makes this easier is I only take the tip of the shot, so there is a single set of x and y coordinates for each shot object to check against.

:)

I need to try this.

Thanks,
Bob


The great throne of thought! I've gotten a few scripting epiphanies for Morrowind in there. :P

Well, in my bathroom, not Bob's.

#31 Gregory DG OFFLINE  

Gregory DG

    TAT IS BACK!

  • 11,242 posts
  • Go Cardinals!
  • Location:Winter Haven, FL

Posted Tue Jun 25, 2013 8:30 PM

Me like...

#32 BillyHW OFFLINE  

BillyHW

    River Patroller

  • 3,549 posts

Posted Tue Jun 25, 2013 11:55 PM

I think I got it!!!!

I was sitting in the bathroom :ponder: and I thought about taking all seven x and y coordinates of each shot and moving through the entire object list only once, checking against the x and y values of each shot. What makes this easier is I only take the tip of the shot, so there is a single set of x and y coordinates for each shot object to check against.

:)

I need to try this.

Thanks,
Bob


Couldn't you try and reverse-engineer what the ColecoVision port does for collision detection?

#33 PacManPlus OFFLINE  

PacManPlus

    River Patroller

  • Topic Starter
  • 4,764 posts
  • Atari 7800 & NES Developer
  • Location:Florida

Posted Wed Jun 26, 2013 5:18 PM

I have to share something with you guys - Alan McNeil has been kind enough to be helping me with this port of Berzerk / Frenzy (hence his thank you on the splash screen of the game). I didn't really mention him in this thread because I wasn't sure he wanted me to.
But the best line of all, was his response: "You can mention me. We are trying to finally get a real version of Frenzy on Atari."
:D

He is too cool. :)

Bob

#34 Trebor OFFLINE  

Trebor

    River Patroller

  • 4,620 posts

Posted Wed Jun 26, 2013 7:00 PM

He is too cool. :)


Birds of a feather... ;)

#35 Lord Helmet OFFLINE  

Lord Helmet

    Don't forget your helmet!

  • 10,006 posts
  • Location:Denver, CO.

Posted Thu Jun 27, 2013 4:23 PM

This is so freaking awesome.

#36 PacManPlus OFFLINE  

PacManPlus

    River Patroller

  • Topic Starter
  • 4,764 posts
  • Atari 7800 & NES Developer
  • Location:Florida

Posted Fri Jun 28, 2013 5:29 AM

Thanks, guys :)

well, my idea didn't work out as planned, but I have others...

Hope to have an update (and maybe even a bin) soon.

#37 mmervine OFFLINE  

mmervine

    Moonsweeper

  • 454 posts
  • Location:Keene, NH

Posted Sat Jun 29, 2013 7:29 AM

Wow...I am really looking forward to this one!!!

#38 AtariNerd OFFLINE  

AtariNerd

    Stargunner

  • 1,052 posts
  • For Illustrative Purposes Only.

Posted Sat Jun 29, 2013 11:37 AM

Do I even need to say... :P :D :twisted: :thumbsup:

#39 OldSchoolRetroGamer OFFLINE  

OldSchoolRetroGamer

    Quadrunner

  • 5,461 posts
  • aka MaximumRD !
  • Location:Kelowna, B.C. CANADA

Posted Sat Jun 29, 2013 3:04 PM

COOL! LOVE BERZERK!

Edited by OldSchoolRetroGamer, Sat Jun 29, 2013 3:14 PM.


#40 ntavio OFFLINE  

ntavio

    Stargunner

  • 1,471 posts
  • I play a super stuntman on TV.
  • Location:Latitude: 2547′16″N, Longitude: 8013′27″W

Posted Sat Jun 29, 2013 3:17 PM

Keep up the great work BOB!!!!! :thumbsup:

Can't wait!!!! :)

#41 bomberpunk OFFLINE  

bomberpunk

    River Patroller

  • 2,270 posts
  • i hoard video games.
  • Location:new orleans

Posted Sat Jun 29, 2013 3:20 PM

if one player exits the screen...

...perhaps a 10-second timer begins for the other player to exit. if not he loses a life, the next screen appears, and then he respawns.
...Evil Otto comes out (if not already out) and is a bit faster than normal
...the other player dies
...the other player starts losing points (1 per second, or 10 per second)

#42 TrekMD OFFLINE  

TrekMD

    River Patroller

  • 3,723 posts
  • Location:Coral Gables, FL

Posted Sat Jun 29, 2013 3:39 PM

This is excellent, Bob, as always! Looking forward to playing it!

#43 RevEng ONLINE  

RevEng

    River Patroller

  • 4,992 posts
  • Bitnik
  • Location:bottom of the stack

Posted Sat Jun 29, 2013 3:49 PM

Any ideas are welcome.


Not a 7800 coder, but thought I'd throw out a few ideas...

You could sort a list of each object by their y coordinate and use a variation of binary search. 64 objects could be checked against a y coordinate in 6 rounds.

Alternatively, you could throw memory at it and create a lookup table that's 48 bits wide and as tall as the screen height, with one bit out of 48 representing each object. As robots and players move you need to update the table with the Y coordinates the object is occupying (slow, a bit of a pain) but it would make checking for collision with Y very fast.

#44 Jaynz OFFLINE  

Jaynz

    Dragonstomper

  • 646 posts

Posted Sun Jun 30, 2013 7:56 AM

A binary search requires the code for a binary search, not just the data included. It would actually take more space and time than a simple iterative loop.

#45 RevEng ONLINE  

RevEng

    River Patroller

  • 4,992 posts
  • Bitnik
  • Location:bottom of the stack

Posted Sun Jun 30, 2013 10:01 AM

Maybe... it depends on how many objects. Even the most inefficient binary search would out perform a linear search when the number of objects gets high enough. I believe a well coded binary search routine would still win at the number of objects Bob is talking about, but it's not the landslide you would see with larger ranges.

Comparing binary search to linear search, the comparison code would be the same, but the range re-adjustment is extra overhead for binary search... but even running just one range divide and cutting the range from 44 enemies to 22 and doing a linear search on the rest would probably be a good cycle win.

Don't overestimate the weight of the range adjustment code. Its very easy to trade off a small amount of rom for cpu, especially if you just run just a round or two and linear search the rest.

Anyway, I don't easily jump to rarified solutions for 6502 assembly, but clearly a plain old linear search isn't working. I'm sure Bob would appreciate other suggestions.

#46 Jaynz OFFLINE  

Jaynz

    Dragonstomper

  • 646 posts

Posted Sun Jun 30, 2013 5:38 PM

The USUAL trick for games like this is to limit the ranges of the robots. For example, if you have 16 robots, divide the screen into four vertical stripes. The missile search then only goes for the stripe it's in by the X coordinate ( X << 2 ). That way you only do a check for 4 robots on any given search, for a total of 5 searches rather than 16.

The bigger trick is the little bit of pain that is the reminder that Frenzy's walls, in some screens, are destroyable...

#47 PacManPlus OFFLINE  

PacManPlus

    River Patroller

  • Topic Starter
  • 4,764 posts
  • Atari 7800 & NES Developer
  • Location:Florida

Posted Mon Jul 1, 2013 4:03 PM

I think I was able to get somewhere with the shot collision issue. :) Thanks guys!


Regarding the dual player exit option, I think when one player exits, it will end the room for both players. Chances are, Otto will be out anyway, so the first player to exit will decide the direction of the room.

#48 VectorGamer OFFLINE  

VectorGamer

    Go Sleep In the Cold

  • 14,796 posts
  • \m/
  • Location:Retrocade, USA

Posted Tue Jul 2, 2013 9:17 AM

Regarding the dual player exit option, I think when one player exits, it will end the room for both players.


I don't know that I like that option. I can see bitching up a storm at the other player for leaving a room too early, especially when you're trying to kill more robots for points. I say leave it up to Evil Otto.

#49 Goochman OFFLINE  

Goochman

    Quadrunner

  • 6,951 posts
  • Moongates to the Past

Posted Tue Jul 2, 2013 9:55 AM

I think I was able to get somewhere with the shot collision issue. :) Thanks guys!


Regarding the dual player exit option, I think when one player exits, it will end the room for both players. Chances are, Otto will be out anyway, so the first player to exit will decide the direction of the room.


2 thoughts -

1. Why not leave the room open until both players exit?
2. Would it be alot of work to place the players opposite the doors they exited? That would allow players to exit their preferred direction. I dont know much about Frenzy so if the door exit matter on next room choice then I would use first player exit as the choice.

#50 SoundGammon OFFLINE  

SoundGammon

    Stargunner

  • 1,350 posts

Posted Tue Jul 2, 2013 12:13 PM

How about if one player exits early, the other player starts to get DOUBLE point values for all scoring while he remains?





Also tagged with one or more of these keywords: Frenzy, Berzerk

0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users