期刊文献+

基于C语言的跨平台2D游戏框架设计

Design of 2D Cross-Platform Game Framework Based on C Language
下载PDF
导出
摘要 出于教学目的,本文基于C99标准,利用跨平台SDL2库提供的音视频操作等功能,设计了一套开源简易的跨平台2D游戏框架CSimpleEngine,该框架主要包含通用功能、事件编辑、输入控制、声音管理、精灵管理、文字绘制、物体管理七大模块,流程上使用事件轮询方式进行驱动。框架只包含3个文件:2个核心文件CSimpleEngine.h与CSimpleEngine.c,1个配置文件CSimplConfig.h,使用起来方便简洁。本文利用该框架快速实现了Windows版本的双人弹球,并利用C4Droid生成Android版本的FlappyBird应用,验证了该框架的易用性和跨平台性。 For teaching purposes,this paper uses the cross-platform SDL2 library and based on the C language to design a simple cross-platform 2D game framework:CSimpleEngine.It mainly includes general functions,event editing,input control,sound management,sprite manage⁃ment,text drawing,and object management modules and is driven by event polling.The framework is convenient and simple to use and only contains 3 files:2 core files CSimpleEngine.h and CSimpleEngine.c,1 configuration file CSimplConfig.h.This article uses the frame⁃work to quickly implement the Windows application of the multiplayer PingPong,and then uses C4Droid to generate the Android APK for FlappyBird which verifying the ease of use and cross-platform of the framework.
作者 苏雄 张宏桥 段凌飞 曾晓华 SU Xiong;ZHANG Hongqiao;DUAN Lingfei;ZENG Xiaohua(College of Electronic Information and Electrical Engineering,Xiangnan University,Chenzhou 423000)
出处 《现代计算机》 2021年第21期152-157,共6页 Modern Computer
基金 2019年国家级大学生创新创业训练计划项目(No.S201910545001) 2019年度湖南省大学生创新创业训练计划项目(No.1783)。
关键词 框架设计 跨平台 C99 SDL2 Framework Design Cross-Platform C99 SDL2
  • 相关文献

参考文献5

二级参考文献37

共引文献13

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部