3D游戏引擎学习一(创建第一个项目)

11 篇文章 0 订阅
11 篇文章 0 订阅
  1. 创建一个简单的3D游戏
    GamePlay$ ./newproject.sh 
    
    1. Enter a name for the new project.
    
       This name will be given to the project
       executable and a folder with this name
       will be created to store all project files.
    
    Project Name: HelloWorld
    
    
    2. Enter a game title.
    
       On some platforms, this title is used to
       identify the game during installation and
       on shortcuts/icons.
    
    Title: Hello 3D Engine
    
    
    3. Enter a short game description.
    
    Description: This is my first 3D game
    
    
    4. Enter a unique identifier for your project.
    
       This should be a human readable package name,
       containing at least two words separated by a
       period (eg. com.surname.gamename).
    
    Unique ID: com.youhao.3d.HelloWorld
    
    
    5. Enter author name.
    
       On BlackBerry targets, this is used for
       signing and must match the developer name
       of your development certificate.
    
    Author: caoshun
    
    
    6. Enter your game's main class name.
    
       Your initial game header and source file
       will be given this name and a class with
       this name will be created in these files.
    
    Class name: HelloWorld
    
    
    7. Enter the project path.
    
       This can be a relative path, absolute path,
       or empty for the current folder. Note that
       a project folder named HelloWorld will also
       be created inside this folder.
    
    Path: 
    
    
    


  2. 编译项目
    GamePlay$ cd HelloWorld
    HelloWorld$ cmake .
    -- Library Found: GLEW Path: /archive/dev/GamePlay/external-deps/glew/lib/linux/x64/libGLEW.a
    -- Library Found: lua Path: /archive/dev/GamePlay/external-deps/lua/lib/linux/x64/liblua.a
    -- Library Found: png Path: /archive/dev/GamePlay/external-deps/libpng/lib/linux/x64/libpng.a
    -- Library Found: BulletDynamics Path: /archive/dev/GamePlay/external-deps/bullet/lib/linux/x64/libBulletDynamics.a
    -- Library Found: BulletCollision Path: /archive/dev/GamePlay/external-deps/bullet/lib/linux/x64/libBulletCollision.a
    -- Library Found: LinearMath Path: /archive/dev/GamePlay/external-deps/bullet/lib/linux/x64/libLinearMath.a
    -- Library Found: openal Path: /archive/dev/GamePlay/external-deps/openal/lib/linux/x64/libopenal.a
    -- Library Found: vorbis Path: /archive/dev/GamePlay/external-deps/oggvorbis/lib/linux/x64/libvorbis.a
    -- Library Found: ogg Path: /archive/dev/GamePlay/external-deps/oggvorbis/lib/linux/x64/libogg.a
    -- Library Found: z Path: /archive/dev/GamePlay/external-deps/zlib/lib/linux/x64/libz.a
    -- Library Found: GL Path: /usr/lib/x86_64-linux-gnu/libGL.so
    -- Library Found: m Path: /usr/lib/x86_64-linux-gnu/libm.so
    -- Library Found: X11 Path: /usr/lib/x86_64-linux-gnu/libX11.so
    -- Library Found: dl Path: /usr/lib/x86_64-linux-gnu/libdl.so
    -- Library Found: rt Path: /usr/lib/x86_64-linux-gnu/librt.so
    -- Library Found: pthread Path: /usr/lib/x86_64-linux-gnu/libpthread.so
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /archive/dev/GamePlay/HelloWorld

    HelloWorld$ make
    [ 33%] Built target HelloWorld
    [ 66%] Copying files: /archive/dev/GamePlay/HelloWorld/*.config
    [ 66%] Built target CopyConfig
    [100%] Copying files: /archive/dev/GamePlay/HelloWorld/res/*
    [100%] Built target CopyRes
    


  3. 运行项目
    bin/linux/HelloWorld


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值