Thread Rating:
  • 2 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Vanilla Éclair (working title)
#48
Obiectele statice sunt aiurea. Sure, daca-s decorative isi fac treaba, dar nu putem sa avem doar chestii decorative in joc. O sa numim obiectele ceva mai complexe decat cele ridicabile, obiecte interactive.
Din aceasta categorie fac parte:
-> fireplace-ul - unde se poate pregati mancarea;
-> locul de pescuit - o portiune "speciala" de pe suprafata apei, unde se poate pescui;
-> chest-ul si biblioteca - containers pentru items;
... si-asa mai departe.

Efectul declansat de fiecare din obiectele de mai sus difera de la obiect la obiect. Evident, fiecare efect in parte va trebui sa aiba un algoritm specific. Totusi, toate obiectele interactive au un lucru important in comun: isi incep activitatea cand jucatorul interactioneaza cu ele. Mai exact, cand le activeaza un NPC sau jucatorul.
Si pentru a implementa obiectele interactive, continuam cu ideea despre care vorbeam acum ceva vreme: ideea de event-uri cu sensul de evenimente din lumea jocului. Dar cum am ales sa le implementez via event-uri (programming-wise), bariera dintre cele 2 notiuni e tot mai fuzzy.
Rolul evenimentelor este in primul rand de a face niste ordine; in al doilea rand, de a oferi acces usor entitatilor din joc la diferite alte entitati, cu care trebuie sa interactioneze.
Cum le implementam?
[Image: 2im1gfr.jpg]
Pornim cu o clasa de baza pentru toate obiectele interactive; va fi un schelet pentru fiecare obiect ce va deriva din ea. Event-urile posibile vor fi din categoria: obiect activat, NPC aproape de obiect si-asa mai departe, fiecare cu o conditie proprie. Pentru a ne asigura ca fiecare obiect derivat are un comportament propriu, in locurile in care ne intereseaza, suprascriem event-urile clasei de baza si introducem codul customizat pentru fiecare obiect interactiv.
In mare parte este acelasi sistem ca si la NPC-uri, unde fiecare NPC mosteneste BaseNPC si suprascrie doar functia SetProperties (see previous screenshots).
replyReply


Messages In This Thread
Vanilla Éclair (working title) - by Patrunjelu' - 09-17-2012, 01:21 AM
RE: Vanilla Éclair (working title) - by Hegan - 09-24-2012, 02:05 PM
RE: Vanilla Éclair (working title) - by Szekemri - 09-24-2012, 08:10 PM
RE: Vanilla Éclair (working title) - by Bogdan - 09-24-2012, 08:35 PM
RE: Vanilla Éclair (working title) - by Szekemri - 09-28-2012, 04:57 PM
RE: Vanilla Éclair (working title) - by Szekemri - 09-29-2012, 10:31 AM
RE: Vanilla Éclair (working title) - by Warhell - 09-30-2012, 09:14 AM
RE: Vanilla Éclair (working title) - by BeoWulf - 09-30-2012, 11:25 AM
RE: Vanilla Éclair (working title) - by Szekemri - 09-30-2012, 03:41 PM
RE: Vanilla Éclair (working title) - by Hegan - 09-30-2012, 07:59 PM
RE: Vanilla Éclair (working title) - by Carnage - 10-04-2012, 09:47 PM
RE: Vanilla Éclair (working title) - by Warhell - 10-19-2012, 03:08 PM
RE: Vanilla Éclair (working title) - by cedry2k - 10-20-2012, 12:42 PM
RE: Vanilla Éclair (working title) - by Carnage - 10-20-2012, 01:45 PM
RE: Vanilla Éclair (working title) - by Carnage - 10-24-2012, 05:51 PM
RE: Vanilla Éclair (working title) - by Szekemri - 10-21-2012, 06:06 PM
RE: Vanilla Éclair (working title) - by Hegan - 10-27-2012, 11:39 AM
RE: Vanilla Éclair (working title) - by Carnage - 10-29-2012, 03:48 PM
RE: Vanilla Éclair (working title) - by Robi - 11-01-2012, 12:23 AM
RE: Vanilla Éclair (working title) - by Robi - 11-01-2012, 12:40 AM
RE: Vanilla Éclair (working title) - by BeoWulf - 11-01-2012, 09:32 PM
RE: Vanilla Éclair (working title) - by BeoWulf - 11-01-2012, 09:38 PM
RE: Vanilla Éclair (working title) - by Patrunjelu' - 11-06-2012, 11:59 PM
RE: Vanilla Éclair (working title) - by old nick - 11-08-2012, 05:53 PM
RE: Vanilla Éclair (working title) - by old nick - 11-08-2012, 08:21 PM
RE: Vanilla Éclair (working title) - by old nick - 11-08-2012, 08:35 PM
RE: Vanilla Éclair (working title) - by Szekemri - 11-08-2012, 10:14 PM
RE: Vanilla Éclair (working title) - by Cristian - 11-08-2012, 10:18 PM
RE: Vanilla Éclair (working title) - by Szekemri - 11-08-2012, 10:23 PM
RE: Vanilla Éclair (working title) - by old nick - 11-08-2012, 10:32 PM
RE: Vanilla Éclair (working title) - by Carnage - 11-13-2012, 09:24 PM
RE: Vanilla Éclair (working title) - by Carnage - 11-23-2012, 11:25 PM
RE: Vanilla Éclair (working title) - by Cristian - 12-02-2012, 09:01 PM
RE: Vanilla Éclair (working title) - by old nick - 12-02-2012, 09:30 PM
RE: Vanilla Éclair (working title) - by meph144 - 12-10-2012, 11:52 PM
RE: Vanilla Éclair (working title) - by meph144 - 12-14-2012, 08:24 PM

Forum Jump:


Users browsing this thread: 7 Guest(s)