Cov txheej txheem:
- Kauj Ruam 1: Cov teeb meem…
- Kauj ruam 2: Stupid Compass
- Kauj Ruam 3: Thaum kawg Kev Tshuaj
- Kauj ruam 4: Cia Tau Txais App Ua Haujlwm
- Kauj Ruam 5: Kho Kho GameSparks
- Kauj Ruam 6: Ntxiv Qhov Txheej Txheem Kawg …
- Kauj Ruam 7: Ntxiv Cloud Code
- Kauj Ruam 8: Peb Ua Tiav lawm
Video: Muab AR Cov Hom Phiaj ntawm GPS Ua Haujlwm hauv Kev Ncaj Ncees: 8 Kauj Ruam (nrog Duab)
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:29
Cov lus qhia no yuav dhau mus ua mobile app rau tso AR khoom ntawm GPS ua haujlwm nrog ARkit thiab ARCore siv Unity3D. Kuv yuav taug kev koj los ntawm kev teeb tsa ib qhov haujlwm uas kuv tau siv Mapbox uas tso cai rau peb los sau cov lus ntawm qhov chaw tshwj xeeb GPS thiab sau lawv mus rau GameSparks database.
Txhua qhov software thiab cov phiaj xwm peb yuav siv ntawm no yog pub dawb.
Rub tawm Unity 3D ntawm no yog tias koj tsis muaj nws:
unity3d.com/
Kauj Ruam 1: Cov teeb meem…
Yog li qhov no tsis yog qhov yooj yim app los ua nrog cov kev txwv tam sim no ntawm mobile GPS thiab mobile compass.
Ua siab ncaj cov khoom pom qhov twg lawv xav tias yuav muaj txog 50% ntawm lub sijhawm. Yog li cov txiaj ntsig tsis zoo, tab sis lawv ua tau raug dua qhov ze koj mus rau cov khoom.
Txawm li cas los xij, Kuv xav tias txoj hauv kev zoo dua rau GPS raws AR ntawm lub sijhawm no yuav siv daim ntawv qhia zoo li pokemon mus thiab thaum koj mus ze rau ib qho khoom uas lub koob yees duab qhib thiab koj tsuas pom cov khoom ntawd nyob ntawm koj xub ntiag. Yav tom ntej kuv xav ua qhov qhia tag nrho ntawm kev siv yooj yim dua li ntawd.
Ob txoj kev twg kuv tau siv Mapbox ua ntej thiab kuv paub tias lawv muaj chav kawm hloov dua siab tshiab uas muaj lub luag haujlwm rau hloov GPS ua haujlwm mus rau kev sib koom ua ke hauv ntiaj teb. Kuv xav tias kuv tuaj yeem hla dhau qee qhov GPS tswj hwm thiab lawv yuav tshwm nyob qhov twg kuv xav tau. Tsis ua hauj lwm
Cov khoom pom tau zoo txheeb ze rau ib leeg tab sis lawv tsis tau nyob hauv qhov chaw raug. Yog li kuv tau ua qee qhov kev tshawb fawb thiab pom tias Kuv Lub Koob Yees Duab xav tau los ua kom haum nrog sab qaum teb tseeb kom cov khoom pom nyob hauv qhov chaw raug.
Qhov teeb meem yog lub koob yees duab hauv koj lub xov tooj yeej tsis raug qhov tseeb.
Kauj ruam 2: Stupid Compass
Qhov teeb meem tseem ceeb yog thaum koj tso cov khoom nyob deb ntawm lub koob yees duab, yog tias koj lub xov tooj lub tswv yim ntawm sab qaum teb muaj tseeb txawm tias nyob deb li ob peb qib, cov khoom nyob deb yuav tshwm nyob deb heev.
Kuv yuav luag muab qhov kev nqis peev no tab sis ib tus phooj ywg hais rau kuv txog qhov haujlwm GitHub no:
github.com/mapbox/mapbox-ar-unity
Qhov no yog kev sim ua "ntiaj teb nplai" AR los ntawm Mapbox qhov twg cov khoom raug thauj mus rau GPS kev tswj hwm kom qhov kev paub dhau los ntawm kev muaj peev xwm tuaj yeem ua haujlwm sab nraud nyob deb deb ntau dua li tsuas yog sab hauv chav me hauv koj lub tsev.
Lawv txoj haujlwm siv AR Txoj Haujlwm deltas thiab GPS Txoj Haujlwm deltas los xam lub kaum sab xis uas yog qhov offset los ntawm AR lub koob yees duab mus rau sab qaum teb tseeb. Yog li pib siv GPS nyeem ntawv thaum tus neeg siv pib lub app thiab kom lawv taug kev hauv kab ncaj thiab nqa lwm qhov nyeem GPS. Tom qab ntawd nrog ob lub ntsiab lus no koj tuaj yeem qhia qhov kev taw qhia uas tus neeg tau taug kev (piv txwv tias lawv lub koob yees duab tau taw qhia rau hauv txoj kev lawv taug kev). Lawv pom tias qhov no muaj tseeb dua li siv lub koob thaij hauv xov tooj.
Lwm qhov teeb meem lawv sim daws yog drift nrog ARkit. Kev taug qab yog qhov zoo hauv ib chav me me tab sis thaum koj sab nraud taug kev mus deb AR cov khoom mus kom deb deb ntawm qhov chaw uas lawv xav tau.
Kauj Ruam 3: Thaum kawg Kev Tshuaj
Yog li qhov Mapbox txoj haujlwm no tau muab txoj hauv kev kom tau txais txoj kev ntseeg siab tig mus rau sab qaum teb kom muaj tseeb yog li txhua yam uas tau tso tseg tsuas yog tso cov khoom hauv ntiaj teb.
Kuv tau xaus qhov ua piv txwv me ntsis yog li kuv tuaj yeem sau cov ntawv xov ntawm qhov chaw GPS tshwj xeeb thiab tom qab ntawd sau cov ntaub ntawv ntawd mus rau GameSparks database. Qhov ntawd yog qhov kuv yuav qhia koj yuav siv li cas.
Qhov teeb meem nkaus xwb nrog txoj haujlwm no yog qhov koj yuav tsum tau ua kom zoo ua ntej nws tuaj yeem siv tau.
Kuv txhais li cas los ntawm kev sib dhos yog tias txij li Mapbox siv txoj haujlwm deltas los xam nqe lus, thaum koj xub qhib lub app thiab koj yuav tsum ua kom ntseeg tau tias lub dav hlau hauv av tau kuaj pom thiab tom qab ntawd taug kev hauv kab ncaj rau ib pliag kom txog thaum ntsuas kom raug.
Hauv qhov kev nkag siab UX yog lwm qhov teeb meem tab sis hauv kev txhim kho ntawm txoj haujlwm lawv muab piv txwv ntawm kev muab cov vuas tso rau pem hauv ntej ntawm tus neeg siv taug kev hla kom ntseeg tau tias muaj kev sib dhos zoo.
Yog li tam sim no koj paub qhov txwv ntawm txoj haujlwm no cia kuv qhia koj yuav siv nws li cas thiaj tuaj yeem ua si ib puag ncig. Thaum kawg koj yuav tsum tsim tus accountboxbox account thiab gameparks tus account ob qho uas yog pub dawb. Kuv siv gameparks tsuas yog li ntawd kuv tuaj yeem txuag GPS tswj hwm qhov chaw vim tias thaum sim koj yuav rov pib dua thiab rov tsim dua lub app ntau zaus.
Tsis tas li, qhov no yuav tsum ua haujlwm nrog ob qho ARkit thiab ARcore tab sis kuv tsuas muaj iPhone nyob rau lub sijhawm tam sim ntawd yog txhua yam kuv tuaj yeem sim.
Kauj ruam 4: Cia Tau Txais App Ua Haujlwm
Thawj yam ua ntej rub tawm txoj haujlwm no los ntawm GitHub:
Txuag cov ntawv rau koj lub desktop thiab qhib nws hauv Unity.
Mus rau cov ntawv, tsim chaw, thiab hloov koj lub platform mus rau Android lossis IOS.
Tam sim no mus rau Mapbox.com thiab tsim ib tus as khauj yog tias koj tseem tsis tau muaj.
Lob koj tus lej API thiab rov qab mus rau Kev Sib Koom, nyem rau ntawm Mapbox tab nyob rau sab saum toj, thiab nyem teeb tsa. Muab tshuaj txhuam rau hauv koj tus lej API nyob ntawd.
Tam sim no tsim tus as khauj ntawm GameSparks.com thiab nyem lub pob nyob rau sab saum toj sab xis los tsim ib qho app tshiab.
Hu nws txhua yam koj xav tau thiab theej koj tus lej API thiab app zais cia. Rov qab mus rau Kev Sib Koom thiab nrhiav GameSparks tab nyob rau saum toj. Nyem rau teeb tsa thiab muab koj daim ntawv pov thawj tso rau hauv ib yam nkaus.
Kauj Ruam 5: Kho Kho GameSparks
Tam sim no ua ntej lub app yuav ua haujlwm, peb yuav tsum teeb tsa peb lub database.
GameSparks siv noSQL yog li peb yuav tsum xub tsim cov khoom sau thiab ntxiv cov xwm txheej uas peb app siv los nyeem, sau, thiab rho tawm los ntawm server.
Ua ntej tsim cov khoom sau tshiab ntawm GameSparks lub vev xaib thiab hu nws txhua yam koj xav tau.
Tam sim no peb yuav tsum tsim 3 cov xwm txheej.
Thawj qhov app yuav tsum tau ua yog sau cov lus tawm mus rau lub hauv paus.
Cov lus muaj qhov latitude, longitude, thiab tom qab ntawv cov lus.
Yog li mus rau tus tsim thiab ntxiv qhov xwm txheej tshiab. Ua tus lej luv "SAVE_GEO_MESSAGE".
Muab txhua yam koj xav tau rau lub npe thiab lus piav qhia.
Ntxiv cov cai luv rau 3 tus cwj pwm:
"LOJ" "LON"
"TEXT"
Teem txhua hom ntaub ntawv rau txoj hlua thiab teeb tus nqi ua ntej rau 0. Ua lub hom phiaj sib sau ua ke ntawm txhua tus rau "siv hauv tsab ntawv."
Kauj Ruam 6: Ntxiv Qhov Txheej Txheem Kawg …
Lub app tseem xav tau thauj tag nrho cov lus los ntawm lub hauv paus thiab nyeem lawv rau hauv Kev Sib Koom thaum lub app pib kom peb tuaj yeem tso cov lus AR uas tau khaws cia hauv lub database.
Tsim lwm qhov xwm txheej thiab hu nws "LOAD_MESSAGE"
Qhov xwm txheej no tsis xav tau tus cwj pwm. Ib zaug ntxiv tso txhua yam koj xav tau rau lub npe thiab lus piav qhia.
Ua tib yam rau lwm qhov xwm txheej thiab hu nws "REMOVE_MESSAGES"
Qhov no txawm tsis xav tau tus yam ntxwv ib yam nkaus.
Tam sim no qhov kawg uas peb yuav tsum tau ua yog ntxiv qee qhov "huab chaws" lossis tus lej server sab uas tau hu thaum txhua qhov kev tshwm sim tau pib los ntawm peb lub app.
Kauj Ruam 7: Ntxiv Cloud Code
Hauv GameSparks mus rau teeb tsa thiab huab chaws.
Peb yuav tsum ntxiv ib tsab ntawv rau txhua qhov xwm txheej uas peb nyuam qhuav ua.
Hauv LOAD_MESSAGE qhov xwm txheej ntxiv cov cai no thiab txuag nws:
var messageData = Spark.runtimeCollection ("GeoMessage");
var tus cursor = messageData.find ();
var allMessages = ;
thaum (cursor.hasNext ()) {
var obj = cursor.next ();
rho tawm (obj ["_id"]);
allMessages.push (obj);
}
Spark.setScriptData ("all_Messages", allMessages); // xa tag nrho cov ntaub ntawv
Hauv REMOVE_MESSAGES qhov xwm txheej ntxiv cov cai no:
var messageData = Spark.runtimeCollection ("GeoMessage");
messageData.remove ({});
Thaum kawg hauv SAVE_MESSAGES kev tshwm sim ntxiv qhov no:
var geoMessageList = Spark.runtimeCollection ("GeoMessage");
var messageLat = Spark.getData (). LAT;
var messageLon = Spark.getData (). LON;
var messageText = Spark.getData (). TEXT;
var currentMessage = {
"messLat": messageLat,
"messLon": messageLon,
"messText": messageText,
};
geoMessageList.insert (currentMessage);
Kauj Ruam 8: Peb Ua Tiav lawm
Txoj haujlwm no siv tus lej tshwj xeeb ntawm koj lub cuab yeej los txheeb xyuas qhov tseeb nrog GameSparks server yog li tam sim no koj tuaj yeem rov qab mus rau Kev Sib Koom thiab nyem ua si, thiab koj yuav tsum pom hauv lub console "ntaus ntawv lees paub …"
Tam sim no mus rau cov ntawv, tsim chaw, thiab nyem tsim. Yog tias koj tsis tau ua ib qho app rau Android lossis IOS koj yuav xav teeb tsa tus lej txhim kho nrog Google lossis Apple.
Thaum lub app nyob ntawm koj lub xov tooj koj yuav tsum xub ua kom ntseeg tau tias ARKit lossis ARCore kuaj pom lub dav hlau hauv av. Tam sim no nyem lub pob khawm nyob hauv qab kaum sab laug. Taug kev tom ntej ob peb kauj ruam thiab koj yuav pom "suav ua ke" los hauv lub teeb xiav. Tam sim no lub khawm UI yuav tsum tshwm sim thiab yog tias muaj cov lus tau rub hauv koj lub database lawv yuav raug tso rau hauv ntiaj teb.
Txhawm rau cim GPS tshiab AR lus nyob qhov twg taug kev mus rau qhov chaw koj xav kom cov lus yog thiab nyem lub cim lus nyob rau sab xis saum toj ntawm lub vijtsam. Ntaus txhua yam lus koj xav tau thiab nyem lub pob tus lej!
Pom zoo:
Lub Hom Phiaj Taw Qhia: Tsim Lub Hom Phiaj Kawm/Qhia Txoj Kev/Cov Txheej Txheem Siv Cov Duab Puncher: 5 Kauj Ruam
Lub Hom Phiaj Taw Qhia: Tsim Lub Hom Phiaj Kawm/Qhia Txoj Kev/Cov Qauv Siv Cov Duab Puncher: Kawm/qhia txoj hauv kev rau cov tub ntxhais kawm tshiab rau kev tsom mus rau lub hom phiaj. Nov yog txoj hauv kev tso cai rau lawv kom pom kev thiab pom cov txheej txheem ntawm kev tsim cov khoom los ntawm cov chav kawm. EkTools 2-nti loj punch; cov duab zoo tshaj plaws. 2. Daim ntawv los yog c
Ib-tes Ncaj Ncaj Ncaj Ncaj Ncaj Ncaj Ncaj Ncaj Qab Zib rau Quadriplegics: 5 Kauj Ruam
Ib-tes Ncaj Ncaj Ncaj Ncaj Ncaj Ncaj Ncaj rau Quadriplegics: Peb tsim cov qauv ntawm ib txhais tes ncaj plaub hau ncaj rau quadriplegics siv yam tsis muaj ntiv tes txawj ua
Lub Hom Phiaj Taw Qhia: Tsim Lub Hom Phiaj Kawm/Qhia Txuj Ci/Txuj Ci Siv Txiab: 5 Kauj Ruam
Lub Hom Phiaj Taw Qhia: Tsim Lub Hom Phiaj Kawm/Qhia Txoj Kev/Txuj Ci Siv Txiab: Kawm/qhia txoj hauv kev rau cov tub ntxhais kawm tshiab rau lub hom phiaj ua haujlwm. Nov yog ib txoj hauv kev tso cai rau lawv kom pom kev thiab pom cov txheej txheem ntawm kev tsim cov khoom los ntawm cov chav kawm.Parts: 1. Txiab (yam twg yuav ua). 2. Daim ntawv lossis daim npav. 3. Marker… nyeem ntxiv
Yokozuna Ninja Booming Grip ntawm Kev Ncaj Ncees (Lub Koob Yees Duab Luam Stand Tripod Adapter): 5 Kauj Ruam (nrog Duab)
Yokozuna Ninja Booming Grip ntawm Kev Ncaj Ncees (Lub Koob Yees Duab Luam Stand Tripod Adapter): Tsis txhob xav tsis meej pem nrog ninja swooping crane teeb tsa lub koob yees duab, tsim cov khoom siv yooj yim no los siv koj tus kheej lub tripod ua lub koob yees duab theej muag. Thaum thaij duab yam uas yuav tsum tau muab tso tiaj tus zoo li *qua ntxi */ khoom koj yuav tsum tau txiav tawm ntawm eb@y, koj xav tau
Hloov Cov Ncaj Ncaj Ncaj Ncaj Ncaj mus rau Txoj Cai Lub Taub Hau (hauv Pinch): 4 Cov Kauj Ruam
Hloov Cov Ncaj Ncaj Ncaj Ncaj Ncaj Ncaj Ncaj Ncaj Ncaj Ncaws Ncaws Ncaws Ncaws Ncaws Pob (hauv Pinch): Tom qab pom qhov kev tshaj tawm rau kev sib tw arduino, kuv hais tias, hav zoo vim li cas ho tsis sim. Yog li kuv kinda cheaped tawm thiab tau txais cov khoom siv pob txha liab qab, nrog lub hom phiaj ntawm "ua nws txoj hauv kev". Ib qho ntawm cov kev hloov pauv no yog ib yam ntawm thawj yam uas koj