Jump to content
IGNORED

Undergrounders - new homebrew 3D action game


VladR

Recommended Posts

I figured I'd create a thread about the game I created for the "Atari Lynx 30th Birthday Programming competition".

 

Here's the online ROM link: https://atarigamer.com/lynx/play/Undergrounders/376664479?r=0

 

While more than 90% of the effort went into the creation of 3D engine (and generic game-related framework features, like menus/HUD, text, audio), in those last few days, I managed to scramble the following gameplay features:

- 25 levels

- 22 different color settings (track, sky, land)

- Four 3D meshes of enemies

- Five 3D meshes for tracks

- Sound effects for shooting/HUD (works in emulator)

- 5 types of curves and 2 types of hills [semi] randomly merged together to create 25 tracks

- Basic RPG stats: Level, HP, Experience, Damage, Armor

- Randomized Procedural generation of Enemy Placement (based on Player's level)

- Auto heal on level-up and if health is below 25%

- Enemies are radioactive, so the closer you are, the more damage they do - so you must figure out the compromise between time it takes for your shot to reach him and the damage you take during that time

 

I would need about a week to polish it more, add music, add some story and mission objectives and fix the last-minute introduced glitches that led to the unfortunate removal of the more complex 3D art assets.

 

Porting to Atari XL:

- I am, however, very happy about the 6502-based 3D engine, written in Assembler, which will make it very easy to transfer to Atari XL, since it's completely Software Rasterizer.

- I'm not using Lynx's Suzy for any drawing (not even clearscreen), it's all CPU based.

- Which means, that on Atari XL, this should directly run in GTIA modes (80x192), as those modes also have 16 colors (and 2 pixels per byte).

- Previously, I did all my 6502 experiments in my 6502 Dev Emulator on PC, but since this is a CC65 project, porting it to Atari XL should be quick and easy (just create Display List for the GTIA mode and run).

- Coupling this with several DLIs should make it very easy to have about 4*16 = 64 on screen colors (sky, transition sky:track, ground, HUD)

- I'm very curious to try out the Gr.11 (16 colors of same luminance) - that should make it really colorful

 

Porting to EclaireXL:

- One of my long-term goals for my 6502 3D experimenting was getting stuff to run on Eclaire

- The GTIA modes on Eclaire have 2x and 4x Horizontal resolution - e.g. 160x192 and 320x192. The frequency differential is higher than 4x, so this should result in a pretty smooth framerate

- Since this was released as a freeware, once I port it to Eclaire, that build will obviously also be freeware

 

Lynx Cart release:

- I'm currently busy with my Jaguar game, as it's only about ~4 weeks till PRGE

- I hope I can squeeze a week of tweaking and polishing the Lynx game, but it's too early to say if that can happen

- Worst-case scenario, after PRGE, I will be able to devote the time for this (but I won't release the game on cart in this stage, that's for sure)

 

Future Lynx games:

- Since I frequently take 6502 coding breaks from Jaguar coding, I absolutely plan on creating more Lynx games next year, especially now that I have a full game framework (minus audio).

- I'd hazard a guess that something like OutRun or Star Raiders would be my next target to best use this engine in its current state

- For sure, I need to do HW acceleration on Lynx and use Suzy to clear screen and draw scanlines of polygons :- )

