English Amiga Board

English Amiga Board (http://eab.abime.net/index.php)
-   Coders. General (http://eab.abime.net/forumdisplay.php?f=37)
-   -   Amiga 3D game programming (http://eab.abime.net/showthread.php?t=26679)

Steve 24 November 2006 16:22

Amiga 3D game programming
 
Hi

I may have a go at programming a 3D Amiga game in the future once I've completed a few 3D demos. What I want to know is how well the Amiga can process filled and filled/textured polygons. For example how many filled polys can the standard A500 handle compared to a standard A1200. Anyone know?

musashi5150 25 November 2006 00:07

Filled polys are ok - but textured ones? Unless you have a heavy-accelerated Amiga or want to use a Coppertrick (Alien Breed 3D) then you should be able to make a cup to tea between frames :D

If you are using the Blitter to draw filled polys, there won't be a world of difference between A1200 and A500. The A1200 will do the math faster and maybe render slightly quicker due to the enhanced bitplane DMA fetching - but actual polygon rendering speed is the same as A500 as the blitter isn't ANY faster.

Having some fastram in the machine will help a lot for sure - as it will keep your code out of chipmem :)

Photon 25 November 2006 15:55

Yeah, if you're using an accelerator with Fast RAM the CPU is faster. The blitter just trundles along at its base MHz. Check out the end part of Arte by Sanity for a 3D routine which makes use of accel.

Forget about textures I say. I doubt 20 textured polys of like 40x40 pixels gives you 1 fps on an A500. Few programmers have succeeded in real texture mapping at all, one exception might be Virtual Intelligence by Horizon. It doesn't seem to use perspective though, i.e. isometric 3D, might be wrong (hard to see).

I think TEC/Cryptoburners made a nice shaded filled poly routine, I'm sure the source is available somewhere. Never did get any of the demos with those routines to work on an OCS A500 though. Probably a small bug like relying on some content of a blitter register that isn't there in OCS.

The Amiga chipset has its limits, but it also allows for creative possibilities. So have a think how you could trick the hardware to save chunks of time. :)

Doc Mindie 25 November 2006 20:07

While we're wandering down the limited Amiga Hardware line.....

In todays world, you just throw a faster processor into the system..... while on the amiga, you use programming tricks to recieve a good result. IMO, you make a better coder when you have to use tricks and circumventions, than just throwing some more horsepower at your code to be able to run it at adequate speeds.

YAY for tricky coding :D

musashi5150 26 November 2006 21:18

Quote:

Originally Posted by Doc Mindie
In todays world, you just throw a faster processor into the system..... while on the amiga, you use programming tricks to recieve a good result.

Indeed :D Ghz machines today take the brains out of coding. Get a machine running only a few Mhz with limited RAM and we can see who the good coders are :great That's one of things I love most on Amiga... clever coding tricks :)

Galahad/FLT 27 November 2006 01:43

Quote:

Originally Posted by musashi5150
Indeed :D Ghz machines today take the brains out of coding. Get a machine running only a few Mhz with limited RAM and we can see who the good coders are :great That's one of things I love most on Amiga... clever coding tricks :)

One of the reasons why so many Amiga demo coders were snapped up to write on SNES and Megadrive

Frog 27 November 2006 02:14

if you want to see some mapping on A500 :
Blitter Disaster / Storm http://www.pouet.net/prod.php?which=14569
Cube'o'Matic / SPREADPOINT http://pouet.net/prod.php?which=5849

or BlitterMiracle / BRS http://pouet.net/prod.php?which=5853

BTW why not make "Stencil vector" like in Mental Hangover ? with some good maps it can look pretty nice.

@Proton : didn't know Virtual Intelligence / Horizon , i'll watch it http://pouet.net/prod.php?which=19102

Photon 27 November 2006 03:15

Photon! I'm a cool zippy light particle, not a measly nucleus pea. :)

Well it's not really texture mapping as we know it if it's a special case that can't be put on a poly of your choosing. It seems the Brainstorm one and the Storm one are non-perspective blitter routines, too. I liked the Spreadpoint one, they seemed to do it right, and they had shading, too. Horizon put that on a bunch of objects, but I'm not sure I saw a texmapped poly that was a tri, only quads?

Stencil vectors look good if you have many small polys, i.e. don't get close to objects. It would probably look not so good in a Dungeon Master type game ;)

P-J 27 November 2006 11:14

Quote:

Originally Posted by musashi5150
Indeed :D Ghz machines today take the brains out of coding. Get a machine running only a few Mhz with limited RAM and we can see who the good coders are :great That's one of things I love most on Amiga... clever coding tricks :)

...and limit your target audience to a handful. No thanks.

Steve 27 November 2006 12:20

Hey great comments. :)

I was more thinking along the lines of writing a 3D game. Maybe an updated version of Castle Master or Legends of Valour for the AGA Amiga's. That would be pretty sweet. The Amiga is certainly very capable of texture mapping. You only have to look at games like Gloom Deluxe and the amazing looking Breathless. Even Legends of Valour had a bit of texture mapping and that was an Amiga 500 game. I'll probably start with a 2D game though. ;)

Photon 27 November 2006 16:53

Hey Steve, tried them and well... remembered I played LoV back then. Looks good but it's a 100x50 pxl screen and 4 fps? If that's what you want but speeded up for AGA, sure. But texture mapping at least resembling what we're used to in games now or maybe 6 years ago is tricky on an Amiga. I will never say anything is impossible on Amiga. Never. Maybe a cool project for the lucky A1260T owners out there? ;)

