Jump to content
IGNORED

Beyond Castlevania...


Recommended Posts

The screens for Marble Madness look great. The main issue I see is how to get the marble to go behind the playfield in certain parts of the map. This is going to require some complex sprite masking to make it look convincing. Normally isometric games draw the screen from the back to the front, so the masking is taken care of automatically. However, that is not an option when using the playfield. Crystal castles cheated and made sure that nothing was ever obscured :)

 

Chris

been long wondering about that. almost seems like there would need to be 3 masks or one that incorporates 3 things.

 

platform mask, collision mask, and maybe a virtual mask that removes part of the ball when it is behind something. Only way I can thnik of for this is keeping the ball in ram and removing sections of the sprite as needed.

 

The platform mask or whatever will also need slope data too. The floor is totaly open on this one. any ideas?

 

Perhaps there could be a way for the ball to mask out player 0 since the ball is associated with the playfield?

Edited by grafixbmp
  • Like 1
Link to comment
Share on other sites

Purhaps it could be done with the ball in conjunction with the span of the marble sprite. This area could be masked by a single byte that gets loaded and the bit that would set the playfield to player0 priority would get loaded from the byte in ram. And then after it is loaded it gets shifted down and used again the next scanline.

  • Like 1
Link to comment
Share on other sites

I guess I'll show what I did last night. The weird thing is the rate of movement for this new graphic would probably be odd just simply cause I rigged it to take the 8 pixel wide player graphic and by shifting its H position properly, make it seem like a 12 pixel wide graphic. This is just because of the the way it moves in the original games.

post-10601-129761535844_thumb.png

post-10601-129761537832_thumb.gif

  • Like 2
Link to comment
Share on other sites

A collection of thoughts.

 

====================

Collision-detection:

====================

 

I have a partially working collision-detection algorithm in place, but it needs help.

So, the plan is to have 2-4 tables, each with 200 bytes in them.

These correspond to the 200-byte high double-pixel beginner race.

The player0 graphic has a VPos (0-199) and an HPos (16-136).

 

The algorithm is as such:

Take the VPos, put in X

Load first collision table value at X (i.e. our current line).

Compare to (HPos divided by 4).

If we have a match, we're on a "bump", so take player's inertia and reverse it.

Since we can have up to, say, 4 "bump" situations per line (for now, holes are represented by "bumps"), then we have 4 table-loads and checks, and we're good to go.

 

Here's the dilemma. There are different actions to be taken when colliding.

An easy example is if you're going southeast, and have a collision.

That's simple-- you invert the inertia in both X and Y directions, and suddenly, you're bouncing backwards.

Makes sense.

 

However, there are other situations where you'll only want to invert inertia in either X or Y only.

An easy example is if you're going northeast into a horizontal flat wall-- the logical direction of bounce is southeast.

 

I'm not sure how I would differentiate these 2 scenarios. Anyone have any idea?

 

====================

Other thoughts about design

====================

 

Typically, as others note on this thread, I get to "almost the goal line", and then get bored or something comes up, and some of the stuff I make becomes temporary abandon-ware (with temporary maybe being a long time). :)

 

So, I figure I need to set some goals for this thing. What I've set forth in my mind as a "fun to have" would be something that was releasable as a demo to show to the world that Yes, a Marble Madness game is possible. The Mega Man 2600 designer(s) only did 2 levels, and I thought that was staggering. For Marble Madness, I honestly have no idea how to make a 400-double-line level work, or even player 2 support work with the current kernel. And, I have no idea how to make your marble fall off-course or go "behind" things.

 

So, I was thinking of it this way (here's what's achievable in my mind without much trouble):

- Title screen "Marble Madness: (The Beginner Race)"

- ability to choose 90 degree or 45 degree angle

- The beginner race has a "win" condition when you cross the finish line.

- Collision detection working pretty well.

- Instead of falling off, you get bumped back.

- Simple "beginner level" music.

 

If I did it this way, it could be limited to 4K, and be a fun little thing for people to have.

 

I also was thinking that if it got that far, it could be interesting to design a few "new" levels, each 200 double-bytes long. It could be a fun game, even so-- just a maze game, really based on Marble Madness. The contraptions like the green carpet, etc... would probably be scrapped initially, but still, there could be fun of the levels, which is kind of a "new twist" on the architecture.

 

However, with that being said, I think a "Beginner Level" that's really functionally close to the original version is a great goal.

 

Anyhoo, random thoughts. :)

 

Regards,

-John

Link to comment
Share on other sites

Oh, I have an idea for my physics problem.

 

So, we've got this table that says where there are places where you "bump".

 

It looks something like this:

 

CollisionTable

; Line 40

.dc.b 4 ; left of screen

.dc.b 5 ; left of screen

