Skocz do zawartości

m97

Użytkownicy
  • Postów

    147
  • Dołączył

  • Ostatnia wizyta

Treść opublikowana przez m97

  1. m97

    Problem z licencją

    Zastosowałem się do wszystkich powyższych porad i także przeinstalowałem gama marker studio z usunięciem plików, lecz nadal otrzymuję ten sam błąd. Dodam też, że posiadam połączenie z internetem. Czy błąd może być powodowany przez firewall? edit: Problem został rozwiązany. Mój antywirus uniemożliwiał połączenie game marker studio z internetem. Dziękuje wszystkim za pomoc.
  2. m97

    Problem z licencją

    Witam, kilka miesięcy temu zakupiłem game marker studio professional. Nie miałem z nim większych problemów do tej pory. Pojawił mi się mianowicie problem z licencją, game marker pyta mnie o licencję przy każdym uruchomieniu. Po podaniu tej licencji sprawdza ją i wszystko działa poprawnie, lecz teraz licencja jakby tak powiedzieć przestała działać. Po podaniu kodu wyświetla mi się następujący komunikat: Mogę też dodać, że sprawdziłem wpisany kod i nie popełniłem w nim żadnego błędu. Z góry dziękuje za pomoc.
  3. Dziękuje, za pomoc. Źle wpisałem argumenty i dlatego to nie działało. Chciałbym jeszcze zapytać o deaktywacje obiektów w gms. Mam w roomie 12k obiektów i bez deaktywacji jest ponad 100 fps, a z nią fps spada poniżej 30. Czy to normalne, czy jest to jakiś błąd. Wcześniej, gdy pracowałem na gm 8.1 deaktywacja zawsze przyspieszała mi grę a teraz zwalnia.
  4. Witam, ostatnio zacząłem się uczyć niedawno dodanych buforów do gms i mam problem z funkcją "buffer_seek". Umiem ustawić odczyt na początku bufora i na jego końcu, ale nie wiem jak go ustawić w środku bufora, np. po piątym bajcie, a takie coś nie działa: GML buffer_seek(blocks_map,16,1) Z góry dziękuje za pomoc.
  5. Miałeś rację chyba nie updatetowałem runnera. Reinstalowałem game marker studio i wszystko działa. Na przyszłość mam pytanie jak updatetować runner?
  6. Witam, znowu zwracam się z pytaniem o ten sam błąd co poprzednio. Tym razem updatetowałem gm studio do wersji 1.1.785 i znowu pojawia się ten sam błąd z runnerem. Czy to możliwe, żeby w nowej wersji nie naprawili tego błędu?
  7. Chciałbym tylko zauważyć, że przy dużych ilościach obiektów nawet dezaktywacja nie pomoże. U mnie fps spadało poniżej 30, kiedy liczba obiektów przekraczała 40000. W takim wypadku należy zastosować ładowanie mapy z pliku i usuwanie jej fragmentów, które są daleko od gracza. Niestety nie jest to proste i wymaga dużo kodu, niemniej jednak pozwala na lepszą optymalizacje.
  8. W jaki sposób to zrobić? Przepraszam, że pytam, ale dopiero niedawno przesiadłem się z wersji 8.1.
  9. Witam, updatowałem dzisiaj gm studio do wersji 1.754 i nie działa mi runner. Mianowicie kompiluje coś takiego: Po czym zawiesza się i nie uruchamia kompilowanej gry. Czy ja robię coś źle, czy to wina yo yo games? Dodam, że na poprzednich wersjach wszystko działało poprawnie.
  10. Witam, w jaki sposób mogę wyczyścić surface przed jego przerysowywaniem?
  11. Udało się w taki sposób: GML _txt = string_replace_all(string(argument0),"\","\"+chr(34)); _txt = string_replace_all(_txt,"\",chr(34)+"\"); _txtTemp = _txt; _txtTemp = _txtTemp + chr(34); _txtTemp = string_delete(_txtTemp,6,1)
  12. Przetestowałem twój kod i znowu pojawia się błąd z wstawianiem cudzysłowu. Po przekształceniu ścieżka wyglądała tak: RD C:\"Users"\"rc710"\"game marker"\"minecreator - własna grafika 32 na 3"2\"savegames\"1" a powinno być tak: RD C:\"Users"\"rc710"\"game marker"\"minecreator - własna grafika 32 na 32"\"savegames"\"1"
  13. Witam postanowiłem napisać funkcję, która taki string: C:\x y\xx\x yz\xxx zmieni w taki: C:\"x y"\"xx"\"x yz"\"xxx" Ogólnie chodzi o to żeby funkcja wstawiała cudzysłów przed i po nazwie folderu. Jest to niby proste, ale męczę się z tym 2 dni i ciągle wychodzą mi jakieś przesunięcia. Oto mój kod: GML pierwszy = true c = 2 while(c<string_length(argument0)){ if(string_char_at(argument0,c)== "\"){ if(pierwszy == true){ c+= 1 argument0 = string_insert(chr(34),argument0,c) pierwszy = false } else{ argument0 = string_insert(chr(34),argument0,c) c+= 2 argument0 = string_insert(chr(34),argument0,c) c+=2 } } c+=1 } return argument0
  14. Witam, próbowałem usunąć folder za pomocą funkcji execute_program, wiersza poleceń i komendy RD, ale jakoś mi to nie działa. Oto mój kod: GML execute_program("cmd",string("RD "+working_directory+"/savegames/"+ds_list_find_value(world_list,czytany_numer)),false)
  15. Jeśli chcesz korzystać z game markerowych funkcji to robisz tak: zapis: GML game_save("ZAPIS/nazwa_twojego_zapisu") odczyt: GML game_load("ZAPIS/nazwa_twojego_zapisu")
  16. Witam, myślałem nad tym jak stworzy folder o nazwie x w tym samym miejscu(folderze) co plik gry i nie wiem jak to zrobić. Wiem, że istnieje funkcja directory_create(), ale ja nie znam ścieżki do folderu w, którym znajduję się gra, bo może się ona znajdować w każdym folderze. Jeśliby można bardzo prosiłbym o ten jak mi się zdaje niedługi kawałek kodu.
  17. Ale 2 czyści mi cały plik, a ja chcę zmienić pojedynczy bajt.
  18. Oto wszystkie funkcje dla plików binarnych: All functions for reading/writing multi-byte integers use the big-endian format, which means the bytes that represent the biggest values are saved first. For example, 276 will be saved as 0-1-20. f_bin_open(filename,mode) - Opens a file in binary mode. Filename is the file name (absolute or relative). Mode should be: 1 = tf_mode_read: Opens for reading. Returns an error if the file does not exist. 2 = tf_mode_write: Opens for writing and clears the existing file. Creates the file if it does not exist. 3 = tf_mode_append: Opens for writing and sets the position to the end of the file. Creates the file if it does not exist. Returns a file id (1-16) or 0 if the file could not be opened, or -1 if an error occurred (invalid mode or more than 16 files opened). f_bin_read_byte(fileid) - Reads a byte from the file. Returns the value of the byte, or 0 if the end of the file was reached. Returns 0 if an error occurred (invalid file id). f_bin_read_byte2(fileid) - Reads 2 bytes from the file. Returns the value of the bytes, or 0 if the end of the file was reached. Returns 0 if an error occurred (invalid file id). f_bin_read_byte3(fileid) - Reads 3 bytes from the file. Returns the value of the bytes, or 0 if the end of the file was reached. Returns 0 if an error occurred (invalid file id). f_bin_write_byte(fileid,number) - Writes a byte to the file. Number can be 0-255. Returns 1, or -1 if an error occurred (invalid file id). f_bin_write_byte2(fileid,number) - Writes 2 bytes to the file. Number can be 0-65535. Returns 1, or -1 if an error occurred (invalid file id). f_bin_write_byte3(fileid,number) - Writes 3 bytes to the file. Number can be 0-16777215. Returns 1, or -1 if an error occurred (invalid file id). f_bin_read_chars(fileid,length) - Reads length bytes from the file and returns them as a string. All NULL bytes in the string will be removed. Returns an empty string if an error occurred (invalid file id). f_bin_write_chars(fileid,length,string) - Writes length bytes from the string to the file. If the string is shorter than length the remaining bytes will be filled with NULL bytes. If the string is longer it wil be truncated. Returns 1, or -1 if an error occurred (invalid file id). f_bin_eof(fileid) - Returns whether the last reading function failed because it reached the end of the file. Normally your game should not depend on this function, but use it only for error checking. Returns -1 if an error occurred (invalid file id). f_bin_seek(fileid,pos) - Sets the current reading/writing position of the file. f_bin_memoryerror(fileid) - Returns whether reading failed because of a memory error since the last call of this function. This will only happen if there was not enough free memory. Returns -1 if an error occurred (invalid file id). f_bin_close(fileid) - Closes the file with id fileid. Returns whether successful (almost always), or -1 if an error occurred (invalid file id). If the function fails, the file will still be closed but it might be corrupted.
  19. Otwieram plik trójką i stwierdziłem, że przy każdej próbie modyfikacji jednego bajtu rozmiar pliku rośnie o jeden bajt.
  20. Zapomniałem dodać że do plików używam specjalnego dll. Podaję dostępne w nim tryby odczytu pliku: f_bin_open(filename,mode) - Opens a file in binary mode. Filename is the file name (absolute or relative). Mode should be: 1 = tf_mode_read: Opens for reading. Returns an error if the file does not exist. 2 = tf_mode_write: Opens for writing and clears the existing file. Creates the file if it does not exist. 3 = tf_mode_append: Opens for writing and sets the position to the end of the file. Creates the file if it does not exist. Returns a file id (1-16) or 0 if the file could not be opened, or -1 if an error occurred (invalid mode or more than 16 files opened). Oto mój kod: GML if(liczba_modyfikowanych_obiektow > 0){ f_bin_close(id_mapa_plik); id_mapa_plik_zapis = f_bin_open("domyslny_swiat/mapa.dat",3); for(a = 0;a < liczba_modyfikowanych_obiektow;a+= 1){ miejsce_zapisu = modyfikowane_obiekty[a,0]*125+modyfikowane_obiekty[a,1]; f_bin_seek(id_mapa_plik_zapis,miejsce_zapisu) b = ds_grid_get(id_mapy_obiektow,modyfikowane_obiekty[a,0],modyfikowane_obiekty[a,1]); f_bin_write_byte(id_mapa_plik_zapis,b) } f_bin_close(id_mapa_plik_zapis); id_mapa_plik = f_bin_open("domyslny_swiat/mapa.dat",1); }
  21. Witam, szukałem czegoś na temat nadpisywania plików binarnych w dokumentacji, ale nie znalazłem. Mój problem polega na tym, że nie mogę zmienić pojedynczego bajtu w pliku. Przepisywanie pliku na nowo nie wchodzi w grę bo jest to duży plik. Kiedy próbuję nadpisać bajt i ustawiam na niego pozycję pisania w pliku to tworzy mi się nowy bajt obok tego, który chciałem zmienić.
  22. Przepraszam następnym razem dokładniej sprawdzę.
  23. Witam, czy w gml można używać przesunięć bitowych tak jak w c++?
  24. Witam, napisałem funkcję pewnej klasy, jednak wywołuje ona dziwny efekt, przerywa program. Oto funkcja: GML void World::draw_world(){ for(int a = view_y;a < view_y + 50;a++){ for(int b = view_x;b < view_x + 80;b++){ switch(pole_gry[a*b]){ case 0: break; case 1: dirt_sprite.x = b*16; // współrzędna x na ekranie dirt_sprite.y = a*16; // współrzędna y na ekranie dirt_sprite.w = dirt_bitmap->w; // szerokość wklejanego obiektu dirt_sprite.h = dirt_bitmap->h; // wysokość wklejanego obiektu SDL_BlitSurface(dirt_bitmap, NULL, screen, &dirt_sprite); break; } } } }
  25. Witam, znalazłem rozszerzenie do game markera Easy Lighting. Oto link Easy Lighting W jaki sposób mam zainstalować to rozszerzenie?
×
×
  • Dodaj nową pozycję...