Efter hearin aboot the JagJam, a wis wantin tae tak pairt. Tho a wisnae shuir whaur tae stairt, or whit tuils tae uise.
The maist faur ben tuilsets ur JagStudio an Raptor AI, an a'v gien thaim a bash afore. Thay'r smashin, hounaiver, a wis wantin tae see gin thare ur ony tuils fur daein 3D gemms oot thare. A'v bin telt thit the Jaguar isnae awfy capable at daein 3D, bit bein mad intae early 3D, as a grew up in that era, a wis wantin tae gie it a bash onywey. I wanted to see if there were any 3D tools available. I'm aware the Jaguar isn't seen as a very capable 3D machine, but I am such a huge fan of early 3D, having grown up in that era, that I wanted to try it anyway.
It turns oot the oreeginal SDK fae 1995 haed bin pit online, an that haes a 3D demo!
A played aboot wi the demo, an it tirns oot thay gie ye a converter thit pits models made in 3DStudio (or ony tuil thit lats ye stowe in the "3ds" format), an is e'en tawkit aboot in the oreegonal documentation! This maks hings a lot easier. Am no e'en shuir gin the 3DO, Saturn or PS1 hiv an equivalent!
Gittin a model loaded in wis a bit o a hassle, tho. The Blender exporter gied me an error sayin the model haes nae Scale. A tried Bryce 7, an it didnae gie an error, bit it didnae shaw ony models on the screen aither.
A decidit tae try an uise ma Windows 98 PC an uise an aulder version o 3D Studio itsel tae export a file. A grabbed the castle model fae the demo, taen oot the castle, an re-exportit.
That wirkit, bit it wis a lot o hassle passin a file tae an fae 2 PC tae git sic a simple task duin, an haed tae fun anither wey.
A than haed a muckle breakthrou. A fun thit exportin tae obj, loadin that file intae Wings 3D, an than export tae 3ds fae thare wirkit! Et voila!
A pit thegither a test room an importit that tae the SDK. It importit, hounaiver, it haed texture problems.
Tirns oot thit the stock renderer disnae support repeatin texturs. This coud be chynged wi the blitter, but am no advanced enouch yet fur that, s' a'll juist wirk aroond this.
Efter that, a decidit tae feegure oot the code ahint the 3D an chynge it's behaviour. A managed tae chynge the control tae gie it an FPS controller tae muive aboot an debug the gemm. The fou gemm will obviously be a rail shuite, an this willnae be immediately accessible in the fou gemm.
Hou you fouter aboot an render 3D models here isnae that different fae ither homebrew seestems. Gin ye'v ony experience daein low-level 3D, ye'll ken whit ye'd be fired intae here.
Pittin thegither the knawledge a gained sae faur, a got a room loaded proper.an wis able tae navigate aroont it, an pit in a few rooms an aw.
It wis a this pynt thit a diskivert suhin interestin aboot the Jaguar renderer: It's fill-rate limitit. Thit means the renderer is mair limitit bi hou big the polygons an models ur raither nor nou mony thare ur.
Whan zoomed oot o the rooms, a git 30-60fps effortlessly, but whan zoomed in, a git 6-12fps.
A kin wirk aroond this an gie the best leukin Jaguar gemm a kin whilst keepin it at a somewhit decent framerate!
A wis gittin a lot o textur warpin an aw. No a lot a kin dae aboot that. Juist mak siccar no tae git ower close tae ony texturs.
A than stairtit tae animate the gemm like a rail shuiter, pittin the camera throu a set path, an it haed taen me a wee whille, bit a got it functionin.
A played aboot wi renderin modes. A'd bin uisin gourad sae faur, thit is the heichest quality yin, uisin a seemlar shadin tae the Nintendo 64, but wanitit tae experiment wi flat an nae shadin tae see gin a got better framerates, an fur flat shaded, a daed. Got it mair consistently at 10. Nae shadin wis surprisingly the same as gourad, tho.
Flat shadin leuks rouch wi some texturs, bit a kin wirk aroond that bi chysin different texturs.
Than a stairtit importin chairacter models. It wis actual pretty straichtforrit.
A first thoucht a haed tae optimise it fur the Jaguar, bit it surprisingly, it ran the oreegional models fine.
The wey the model wis designed, A cud git awa wi hivin maist o't untexturt tae big up speed.
Than a muived ontae animatin thaim. Tae save time an due tae ma lack o skills, a'm uisin vertex animations (Whaur a store seperate models for each frame insteid o uisin armatures tae manipulate the ae model)
A haed issues at first whaur it widnae display the models, an thoucht at first it wis cause a fillt up video memory, s' a reducit the amoont o frames it loaded in.
Than suddenly it wirkit wi aw the frames a exportit! Nae idea whit a daed different, bit it wirks nou!
A fund oot hou tae load in multiple models an aw, an wi this, a'd duin some experiments wi the polygon coont, a, fund kin git aroond 4000 polygons on screen afore it daes. This is aboot as mony polygons Saturn an Playstation gemms teepically haed. A'v gaun up tae aboot 8000 an hiv it reduce tae 4fps. Coud be uised fur cutscenes an the occasional gemmplay dip, bit 4000 is the targit.
A glitch occured, an got 17,000 polygons on screen at 2fps. S' thare's that.
At this pynt, a decidit tae git the gemm testit on real hardware. A'v a Jaguar (an a Jaguar CD), bit nae flash cart tae test it. A fund someb'dy tae test it fur me, an it ran!
Than a modified the animation player tae spawn enemies whan a tell it tae. WIs difficult at first, as it juist spawned aw the enemies, until a realised it wis juist gaun though the hale array size insteid o whit a juist initialised. It's wirkin nou.
That'll be it fur this development log. A'll pit oot mair whan a feel a'v made enouch progress! See yese nixt time!
Am back wi anither update tae the projeck. This time focusin on drawin 2D sprites on tap o the 3D scene fur the HUD.
That'll be easy, will it no? A thocht that an aw, until a fun oot thit the Jaguar SDK disnae hiv ony demos for 2D in C. It's aw in...
A asked aboot an naebody haed a saumple fur me thit didnae involve assembly, s' a haed nae chyce bit tae try an lairn it an howp tae christ a kin git it wirkin.
A fund a decent 68k assembly tutorial in Inglis s' spent wan nicht lairnin it aw an crammin it in ma nut.
Efter that, readin the assembly far the SDK samples wis easier, bit a still haed trouble unnerstaunin whit's gaun on.
Tryin tae chynge the assembly code aboot, a got this.
it scrambled the 3D eemage, bit it daed chynge whan a pressed buttons. It's progress, is it no?
A wis referred tae some fowk thit micht be able tae help me, an aw o thaim haed tae tirn me doun. Except fur the wan.
Thay war able tae explain tae me thit the Object Processor leet wis coded intae C on the 3D sample.
The Jaguar haes 3 main CPUs. The Motorolla 68000, an 2 custom CPU cawed Tom and Jerry. The 68k is meant tae be the main logic processor, whilst Tom handled graphics, an Jerry soond.
Tom consists o 2 sub-processor: The blitter an the Object Processor.
The object processor is fur pittin sprites on screen, an haes a tasklist, cawed the Object List, fur the Jaguar tae gang throu. Whit is bein duin fur 3D is it essentially converts the hale scene intae wan giant sprite, an render that uisin the OP. Ivery sprite haes it's ain entry on the list tae render, as weel as thay'r coordinates, scale, etc. tae tell it whit tae dae wi the sprite afore pittin it on screne.
It turns oot thit the array is on the main.c file, an at first a thocht a haed tae pit on a new Object List tae render, an a awmaist haed it.
Eventually, a fun oot whit a actual haed tae dae, an got it wirkin!
Wan last hing wis the transparency. A fun oot thit black (Colour 0) is the transparency color. An odd chyce, bit whitiver.
A pit thegither a tutorial on hou tae dae it, gin yese ur interestit.
While a wis tryin tae feegure this oot, a tried the 3D on 2D route, but the issue thare wis a widnae hiv haed ony transparency, but a did accidentally made a Quake-style pick-up as a wis tryin.
Nixt wis tae git enemies tae spawn whauriver an whaniver a tell it tae it spawn, this process wis fairly straichtforrit.
Than a pit a crosshair on the screen. Fur this a decidit tae hiv it in 3D space tae mak it easier fur me tae detect collisions. Haed tae creaut multiple transformation structs tae git it wirkin consistent
A decidit tae mak it rotate it tae gie it mair flair!
Whit wisnae straichtforrit wis gittin collisions tae wirk. It juist widnae detect it whaur it sud be. A decidit tae test it wioot onyhing else on screen bit an enemy bein placed whaur the hitscan ends.
'At wad explain it
A tried tae fun weys tae git the crosshair tae face the camera, an naething seemed tae wirk, s' a hiv a temporar solution whaur the crosshair manually rotates as it's bein muived. That daed the trick.
Throuoot aw this a decidit tae implement resolution options. Bi that a mean gie the uiser letterbox options. Bi hivin the vertical res shortened, it impruives the framerate, as seen here.
Tawkin aboot framerates, yese hiv prolly noticed thit the wey am daein collisions is slawin doun the gemm bi quite a bit. A wis telt bi anither hamebew developer thit aulder seestems dinnae like divisions at aw, an uisin thaim slaws the gemm doun, an tae uise whit's cawed "bitshifts" insteid. Bitshifts ur basically muivin the 1s an 0s up or doun wan spot. This kin be uised tae divide or multiply vailyies uisin less resoorces, an it wirkit! A wis gittin 10-12 fps even on halescreen mode!
Wi this, a decided tae stairtm populatin the levels, an arrangin iverhing, an testin it haes made me realise am really pushin the N3D ingine (as referred tae bi Jag devs) tae it's absolute limit. It gangs doun tae 5fps in halescreen mode whan 5 enemies ur on screen. (10-12fps in cinemascope letterboxed mode)
Muivin the polygons actual daes slaw hings doun. It's no likely thit a'll hiv 5 enemies on screen at the wan time, bit it's defos suhin tae conseeder.
Wioot optimisations, a hink this is gaun'ae be the best a'll git. A'v adaptit the gemmplay tae this.
A got the crosshair tae muive slawer, enemies hitboxes bigger, an juist giein fowk mair time tae shuit hings. A uised while loops an aw tae guarantee collisions, as this wis actual stairtin tae be a problem at this framerate!
A hink a'll lea' it thare fur this week's blog. Am happy wi the feedback am gittin wi this projeck an this blog. A'll see yese nixt time!