Jump to content
IGNORED

Re-Started Frenzy / Berzerk :)


PacManPlus

Recommended Posts

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

  • Like 1
Link to comment
Share on other sites

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

  • Like 4
Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

  • Like 2
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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

  • Like 9
Link to comment
Share on other sites

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)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

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.

  • Like 5
Link to comment
Share on other sites

 

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...