[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4505: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4507: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4508: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4509: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
SloGameDev.net • Poglej temo - pomoč

pomoč

Vsi tehnični vidiki izdelovanja iger - programiranje vseh vrst in oblik, modeliranje, animacija, risanje, dizajn, grafika, glasba in zvok, umetna inteligenca, matematika, fizika itd.

pomoč

OdgovorNapisal/-a koscak » Ne Nov 20, 2011 10:36 pm

koscak
wannabe
wannabe
 
Prispevkov: 97
Pridružen: Ne Nov 20, 2011 10:23 pm

Re: pomoč

OdgovorNapisal/-a Blodyavenger » Po Nov 21, 2011 1:09 am

................ ...................
"Don't you dare using uninitialized variables, not in C++"
Uporabniški avatar
Blodyavenger
expert
expert
 
Prispevkov: 716
Pridružen: Pe Sep 12, 2008 3:31 pm
Kraj: Land of the Ten Hares

Re: pomoč

OdgovorNapisal/-a koscak » Po Nov 21, 2011 2:56 pm

koscak
wannabe
wannabe
 
Prispevkov: 97
Pridružen: Ne Nov 20, 2011 10:23 pm

Re: pomoč

OdgovorNapisal/-a koscak » Po Nov 21, 2011 3:18 pm

Aja kaj render je moj colision ki preverja trk med ladjo in metkom.
koscak
wannabe
wannabe
 
Prispevkov: 97
Pridružen: Ne Nov 20, 2011 10:23 pm

Re: pomoč

OdgovorNapisal/-a Blodyavenger » Po Nov 21, 2011 3:42 pm

No, sej nimam namena naredit igro, samo podajal ti bom oporne točke in kako kaj spremenit in zakaj. A si poiskusil kaj spremenit kakor sem predlagal? Strelja še vedno enako kakor na sliki ki si jo priložil?
Trenutno delam, bom pa pregledal kodo ko pridem domov.

Render = Draw() - izrisovanje

Trke preverjaš v "Update()"
................ ...................
"Don't you dare using uninitialized variables, not in C++"
Uporabniški avatar
Blodyavenger
expert
expert
 
Prispevkov: 716
Pridružen: Pe Sep 12, 2008 3:31 pm
Kraj: Land of the Ten Hares

Re: pomoč

OdgovorNapisal/-a koscak » Po Nov 21, 2011 3:53 pm

Jaz enako v šoli ;) Mikrokrmilnike mamo :D
Se priporočam za nasvete in najlepša ti hvala. Bom naredil tako kot si rekel a ta colision je pri meni kot update, pa vse z maina klicem, Nekaj bi spremenil da bi naredil meni potem pa prek play kličem igrico .
koscak
wannabe
wannabe
 
Prispevkov: 97
Pridružen: Ne Nov 20, 2011 10:23 pm

Re: pomoč

OdgovorNapisal/-a koscak » Po Nov 21, 2011 3:56 pm

Aja pa prosil bi če bi mi sedaj povedal kaj moram prestavit ker pri 400 vrsticah se da spreminjat, pri 1000 ali več pa žal ,,,
koscak
wannabe
wannabe
 
Prispevkov: 97
Pridružen: Ne Nov 20, 2011 10:23 pm

Re: pomoč

OdgovorNapisal/-a Blodyavenger » Po Nov 21, 2011 8:15 pm

................ ...................
"Don't you dare using uninitialized variables, not in C++"
Uporabniški avatar
Blodyavenger
expert
expert
 
Prispevkov: 716
Pridružen: Pe Sep 12, 2008 3:31 pm
Kraj: Land of the Ten Hares

Re: pomoč

OdgovorNapisal/-a koscak » Po Nov 21, 2011 8:52 pm

koscak
wannabe
wannabe
 
Prispevkov: 97
Pridružen: Ne Nov 20, 2011 10:23 pm

Re: pomoč

OdgovorNapisal/-a koscak » Po Nov 21, 2011 8:56 pm

Zadnjič spremenil koscak, dne Po Nov 21, 2011 9:18 pm, skupaj popravljeno 1 krat.
koscak
wannabe
wannabe
 
Prispevkov: 97
Pridružen: Ne Nov 20, 2011 10:23 pm

Re: pomoč

OdgovorNapisal/-a Blodyavenger » Po Nov 21, 2011 9:06 pm

Aja, vidiš vidiš, nism bil sigurn glede value :)

Glede premikanja pa ne, ne smeš imet v while zanki nikakor...
Kakor sm že večkrat omenu, igra deluje v krogu

Input
Update
Izris
..

Ko pride na vrsto update, poziciji objekta prišteješ neko vrednost natanko enrkat.

Recimo da imamo jabolko na drevesu z x = 10, y = 10. Določimo da jabolko pada in tako
vsak krog (vsakič ko pride Update na vrsto) zmanjšamo y za 1

