Oink 'n' Boink - 2 Player Battle Game

Also @JamesNES are you going to sell this? Depending on the month if you kickstart it I'll definitely be there... I've already promised another two to support though so if this month the Rip me.
Regardless would love to buy a physical eventually for a game that reminds me of smash bros but with a warioware twist! Great stuff!
 

JamesNES

Well-known member
@JamesNES Wow, those transition effects are really cool. Difficult to achieve? Can it be made with a simple macro or a subroutine?
(it would be useful)
It's not really doable as a macro I don't think, it runs over multiple frames in my round over script. For instance, here's the code for the first GIF, the one with shutters going from the left and the right:

Code:
wipe8:
    ;;scratch1 = left x
    ;;scratch1+1 = right x 
    
    LDA scratch1+1 
    BNE +
        ;;scratch1 and scratch1+1 are set to zero before first calling this
        LDA #31
        STA scratch1+1
    
    +
    ;;do left shutter 
    LDA #$00
    STA tempB 
    LDX #$00
    -leftLoop
        DrawSingleTile #$00, scratch1, tempB 
        INC tempB 
        INX 
        CPX #30
        BNE -leftLoop 
    jsr doWaitFrame
    
    LDA #$00
    STa tempB 
    LDX #$00
    -rightLoop
        DrawSingleTile #$00, scratch1+1, tempB 
        INC tempB 
        INX 
        CPX #30
        BNE -rightLoop  
    jsr doWaitFrame
    INC scratch1 
    DEC scratch1+1
    LDA scratch1 
    CMP #$10
    BNE +
        jsr startNewRound
    +
    

RTS

scratch1 and scratch1+1 are just variables I know won't be altered anywhere else in between running this.

DrawSingleTile is a macro I wrote to draw one 8x8 tile, it takes the tile index, then its X and Y, from 0 to 31 and 0 to 29. I'll attach it to this post.

I also changed doUpdateScrollColumn.asm to take a variable max tiles to write depending on the circumstance:

Code:
    LDY scrollOffsetCounter
    LDX currMaxTileWrites ;;;here. By default it's #$10 but you can bump it up if you're on PAL, or know that there aren't any palette writes going on while writing heaps of tiles.
                                         ;;;I have it at #$18 for this
loop_LoadScrollColumn:
    LDA scrollUpdateRam,y
    
    STA $2006
    STA $07FE
    INY
    
    LDA scrollUpdateRam,y
    STA $2006
    STA $07FF
    INY
    
    LDA scrollUpdateRam,y
    STA $2007
    INY 

    STY scrollOffsetCounter
    
    CPY maxScrollOffsetCounter ;; this should probably be variable.
    BEQ doneUpdatingColumn
    
    DEX
    BNE loop_LoadScrollColumn
    JMP notDoneUpdatingColumn
    
doneUpdatingColumn:
    LDA updateScreenData
    AND #%11111011
    STA updateScreenData
;    LDA scrollByte
;    AND #%11111110
;    STA scrollByte
    LDA #$00
    STA scrollOffsetCounter
    STA maxScrollOffsetCounter ;;added this
notDoneUpdatingColumn:

It's really just down to fiddling with how many tile writes you can get away with in a single frame, and adding wait frames when needed. Like the diagonal shutters, I vary how many wait frames depending on how far across the screen it is to speed it up initially, before it's drawing huge amounts of tiles.
 

Attachments

  • DrawSingleTile.zip
    781 bytes · Views: 1
however you did this @JamesNES (which I'm assuming is the ChangeTileAtPosition script I couldn't figure out) I'm going to need advice for how to use this for my game. to transition to battle screen you know? okay got the game not crashing now because I added the doChangeTileAtPosition.asm to the loadallsubroutines.asm...
my issue is that I don't quite know how to say... make the variable change a tile which it's x = 3 and y = 4... how do you get that info?
 
Last edited:

JamesNES

Well-known member
however you did this @JamesNES (which I'm assuming is the ChangeTileAtPosition script I couldn't figure out) I'm going to need advice for how to use this for my game. to transition to battle screen you know? okay got the game not crashing now because I added the doChangeTileAtPosition.asm to the loadallsubroutines.asm...
my issue is that I don't quite know how to say... make the variable change a tile which it's x = 3 and y = 4... how do you get that info?
This thread is for me posting stuff about my game. I posted that macro for someone else, I wasn't intending to be answering questions about it for weeks. How you handle that stuff in your game is up to you, and is what making a game is actually about
 
This thread is for me posting stuff about my game. I posted that macro for someone else, I wasn't intending to be answering questions about it for weeks. How you handle that stuff in your game is up to you, and is what making a game is actually about
I mostly agree and thanks for sending me the code anyway man, got it working. I just need to be able to find the right position on the map using postscreenload, and then change the tiles graphics, it won't take that long for me to figure this out but I'm busy today anyway... but yeah I know it's off topic here... but I am grateful man. Thank you looking forward to your game!
 