- Also, port some of the less critical engine methods written in C to ASM (it's a CC65 project)

 

Lynx19.thumb.PNG.04970e89c048b9633f460438188003c5.PNGLynx17.thumb.PNG.708d96843fd186422401a2fe01148c7b.PNG

Lynx16.thumb.PNG.48c4a5ca6749ead4d06e836b0345ae51.PNGLynx21.thumb.PNG.4a3df12e05cdf1e73cfdb22079aa151b.PNG

Lynx15.PNG

  • Like 5
Link to comment
Share on other sites

Interesting. It always felt to me that tracks are too short, not the other way around - around one minute. But yeah, the miniMap is quite high on the todo list - though not higher than music and the art asset glitch.

 

Which browser are you using to play it ? I just noticed it doesn't start up on my IE.

 

Link to comment
Share on other sites

I was very impressed with the smoothly scrolling 3d graphics.  I didn't read any instructions so its probably my own fault, but I couldn't figure out what exactly to do just by playing, it didn't look like I was dodging or shooting anything, or speeding up or slowing down. Periodically the screen flashed, was I getting injured? Is this a first person view?

Edited by sirlynxalot
  • Thanks 1
Link to comment
Share on other sites

3 hours ago, sirlynxalot said:

I was very impressed with the smoothly scrolling 3d graphics.  I didn't read any instructions so its probably my own fault, but I couldn't figure out what exactly to do just by playing, it didn't look like I was dodging or shooting anything, or speeding up or slowing down. Periodically the screen flashed, was I getting injured? Is this a first person view?

Don't worry, it's not your fault I ran out of time to implement some basic story and instructions.

 

Yeah, this is a first-person view. You can't dodge, because the enemies are radioactive and their damage depends on distance from you. You try to shoot them down before you die.

 

The screen flashes when your HP decreases due to the radiation. You can speed up and slow down to complete halt - shooting enemy from distance - though it's not necessarily best option as it takes a long time for the shot to arrive. There's a sweet spot where the compromise [between length of time it takes for the shot to arrive and the damage you receive] works for you in a long-term sustainable way.

 

You do have an option of bypassing the enemy completely, thus minimizing the damage, but that also means you don't get the XP, hence don't level up, hence don't get your HP replenished upon an upgrade. So, you won't get very far using this strategy.

 

I'm glad you liked 3d gfx, looks like you're the only one :)

I explained the glitch I ran into in last few days so had to revert to very basic track segments (like a simple quad road, or double quad - which obviously sucks, visually).

 

That will, obviously, be fixed for a cart version.

Link to comment
Share on other sites

39 minutes ago, VladR said:

I'm glad you liked 3d gfx, looks like you're the only one :)

I posted the 1st day of its release that I played up to somewhere between level 13 to 15, and a few thoughts on it.  I liked the 3D.  It was interesting enough to keep me for that many levels, but just needed more to hold my attention past that point. If I'd known at the time that there were 22 levels, I would have tried to survive through them all.  Since I didn't know if it went on indefinitely, I quit playing at that point.  I really look forward to what you end up doing with the game.  I'm also really looking forward to the other ideas you had with the engine, like an Outrun type racer.  :-)

Link to comment
Share on other sites

2 minutes ago, KevinMos3 said:

I posted the 1st day of its release that I played up to somewhere between level 13 to 15, and a few thoughts on it.  I liked the 3D.  It was interesting enough to keep me for that many levels, but just needed more to hold my attention past that point. If I'd known at the time that there were 22 levels, I would have tried to survive through them all.  Since I didn't know if it went on indefinitely, I quit playing at that point. 

Right ! I forgot about that, sorry ! Should have made the thread at that time as it makes collecting all feedback so much easier.

 

I was going by the feedback on the voting page, and some decent soul took a crap there and downvoted all the game features to lowest value of 1.0 :lol:

2 minutes ago, KevinMos3 said:

 I really look forward to what you end up doing with the game.  I'm also really looking forward to the other ideas you had with the engine, like an Outrun type racer.  :-)

I had a really nice underground bunker entrance modeled, from which you start, but when imported again, it barfed out, which is when I noticed other enemy meshes not working. That was 2 days before deadline, and I was still missing some core gameplay elements, so it was obvious it's not happening for that release.

 

The OutRun-style makes sense to me as next step, because:

- I will keep the road as a 3D mesh, hence get all the curves and hills for free (automatically) - no need to handle the ScanlineRoad BS