Move()
{
y = y - 0.001;
}

Ti sedaj kličeš funkcijo Update() vsako 1ms, torej bo jabolko padlo na tla (doseglo y == 0) v natanko 1 sekundi, kar je pravilno.
Če bi naredil while zanko, ki gre 1000x skozi, pa bi jabolko že v 1ms doseglo tla...

Razumeš zakaj while zanka ni prav? :)
................ ...................
"Don't you dare using uninitialized variables, not in C++"
Uporabniški avatar
Blodyavenger
expert
expert
 
Prispevkov: 716
Pridružen: Pe Sep 12, 2008 3:31 pm
Kraj: Land of the Ten Hares

Re: pomoč

OdgovorNapisal/-a koscak » Po Nov 21, 2011 9:20 pm

Štekam zgoraj je urejena koda in tvoja pravilne vendar ladje se ne premikajo, in skos so izrisani metki , samo hočem povedat metki ne smejo it naprej, dokler jih nek triger(sprožilec) ne sproži.
Upam da razumeš, dokler jaz ne pritisnem tipke m- se ne smejo premikat.
Sedaj stoji vse pri miru tako kot sem gor pokazal. ne delujejo tipke, je pa sigurno boljši način ta ki si mi ga povedal. Pozna se ker prvič to delam.
koscak
wannabe
wannabe
 
Prispevkov: 97
Pridružen: Ne Nov 20, 2011 10:23 pm

Re: pomoč

OdgovorNapisal/-a Blodyavenger » Po Nov 21, 2011 10:20 pm

................ ...................
"Don't you dare using uninitialized variables, not in C++"
Uporabniški avatar
Blodyavenger
expert
expert
 
Prispevkov: 716
Pridružen: Pe Sep 12, 2008 3:31 pm
Kraj: Land of the Ten Hares

Re: pomoč

OdgovorNapisal/-a koscak » Po Nov 21, 2011 10:29 pm

Zadnjič spremenil koscak, dne Po Nov 21, 2011 10:45 pm, skupaj popravljeno 1 krat.
koscak
wannabe
wannabe
 
Prispevkov: 97
Pridružen: Ne Nov 20, 2011 10:23 pm

Re: pomoč

OdgovorNapisal/-a Blodyavenger » Po Nov 21, 2011 10:33 pm

Bistvo je da razumeš princip zakaj se stvari ne primikajo in kako jih začet pravilno premikati, zato predlagam da poskusiš premakniti metek. Če ti uspe en metek pognat čez ekran ti bo lažje razumevanje moje razlage.

Potem bomo tudi ladjico premaknili kakor je treba
................ ...................
"Don't you dare using uninitialized variables, not in C++"
Uporabniški avatar
Blodyavenger
expert
expert
 
Prispevkov: 716
Pridružen: Pe Sep 12, 2008 3:31 pm
Kraj: Land of the Ten Hares

Re: pomoč

OdgovorNapisal/-a koscak » Po Nov 21, 2011 10:49 pm

Zadnjič spremenil koscak, dne Po Nov 21, 2011 10:53 pm, skupaj popravljeno 2 krat.
koscak
wannabe
wannabe
 
Prispevkov: 97
Pridružen: Ne Nov 20, 2011 10:23 pm

Re: pomoč

OdgovorNapisal/-a Blodyavenger » Po Nov 21, 2011 10:53 pm

Preden karkoli več začem gledat, me zanima kakšno je stanje z metkom. Ali se premika? Izstreli? Ali ga ni?
................ ...................
"Don't you dare using uninitialized variables, not in C++"
Uporabniški avatar
Blodyavenger
expert
expert
 
Prispevkov: 716
Pridružen: Pe Sep 12, 2008 3:31 pm
Kraj: Land of the Ten Hares

Re: pomoč

OdgovorNapisal/-a koscak » Po Nov 21, 2011 10:59 pm

koscak
wannabe
wannabe
 
Prispevkov: 97
Pridružen: Ne Nov 20, 2011 10:23 pm

Re: pomoč

OdgovorNapisal/-a koscak » Po Nov 21, 2011 11:02 pm

koscak
wannabe
wannabe
 
Prispevkov: 97
Pridružen: Ne Nov 20, 2011 10:23 pm

Re: pomoč

OdgovorNapisal/-a koscak » Po Nov 21, 2011 11:11 pm

Sedaj sem se spomnil kaj je verjetno narobe funkcija pritisni(), kam je potrebno vstavit funkcijo klici ker brez nje ne gre te funkcije. Ker v njej se nahajajo glavni pritiski na tipke (branja), fuknciji tipkovnica in tipkovnica2 ugotvljata le če je tipka pritisnjena in da ne pride do zmešnjav če imaš 2 tipke pritisnjeni naenkrat.
koscak
wannabe
wannabe
 
