Pietro Bros [DEMO]

edited June 2016 in Brand new software
Hi People.

I wanna share with you a game that I'm working on, since a month or so...

kOoPGzU.png

https://drive.google.com/file/d/0Bw3Nat5zkP-HbHF0SGFVR2JhVUk/view?usp=sharing

It's Called Pietro Bros, is about an Italian plumber, not related to Mario.

I love to have your opinions and also I need the help of an expert on AY to put some music on it.

Regards


Post edited by cgonzalez on
«1

Comments

  • edited June 2016
    it looks stunning!!! any chance you will make a complete game out of it? please say yes....
    (the only thing which is slightly annoying is the fact that the whole screen flickers a bit...i gues it is updated or something like that?)
    Post edited by gabriele amore on
    Find my (mostly unfinished) games here
    https://www.facebook.com/groups/1694367894143130/
  • Yep, I noticed a few timing jumps where the colours flick out for a moment.

    But otherwise it looks amazing, and your sprites and animations of the main character are brilliant. I see a clever use of PAPER colours to get half-character positioning to match up to the frame of animation and position of the character's hands.

    The only thing I would point out is that the skid-stop animation seems unnecesary if the character has only just moved one square, as it means the smallest step you can make with one tap of the direction button is two squares, which could get you killed.
    Joefish
    - IONIAN-GAMES.com -
  • Fantastic!
    I hope you finish this, because this is a real gem.
    btw, I noticed a periodic screen flickering, what's this exactly?
  • Flickering is about some Nirvana performance test that's is not finished. I removed some of the Nirvana+ halt instructions to gain speed.

    This just a demo,I will try to finish it. But sound is beyond for now, so if someone wanna help me I will really appreciate it. I got the samples.

    Regards
  • brilliant!
    ZXBasic.uk Snapshot hosting : http://zxbasic.uk/
    ZXBasic.uk Database : http://zxbasic.uk/db/0
  • Awesome!!!

    The only noticeable problem is, Mario sprite "flickers" when he's in front of a pipe. It means you are sometimes redrawing a pipe without redrawing Mario in front of it.

    This is the easiest way to fix this problem: Always reserve sprites 6 and 7 (last 2 sprites) to redraw Mario and Luigi every frame, even if they didn't move. This way, it doesn't matter what else you are drawing on screen (or how you are using other sprites), Mario and Luigi will always be in front of everything else, including pipes. They will never flicker.

    You currently have 4 pipe groups (1 pipe group at each corner of screen). I suppose 3 tiles are enough to redraw each pipe group. So you can use this logic:

    - During frame 1, erase Mario using NIRVANAfillT. Use 3 sprites to redraw pipe group closest to Mario, another 3 sprites to redraw pipe group closest to Luigi. Move Mario only. Use last 2 sprites to redraw both Mario and Luigi.

    - During frame 2, erase a few enemies using NIRVANAfillT. Move these enemies. Use at most 6 sprites to redraw these enemies at new position. Don't change last 2 sprites, so they will redraw Mario and Luigi again.

    - During frame 3, erase Luigi using NIRVANAfillT. Use 3 sprites to redraw pipe group closest to Mario, another 3 sprites to redraw pipe group closest to Luigi. Move Luigi only. Use last 2 sprites to redraw both Mario and Luigi.

    - During frame 4, erase a few enemies using NIRVANAfillT. Move these enemies. Use at most 6 sprites to redraw these enemies at new position. Don't change last 2 sprites, so they will redraw Mario and Luigi again.

    This way, Mario and Luigi will move at 50/4 = 12.5 frames/sec. This is probably fast enough for you!

    If you want to move them even faster, a more efficient solution is to apply this logic in alternate frames:

    - During every even frame, erase Mario and Luigi using NIRVANAfillT. Use 3 sprites to redraw pipe group closest to Mario, another 3 sprites to redraw pipe group closest to Luigi. Move Mario and Luigi if you want. Use last 2 sprites to redraw Mario and Luigi.

    - During every odd frame, erase at most 8 enemies using NIRVANAfillT. Move these enemies if you want. Use at most 8 sprites to redraw enemies at new position.

    Keep repeating this logic every 2 frames. You will be able to move heroes and enemies at 25 frames/sec, if you want.

    Makes sense?
    Creator of ZXDB, BIFROST/NIRVANA, ZX7/RCS, etc. I don't frequent this forum anymore, please look for me elsewhere.
  • Einar

    The blink effect is on purpose triggered when over a background. I was planning to leave as an option for final version.

    It's very cool I discovered as a mistake, actually by sharing the sprite on both players.

    Is created by drawing with the same sprite number the player tile, Nirvana sync and then the background tile. I need to fix it because it works well for even columns but not odd cols because in that case I should have to draw the left and right backgrounds.

    What I will love to have is to have in Nirvana support for 8x8 tiles. For example by diving a btile on 4 corners areas 0,1,2,3, and calling the functions with tile col lin and corner. To use as objects in the game, or repaint backgrounds for example.



  • cgonzalez wrote: »
    The blink effect is on purpose triggered when over a background. I was planning to leave as an option for final version.

    I had a different impression, but if you like the blinking, the decision is all yours! :)
    cgonzalez wrote: »
    Is created by drawing with the same sprite number the player tile, Nirvana sync and then the background tile. I need to fix it because it works well for even columns but not odd cols because in that case I should have to draw the left and right backgrounds.

    It also doesn't work well if you stop at the pipe, then press JUMP.
    cgonzalez wrote: »
    What I will love to have is to have in Nirvana support for 8x8 tiles. For example by diving a btile on 4 corners areas 0,1,2,3, and calling the functions with tile col lin and corner. To use as objects in the game, or repaint backgrounds for example.

    Unfortunately I will be too busy this weekend, but I will code this routine for you next week!
    Creator of ZXDB, BIFROST/NIRVANA, ZX7/RCS, etc. I don't frequent this forum anymore, please look for me elsewhere.
  • I looks great and its safe to say that we are all impressed but why haven't you called it Mario Bros? Its an exact copy of the original and infringes copyright laws anyway so calling it by another name would not change a thing legally. Best to call it by its original name as they wont care anyway.
  • This Mario sprite flickering in front of pipes, really doesn't look good and I hope you will reconsider Einar's suggestions to fix it.
    Other than that, it looks great.
    btw, Is this the first game with Nirvana+ engine or there's some more in the making?
  • Pegaz wrote: »
    Is this the first game with Nirvana+ engine or there's some more in the making?

    There are another two NIRVANA+ games under development:

    http://faqwiki.zxnet.co.uk/wiki/NIRVANA+_Engine
    Creator of ZXDB, BIFROST/NIRVANA, ZX7/RCS, etc. I don't frequent this forum anymore, please look for me elsewhere.
  • cgonzalez wrote: »
    Hi People.

    I wanna share with you a game that I'm working on, since a month or so...

    kOoPGzU.png

    https://drive.google.com/file/d/0Bw3Nat5zkP-HbHF0SGFVR2JhVUk/view?usp=sharing

    It's Called Pietro Bros, is about an Italian plumber, not related to Mario.

    I love to have your opinions and also I need the help of an expert on AY to put some music on it.

    Regards


    It looks 100% faithful to the original but please call it Mario Bros. :) Calling it another name doesn't protect it legally as its an exact carbon copy of the original Nintendo game. Donkey Kong was recently released for the Intellivision (complete with packaging) and Nintendo wasn't bothered at all.

  • There are another two NIRVANA+ games under development:

    http://faqwiki.zxnet.co.uk/wiki/NIRVANA+_Engine

    Snake Escape looks very promisiing, I hope the final version will be available soon.
    Bomberman is also a nice game, but I prefer this Mario (Pietro) Bross and I'd like to be finished first.
  • edited June 2016
    cgonzalez wrote: »
    The blink effect is on purpose triggered when over a background. I was planning to leave as an option for final version.

    I had a different impression, but if you like the blinking, the decision is all yours! :)
    cgonzalez wrote: »
    Is created by drawing with the same sprite number the player tile, Nirvana sync and then the background tile. I need to fix it because it works well for even columns but not odd cols because in that case I should have to draw the left and right backgrounds.

    It also doesn't work well if you stop at the pipe, then press JUMP.
    cgonzalez wrote: »
    What I will love to have is to have in Nirvana support for 8x8 tiles. For example by diving a btile on 4 corners areas 0,1,2,3, and calling the functions with tile col lin and corner. To use as objects in the game, or repaint backgrounds for example.

    Unfortunately I will be too busy this weekend, but I will code this routine for you next week!

    Einar,Thanks for your engine that's the source of all of these Speccy miracles!

    It would be great to support 8x8 tiles, some nice ideas comes to my mind, like a manic miner clone, by using the Pietro framework!

    Yeah background are not working on jumps I know im only painting 2 tiles, instead of 3 as you told me.


    And for the other people the game will be called Pietro, I like it that way. Also by coincidence Pietro even exists http://www.mariowiki.com/Pietro so is my tribute to this forgotten character.


    Also there's a 3 demo of my own, but is far from be finished.

    Was older even that Pietro, it's Super Pietro and on hold

    https://drive.google.com/file/d/0Bw3Nat5zkP-HODFXX3pqdUNhQlE/view?usp=sharing

    Regards

    Post edited by cgonzalez on
  • It looks great!!!
  • Pegaz wrote: »
    Snake Escape looks very promisiing, I hope the final version will be available soon.

    It will :)
    Creator of ZXDB, BIFROST/NIRVANA, ZX7/RCS, etc. I don't frequent this forum anymore, please look for me elsewhere.
  • cgonzalez wrote: »
    Einar,Thanks for your engine that's the source of all of these Speccy miracles!

    You are welcome! Thank you for using it!!!
    cgonzalez wrote: »
    And for the other people the game will be called Pietro, I like it that way.

    I agree.
    cgonzalez wrote: »
    Was older even that Pietro, it's Super Pietro and on hold

    This older title also looks promising, but I strongly recommend to remove scrolling and change it to flip-screen instead.

    The scrolling effect will never work properly. When using multicolor, there's not enough CPU left for a proper scrolling, unless you use a multicolor engine created specifically to support it.
    Creator of ZXDB, BIFROST/NIRVANA, ZX7/RCS, etc. I don't frequent this forum anymore, please look for me elsewhere.
  • still get the odd flicker on a 128+/+2/+2a/+2b/+3 usually from within the first couple of seconds then nothing for about a minute of so

    on a 48k there was a lot more (almost as much as the original demo) and 'Mario' seems to go to the right on his own, even taking into consideration the inertia the first time I loaded it

    I reloaded the game on the 48k and the second time and it was much more stable, the flicker was the same as I described for the 128
  • edited June 2016
    It's weird, I'm checking on Spectaculator (I don't own a real Speccy PAL, only NTSC ones) and I don't see so much flickering.

    Yea sometimes Players get eternally sliding, I will fix it.

    Here's a little update with proper fonts and On screen texts.
    PeCWDEE.png

    https://drive.google.com/file/d/0Bw3Nat5zkP-HTHVVSUphZTJCNmM/view?usp=sharing

    Regards



    Post edited by cgonzalez on
    Thanked by 1abelenki
  • looks very close to original arcade game now. good job!
    MAME Stuff | ZX Spectrum favorites | Bubble Bobble Series chart / wiki | PC configuration
  • Proper nifty.

    Please finish it!
  • edited June 2016
    I'm triying but I'm running out of memory...

    @Einar Saukas Do you know why z88dk/Nirvana have to be started on address 32768?

    If try to change it, to a lower area, the speccy resets, the debuger on ZXSPIN shows free memory from 24000 to up...

    zcc.exe +zx -vn -lm -lndos -lnirvana+ -create-app -O3 pietro.c -opietro.bin
    appmake +zx --binfile pietro.bin --output pietro_bin.tap --org 32768 --noloader --blockname pietro_bin
    copy /b loader.tap + pietro_bin.tap pietro_release.tap

    Here's my BASIC Loader:

    10 BORDER 0:PAPER 0
    20 CLEAR VAL "32768"
    30 POKE 23739,111
    40 LOAD "pietro_scr" SCREEN$
    50 LOAD "pietro_fon" CODE
    60 LOAD "nirvanaeng" CODE
    70 LOAD "pietro_bin" CODE
    80 RANDOMIZE USR VAL "32769"


    Regards
    Post edited by cgonzalez on
  • edited June 2016
    cgonzalez wrote: »
    Do you know why z88dk/Nirvana have to be started on address 32768?

    It doesn't -- that's just the default address for compiles because that's the first byte of uncontended ram. You have to tell z88dk to compile to a different address if you want the binary to be generated earlier.
    zcc.exe +zx -vn -lm -lndos -lnirvana+ -create-app -O3 pietro.c -opietro.bin
    appmake +zx --binfile pietro.bin --output pietro_bin.tap --org 32768 --noloader --blockname pietro_bin
    copy /b loader.tap + pietro_bin.tap pietro_release.tap
    
    10 BORDER 0:PAPER 0
    20 CLEAR VAL "32768"
    30 POKE 23739,111
    40 LOAD "pietro_scr" SCREEN$
    50 LOAD "pietro_fon" CODE
    60 LOAD "nirvanaeng" CODE
    70 LOAD "pietro_bin" CODE
    80 RANDOMIZE USR VAL "32769"
    

    With the classic c library (which you are using) you can change the ORG by adding "-zorg=ADDRESS" on the compile line. Here's an example moving the compile address to 28000:
    zcc.exe +zx -vn -lm -lndos -lnirvana+ -zorg=28000 -create-app -O3 pietro.c -opietro.bin
    appmake +zx --binfile pietro.bin --output pietro_bin.tap --org 28000 --noloader --blockname pietro_bin
    copy /b loader.tap + pietro_bin.tap pietro_release.tap
    
    10 BORDER 0:PAPER 0
    20 CLEAR VAL "28000"
    30 POKE 23739,111
    40 LOAD "pietro_scr" SCREEN$
    50 LOAD "pietro_fon" CODE
    60 LOAD "nirvanaeng" CODE
    70 LOAD "pietro_bin" CODE
    80 RANDOMIZE USR VAL "28000"
    

    You can't quite go as low as you want because your basic loader still has to function. You can try experimenting with how low you can go by CLEARing to lower values until you get a ramtop no good error.

    Once the program has started, you can reclaim the area occupied by basic by placing data down there. This is much easier to do with the new c library btw.

    The "-lm" you have in your compile line is for linking against the floating point library. You should be able to get rid of that. If you get an error after getting rid of it, that's because the compiler has decided you need the big version of printf. You probably don't so if that happens, you should also tell the compiler to use a smaller printf (ask how if you have to!)
    Post edited by Alcoholics Anonymous on
  • cgonzalez wrote: »
    10 BORDER 0:PAPER 0
    20 CLEAR VAL "32768"
    30 POKE 23739,111
    40 LOAD "pietro_scr" SCREEN$
    50 LOAD "pietro_fon" CODE
    60 LOAD "nirvanaeng" CODE
    70 LOAD "pietro_bin" CODE
    80 RANDOMIZE USR VAL "32769"

    It should be CLEAR N-1 and RANDOMIZE USR N.

    Therefore the correct is CLEAR VAL "32767" and RANDOMIZE USR VAL "32768" in your case.
    Creator of ZXDB, BIFROST/NIRVANA, ZX7/RCS, etc. I don't frequent this forum anymore, please look for me elsewhere.
  • 10 BORDER 0:PAPER 0
    20 CLEAR VAL "28000"
    30 POKE 23739,111
    40 LOAD "pietro_scr" SCREEN$
    50 LOAD "pietro_fon" CODE
    60 LOAD "nirvanaeng" CODE
    70 LOAD "pietro_bin" CODE
    80 RANDOMIZE USR VAL "28000"
    

    It should be CLEAR VAL "27999"
    Creator of ZXDB, BIFROST/NIRVANA, ZX7/RCS, etc. I don't frequent this forum anymore, please look for me elsewhere.
  • cgonzalez wrote: »
    @Einar Saukas Do you know why z88dk/Nirvana have to be started on address 32768?

    As AA already answered, a program using NIRVANA can start at whatever address you want. You just need to recompile the program accordingly.

    Just remember that the parts of your program located below 32768 will be slowed down by memory contention. Although NIRVANA sprites are immune to memory contention, so if you mostly use sprites to display tiles on screen, you shouldn't notice too much difference in practice.
    Creator of ZXDB, BIFROST/NIRVANA, ZX7/RCS, etc. I don't frequent this forum anymore, please look for me elsewhere.
  • edited June 2016
    Thank You Alcoholics! I owe you a beer! Also Einar!

    We got 7,256 Kb to keep putting more stuff!


    darMPw2.png
    Post edited by cgonzalez on
  • You are welcome!

    You will find more tips to reduce program size here:

    http://www.z88dk.org/forum/viewtopic.php?id=9159

    You will have to choose optimizations you can use, not all of them apply in your case.
    Creator of ZXDB, BIFROST/NIRVANA, ZX7/RCS, etc. I don't frequent this forum anymore, please look for me elsewhere.
Sign In or Register to comment.