- since the most complex mesh right now is about 25 quads on screen (5 rows with 5 quads per row), I can get same performance with the view distance of 25 (e.g. 5x further than now)

- not to mention that if I go for road, I can completely remove couple quite expensive pipeline stage of point sorting and edge initialization, as with road there's no need for that, hence further improving performance

- furthermore, a road algo can be created that will use a faster fixed-point math (I won't need Bresenham, as there won't be any neighboring edges to match, hence no visual artifacts)

- I believe I can double that to roughly view distance of 50 quads, yet still have same performance.

 

- grass and road will be textured which will greatly improve visual variety and also help performance-wise (I did the tests on Jaguar with this already) with other portions of the pipeline, which - granted - on Jaguar run in parallel, but on Lynx must be halted while Suzy's busy

 

Problem with OutRun is hand-drawn backgrounds. In parallel to anything I'm doing, I'm also working on algorithms how to generate them procedurally, yet having at least some artsy feel. Those algorithms are reusable on both Jaguar and Lynx. After all, I need some backgrounds for my Jaguar game as well, so it's a problem worth fixing on both platforms.

 

 

Of course, on jaguar, I can sacrifice 128 KB for a heightmap that will get rendered at load-time from different angles and light conditions and scales (X/Y/Z). I could do that for a 512 KB cart on Lynx too, but at 64 KB, I don't have enough spare RAM for that.

Link to comment
Share on other sites

55 minutes ago, VladR said:

Inspiring ? How so ? 

Inspiring because I use to code in C but want to try something more chalenging: when last year decided to move from new consoles like 3DS and Switch to the Atari Lynx, it was with the idea to refresh my 20yo ASM knowledge and, taking my time, code a whole game in ASM.

 

3D in machine code on 65xx is one of the things I want to explore in the future, and your work game me some good hints on how to organize my learning path.

  • Thanks 1
Link to comment
Share on other sites

I'm glad it served some educational point.

 

I'm sure you noticed I'm leaning more towards the as high-level as possible approach - basically whole gameplay is in C, well - basically everything except the rasterizer :)

I'm sure I could shave off some significant KBs by transitioning all code to Asm, though - that's the single greatest advantage of it.

 

However, with a cart release, 64 KB is no longer a limitation, so I can get away with C's larger RAM footprint.

 

But, without C, I would have missed the deadline, for sure. So, there's that, too...

 

How much time do you think you will have next year ? Do you work on Lynx in waves, with some months taking a break from coding ?

 

Would you be open to some collaboration on a cart release ? I'm sure it wouldn't be hard finding a game genre that would be enjoyable for both.

 

Just an Example - I would provide the 3D engine and you could, in your free time, work on a gameplay (or, for example, different stages of game).

Link to comment
Share on other sites

I have no defined schedule.

 

I planned to have a month of break after this competition, but was engaged for coding a game for the Sill Venture Compo and have to code a multiplatform SDL simple game for Retroguru to be used at a german Maker Fair in October to show to visitors how to design a tiled game level.

 

Have to work also on my crazy project of running native VCS code on the Lynx (that I don't know how far can go, but is a nice way to study both VCS and Lynx architectures) and have another secret crazy HW project starting soon (waiting to receive all the material). 

 

So untill the end of the year I'm full, because I have a full time job and can work on these project only in the free time.

 

But let's stay in touch, a collaboration is possible and could be a good opportunity for me to learn something. 

 

 

Link to comment
Share on other sites

16 hours ago, KevinMos3 said:

I posted the 1st day of its release that I played up to somewhere between level 13 to 15, and a few thoughts on it.  I liked the 3D.  It was interesting enough to keep me for that many levels, but just needed more to hold my attention past that point. If I'd known at the time that there were 22 levels, I would have tried to survive through them all.  Since I didn't know if it went on indefinitely, I quit playing at that point.  I really look forward to what you end up doing with the game.  I'm also really looking forward to the other ideas you had with the engine, like an Outrun type racer.  ?

I hope this is ironic. ;-) Outrun uses sprite graphics.

  • Haha 1
