Jump to content

NRV

Members
  • Posts

    444
  • Joined

  • Last visited

  • Days Won

    2

Posts posted by NRV

  1. Yes, I disabled them (commented the code) for later versions, because they are big pre-compiled sprites, so they took too much memory.

    But when all is running from a 1MB cartridge, then I can reactivate them and they should just work.

    I think I have said this before, but.. at 40 fps both barrels in screen took like a 10fps hit, so the current engine should run near 15 or more fps, with both of them.

    Obviously there is more work to be done, apart from the rendering.
    Basically calculating when to render an object, in what direction (camera angle vs object angle), at what zoom level (distance to the camera), doing the clipping against the walls (comparing "z" values).
    But if the ideas I have in mind work well enough, then this extra cost should be small compared to the rendering one.

     

    • Like 4
  2. It makes me think also in Adventure 3.. if Adventure were a platform game :)

     

     

    Looks and plays totally cool. As heaven said, the physics are really great. Keep the Player's look, name it "Super Mario Blocks" and release it :-)

     

    Do you know MADS' ".PROC/ENDP" statement? It allows for very nicely defined local labels, so you don't need the prefixes:

     

    .proc CheckCreateEnemyMissile

    ; check for a free missile index
    ...
    rts
    .endp

     

    Still you can jump into where you need with "CheckCreateEnemyMissile.found_one_free"

     

    Yes! .. in fact I learned it from you, when looking at your example code to create a 1MB cartridge, directly from a mads source.

    I used .proc a lot when moving the projectM presentation to use a cartridge, but this one here is very old code.

    Another thing very useful when using .proc, was the option to set a specific assembly address, for when you need to move your code from the cartridge to normal ram.

     

     

    • Like 2
  3. Hi, for the people that is still interested in this.. x)
    As you know, it has not advanced much these last years, but recently I had some time to look at it again, and did some actualizations.
    I started moving the presentation code to use a 1MB cartridge. A big step for me, because I never did it before.. thanks to JaC for his code example, in some part of this forum :).

    Now it would be easier to move the rest of the code and add more things.

    Also I used another of the great musics from Miker:



    I did some small optimizations to the main code, recovered the rotation pivot in the camera (smoother rotations) and changed the camera fov (field of view), so the walls look "bigger" and more detailed now.

    With this I also added some graphic "quirks" that I need to fix, mostly when you are too close to a wall.

    I don't know if you can see all that in the video, but I think it looks better:



    There is another video in my channel, but is from the first version of the PM demo (the render engine test with the barrels).

    Regards!
    • Like 28
  4. Hi, this a platform game engine that I did mostly in 2010. Recently I added the enemy logic, the laser barriers animation and some other details.
    I hope people can find it useful to look at the code, or maybe use it as the basis for a game.

    What I implemented is a system a little more complex than what you normally see in the A8. Most movements have a different speed and acceleration defined, and some of these values use fixed point math. For example you can define the speed for walking, jumping, falling, swimming, climbing, and the accelerations used to reach those values. Also you can hold the jump input for higher jumps and use some air control.
    Right now you shoot with the button and jump moving the joystick up. I don't like this much, but I wanted to test having both options for this prototype.
    I normally play in a pc using the keyboard, so maybe the values are a little too sensitive for a real joystick.

    There is a PAL version, but is a little different than the NTSC one. I did translate the speed and acceleration values, but it seems applying them 50 times per second has not the same accumulated effect, that at 60 fps (it feels more "floaty"). Also, there is a precision problem trying to translate the smaller values (should use more bytes).

    Here, a video:



    The engine is pretty efficient, most of the time in the frame is free as you can see here:

    post-11240-0-03247800-1503898642_thumb.png

    For example, the enemy logic only updates one enemy per frame, looking if the player is near and then shooting in the correct direction (if the cooldown and the number of enemy missiles allows it).

    Other details:
    - Most collisions tests are char based and assume a player with the current size, but they can be changed for bigger players. Only the collision between the player (P0) and any danger, use the hardware registers.
    - The player logic use a system of states to know how to move and what collisions to check (over platform, jumping, falling, climbing and in water). The color of the player changes according to the state and also to what he hits, but this was for debugging.
    - The camera speed is based on the distance to the player, so is smoothed out a little.
    - Most objects coordinates in the level use 2 bytes and are translated to screen coordinates before rendering. With a moving camera you need to update your player/missile graphics, not only when they move, but also when the camera does it.

    The level was done in Envision PC (the "reborn" version) and is easy to modify, but there is not much error checking, so beware. Code was done in mads and tested in Altirra, as always.

    The condition to "win" this demo is collecting all coins and destroying all enemies (the clock stops then). My record for this is 1:16.1 in NTSC, but I died once :)

    open_plat.zip

    • Like 30
  5. Let's say you implement a game in graphic mode 7, with a window of 128 x 64 pixels (just throwing numbers).

    Every line uses 32 bytes of memory (narrow mode playfield), and lets say your video memory starts at $8000.

    Using unrolled code you could have 8 methods like this:

     

    sta $8000,x

    sta $8001,x

    sta $8002,x

    ...

    sta $801f,x

    rts

     

    (97 bytes x8 = 776 bytes for all methods)

     

    This one covers the case for the first 8 lines, if you want to write in line 0 you set x = 0, for line 1 you set x = $20, for line 8 you call the next method with x = 0, and so on.

    For filling one line then you basically need to set the accumulator with your "color", set x with the line offset, jump to the correct "sta", and write a "rts" at the exit point (and recover the original "sta" at the end).

    Also this is for filling 4 pixels at a time, you still need to set correctly the "borders", so probably this is better used for "lines" larger than a fixed value (if the setup is to costly).

    But your throughput would be something like 1.25 machine cycle per pixel.

     

    .. or you could remove the use of "x", write the methods for all lines (using 776x8 = 6208 bytes), and get 1 machine cycle per pixel..

    • Like 1
  6. The performance analyzer is really nice, thanks!

     

    post-11240-0-61727600-1502403802_thumb.png

     

    The slightly grey area is something like the vblank?

     

    It would be nice, at some point, to be able to use the source listing (in mads) to set colors for specific methods and maybe have some kind of visual marker for when the logic frame really ends (or could be done automatically, but it seems there are many methods to change to the next frame, like changing the DL address, changing the DL jump or LMS instructions..).

    But probably you have something better in mind.

  7. (offtopic)

     

    I have not checked the site in the last years, could be more updates.. (he was trying to implement the Galaga code in C).

    http://pushpopmov.blogspot.cl/2012/08/galaga-z80-disassembly-uploaded.html

     

    General info:

    http://galaga.info/

     

    Some of the interesting links seems to be dead, like this one.. maybe in the wayback machine.

    http://www.computerarcheology.com/wiki/wiki/Arcade/Galaga

     

    oh.. but this works, nice (code with comments.. also check the info about the sound of Time Pilot :) )

    http://www.computerarcheology.com/Arcade/Galaga/

     

    more code info:

    http://donhodges.com/galaga_stage_256_fix.htm

     

    I did have a backup of some source..

     

    z80.zip

    • Like 1
  8. Nice! .. so basically IRQ's are the "future"? x)

     

    Probably I'm going to look at your source to see if I was doing it right all this time..

     

    Edit:

    Yep it looks similar. From what I see you have two irq's (IRQ and IRQ2), for odd and even frames, one dli (dli0) at the start of the frame (I suppose), to init stimer and irqen, and one vbi.

    Also you use the same trick of one irq every two scanlines (this seems to be the fastest way, but needs to burn some cycles in the middle..is that what you do with "#cycle #13"? .. is that Mads?).

    The only differences with my code is that I never use a vbi (I deactivate them and just put a dli there, if I need one at the bottom of the screen), to simplify the NMI handler.

    Also I only set stimer one time, at the start of a program (not every frame), but my horizontal sync looks more complex because I need to burn some cycles (after calling two "sta wsync" in a row), so the first irq is always called at the same horizontal position (in the scan line).

  9. I forgot to mention that, for the next step, I need to reorder the code and start using the banks in the 8Mbit maxflash cart.

    But I don't know much about cartridges in general.

    My idea would be (if possible) to generate an Altirra maxflash cartridge, directly from Mads.

    For that I need to be able to assemble different code with the same address (the 8k bank/window), and also generate any kind of header and checksum info that is necessary.

     

    In my case the first thing I do is deactivating the operative system and using all the memory, so no need to follow the OS guidelines I suppose.

    So anyone that can put the simplest code to do this (or a link to the info), would be of great help.

    I believe it should be possible, but normally I have seen people using external tools to generate the final cartridge code.

     

     

    Related pictures:

     

    http://www.indiedb.com/games/starshock

     

    Related videos:

     

     

    Related game: (to farm for ideas x) )

     

    http://phoboslab.org/xibalba/

     

     

    Regards.

    • Like 1
  10. Warning, long post ahead :)

     

    gr.8 ?

    That video looks pretty smooth, inclusive when reaching one digit frame rates. I suppose that's and advantage of the resolution and being monochrome.

    I think I read something about the techniques he used (in a link from FormatWars maybe?). Doing some kind of eor filler, with raycasting only for the limits between tiles, but I could be wrong.

    Anyway, doesn't look like I can reuse those ideas in ProjectM, maybe the raycasting one, but I already have one good optimization to implement there (that involves doing it with a binary search, to at least interpolate the final height of a row in between).

     

     

    Same bandwidth though less CPU loss since the timer IRQs wouldn't be needed for mode change.

    But doing higher resolution would mean the raycast phase would slow it down a whole lot more.

     

    IMO the 256 colour mode looks way better. More colour at the price of resolution usually does.

    Yep, I also prefer the 256 color mode, and wouldn't change it a this point. What I miss right now is the true two pixel per byte resolution in GTIA. Probably I will try to do it just in GTIA9 in that case and just reduce the number of rows.

    I wouldn't like to use any external hardware acceleration for this, but I find it interesting that just doubling the cpu MHz in Altirra (65C816, 3.58Mhz), almost get the frame rate to 50. I don't know if the IRQ's are taking time in that case (because they look broken), but is a good scaling.

     

     

    An interesting thing is that there is no visible distance limit in the raycasting. I'd imagine that for performance reasons the limit would be to check max 4-5 intersections with cells.

    Yes, that's another good thing in that demo. I don't have areas that "open" in ProjectM, precisely to control that.

    You could set the limit as an option in a menu, so the user decides, but there is no point in searching for a collision beyond the minimum height of a wall.

    Good thing if you have a game with limited visibility, like a dungeon, where you only see black/darkness beyond a certain distance (or some kind of fog.. GTIA9 again, hint, hint).

     

     

    Btw, how did you plan to implement enemies? I've played with resolution used in Project M and it was very hard to show reasonable looking enemies.

    From the graphic side I would choose doing them just in the same mode, like the barrels in the first demo:

    http://www.atariage.com/forums/topic/148697-project-m-stage-1/

     

    Direct conversion:

    post-11240-0-96217500-1431291571_thumb.png

    Hand made, first version:

    post-11240-0-07429700-1431291667_thumb.png

    Hand made, final version:

    post-11240-0-41120500-1431291676_thumb.png

     

    I did some graphics tests using Player/Missiles.. original one:

    post-11240-0-72480400-1431291496.png

    My version with a couple of line color changes:

    post-11240-0-83354900-1431291506.png

    But it takes too much time for me to do something like this (I'm not an artist x) ).

    I would prefer to use the P/M for small projectiles and shot effects, maybe for the main weapon or other overlaping static effects.

     

    The two barrels in the first demo (precompiled sprites), have a load of like 5fps in a 20fps system, approx. So if I were to put them in the current ProjectM, I would get frame rates between 15 and 20 probably.

     

    From other thread:

     

    If this is the case --- then it seems the only way to get over it, is to have hardware assistance - taking it away from standard A8 hardware software... not desirable but maybe the only possible solution for a good outcome...

    I have already decided in using the 8Mbit cart. It's just more memory and would allow me to do everything I want (more wall variations, pre compiled sprites, animations, recovering the smooth rotation from PM 1.5 .. go take a look if you don't remember).

    No need for hardware assisted DMA or other things, but the code could adapt and give you a better frame rate if you have a better cpu.

     

    Still, to turn it into a full-featured FPS would involve a lot of CPU power needed for large sprites that must be resizeable, clipped when moving half-way behind walls, with collision detection etc. Actually I do not wonder that the work has stalled at the current phase.

    Nah :) ... I have seem this from time to time, and my answer is still the same. I don't have much time these days (for the last years I should say).

    Also I'm not good working just a little everyday, so is not technical problems that have stalled this. In fact, I don't see any major problem ahead.

     

    Neither sprites, collision detection or AI are great problems.

    - Clipping: for precompiled sprites you can reorder the code in "sprite rows", then clipping a row is just comparing the current sprite distance to the camera with the distance in the world "row Zbuffer", and then starting (or ending) the draw at the correct row.

    For P/M's it would work in a similar way and at the end just setting a mask, used to draw the P/M.

     

    - Collision detection, AI: is basically a 2d top down world. First, I don't think you need to have that many objects active locally.

    For projectiles is basically a couple of X/Y comparations, or tile comparations (against walls for example).

    For enemies you don't need to start doing A* for this to be fun :). Lot of "2d games" (like PacMan, Robotron, Eidolon, Encounter) have ideas that can be used to move enemies and get interesting behaviors.

     

    - Sprite scaling: here you don't need to have scaling code. You could use some scaled frames in memory (not all sizes) and still have a good effect (like in Space Harrier). Eidolon don't do any scaling for example.

    Also, in the Spectrum demo the sprites appear and disappear at certain distances, and it still looks good.

     

    There are still more optimizations and tricks that can be used, to improve speed and visuals.

    Hiding sprites background (not drawing the world in the same rows). I don't like this, but could be an option for the user to decide.

    There was a recent Spectrum demo of an rpg with a 3d view here, that I don't remember the name, but the interesting thing was that they never did "scale down" of the graphics, only scale ups.

    So you don't see the typical artifactings in the walls, at certain distances or while moving. That's an idea that I would like to test to improve visual fidelity, for example.

     

     

    Regards.

    • Like 5
  11. I know you'll think I'm stupid for asking this, but, how do I run the Project_M file?

     

    Short answer: get last version of the Altirra emulator, run it, unzip the ProjectM file, drag and drop the PAL file over the Altirra emulator (configured for PAL, with 64K and PAL blending activated).. should work.

  12. Use fractional maths in similar fashion as if moving sprites.

     

    Velocity value stored in 2 bytes, high byte contains direction plus amount to move each VBlank.

    Low byte contains value which is added to a working accumulator value, if it carries over then it also gets added/subtracted from positional value on that iteration.

     

    Using such fractionals allows many speed variations from 1/256th, 2/256ths through to 254/256ths, 255/256ths.

     

    If you're real fussy, you could do tables such that Pal and NTSC speeds are overall almost identical. But movement that isn't frame-exact can look jumpy.

     

    Yep, +1 to Rybags answer.

    I do that in my Pad game for the movement of the balls, enemies and powerups, and with different movement values for NTSC and PAL (so they move at the same "speed").

    The only problem could be that for small objects it probably looks better (unnoticed) than for the whole screen (your case).

    But is by far the more elegant solution, forget all those if/then and counters.. just add two values every frame and update the scrolling/LMS's with the processed result.

     

    For example, let's say that you move one scanline every frame in PAL, then your two values are 1 and 0 (decimal part).

    Then you have a speed of 50 scanlines per second in PAL.

    To replicate that speed in NTSC you need to move every frame a value equal to 50/60 (50 scanlines in one second or 60 NTSC frames).

    So 0.83333 scanlines per frame, and your two values should be 0 and 213 (approx... is never going to be perfect for all cases with this method, but good enough).

     

    (What I did was to take the decimal part ".83333" and multiply it by 256 to get a new "byte" from it.)

     

    Obviously, you need to remember (accumulate) this 2-byte result from frame to frame.

     

    Also you can now do some kind of smooth acceleration effects, no need to have just 6 different speeds.

  13.  

    Not sure if POKEY-IRQ is really "faster". Do you have to retrigger the timer or does it automatically reload it? I used the POKEY IRQ just once in my PAL-blending experiments and have no clue what I did back then :)

    WSYNC isn't needed if NOPs are used and finally, POKEY IRQ runs 312 scanlines, DLIs only during display (max. 240) so you have to to actually do something.

     

     

    I don't understand every little detail about IRQ's (for that probably you need to talk with Phaeron x) ), but from my own experience they could be faster.

    I normally trigger them inside a DLI once per frame, then they run automatically (as FJC says) over the scan lines that I need them, and then are deactivated for the rest of the frame (using a counter inside the IRQ code, or maybe using another DLI).

    You also need to do some kind of sync at the start of your code, if you want the IRQ's to happen before a specific vertical position (for color changes for example, if you are going to have one per scan line).

    The bigger issue is probably the lost of a sound channel.

    Emmm.. doing a WSYNC or NOPs is the same.. just lost processor time :)

  14. I did put the code of my last game here:

    http://atariage.com/forums/topic/191864-pad-15-beta/page-3?do=findComment&comment=2897188

    (but this was started like 20 years ago, so there are like two programming styles coexisting here x) )

     

    Some old demos with code:

    http://www.atariage.com/forums/topic/108283-more-software-sprites/

    http://www.atariage.com/forums/topic/119962-why-are-my-shape-tables-flickering/page__view__findpost__p__1453933

    http://www.atariage.com/forums/topic/52701-bubble-bobble/page__view__findpost__p__1260463

     

    I would say similar to Phaeron.. with lots of comments, starting with memory maps, vars and constants definitions, then the inclusion of some standard equates and macros files, code initialization (for games something like InitSystem, InitGame, InitLevel), a short main loop with some jsr calls (read input, game logic, draw screen, screen sync..), ending with interruptions and data areas and tables (P/M's, fonts, DL's..).

    Also when the programs grows, logic groups of methods or data end in their own files.

    • Like 1
  15.  

    Quite interesting! I also built a somewhat similar converter for Pokey some years ago, unfinished - but basically working.

    It uses the SA_POKEY.DLL and feeds it with permutations of control values, analyzing the output statistically.

    The source audio is handled the same way (frame wise) and the similarity mapping outputs the control values.

     

    Is there really demand for such converter?

     

    I believe if you could increase the quality by using more updates per frame (4, 8..) it could be very interesting.

     

    Something like a rastaconverter but for sounds and music..

  16. Generally, I have noticed that, except for grey, the colors in PAL are usually one chroma step to the right of the NTSC colors. Which means, chroma 9 in PAL is chroma 10 in NTSC, 10 becomes 11, and 15 becomes 1.

     

    I follow the same rule (and do the opposite when going from NTSC to PAL).

    Some colors are not the same (you can notice the difference) but as an overall change I think is the better solution..

     

    Some examples: (NTSC / PAL , Altirra palettes)

     

    post-11240-0-05929500-1410641796_thumb.pngpost-11240-0-98030300-1410641806_thumb.png

    post-11240-0-13774200-1410641818_thumb.pngpost-11240-0-98305200-1410641823_thumb.png

    post-11240-0-26591000-1410641831_thumb.pngpost-11240-0-83858500-1410641835_thumb.png

    post-11240-0-13359500-1410641840_thumb.pngpost-11240-0-42226000-1410641845_thumb.png

    • Like 2
  17. I remember some nice articles about the Synapse adventures:

     

    http://www.atarimania.com/game-atari-400-800-xl-xe-essex_1879.html

    http://www.atarimania.com/game-atari-400-800-xl-xe-mindwheel_3404.html

    http://www.atarimania.com/game-atari-400-800-xl-xe-brimstone_793.html

     

    But I don't know if they are at the level of the Infocom ones.

    The manuals looks nice anyways (and you need them for the password protection).

  18. "I herd him talking to his solicitor this morning" ... this one is wrong in SO many levels...

    I think this is now my "favorite phrase for crazy threads" here.. (make space you "envious snake").

     

     

    Since I was invited to share this unintentional validation of my original point of view, here it is:
    ...
    "Congratulations for ruining it again for all the Atari 8-bitters in the world."

     

    What have you done flashjazzcat.. what have you done. That should be some kind of record x)

    I always knew you were evil flashjazzcat, showing only glimpses of your amazing project, year after year, without an exe.. (like I'm one to talk...)

     

    anyone else tempted to just *write the bloody thing* for a laugh?

     

    Yes.. I'm torn between doing a pc version in Unity, GameMaker or plain C plus OpenGL, with procedural levels, a kind of 3d infinite runner with elements of elektra glide, encounter, stunt car racer, stealth (landscape).. plain but colorful graphics with good gameplay..

    Or doing the worst possible version, in a "satire" kind of way (I think this is going to be the most difficult.. the original material doesn't leave much room to make it worse).

    If only I have the time x)

     

     

    Sounds like time for a programming contest.

     

    Based on this description...

     

     

    ...write a game using any play method and style that incorporates the elements described above. (Like third-person view pole position, side scrolling moon patrol, pac-man maze, etc.) Entries will all be named after some form of *ENTRON 3D, with the exception that "C" cannot be used. BENTRON 3D, DENTRON 3D, etc.

     

    I can see this inspiring a global game jam with Peter Molydeux and Notch...

     

     

    Oh snap! They ARE lawyers, for the video game industry. This just keeps getting better. You know, I'm not usually inclined to stir someone else's Kool-Aid, but they (he) just might have it coming.

     

    Oh .. it was a trap from some devious lawyers all the time, and we took the bait :)

     

    • Like 2
  19. Just for some great moments:

     

    - BallBlazer: beating the level 10 AI and many close matches with friends (replaced years later with Kick Off 2), the goals from midfield at the start of a match (there is a trick for that), the advanced techniques like hitting another player pursuing you with your own rotofoil (after shooting the ball) and one shot toward the goal that hit the left "wall", rebounded in the other player, in the wall again and finally entered the goal x)

    - Ultima 3: discovering Ambrosia and listening to that music for the first time, the secret walls (Ultima 4 was a more complete game, but I missed the music).

    - Alternate Reality The City: seeing that intro and the music for the first time (with lyrics), all the ambiance and mystery in the city, the rain and the small dragons (yep The Dungeon has a lot more things to do, with puzzles and quests, but The City has the advantage of been first and the details, thanks to the hand of P. Price).

    - Encounter: the many types of enemies, like the saucer that covered the field in shots or those annoying turrets, liked the clean and fast graphics, trying to reach the last level, trying to evade the incoming missile, hitting a pillar at the last moment but still destroying the missile at point blank ("RoF alien" stress level I should say x) ).

    - The Eidolon: not a lot of different things to do (maybe discovering the uses for the energy balls and some small puzzles), but great ambiance and enemies, technically great, big enemies with good animation, probably one of the best "boss" fights in the A8 (not that great a finale) and the musical heads :). Special mention to the other two, Rescue on Fractalus and Koronis Rift.

     

    Special mention for two players: One on One, Int. Karate, Archon and Mig Alley Ace. Also Star Riders, Pitfall 2 and Pastfinder.

     

×
×
  • Create New...