Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / [DBP] - [DIRECTX 11] Basics - Falling Spheres

Author
Message
Chris Tate
DBPro Master
16
Years of Service
User Offline
Joined: 29th Aug 2008
Location: London, England
Posted: 24th Aug 2014 22:01 Edited at: 25th Aug 2014 20:37
The following snippet contains an elementary framework for creating a DirectX 11 program. It also demonstrates how to make objects fall from the sky using the central processing unit, CPU, of your computer. Falling objects in 3D games could include snow, rain, meteors and airstrike projectiles.

While CPU animated game elements suffice for many applications, it is recommended to use a physics plugin or shader to ensure your game is using the correct hardware dedicated for the purpose of forcing objects around.




Code for creating an animated scene full of falling spheres in a DX11 Program



Constants
Please insert if you do not wish to include the plugin supplied constants file.



Disclaimer:
[i]
The candid idea surrounding this simplistic snippet and my endeavours in this context is for me to learn and share my learning of how to initialize the plugin, and establish an easy to extend program loop in order to produce more complex snippets in future. You are free to use my examples freely in your works but are to adhere to the terms and recommendations of the author of the plugin, whose suggestions are advised to be held as the superlative source.

Please find the prerequisites and more information about the forthcoming Ziggurat plugin in the WIP board; you may download the latest demo version of the plugin freely which contains everything you need to get started, including a collection of example programs supplied by Rudolpho.[i]

Login to post a reply

Server time is: 2024-11-21 12:03:15
Your offset time is: 2024-11-21 12:03:15