程序员开发实例大全宝库

网站首页 > 编程文章 正文

用OpenGL写的3D俄罗斯方块(opengl 俄罗斯方块)

zazugpt 2024-09-09 10:40:04 编程文章 23 ℃ 0 评论

BlockOut II is an OpenGL adaptation of the original BlockOut DOS game by California Dreams in 1989. 玩家有世界排名的。玩这个和亡者农药哪个对学SoildWorks有点帮助?农药没有自己做游戏引擎吧?

这个编译起来简单,make两次即可。But...

先apt install libgl1-mesa-dev libglu1-mesa-dev libxext-dev libsdl1.2-dev libsdl-mixer1.2-dev

然后从它的网站(链接见评论)下载源码。

先在ImageLib/目录下make,再在BlockOut/下make。

运行blockout,它说需要用BL2_HOME环境变量指定声音文件所在的目录。

apt install blockout2装二进制包。dpkg -L blockout2知道应:

export BL2_HOME=/usr/share/games/blockout2

刚进去屏幕两侧闪烁,放下块积木后OK,800x600x32,一千七百多[微笑]的fps。

Debian有它的源码包,里面有sounds/目录,可ImageLib/src/png/里只有两个文件。

从它网站下载的,没有sound目录,可png/文件是全的,能编译的。


Mesa is an open source 3D computer graphics library. libGL is the core library for OpenGL. libGLU is a utility library for OpenGL. It provides higher-level functions.

  • libglu1-mesa-dev Mesa OpenGL utility library
  • libgl1-mesa-dev 过渡哑包
  • libxext-dev X11 miscellaneous extensions library

SDL (Simple DirectMedia Layer) is a library that allows programs portable low level access to a video framebuffer, audio output, mouse, and keyboard.

  • libsdl1.2-dev
  • libsdl-mixer1.2-dev

Tags:

本文暂时没有评论,来添加一个吧(●'◡'●)

欢迎 发表评论:

最近发表
标签列表