Oink 'n' Boink - 2 Player Battle Game

JamesNES

Well-known member
I wanted to make a simple two player game to play with friends, and I came up with an idea that you're battling on a single screen to get the most of a particular item. It ended up being carrots, and the main characters pigs, and then I had ideas for more modes. So more complicated than originally planned!

The game is feature complete but there are a few bugs left; I just started a new job so I don't really have time to work on it so I figured I'd put it out in WIP until I can get back to it.



It has four modes:

Scramble

This mode is pretty straight forward, you compete to get the most carrots, picking up power ups to mess with the other player along the way.

(the GIFs are at 30fps but the game is a solid 60 even with all the stuff moving around)


scramblewater3.gif


scramble1.gif

flip.gif


Dodgeball

In this mode two balls spawn and you can only get points by hitting the other player with them.

dodgeballgif.gif


Joust

My favourite one, this one has platforms that disappear over time and force you to move around the level. The goal is to knock the other play off, getting a point each time they fall.

JOUST1.gif

joustwater.gif


Battle

This one you have to bop the other player on the head/push them from behind until they're out of health. When the time runs out, it goes into sudden death and drops the players' health to 1 each. This mode has hearts so you can get health back.

battlegif.gif


After eight rounds there's a summary where it figures out who won based on a bunch of things with one unique variable per mode:


results.gif

(these were just random values for the purposes of the gif)

I hadn't tried a platformer before, or anything two player, so this was a fun learning experience.

In total it has forty levels, 16 for scramble and 8 each for the other three modes.


Here's the link if you want to give it a go:

Note: compiled for PAL region - The music will be off and there'll be glitches if it's played NTSC

Oink 'n' Boink!
 
Last edited:

JamesNES

Well-known member
Thanks! I learned a lot making this one. I did my own routine for the text printing, and figured out stuff like sprite platforms, the disappearing platforms and the swimming. Was a cool mini-project. Next is to work it into a single player game :x
 

JamesNES

Well-known member
I finally got the energy to get back into working on this one. I'm starting a single player mode, sorta like a cross between Bubble Bobble and Wario Ware. There'll be a bunch of different objectives, depending on the level.

First thing was to integrate a nifty particle system I'd made for another game but abandoned. It uses a bunch of tables and a huge chunk of unused RAM NESMaker has put aside by default.

Then I added a lava tile that uses it. Even made him put a thumb up like in Terminator 2. The smoke coming off is the particle system I made. Definitely going to make better lava, and animated!

t2.gif
 

JamesNES

Well-known member
One of my ideas for a stage type was surviving a set amount of time while more and more enemies spawn in. I got it to have 16 on screen at once without slowing down. They spawn in as distant pairs of eyes that can't hurt you, then after a while they swap out for the big enemies that can.

In the actual level I think it'll ramp up a bit more gradually. I'm just spawning them in with the select button here lol

batcave.gif
 

SciNEStist

Well-known member
I'm working on a 2 player game myself. gotta say, it's a little bit of a pain getting the physics and controls I want working for both players, but it'll be worth it.

I really dig the variety of gameplay here. I hope you can squeeze it all in without sacrificing too much. It reminds me of those streamer friendly games like "move or die" or "fall guys" or even mario party.
 

JamesNES

Well-known member
Being two player and not having to have too many enemies I could cut out large chunks of code. Single screen helps too! Even with all these modes I still have two whole empty banks and a couple at 50%
 

vanderblade

Active member
Amazing work, @JamesNES!

Is this made using the latest NESMaker? I could never get my 2nd player object to appear after any warp is activated. Has somebody since outlined how to get that up and running in 4.5.9? I have my 2_player object and controls all set up.
 

JamesNES

Well-known member
Amazing work, @JamesNES!

Is this made using the latest NESMaker? I could never get my 2nd player object to appear after any warp is activated. Has somebody since outlined how to get that up and running in 4.5.9? I have my 2_player object and controls all set up.