Link to comment
Share on other sites

1 hour ago, VladR said:

Wow, so you cannot imagine polygonal road with outrun's land texturing and sprites?

 

How's that for ironic :) ?

 

Because atm it remotely resembles a very abstract version of "Stun Runner", which the Lynx has a very good version of btw. I played the 3D games of the Lynx quite a lot and I would call a polygon engine with texture mapping a rather lofty goal. "Warbirds" might be the best 3D a very capable and expierenced coder might get out of the system. Your engine would need to improve drastically to match the current best 3D on the system and to add any (realistic) details to the graphics. For now its a very respectable demo, but also a humble foundation of what could be a game. Keep going :-)

Edited by agradeneu
Link to comment
Share on other sites

I have to strongly disagree here. Mixing bitmaps with graphics is the way to go on the Lynx.

 

The Lynx maximum resolution is 160 by 102 pixels. A full vector based game easily becomes just a bunch of noise.

 

Look at Wing Commander on Amiga. All craft and explosions are bitmaps.

wcii.thumb.jpg.a964977a4055898cdbe18a538b1f2476.jpg

 

 

With good bitmaps you can have personality in the game. This style is what fits the Lynx best imho.

1400392651_Screenshotfrom2019-09-1410-27-24.png.fb3f9553dd766795d6ee282439f1f49f.png

 

Even some great new games like Strike suit zero mixes vectors and bitmaps in a nice way.

90.thumb.png.e7980530ab949e1d0e26bd672e2b29a9.png

  • Like 2
  • Thanks 1
Link to comment
Share on other sites

4 hours ago, karri said:

I have to strongly disagree here. Mixing bitmaps with graphics is the way to go on the Lynx.

 

The Lynx maximum resolution is 160 by 102 pixels. A full vector based game easily becomes just a bunch of noise.

 

Look at Wing Commander on Amiga. All craft and explosions are bitmaps.

wcii.thumb.jpg.a964977a4055898cdbe18a538b1f2476.jpg

 

 

With good bitmaps you can have personality in the game. This style is what fits the Lynx best imho.

1400392651_Screenshotfrom2019-09-1410-27-24.png.fb3f9553dd766795d6ee282439f1f49f.png

 

Even some great new games like Strike suit zero mixes vectors and bitmaps in a nice way.

90.thumb.png.e7980530ab949e1d0e26bd672e2b29a9.png

Thats why I mentioned Warbirds as a nice example how to use sprites in an real 3D game. 

But an Outrun game would  just use scaled bitmaps, in pseudo 3D fashion.

 

Edited by agradeneu
Link to comment
Share on other sites

16 hours ago, agradeneu said:

Because atm it remotely resembles a very abstract version of "Stun Runner", which the Lynx has a very good version of btw. Your engine would need to improve drastically to match the current best 3D on the system and to add any (realistic) details to the graphics. For now its a very respectable demo, but also a humble foundation of what could be a game. Keep going :-)

But I'm not doing that - You're the only one here who tries to match my engine with the best ones. I'm perfectly happy with the performance in its current stage, given the fact that few weeks before that I didn't have any code running on Lynx :)

 

Do you understand what it means when I said it's a "SW rasterizer" and that I don't use any power of the 16 MHz "Blitter" (Suzy) ? Not even to clear screen ? 

 

It's basically, like,  Atari XL (160x96), just at 4 MHz instead of 1.79. Hence, there is a lot of upwards potential, once I start using the 16 MHz chip.

 

 

16 hours ago, agradeneu said:

 I played the 3D games of the Lynx quite a lot and I would call a polygon engine with texture mapping a rather lofty goal.

Except Lynx's Suzy has a built-in capability to scale textured bitmaps, which is exactly what is needed for textured roads. Now, I haven't experimented with that yet, but karri has done exactly that scenario (road rendering) and he knows how fast that is.

 

