tac08isanemulationoftheruntimepartofthePico-8fantasyconsole.Ittakesa.p8(textformat)Pico-8cartfileandrunsitcloselyaspossibletotherealPico-8software.
Whatisn'ttac08?tac08isnotareplacementforPico-8,itprovidesnoneofthecontentcreationcomponentsofPico-8,suchascodeediting,spriteandmapcreationandmusictools.YouwillstillrequireacopyofPico-8tomakegames.AlsoifyoujustwanttorunPico-8gamesyouwillhaveamuchbetterexperiencewithPico-8thantac08
Whywastac08written?tac08'stargetaudiencearedevelopersthatwanttodooneormoreofthefollowing:
ToenablePico-8gamestoberunonplatformsthatPico-8itselfdoesnotrunon.ToembedPico-8gameswithinothergameengines.TomakeitpossibletoextendthePico-8apiandallowgamestousefeaturesnotcurrentlysupportedbyPico-8tac08waswrittenformyownpersonaluse(specificallyforitems1&3above)butIhavedecidedtoopensourceitasothersmayfindituseful.
Isita100%emulation?No.tac08isstillindevelopment,howeverinmytesting,Ihavefoundthatalargenumberofthemostpopulargamesworkcorrectly.
Thisisalistofthemostsignificantcompatibilityissues:
Notallpeekandpokeaddressesareimplemented,notablythecurrentdrawstatevaluesOnlyonejoystickiscurrentlysupportedanditcannotbeconfigured.Savingscreenshotsandrecordinggifvideosarenotimplemented.Theflip()apifunctionisnotimplemented.Sonotweetcartsandsuchwillwork.Onlygamesthatuse_init,_updateor_update60,_drawwillworkcorrectly.Pico-8'ssoundsynthesizerisnotimplemented,howeveryoucanstillplaysoundeffects(seebelow)Themusic()apifunctionisnotcurrentlyimplemented(butIplantoimplementit).Thereareprobablymorethingsicanaddtothislistandwillupdateasneeded.HowdoIgetsoundworkingthen?Thewaysoundisimplementedintac08isnotideal,butgivencurrentmycurrentworkloadsandcomplexityofthePico-8soundsystemIfeelitisareasonablecompromise.Inordertohavetac08playsoundyouneedtoexportyoursoundeffectsfromPico-8aswavfiles.Ihavefoundthatsoundeffectsdonotexportcompletelyiftheyhaveloopswithinthem.
Exportingthesoundeffectsisatwostageprocess.FirstpastethefollowingcodeintothePico-8commandprompt:
fora=0x3200,0x42ff,68dopoke(a+66,0)poke(a+67,0)endcstore(0x3100,0x3100,0x1200,"audio.p8")Thiswillsaveoutacartcalled"audio.p8"containingonlytheunloopedsfxdata.
Nextloadtheaudio.p8cartandexporttheactualsfxaswavfiles:
load"audio.p8"export"cart%d.wav"where"cart"isthenameofyouroriginalcartridgefile.Youneedtohavethesewavfilesinthesamefolderasyoucart.Youcandeleteanywavfilesthatyourcartdoesnotneed.
notethatifthegamecreatessoundatruntimethenitisnotcurrentlypossibletoplaythese
HowdoIbuildtac08WindowsAVisualStudio2017solutionisprovidedinthetac08\win-tac08directory.AcopyofVisualStudio2017CommunitywithC++componentsinstalledissufficienttobuildtac08.
AcopyofthelibSDL2headerfiles,librariesandDLLsareincludedwiththesolutionanddonotneedtobedownloadedseparately.
firstclonetac08fromgithub:gitclone--recurse-submoduleshttps://github.com/0xcafed00d/tac08.gitSimplyopenthesolutionfile(tac08\win-tac08\win-tac08.sln)withVS2017,andselectBuildSolution.BinarieswillbeplaceineithertheReleaseorDebugdirectories,dependingonwhichbuildmodeisselected.Linux&MacAmakefileissuppliedthatwillbuildtac08forlinuxsystems&MacOSX.IthasbeentestedonUbuntu16.04&18.04,RasbianonaRaspberryPi3,aCrostinihosteddebianinstallonachromebook,andaMac.
Buildscriptsforotherenvironmentsarenotcurrentlyprovided(becauseIhavenotwrittenthemyet:-).tac08iswritteninstandardc++11.Theluainterpreterisaversionoflua5.2modifiedtosupportthesyntaxchangesPico-8requires,whiletheluainterpreteriswritteninC,themodificationsrequireittobecompiledasC++.ThismodificationwasperformedbySamHocevarhttps://github.com/samhocevar/z8lua
Theonlyexternaldependencytac08isthecoreSDL2.0library,soitshouldbepossibletobuildtac08fromtheprovidedcodeforanyplatformthathasSDL2.0portedtoit.
firstclonetac08fromgithub:gitclone--recurse-submoduleshttps://github.com/0xcafed00d/tac08.gitinstallsdl2.0developmentlibraries:ForDebianbasedLinuxdistributionsuseapt.
sudoaptinstalllibsdl2-devOtherdistributionsandtheMacwillhaveothermechanismsforinstallinglibraries.
YoumayneedtomodifytheSDL_PATH_LIB&SDL_PATH_INCvariablesinthemakefileifyourSDLlibrariesarenotinstalledinastandardlocation.
buildluainterpreter:cdtac08/src/z8luamakeacd../..buildtac08:makeAfterthisyoushouldbeleftwithatac08executablewithyoucanrunwith:
./tac08mygame.p8
评论