JamesNES

Well-known member
I've been working on this skiing game, I've been wanting to make something vertically scrolling to see what I could do. You hit A on the ramp to jump (or fall off the cliff and get stunned), then you press buttons in order to do a trick which gives you a boost! Bumps slow you down and rocks stun you as well.

For the PVP side of it I'm figuring to do it like Micro Machines where you get a point if the other person goes off the top of the screen.

I haven't done attribute loading yet because it's no fun at all, but I'll have to since I want to have trees and stuff. Think it's shaping up to be pretty cool so far. Throwing in totally OTT stuff like the shadow getting smaller with your height just cos haha.

freeski1.gif
 

PewkoGames

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!

View attachment 6004
If you ever do a tutorial on vertical scrolling, let me know. I had a few ideas for vertical scrollers
 

JamesNES

Well-known member
If you ever do a tutorial on vertical scrolling, let me know. I had a few ideas for vertical scrollers
The drawing part isn't that hard, it's the other stuff like collisions and object spawning and whatnot. I removed all of NES Maker's scrolling code when I started so I don't really know how that's laid out, for this I used the collision data that's generated when you compile to make simple objects, just x/y/width/type in RAM and check collisions against them to do things. Since I'm not using NES Maker's collision system at all for this minigame, I've got like 512 bytes extra of RAM to do things with.

This is the third time I made a vertical scrolling routine, and I've gotten a pretty good grasp on it now (scrapped the other two). It's basically

  • increase camY
  • check if camY is a multiple of 8 (AND #%00000111)
  • if it is, load a new row of tiles and draw them at camY >>> (shifted right three times)

You have to check if camY has hit #$F0 first as the screen is only 240 pixels tall, so set it back to zero.

And since the data is stored as meta tiles not single tiles, you need to keep track of whether it's an odd or even row, and add #$10 to the tile index accordingly.

This doesn't factor in attributes which I still haven't gotten down 100% myself, but I think I've got it and I've set aside some time this weekend for it. It just won't look cool enough if I don't have some colour, so I HAVE to do it this time!
 

SciNEStist

Well-known member
this skiing is a very neat addition, but the snow doesnt really fit your farm theme that most of the other stuff falls into.. perhaps have them going down off a barn roof, or a muddy hill?
 

JamesNES

Well-known member
Ha! Good point. It's become so untethered, just doing whatever comes into my head, forgot there could still be a theme. I'm still in the "having a blast programming everything" phase but that's definitely something I'll think about when I get to the graphics part.
 

JamesNES

Well-known member
Got it! It's scrolling vertically and loading in the attributes properly too. That was probably the hardest thing I've done but it's such a relief to finally figure it out. I think I'd tried at least twice before to get this going and just gave up.

I ended up setting aside 64 bytes to keep a copy of the current attribute table to make it easier to update them, since you can't just write a whole row of attributes at once without it looking ugly. You have to mix them with the previous or next row before writing them. Was a real brain-hurter.

Next is to make the camera properly dynamic, as right now it just follows the fastest player which isn't gonna be good enough.

freeski_.gif

And this is how I have colliding with obstacles set up so far:

freeski__.gif

Ice locks up your controls so you keep going the same way till you're on ground again. When you hit a tree or cliff or something it pushes you downwards, but this isn't properly synched with the camera yet so eventually you'll go off the bottom of the screen.
 
Last edited:

SciNEStist

Well-known member
A thought occured to me when I was playing Archon. A way to frame all these mini games I could suggest is something like tic-tac-toe or connect 4, where you have to win the minigame in order to play your turn.

In the game Archon, its like chess but your piece actually has to win an arena battle game to take the enemy piece, it adds a neat element for sure.
 

JamesNES

Well-known member
Cool idea! Archon rules, I think the last game I played with my mate was like an hour long. I suck though so I think I had to stalemate him :LOL:

I had been trying to think of something along those lines, like I really like Wobbly Bobbly from Warioware on the Gamecube, sort of the same idea. Win a round to take a shot at progress. Definitely something to consider. While I'd have fun programming a board game on top I'd really rather something more interesting.

With the skiing, I'm going to make it a downhill mud course, so I can have green grass and stick closer to the theme. I've gotten two players working now, and a finish line where you get sprinkled with confetti. Still deciding if I want to have items or not, but I need a status bar at the top to hide draw in, so I'd need something to put in there.
 

JamesNES

Well-known member
Most of the gameplay is done now, I made this cool finish line effect!

Tried some ideas that aren't snow but mud just looked like... crap.

Thinking about putting some sort of attack items in, so I'll have something to put in the status bar. Need to give them some animation too. I didn't use NES Maker objects for this since I used up all my animations/action steps a looooong time ago, so doing my own animation code will be an experience.

freeskiwin.gif
 
Top Bottom