Breathless was pretty much the same as LoV, twice the screen size but twice as big pixels :D Better FPS though, but it's AGA of course. Gloom Deluxe - tiny screen again, good FPS but if you ran fullscreen you got gigantic pixels :'( Only tried the demos though, maybe full version is better?

About your 2D game: Yeah, if you're not an Amiga Ace texture mapping is not the easiest start ;) Will be interesting to see how your programming comes along!

Photon 27 November 2006 16:56

Quote:

Originally Posted by P-J
...and limit your target audience to a handful. No thanks.

Hey P-J, what do you mean by that??? :)

Steve 27 November 2006 17:06

Quote:

Originally Posted by Photon
Hey Steve, tried them and well... remembered I played LoV back then. Looks good but it's a 100x50 pxl screen and 4 fps? If that's what you want but speeded up for AGA, sure. But texture mapping at least resembling what we're used to in games now or maybe 6 years ago is tricky on an Amiga. I will never say anything is impossible on Amiga. Never. Maybe a cool project for the lucky A1260T owners out there? ;)

Basically I'd like to do a full screen version of a 3D classic like Castle Master or LoV. I wouldn't want them to run in a tiny little screen like the original versions though. An upgraded A1200 should easily be able to handle a fullscreen AGA version of LoV. :D

Quote:

Breathless was pretty much the same as LoV, twice the screen size but twice as big pixels :D Better FPS though, but it's AGA of course. Gloom Deluxe - tiny screen again, good FPS but if you ran fullscreen you got gigantic pixels :'( Only tried the demos though, maybe full version is better?
No, no, no! You must have tried the games in their default 2x2 'chunky' pixel mode. You can change the display settings in both games so they render in 1x1 pixel mode and look very nice indeed. The pixels are more noticable nowadays (in 3D Amiga games) because modern games use texture filtering which the Amiga can't do.

Quote:

About your 2D game: Yeah, if you're not an Amiga Ace texture mapping is not the easiest start ;) Will be interesting to see how your programming comes along!
Well I write 3D games for a living so I reckon I've got half a chance. lol. I'm really still learning about the inner workings of the Amiga though. I might have a go at making a version of Gloom Deluxe for the DS. I think the DS would be perfect for a game like that. What do you guys think?

P-J 27 November 2006 22:08

Quote:

Originally Posted by Photon
Hey P-J, what do you mean by that??? :)

The smiley face says it all ;)

Frog 28 November 2006 00:17

Quote:

Originally Posted by Photon
Photon! I'm a cool zippy light particle, not a measly nucleus pea. :)

oops sorry Photon...

Kalms 28 November 2006 04:47

Just a word or two regarding performance...

The total number of pixels displayed by a copperscreen display is limited by the speed of the copper itself.
The copper can do approx. 57 MOVEs per scanline in normal 15kHz PAL/NTSC resolutions.

This means that if you want to have chunky-pixels that are 2 scanlines high, you can have up to 114 chunky-pixels horizontally.
If you want to have chunky-pixels that are 3 scanlines high, you can have up to 128 chunky-pixels horizontally. (You'll stop at 128 since you're double-buffering the palette.)
This means that the best resolution you'll get for a full-screen copperscreen is 2.5x3 pixelsize.

If you have a copperscreen at a high resolution, the copper will consume a lot of your chipmem bandwidth too. If you target 68030+ then you are probably better off with a C2P based solution.

Chipmem write bandwidth: ~7MB/s
Fastmem read bandwidth, Blizzard 1230: ~30MB/s
Fastmem read bandwidth, Blizzard 1260: ~35MB/s

You'll want to do all rendering to a temporary buffer in fastmem, and once that is done you c2p convert the result into chipmem. (You can do some improvements on the scheme, but that's the gist of it.)

Let's presume that you want to render 320x200 chunkypixels, at 1x1 pixelsize.

320x200x8bpl of graphics data = 64000 bytes of data.
Copying 64kB of data fast->chip takes roughly 15ms (i.e. 75% of a frame).
35MB/s read speed for fastmem translates into 700kB/frame. Considering that you will be reading & writing 64kB just for the *screen writes* (assumiung no overdraw), you are going to consume considerably more bandwidth than that on datacache misses for the texture accesses.

That's why you haven't seen a lot of really smooth 1x1 full-on 3d graphics in games on the miggy. [In demos it's easier, since there you can tweak the camera and the environment until the performance target has been achieved.]

Steve 28 November 2006 12:01

Interestig stuff Kalms. Thats certainly worth reading a few times (till it has sunk in - still early in the morning).

I'm now wondering how many of the textured Amiga games are really true 3D environments. I think Alien Breed 3D II is but I'm not so sure about Gloom Deluxe and Breathless and all the other 'Doom clones'. Are these games using the same type of rendering technique as Wolfenstein 3D and Doom by basically cheating a 3D display?

How can you tell if a game is rendering a true 3D environment (like Quake does)?

What do you think is the difference in CPU expense between true 3D and fake 3D games?

DDNI 28 November 2006 18:07

Steve, if its slooooooooow its full 3d, if it jerks rapidly its pseudo 3D... ;)

musashi5150 28 November 2006 18:22

Quote:

Originally Posted by DDNI
Steve, if its slooooooooow its full 3d, if it jerks rapidly its pseudo 3D... ;)

Nicely explained :great

redblade 29 November 2006 02:14

hmm code a HAM update of FA-18 Interceptor :)

does any one know what the Flight simulator was that Jay Miner saw?


All times are GMT +2. The time now is 00:36.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.

Page generated in 0.04619 seconds with 11 queries