Quidditch

I thought about using a single bat/throw button, but I went with the same logic that ra4king arrived at- there are situations where you could do both but only want to do one, so I made them separate buttons. Forcing you to throw the quaffle before hitting the bludgers away defeats most of the purpose of hitting them at all, I think. Thanks for playing!

Heh, I can’t tell whether you’re saying the game is fun or not! Hopefully it is though.

What’s weird is that my original plan did have scrolling. Actually, if you look at the painting code, I have a boolean you can change so that the view is zoomed in just enough to keep both players visible instead of showing the whole field. It feels like a completely different game, and I recommend you try it (full disclosure- I added the quality control after that code, so it might not work right out of the box). In the end, my fundamental goal was to keep things simple, obvious, and fun, so I chose to show the whole field.

I thought about that as well, and that would definitely be in any updated version, but my simple AI is dumb enough that you’d just have a jumble of players all doing the same thing- there are definitely ways around that, but I went with the bare minimum I could accomplish instead of adding features I thought would be awesome that would keep me postponing the release.

[quote=“roland,post:38,topic:36951”]
That’s a really good idea, and not hard to implement. I probably should have gone that way instead, but my focus has shifted so I probably won’t have time to add it to this version. Actually I also originally wanted to try to implement the Wronski feint so that players could hit the ground, but again, in the end I went with simplicity, so I had to cut a ton of features for time and sanity’s sake. Maybe in the next version.

[quote=“roland,post:38,topic:36951”]
Again, it’s weird how much you’re in my brain. Both of these features, along with the scrolling, were a part of my original idea- but simplicity won in the end. I had some short-lived grand schemes of having a penalty system where you could hit opponents with your bat, but you had a chance to be “seen by the ref”, which would allow your opponent to shoot a foul. But, I wanted to keep things obvious and not confusing, so I scratched it and just allowed the players to push one another, not hit one another.

[quote=“roland,post:38,topic:36951”]
Yeah, I explained this above so I won’t harp on it, but I probably should have made it harder to catch. I wanted to make sure the games didn’t last too long and get boring, but maybe I overcompensated.

[quote=“roland,post:38,topic:36951”]
That’s awesome to hear, as it’s one of the things I was wondering about. I thought about making it so the left and right arrows controlled the angle of your broom and the up and down arrows controlled speed, but I thought that might be clumsy or confusing. Maybe in another version I could have that as an “advanced controls” option, maybe with the bonus that you could go faster if you used it (like choosing manual transmission in racing games).

[quote=“roland,post:38,topic:36951”]
Thanks so much, and thanks for playing!

Hopefully I can eventually find an artist to help out with the next version, because I’d love to implement all the great suggestions I’ve heard!

Haha oh geez. That would be pretty awesome, but I’ve got quite a ways to go before I implement that! Maybe in addition to an artist, I also need an “online guy” to help with that stuff for the next version?

I’m glad I could help. :slight_smile:
It sounds like you could make two different versions - a quick, fun, small game, and a more complex game which would be harder to learn but in the long run be better. It is good to keep things simple. The game is fun, but after a while will become boring if there isn’t enough variation and challenge.
I had a look at your code, and added a camera that follows just player 1 and I think it’s pretty fun! (don’t try 2 player, it won’t work well… haha )
http://www.chaosreef.com/quidditch/quidditch.html
I added some deltax and deltay when you get hit by the bludgers, but the direction is completely random because I couldn’t be bothered reading through and finding out how the heading variable works.

I might be able to be the “online guy” :wink:

That’s a good point. I kept things simple because my target audience was a few girl friends who like Harry Potter but don’t really ever play games, so almost every decision was made with the idea of simplicity. But compared to the 1300 views this thread received so far (I know that doesn’t equal 1300 plays, but still), maybe I should add some more complicated gameplay to keep things interesting and replayable. I’ll definitely keep that in mind for games I make in the future.

That’s very cool, and I’m pretty thrilled that a stranger on the internet liked something I did enough to spend time on it. Seriously, thanks, what an awesome way to start the day! I wonder if you used any of the code I wrote for keeping both players on the screen (the if statement that I deactivated in paintComponent() but left in the code), or if you did it from scratch? It wouldn’t have been hard to modify my code to only worry about one of the players, I don’t think. Either way, very cool.

You probably could just get the bludger’s current deltaX and deltaY (before it bounces off the player), then set the player’s deltaX and deltaY based off that. But I like your effect, and I’ll probably add it if I ever do come back to this.

Cool, I’ll keep you posted. I have a ton of ideas for this, but I’m mostly hampered by my lack of art skills. So if an artist ever comes along, I’d be interested in coming back to this. I’ve got a lot on my plate at the moment, but in the future, this would be a fun project.

I used most of your code, just changed a few things slightly.


if (!drawZoomed){...}
else{

			double border = 200;
			
			double x = player1.getX()/2 -gameWidth/4 + image.getWidth()/2;//(player1.getX() + player2.getX()) / 2;
			double y = player1.getY()/2 -gameHeight/4 + image.getHeight()/2;//(player1.getY() + player2.getY()) / 2;
			//double distance = Math.hypot(player2.getX()-player1.getX(), 0);//player2.getY()-player1.getY());

			int left = (int)(x-border);
			int right = (int)(x+border);
			int up = (int)(y-border);
			int down = (int)(y+border);
			if (left < 0) 
			{
				left = 0;
				right = (int) (border*2);
			}
			if (right > image.getWidth())
			{
				left = (int) (image.getWidth()-border*2);
				right = image.getWidth();
			}
			
			if (up < 0) 
			{
				up = 0;
				down = (int) (border*2);
			}
			if (down > image.getHeight())
			{
				up = (int) (image.getHeight()-border*2);
				down = image.getHeight();
			}
			
			g.drawImage(image,
					0,
					0,
					getWidth(),
					getHeight(),
					left,
					up,
					right,
					down,
					this);
		}

[quote]You probably could just get the bludger’s current deltaX and deltaY (before it bounces off the player)
[/quote]
oops. I didn’t see them lol :clue:

[quote]Cool, I’ll keep you posted. I have a ton of ideas for this, but I’m mostly hampered by my lack of art skills. So if an artist ever comes along, I’d be interested in coming back to this. I’ve got a lot on my plate at the moment, but in the future, this would be a fun project.
[/quote]
Sounds good. If I don’t reply on this thread just send me a quick email at chaosreef@gmail.com