본문 바로가기
728x90
SMALL

전체 글153

[ChatGPT][SFML][커스텀 2D 게임 엔진 개발] SFML 기반 커스텀 2D게임 엔진용 스프라이트 편집기 생성 예제 코드 샘플 SFML 기반 커스텀 2D게임 엔진용 스프라이트 편집기 생성 예제 코드 샘플 /* Here's an example of how you could move the sprite using the arrow keys */ #include int main() { sf::RenderWindow window(sf::VideoMode(800, 600), "Sprite Editor"); sf::Texture sprite_texture; if (!sprite_texture.loadFromFile("sprite.png")) { return -1; } sf::Sprite sprite(sprite_texture); float speed = 200.0f; // pixels per second sf::Clock clock; wh.. 2023. 1. 13.
[ChatGPT][SDL2][커스텀 2D 게임 엔진 개발] SDL2 기반 커스텀 2D게임 엔진용 스프라이트 편집기 생성 예제 코드 샘플 SDL2 기반 커스텀 2D게임 엔진용 스프라이트 편집기 생성 예제 코드 샘플 // Here's an example of how you could move the sprite using keyboard input in SDL2 #include "SDL.h" #include int main(int argc, char* argv[]) { SDL_Init(SDL_INIT_VIDEO); SDL_Window* window = SDL_CreateWindow("Sprite Editor", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 800, 600, SDL_WINDOW_SHOWN); SDL_Renderer* renderer = SDL_CreateRenderer(window,.. 2023. 1. 13.
[ChatGPT][SDL2][2D 게임 개발] C와 SDL2 라이브러리를 사용하여 360도 회전하는 로고 회전 애니메이션을 만드는 방법의 예 C와 SDL2 라이브러리를 사용하여 360도 회전하는 로고 회전 애니메이션을 만드는 방법의 예 // Here's an example of how you can create a logo rotation animation that rotates 360 degrees using C and the SDL2 library #include int main(int argc, char* argv[]) { // Initialize SDL if (SDL_Init(SDL_INIT_VIDEO) < 0) { printf("SDL could not initialize! SDL_Error: %s\n", SDL_GetError()); return 1; } // Create the window SDL_Window* window = S.. 2023. 1. 13.
[ChatGPT][SFML][2D 게임 개발] C++ 및 SFML 라이브러리를 사용하여 360도 회전하는 로고 회전 애니메이션을 만드는 방법의 예 C++ 및 SFML 라이브러리를 사용하여 360도 회전하는 로고 회전 애니메이션을 만드는 방법의 예 // Here's an example of how you can create a logo rotation animation that rotates 360 degrees using C++ and the SFML library #include int main() { // Create the main window sf::RenderWindow window(sf::VideoMode(800, 600), "SFML window"); // Load a sprite to display sf::Texture texture; if (!texture.loadFromFile("logo.png")) return EXIT_FAIL.. 2023. 1. 13.
728x90
LIST