Jump to content

nanochess

Members
  • Content Count

    6,415
  • Joined

  • Last visited

  • Days Won

    19

Posts posted by nanochess


  1. 3 hours ago, cmadruga said:

    Currently doing the final touches on Pandora before the final submission.

    This latest version should be the one reviewed by the judges instead of the one submitted by the original deadline.

     

    No changes made to Infiltrator or Eggerland since the deadline changed, so the files already submitted are still good.

     

    Question to contest organizers: are you planning on sending a confirmation email for each entry received? I'm thinking that would be good.

     

    I'll ask about this because other person is the one receiving all the entries.

     


  2. 1 minute ago, DZ-Jay said:

     

    Ah, so writing doesn't occur per sector, I see.  I thought you had to read/write/erase in blocks of 8 rows.  Re-reading the documentation I see that erase is per sector, but read and write is per row.

     

    Implied in all that is that a "FLASH row" can hold an array of 96 words, is this true?

     

    That's right :)

     


  3. 2 minutes ago, DZ-Jay said:

    @nanochess,

     

    I though of that, but didn't really know why it was split to being with.  Is there any reason why you would ever call FLASH WRITE without first calling FLASH ERASE?  If not, why not build it into the call to FLASH WRITE?

     

    This is because my ahead thinking: FLASH ERASE erases eight rows, what if you want to write fast and write each row in sequence until filling the eight rows? Better to leave the choice for the tech-savvy programmer.

     

     


  4. DZ-Jay is right with the structure of the code. Furthermore I would do the variable saving code like this:

     

        DIM #row(96)
        FLASH INIT
        
        ' ... other code ...
    
    write_row: PROCEDURE
        #row(0)=levelnumber
        #row(1)=lemonnumber
        #row(2)=health
        FLASH ERASE FLASH.FIRST
        FLASH WRITE FLASH.FIRST,VARPTR #row(0)
        END
        
    read_row: PROCEDURE
        FLASH READ FLASH.FIRST,VARPTR #row(0)
    
        levelnumber = #row(0)
        lemonnumber = #row(1)
        health = #row(2) 
        END

  5. 7 minutes ago, Old Timey Retro Gamer said:

    Thanks @carlsson!  It is definitely different.  This is bringing back a lot of memories using basic.  I don't think I've use FOR / NEXT since 1987!  I know that I'll get it the hang of it. As I am going through the book, I try to make a comment on each statement for my reference.

    Glad you could solve it. I typically tend to have more time the Sunday, but these weekends I'm passing more time with my daughter so I had time until today to read this thread!!!

     

     

     

    • Like 2

  6. 18 hours ago, Aking said:

    Not cool profiting selling carts of a free original game if you don't post openly the digital rom first.

    Your comment is non-sense, please stop.

     

    Every year I choose a game, typically my own, and release it for free just to return something to the community.

     

    2 hours ago, Aking said:

    was refering to Uwol for example, it is free on all platforms but coleco , and not improved from the original FREE game

     

    2 hours ago, Aking said:

    A few Improvements here and there.

    It does not make that behavior less questionable.

     

    You appear to think that everyone is tech-savvy enough to have an emulator or have a Flash cartridge, but in fact most people is happy of having a cartridge to play directly in their console.

     

    Following your logic, I shouldn't have even ported the game, as it is available the same in Spectrum, and everyone should run to download a Spectrum emulator and play the game. I've a thick skin, people like you have made programers depressed, and they simply quit the community without saying a word. A piece of advice: cease to do that, you hurt the community.

     

    In other news, I don't have received any response from the original programmers, so I don't foresee a cartridge release.

     

    • Like 1
    • Thanks 1
    • Sad 1

  7. 1 hour ago, Taylor the Gaming Guy said:

    https://drive.google.com/file/d/1SrZzBY0tLTgjkRLvJAnkb5x9YyMsXG1T/view?usp=sharing

    This is a video of the SCC version of the game.

    And this is on an WebMSX, I used one of my new ideas, C-BIOS installation.

    So this is what MSX colors look like for real on an MSX2 or up.

    I've an MSX2 and the colors should look almost the same as MSX, so the purple color isn't right. I'll put up a picture once I load it on my Flash cartridge.

     


  8. On 2/19/2021 at 11:43 AM, tanuki said:

    Hello Nanochess and everybody,

    Could you be interested by a physical version ?

    I really like the graphic style, it deserves a box version, don't you think?

    Although I ported it, I would need to ask for permission to the original authors The Mojon Twins before saying anything.


  9. 1 hour ago, Nicam_Shilova said:

    Nice game, however it's normal when a bat dive over you, you're get stucked into underground ? I wonder if I found a glitch...

    It's right. You can jump out of it, and in thinner floors it makes you to drop out of screen.


  10. Hi everyone!

     

    Five years ago I saw this game made for Spectrum by The Mojon Twins, and I was so impressed that I asked for permission to port it.

     

    Well, life got in between, and finally Yesterday I started porting it, and here is the fully functional game freely available (as the original was also).

     

    Not only for Colecovision, but also for MSX.

     

    Enjoy it!

     

     

     

    image100.png

    image101.png

    image103.png

    image104.png

    zombie_calavera_msx_colecovision.zip

    • Like 22
    • Thanks 3

  11. I see.

     

    You can optimize your code this way (notice the nesting):

     

    IF EXPR0 THEN

    if expr1 then if expr5 then statement01:statement02 else statement03
    if expr2 then if expr6 then statement04:statement05 else statement06
    if expr3 then if expr7 then statement07:statement08 else statement09
    if expr4 then if expr8 then statement10:statement11 else statement12

    END IF

     

    I understand when you say more variations, it means you add a different speed like this (and replicate code):

     

    IF speed = 0 THEN

        enemy_x = enemy_x + 1

        enemy_y = enemy_y + 1

    ELSEIF speed = 1 THEN

        enemy_x = enemy_x + 2

        enemy_y = enemy_y + 2

    END IF

     

    This can be optimized this way:

     

    enemy_x = enemy_x + speed_table(speed)

    enemy_y = enemy_y + speed_table(speed)

     

    '  In another part for data

    speed_table: DATA 1,2

     

     

    • Like 5

  12. 13 hours ago, fsuinnc said:

    OK, I have the #backtab working. (not that it was difficult). However, I don't understand how to update just one invader each video frame (as Oscar referenced).

    I mean I'm guessing this is related to the "On Frame" and 60 frames per second (NTSC). 

    Currently I have a "For A = 0 to 35" loop and for each of the 36 aliens it gets the position, color and direction and anim frame, updates the screen, and then updates positions and checks to see if they have reached the end of row, etc. This takes a lot of time and bogs everything down.  How do I set things up so that the processing is in sync (as much as it can be) with the frames? I know that seems like a pretty basic question but I think (as an old Top down business programmer) I just have a problem visualizing how the program is running along and then 60 times a second it jumps from where ever it is to a particular procedure and then comes back and proceeds where it left off. If that is what happens then how do I keep track of where I am?

     

     

     

    You don't need to use ON FRAME to keep track of which invader to move.

     

    The basic pseudocode for this game looks like this:

     

    game_loop:

              GOSUB update_sprites

              WAIT

               GOSUB move_invader

               GOSUB move_invader_bullet

               GOSUB move_player_bullet

               GOSUB move_player

              GOTO game_loop

     

    Now for the move_invader procedure it is a global variable next_invader containing the number of the next invader to move, and you need to keep an array for all the invaders telling if the invaders is alive or dead.

     

    For example:

     

           c = 0

           DO

                next_invader = next_invader + 1

                c = c + 1

           LOOP WHILE invader_alive(next_invader) = 0 AND c < 36

     

    It increases the next_invader variable until an alive invader is found, or stops if the invaders array is empty (all killed then c = 36)

     

    Now because all invaders are aligned in a rectangle, you can get the x, y coordinate of the invader based on the top left of the rectangle.

     

             x = rectangle_x + next_invader % 6 * 2     ' Suppose the invaders are spaced by 2 cards

             y = rectangle_y + next_invader / 6 * 1     ' Suppose the invaders are one for each row.

     

    The rectangle_x and rectangle_y position is moved when all invaders have been displaced in the same direction. The direction changes when one invaders touches the side of the screen, but the change shouldn't be done until all invaders are moved (otherwise the invaders array would disalign).

     

    Use a notebook to illustrate the conditions that are required by the invaders to move, and keep track of variables. It will make it easier to implement.

     

     

     

     


  13. My approach for fractional positioning in IntyBASIC is a variant of this.

     

    Supposing you want to preserve values from 0.0 to 9.9 on an integer variable. How you do this? Using a multiplication by 10.

     

    So for example:

     

       a = 5 * 10 + 4     ' 5 * 10 + 4 = 5.4

       b = 2 * 10 + 3     ' 2 * 10 + 3 = 2.3

       c = a + b ' 54 + 23 = 77

        PRINT <>c/10,".",c%10    ' Separate digit and fraction

     

    And for the pixel positioning we use only the digit part (the / 10 result value).

     

    BUT WE HAVE A PROBLEM THERE!!! The CP1610 processor is not so good at processing multiplications and division.

     

    So we replace 10 by 256, because multiplication and division by 256 is done with SWAP/AND instructions (only two instructions). This means also that we need a 16-bit variable to keep the position, this way using #x and #y.

     

    Now to set a ball in the center of the screen.

     

    #x = 80 * 256

    #y = 48 * 256

    SPRITE 0, $0308 + #x / 256, $0108 + #y / 256, $002f * 8 + 7     ' Draw a 'O' letter in white.

     

    To get a movement on the screen we can add further two variables:

     

    #sx = 0

    #sy = 256

     

    game_loop:

    WAIT

    SPRITE 0, $0308 + #x / 256, $0108 + #y / 256, $002f * 8 + 7     ' Draw a 'O' letter in white.

    IF #y >= 88 * 256 THEN    ' Touches floor

        IF #sy > 0 THEN    ' Going down
            #sy = -(#sy / 2)    ' Reboots with half acceleration
        ELSE
            #sy = 0
        END IF
    END IF

    #x = #x + #sx

    #y = #y + #sy

     

    IF #sy > 0 THEN

        #sy = #sy + 32     ' Gravity acceleration

    ELSE

        #sy = #sy + 16     ' Reduce ascend

    END IF

    GOTO game_loop

     

    And then it fails because a rounding error but I'm too lazy to correct it for tonight :P

     

    • Thanks 1

  14. The last line of your working CFG file said $559a - $64fb = $f000 this means there are $0f62 words inside the $f000 segment, so you have only 158 words free there. Adding almost anything would make your program to crash.

     

    But your first segment $5000 only uses $059a words, and you don't use the $6000 segment. So you can move your ASM ORG $A000 line further ahead on your code, so you see the $5000 filled completely and automatically starts using the $6000 segment.

    • Like 1

  15. There are a few principles to optimize IntyBASIC programs:

     

    * If a routine is repeated several times in your program, it qualifies to become a subroutine, just check for the common parameter.

    * If a semi-long expression is repeated several times in your program, consider replacing it with a subroutine or a DEF FN.

    * If you have several IF doing comparison with constants, replace with ON GOTO or ON GOSUB

    * if you have tons of PRINT with strings (for example a text adventure), start considering using DATA PACKED and a printing subroutine.

     

    • Like 1

  16. 2 hours ago, fsuinnc said:

    So, I'm basically trying to make a space armada kind of game.  I know it's not groundbreaking but seemed fun.  I really like the discussion here, and like the Sine curve program, but even with the code I don't understand it.  (I haven't looked very long and I think I get what's it's doing but really don't get it in detail). 

     

    but, for my space conqueror game the bad guys are scrolling across the screen and I'm pretty sure they are part of the background but I am trouble registering my bullets hitting the background. There is literally nothing on the screen that is not color 0 (black) except the bad guys but if I check for COL1 = HIT_BACKGROUND it registers a hit as soon as I fire. If I make sure the Y coordinate such that the bullet has cleared the gun it still seems to hit the background by hitting nothing. SC_vid2.gif.3fbfbec868051c0b9db56de5242bb227.gif

     

     

     

     

     

     

     

     

     

    I'm stealing some of the code from Oscar's book if the gun looks familiar it's from the Raiders program. but even with the book I don't understand "IF COL1 AND $00FC THEN".  I know how to convert hex to decimal just not always sure where all the parts come from. 


    also, is there a dummies guide to PEEK and POKE somewhere?  Is Poke or back tab faster/better than Print because I'm scrolling 36 spaceships using print statements.

     

    Your sprite for the bullet should be deactivated by using (for example) SPRITE 1,0 (supposing your bullet is the sprite 1)

     

    If you are using any idiom where the first parameter contains $0300, it means it is checked for collisions, so when you enable it, it already made collision with its current X/Y position.

     

    Now the syntax for checking collision against background should be IF COL1 AND $0100 THEN because the background is the bit 8 of each collisiion. Remember each sprite has its own collision register COL0-COL7 and can check for collision against each other sprite. I've repeated this table before:

     

    $0001 = Against sprite 0

    $0002 = Against sprite 1

    $0004 = Against sprite 2

    $0008 = Against sprite 3

    $0010 = Against sprite 4

    $0020 = Against sprite 5

    $0040 = Against sprite 6

    $0080 = Against sprite 7

    $0100 = Against background (any pixel set to 1)

     

    To get combinations you add up these values, so $00fc means collision against sprites 2-7.

     

    PEEK and POKE can be used to access the screen, and it is the same speed as using #backtab for read and write, BUT IT IS MORE DIFFICULT TO READ. Personally I always use #backtab(c) = #d to write the screen, and #d = #backtab(c) to read from the screen.

     

    PRINT on the other hand preserves the cursor position, so it is slower and very noticeable when updating big parts of the screen.

     

    IMHO, I would use pre-shifted space invaders in 2px steps (7 GRAM for each one), and if you give a look to the original space invaders, only one invader is updated for each video frame!!!

     

    Ok, I got lenghty!!!  😱


  17. 22 hours ago, PuzZLeR said:

     

    I would think it the other way around, that the pandemic is delaying (or extending?) things. Nevertheless, I'm sorry to hear this situation over there. It's bad over here too in Toronto. Be safe my friend.

     

    I will try and submit something, but it doesn't look too good for me. Now my program isn't compiling any more. I will post a question in the Intellivision Programming forum very soon. Hopefully you, and some other Great Minds can come to my rescue very soon.

     

    2 hours ago, Rinka said:

     

    thank u for the welcome, im happy to be here, and thank u for intybasic, the book, and all that u have done for programming and retro gaming 🙂👍

     

    i wont be submitting anything this contest. im just not ready. but will still use intybasic in the future

     

    hmmmmm... last try here... nobody has confirmed a female participant before... last try again: if u extend the contest just to 2 weeks u will get your 1st female participant

     

    lol - how is that for a valentines day special historic moment for the contest! 🥰🤗

     

    Just knew a judge broke his wrist and had surgery, so I don't want to risk his recovery.

     

    I'm delaying the contest deadline by one month.

     

    P.S: Of course this doesn't mean that future contests will also have this incredible extensible deadline. 😉

     

     

    • Like 3
×
×
  • Create New...