This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:orx:tutorials:object [2012/12/28 14:39 (11 years ago)] – iarwain | en:tutorials:objects:object [2020/08/31 05:28 (4 years ago)] (current) – ↷ Links adapted because of a move operation sausage | ||
---|---|---|---|
Line 3: | Line 3: | ||
===== Summary ===== | ===== Summary ===== | ||
- | As orx is data driven, here we only need two lines of code to create a viewport and an object. All their properties are defined in the config file ([[http://orx.svn.sourceforge.net/svnroot/orx/trunk/ | + | As orx is data driven, here we only need two lines of code to create a viewport and an object. All their properties are defined in the config file ([[https://github.com/orx/orx/blob/master/ |
The viewport is associated with a camera which is implicitly created from the info given in the config file. | The viewport is associated with a camera which is implicitly created from the info given in the config file. | ||
Line 11: | Line 11: | ||
In a later tutorial we'll see how to generate complex object hierarchies or even a whole scene (all background and landscape objects for example) with only a single line of code. | In a later tutorial we'll see how to generate complex object hierarchies or even a whole scene (all background and landscape objects for example) with only a single line of code. | ||
- | For now, you can try to uncomment some of the lines of [[http://orx.svn.sourceforge.net/svnroot/orx/trunk/ | + | For now, you can try to uncomment some of the lines of [[https://github.com/orx/orx/blob/master/ |
===== Details ===== | ===== Details ===== | ||
Line 42: | Line 42: | ||
return EXIT_SUCCESS; | return EXIT_SUCCESS; | ||
}</ | }</ | ||
+ | |||
+ | //Calling '' | ||
+ | This event is sent when closing the windows, for example, but it can also be sent under your own criteria (escape key pressed, for example).// | ||
As orx is data driven, we don't need to manually load any data, such as a sprites. | As orx is data driven, we don't need to manually load any data, such as a sprites. | ||
Line 50: | Line 53: | ||
Don't worry, all this will be covered in further tutorials. | Don't worry, all this will be covered in further tutorials. | ||
- | Now we have an object, we need to learn how to interact with it. This brings us to our second tutorial: [[clock]]. | + | Now we have an object, we need to learn how to interact with it. This brings us to our second tutorial: [[..:clocks:clock]]. |
===== Resources ===== | ===== Resources ===== | ||
- | Source code: [[https://bitbucket.org/orx/orx/src/2de6026f32be/ | + | Source code: [[https://github.com/orx/orx/blob/master/ |
- | Config file: [[https://bitbucket.org/orx/orx/src/2de6026f32be/ | + | Config file: [[https://github.com/orx/orx/blob/master/ |