Prispevkov: 97
Pridružen: Ne Nov 20, 2011 10:23 pm

Re: pomoč

OdgovorNapisal/-a Blodyavenger » Po Nov 21, 2011 11:12 pm

................ ...................
"Don't you dare using uninitialized variables, not in C++"
Uporabniški avatar
Blodyavenger
expert
expert
 
Prispevkov: 716
Pridružen: Pe Sep 12, 2008 3:31 pm
Kraj: Land of the Ten Hares

Re: pomoč

OdgovorNapisal/-a koscak » Po Nov 21, 2011 11:15 pm

Žal ne pomaga . Po moje je problem z branjem z tipkovnice. Preberi zgornji post, ki sem ga napisal vmes ko si pisal, kaj naj zakomentiram.
koscak
wannabe
wannabe
 
Prispevkov: 97
Pridružen: Ne Nov 20, 2011 10:23 pm

Re: pomoč

OdgovorNapisal/-a Blodyavenger » Po Nov 21, 2011 11:26 pm

................ ...................
"Don't you dare using uninitialized variables, not in C++"
Uporabniški avatar
Blodyavenger
expert
expert
 
Prispevkov: 716
Pridružen: Pe Sep 12, 2008 3:31 pm
Kraj: Land of the Ten Hares

Re: pomoč

OdgovorNapisal/-a Blodyavenger » Po Nov 21, 2011 11:28 pm

Aaaa, točno, dobra analiza :)

Pokliči funkcjio pritisni( ) čisto na začetku Update() funkcije, samo da vidimo če dela
................ ...................
"Don't you dare using uninitialized variables, not in C++"
Uporabniški avatar
Blodyavenger
expert
expert
 
Prispevkov: 716
Pridružen: Pe Sep 12, 2008 3:31 pm
Kraj: Land of the Ten Hares

Re: pomoč

OdgovorNapisal/-a koscak » To Nov 22, 2011 1:20 pm

koscak
wannabe
wannabe
 
Prispevkov: 97
Pridružen: Ne Nov 20, 2011 10:23 pm

Re: pomoč

OdgovorNapisal/-a Blodyavenger » To Nov 22, 2011 1:27 pm

................ ...................
"Don't you dare using uninitialized variables, not in C++"
Uporabniški avatar
Blodyavenger
expert
expert
 
Prispevkov: 716
Pridružen: Pe Sep 12, 2008 3:31 pm
Kraj: Land of the Ten Hares

Re: pomoč

OdgovorNapisal/-a koscak » To Nov 22, 2011 1:37 pm

koscak
wannabe
wannabe
 
Prispevkov: 97
Pridružen: Ne Nov 20, 2011 10:23 pm

Re: pomoč

OdgovorNapisal/-a Blodyavenger » To Nov 22, 2011 2:00 pm

................ ...................
"Don't you dare using uninitialized variables, not in C++"
Uporabniški avatar
Blodyavenger
expert
expert
 
Prispevkov: 716
Pridružen: Pe Sep 12, 2008 3:31 pm
Kraj: Land of the Ten Hares

Re: pomoč

OdgovorNapisal/-a koscak » To Nov 22, 2011 4:30 pm

http://www.shrani.si/f/a/37/2zbdpB0k/primer3.png

izpisuje črke, ker cem dal cout<<tipka; ker ti compailar noče prekompajlat printf-ja (v codeblocks) v dev c++ to deluje z printf ;)
Ob vsakem pritisku izpiše črko, kar je prav,..
Osebno mislim da pri metku bi mogla dat nek timer ki bi dovolil premik metka, mal počasneje da bi bil človeškemu očesu viden.
Mislim da je to narobe, in po moje bi mogla ko metek pride z polja dol, jih uničit,ker v najnem primeru se metek postavi na 0 šele ko zadane ladjo, ni pa nujno da zadane.
koscak
wannabe
wannabe
 
Prispevkov: 97
Pridružen: Ne Nov 20, 2011 10:23 pm

Re: pomoč

OdgovorNapisal/-a Blodyavenger » To Nov 22, 2011 6:26 pm

Tam kjer povečaš X pri metku

x += 0.001 poskusi naredit malo večjo številko kot je npr. 0.1, ker sedaj se je metek povečeval 1 pixel vsako sekundo in mogoče ni bilo vidno. A tisto je metek na sredini drugače?
................ ...................
"Don't you dare using uninitialized variables, not in C++"
Uporabniški avatar
Blodyavenger
expert
expert
 
Prispevkov: 716
Pridružen: Pe Sep 12, 2008 3:31 pm
Kraj: Land of the Ten Hares

Naslednja

Vrni se na Izdelovanje iger

Kdo je na strani

Po forumu brska: 0 registriranih uporabnikov in 0 gostov

cron