tac08开源项目

我要开发同款
匿名用户2021年11月26日
16阅读
开发技术C/C++
所属分类游戏/娱乐、游戏模拟器/工具/引擎
授权协议MIT License

作品详情

tac08Whatistac08?

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-8

tac08waswrittenformyownpersonaluse(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

HowdoIbuildtac08Windows

AVisualStudio2017solutionisprovidedinthetac08\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&Mac

Amakefileissuppliedthatwillbuildtac08forlinuxsystems&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-dev

OtherdistributionsandtheMacwillhaveothermechanismsforinstallinglibraries.

YoumayneedtomodifytheSDL_PATH_LIB&SDL_PATH_INCvariablesinthemakefileifyourSDLlibrariesarenotinstalledinastandardlocation.

buildluainterpreter:cdtac08/src/z8luamakeacd../..buildtac08:make

Afterthisyoushouldbeleftwithatac08executablewithyoucanrunwith:

./tac08mygame.p8
查看全文
声明:本文仅代表作者观点,不代表本站立场。如果侵犯到您的合法权益,请联系我们删除侵权资源!如果遇到资源链接失效,请您通过评论或工单的方式通知管理员。未经允许,不得转载,本站所有资源文章禁止商业使用运营!
下载安装【程序员客栈】APP
实时对接需求、及时收发消息、丰富的开放项目需求、随时随地查看项目状态

评论