Coder Social home page Coder Social logo

biud436 / initial2d Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 2.0 34.92 MB

C++로 자체 개발한 2D 게임 엔진으로 Sprite, Audio, Input을 포함한 기능을 내장합니다.

License: Other

C++ 14.85% C 84.95% Lua 0.18% JavaScript 0.02%
cpp fmod gamedev gdi libpng lua openal windows-api zlib

initial2d's Introduction

🧳 Github Stats

Biud436's GitHub stats

🔨 Tech Stack

Backend: NestJS, Node.js, TypeORM, Docker, Redis, AWS EC2, Linux(Ubuntu)

Database: MariaDB

Frontend: React, React Native, SWR, React Query, Styled Components, MUI

Languages: Typescript, Javascript, Ruby, C#, C++

initial2d's People

Contributors

biud436 avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

initial2d's Issues

루아 파일을 정적 라이브러리로 분리하기

컴파일 시간이 너무 많이 소요되는 관계로 루아 파일들을 정적 라이브러리 또는 별도의 DLL로 따로 분리해야 한다.

디버그

문자 집합 : MBCS
코드 생성 : 다중 쓰레드 디버그 DLL(MDd)

릴리즈

문자 집합 : MBCS
코드 생성 : 다중 쓰레드(MT)

내부 솔루션으로 구현하고, 해당 솔루션 내에 있는 라이브러리 파일을 상대 경로를 사용하여 링크한다.

DataManager에서 오류가 있습니다.

JSON 데이터 구조 변경 후 오류가 발생하였습니다.

얕은 C# 지식의 한계가 왔기 때문에 당분간은 해결이 불가능 합니다.

20개의 파일 스테이징이 필요하지만 아직 커밋을 못했습니다.

mruby link error

C++ 프로젝트에 C 기반의 라이브러리를 사용하여 네임 맹글링 차이로 동작을 하지 않는 것으로 보여지지만 확실하지 않음.

맵 에디터 프로그램 C++ QT로 포팅하기

이유

디자인 패턴과 구조 고려 없이 윈폼으로 빠르게 만드는 것 까진 좋았으나 프로그램이 커지고, 중간에 데이터를 하나라도 바꾸면 커플링된 UI와 데이터들이 오류를 내뿜었고, C#의 제네릭이나 리플렉션 또한 익숙한 언어가 아니므로 한계를 느끼게 되었다. 또한 윈폼은 이미 사장된 시장이며 WPF로 옮기는 추세라고 했으므로 더 마이너란 C++로 변경을 단행할 계획이다.

목표

C# Winform 버전을 우선 완성한 후, C++ QT 5로 변경.

SDL2로 포팅하기

개요

현재 게임 엔진 상에서 GDI에 종속된 코드가 많다. 하지만 이미 사장된 기술이며 취업 전선에 뛰어들기 위해 의도적으로 기술을 보여주기 위한 의도가 아니라면 장기적으로 SDL2로 교체하는 것이 좋다고 생각한다.

SDL2의 전형적인 코드는 인터넷이나 책에서 쉽게 구할 수 있으므로 생략한다. 구현은 간단하지만 빌드 시스템 구성은 관련 학과를 나오지 않았다면 조금 까다로울 수 있다.

	if (SDL_Init(SDL_INIT_EVERYTHING) < 0) 
	{
		cerr << "초기화 오류" << endl;
		return -1;
	}
        // 생략 ...

GDI에서 폰트 묘화는 TTF 파일로부터 비트맵 폰트 묘화를 하는 GetGlyphOutlineW라는 조금 RAW한 API를 사용하여 힘들게 구현되었다. 하지만 SDL2에서는 SDL_ttf의 TTF_RenderUTF8_Blended를 이용하면 화면에 쉽게 묘화할 수 있다.

이미지 묘화는 libpng를 이용하여 png 이미지를 bmp로 디코딩한 후 구현되었다. 그러나 SDL2의 SDL_image를 쓰면 쉽게 불러올 수 있다. 기술적으로는 전자를 보여주는 것이 낫지만 게임 프레임워크로써의 매력이 떨어지므로 SDL_image로 바꾸는 것이 좋을 것이다.

파일 입출력은 안드로이드가 주축이므로 SDL_RWseek나 SDL_RWread, SDL_RWclose, SDL_RWwrite 같은 APK 내부의 파일을 읽고 쓰는 API를 사용해야 한다. 기본 게임 엔진에 파일 시스템을 클래스로 따로 캡슐화 해놓지 않았기 때문에 포팅에는 시간이 걸릴 것으로 생각 된다.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.