.dc.b 6 ; left of screen

.dc.b 5 ; left of screen

.dc.b 4 ; left of screen

 

I was thinking about it-- the farthest it can go is to 43. That means it can go to 6 bits max.

I have 2 bits I can do things with.

 

Maybe what I need to do with those 2 bits is to use them. Maybe they can tell the direction of the "bump", i.e -, |, \, or /.

With that information, I may be able to deduce what sort of bounce is needed.

 

Would this be a good system?

 

-John

Link to comment
Share on other sites

Sounds good to me. Not sure what the extra 2 bits could be used for. Only things I could figure out was, Lets say that any particular location has a rate of slope and that rate has an x and y offset for its direction. In this the x and y offset would be 45 degrees to the viewer (because of the isometric look) as "X" /=x \=y.

 

I don't know if this truly could have any bearing but I had wondered about a single byte that tells everything the ball needs to know on how to move on the platform. just not sure what kind of data table it would be but I'm afraid it would be too big to be doable.

 

one byte 1111111

 

separate 1111 = x axis: 1111 = y axis

 

positive/negative values

 

1111 collision

1110 hole

1101 slope 6 power-

1100 slope 5 power-

1011 slope 4 power-

1010 slope 3 power-

1001 slope 2 power-

1000 slope 1 power-

0000 no slope

0001 slope 1 power+

0010 slope 2 power+

0011 slope 3 power+

0100 slope 4 power+

0101 slope 5 power+

0110 slope 6 power+

0111 goal

 

this goes for both the x and y axis in an isometric view.

 

This also gives 3 other conditions i just game some examples of what ifs. :D

 

This was just an arbitrary thought though

 

There could be a test for these first

01110111 = goal

11101110 = hole

11111111 = collision

 

Don't read too much into this just thinking out loud. lol

Edited by grafixbmp
  • Like 1
Link to comment
Share on other sites

Hey grafixbmp, look where your Mario ended up!

post-9364-12611181902_thumb.png

 

I don't plan to leave this pic there and it's not going to be in the actual released hack, I just felt like taking a break and goofing off a bit... although, it would be a fun idea if someone were to replace all DD characters with Mario ones. Princess Toadstool as Linda. That would be a perfect fit.

 

I wish some one would make a 32k version of Double Dragon with better graphics and two player mode for the 2600. I'd pay $45 for a good copy. Oh well, a man can dream can't he?

  • Like 1
Link to comment
Share on other sites

Ok, quick update, tho no new release software for now.

 

The good news is that I have gotten collision detection to be a lot better than I had it previously.

In my first implementation, there were "gaps" where the ball could slip through-- and that seems to have been fixed now.

 

The next step from here is to figure out some of the physics that need to happen upon collision.

I have it so it always "reflects back" upon collision right now, but surprisingly, this behavior has a few rare situations where the ball itself can get stuck.

So, that's the next step to work on. :)

 

-John

Link to comment
Share on other sites

Ok, I need some testing help. :)

I think I have a working method of collision detection.

But, I'd like some people to verify that I haven't missed anything.

 

At the moment, it's only 100% set up to work on the orange triangle on the left (see picture).

By the way, the ball is now an "equal sign" that really is just showing the 4 corners that are tested for collisions.

 

Basically, I want to know if anyone can get the equal sign to get stuck in the triangle area (either around its edge, or inside).

5 points to the person who can get it to happen. And 10 points to the person who can do it, and tell me how to reproduce it.

 

Any takers?

 

It's a boring task, I know, but I would like some verification before I put collision detection on more of the playfield.

 

post-151-129795046157_thumb.png

 

-John

marble_2011_02_17.zip

  • Like 1
Link to comment
Share on other sites

X

-X

--X

---X

----X*

-----X

-----X

-----X

 

* is where I was able to get it stuck whilst coming up from below in a fast arc, with the downswing ending

at that point.

 

it would be a lot faster to check if the ball didn't bounce off like mad :) (and no timer,) or even just for the sake of collision testing, 1-1 movement on the ball to stick control...

 

The feel of the movement is very good for marble madness, tho.

Edited by Godzilla
  • Like 1
Link to comment
Share on other sites

Ok, the 10 points are yours. :)

 

I can make a "no time limit version" later in future tests; that should be easy enough.

As for the bouncing-- well, that's the part that I need to keep enabled for now to make sure it bounces out correctly.

 

Just to clarify-- did it really get stuck, or did it just bounce around and then find its way out again?

It should theoretically bounce out, even if it jostles around a bit before doing so.

I've seen it do that a little.

 

But, if it really is stuck, I'll need to do some thinking, as to why it happened in that particular place.

It's gotta be one of those cases where a bunch of conditions hit at the exact same time, and then I'll have to correct for it.

 

-John

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