Hmm I don't remember having any trouble, what I did was add player 2 as monster 1 on every screen. You could do a thing in PostScreenLoad where you set player 2, ie the monster with object ID 1, to have the X and Y coordinates you want it to start at. Like if you wanted it to start one tile to the right of player 1's warp in coordinates, you'd do:

Code:
LDX #$01
LDA newX
CLC 
ADC #$10
STA Object_x_hi,x

newX and newY are the warp in coordinates for the screen. Honestly I was surprised at how well done NES Maker's two player stuff was out of the box, I didn't think it was set up at all. Just making sure that player 1's object index is 0 and player 2's index is always 1 makes things way easier.

And yeah this is in 4.5.9.

I'm currently working on an auto vertical scrolling stage mode that I can't wait to get done properly. You gotta keep jumping as the stage gets faster and more random stuff keeps popping in.
 

JamesNES

Well-known member
Thanks! I wrote a more lightweight object system to go alongside the default one, cos the default one is still good for more complex characters like the players. Originally it was for things like bullets and rain n stuff but it grew into something bigger.

I think the players are the only proper nes maker objects left in my game now
 

JamesNES

Well-known member
Made some progress with vertical scrolling, something I've always wanted to take a swing at. Collisions are bit off but I think I can do it now at least. Static HUD at the top hiding the draw in!

Need to slow down the scroll and add death when you fall off the bottom but I've already put that in a different mode so it should be pretty simple. I'll add things shooting bullets and stuff too to make it more interesting.

It's currently splicing together random screens every time it goes up to a new one, so there are repeats as I've only made four of them so far. But it's working!

vertscroll2.gif
 
Last edited:

vanderblade

Active member
Hmm I don't remember having any trouble, what I did was add player 2 as monster 1 on every screen. You could do a thing in PostScreenLoad where you set player 2, ie the monster with object ID 1, to have the X and Y coordinates you want it to start at. Like if you wanted it to start one tile to the right of player 1's warp in coordinates, you'd do:

Code:
LDX #$01
LDA newX
CLC
ADC #$10
STA Object_x_hi,x

newX and newY are the warp in coordinates for the screen. Honestly I was surprised at how well done NES Maker's two player stuff was out of the box, I didn't think it was set up at all. Just making sure that player 1's object index is 0 and player 2's index is always 1 makes things way easier.

And yeah this is in 4.5.9.

I'm currently working on an auto vertical scrolling stage mode that I can't wait to get done properly. You gotta keep jumping as the stage gets faster and more random stuff keeps popping in.
Thanks, @JamesNES.

Maybe it's because I'm using a scrolling module, but the above code doesn't work for me. Warps still de-load player2_object. Or, at the very least, it's not appearing on screen.

My player2 object is also object #$07, but that should just be a simple replacement, right?

Code:
LDX #$07
LDA newX
CLC
ADC #$10
STA Object_x_hi,x
 

JamesNES

Well-known member
Thanks, @JamesNES.

Maybe it's because I'm using a scrolling module, but the above code doesn't work for me. Warps still de-load player2_object. Or, at the very least, it's not appearing on screen.

My player2 object is also object #$07, but that should just be a simple replacement, right?

Code:
LDX #$07
LDA newX
CLC
ADC #$10
STA Object_x_hi,x
I'm literally placing it on every screen as monster 1, so it's despawning and creating a new one with every warp. It's not flagged as persistent or anything, just player.
 
One of my ideas for a stage type was surviving a set amount of time while more and more enemies spawn in. I got it to have 16 on screen at once without slowing down. They spawn in as distant pairs of eyes that can't hurt you, then after a while they swap out for the big enemies that can.

In the actual level I think it'll ramp up a bit more gradually. I'm just spawning them in with the select button here lol

View attachment 5973
incredible. HOW DID YOU DO THAT?
 
Top Bottom