I believe he also mentioned in some thread that due to some glitches, he had to render the road (it was either road or that road edge polygon - don't recall exactly this moment) in two passes, which will be expensive, but should be still less expensive than a per-scanline-traversal, as a lot of CPU time is killed on that.

 

I would definitely defer to his experience here.

 

 

 

Regardless, my plan for OutRun is to use Suzy to render textured scanlines (yes, not whole scaled road segment polygons), because this will achieve the full perspective effect on the environment texture (e.g. most distant grass scanline will look different than nearest one - helping the perspective, especially in fast motion).

If that turns out to be too slow, then I can always go back to the scaled road polygon method (and scaling the grass texture as another polygon, instead of per-scanline basis, though loosing the per-scanline XP offset, which is part of the full perspective).

 

But, it's definitely a method worth trying out, IMHO.

Link to comment
Share on other sites

14 hours ago, karri said:

I have to strongly disagree here. Mixing bitmaps with graphics is the way to go on the Lynx.

 

The Lynx maximum resolution is 160 by 102 pixels. A full vector based game easily becomes just a bunch of noise.

 

Look at Wing Commander on Amiga. All craft and explosions are bitmaps.

wcii.thumb.jpg.a964977a4055898cdbe18a538b1f2476.jpg

 

 

With good bitmaps you can have personality in the game. This style is what fits the Lynx best imho.

1400392651_Screenshotfrom2019-09-1410-27-24.png.fb3f9553dd766795d6ee282439f1f49f.png

 

Exactly. To give 'personality' via use of polygons, one needs insane amount of them, way above the HW's capability.

 

However, flatshading allows me to do both code and gfx easily, as there's just few polygons.

 

But, the polygons will never be cute. For that, you need GeForce-level HW power and resolution at least 800x600, from my experience.

Link to comment
Share on other sites

7 hours ago, VladR said:

 

 

Except Lynx's Suzy has a built-in capability to scale textured bitmaps, which is exactly what is needed for textured roads. Now, I haven't experimented with that yet, but karri has done exactly that scenario (road rendering) and he knows how fast that is.

 

I believe he also mentioned in some thread that due to some glitches, he had to render the road (it was either road or that road edge polygon - don't recall exactly this moment) in two passes, which will be expensive, but should be still less expensive than a per-scanline-traversal, as a lot of CPU time is killed on that.

 

I would definitely defer to his experience here.

 

 

 

Regardless, my plan for OutRun is to use Suzy to render textured scanlines (yes, not whole scaled road segment polygons), because this will achieve the full perspective effect on the environment texture (e.g. most distant grass scanline will look different than nearest one - helping the perspective, especially in fast motion).

If that turns out to be too slow, then I can always go back to the scaled road polygon method (and scaling the grass texture as another polygon, instead of per-scanline basis, though loosing the per-scanline XP offset, which is part of the full perspective).

 

But, it's definitely a method worth trying out, IMHO.

I get that but I see two issues here:

1. The road corners might look very edgy with polygons

2. It might be much too slow for an Outrun game to be FUN

 

A good Outrun clone would need nice detailed bitmaps and very fast speed. The Lynx is quite fast with sprites scaling and scanline based road, but then that would be a totally different engine than what you try to do with your 3D polygon experiments. I hope you are familiar with this:

 

Edited by agradeneu
Link to comment
Share on other sites

8 hours ago, VladR said:

Exactly. To give 'personality' via use of polygons, one needs insane amount of them, way above the HW's capability.

 

However, flatshading allows me to do both code and gfx easily, as there's just few polygons.

 

But, the polygons will never be cute. For that, you need GeForce-level HW power and resolution at least 800x600, from my experience.

You don't need Geforce to get out decent detailed graphics of this HW. It was already done and proven.

Edited by agradeneu
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...