Why I Love this forum

Started by 3DzForMe, December 28, 2018, 07:37:32

Previous topic - Next topic

RemiD

well, in the documentation, it is written that renderworld() draws on the backbuffer, so (if the documentation is correct) it should not happen...

TomToad

(Checks documentation)
RenderWorld [tween#] 

Parameters:


tween# - defaults to 1.

Description:

Renders all entities in the world.
The optional tween parameter can be used to render entities at a point somewhere between their captured position and their current position. A tween value of 0 will render entities at their captured position, a tween value of 1 will render entities at their current position. Other values may be used for interpolation. Defaults to 1.

Tweening is a technique used to allow games to have their game logic updated a fixed amount of times, e.g. 30, while having Blitz3D interpolate between these game logic updates to render as many frames per second as it can, e.g. 60+, with each frame different to the last.

This results in a game which only has to have its game logic updated at half the rate of the renders per second, freeing up CPU time, while at the same time having the game run as smooth as possible on anybody's machine.

Render tweening is quite an advanced technique, and it is not necessary to use it, so don't worry if you don't quite understand it. See the castle demo included in the mak (nickname of Mark Sibly, author of Blitz3D) directory of the Blitz3D samples section for a demonstration of render tweening.



Example:

None.


No mention of BackBuffer.
------------------------------------------------
8 rabbits equals 1 rabbyte.

RemiD

i have this written in my blitz3d doc :
Quote
Renders the current scene to the BackBuffer onto the rectangle defined by each cameras CameraViewport( ). Every camera not hidden by HideEntity( ) or with a CameraProjMode( ) of 0 is rendered. Rendering to other buffers is currently not supported by Blitz3D.

The optional tween parameter should only be specified when RenderWorld is used in conjunction with CaptureWorld. CaptureWorld is used to store the 'old' position, rotation and scale, alpha and colour of each entity in the game world, and a tween value of < 1 will interpolate between these 'old' values and the 'current' ones. A tween value of 0 will render all entities at their state when CaptureWorld was last called, and a tween value of 1 will render all entities at their current state.

The use of tweening allows you to render more than one frame per game logic update, while still keeping the display smooth. This allows you to cut down on the CPU time that would be required to update your game logic every render. Note, however, that the bottleneck in almost all 3D applications is the graphics card and the CPU time involved in updating game logic is often very little. A good alternative to render tweening is the use of a delta time, that is, moving your entities each frame depending on the time it took for the program to process and render that frame.

Render tweening is quite an advanced technique, and it is not necessary to use it, so don't worry if you don't quite understand it. See the castle demo included in the mak (nickname of Mark Sibly, author of Blitz3D) directory of the Blitz3D samples section for a demonstration of render tweening.

TomToad

#33
Strange, I just checked some backups to see which is the latest docs.  Looking at the RenderWorld command, v1.64 has no mention of BackBuffer.  The date of the docs is 2001.  V 1.88 says rendering will be on the backbuffer, docs from 2005.  v 1.106-v1.108 has the original 2001 docs.

The 2001 docs imply 3d rendering is only allowed on the BackBuffer for other commands, such as CreateTexture() which says "to display 3D graphics on a texture, your only option is to copy from the backbuffer to the texturebuffer.", but nothing in RenderWorld nor SetBuffer where you would expect such a description.

After some experimenting, I have found that you can set other rendering targets, but they will only result in a black image.  So the 2005 docs (which seem to be the latest) are correct, just poorly worded.  It should say
QuoteRenders the current scene onto the rectangle defined by each cameras CameraViewport( ). Every camera not hidden by HideEntity( ) or with a CameraProjMode( ) of 0 is rendered. Only the BackBuffer currently supports 3D rendering.  Using SetBuffer to render to other buffers will result in a blank image.
(and why the latest version of B3D is using an old version of the docs is a mystery).

Edit:  It appears the download from itch.io has the latest docs (2005).  The download from BlitzBasic.com does not, though they are listed as the same version.
------------------------------------------------
8 rabbits equals 1 rabbyte.

RemiD

there was also another update for the Blitz3d docs : (1.99)
http://rd-stuff.fr/blitz3d-docpak-1.99.zip

3DzForMe

#35
Thanks for the info about the update to the docs,  ;D

Was digging around trying to source the fastlibs libraries/dll(s) (As some of you may know I've had TWO dev machines die during the gaming competitions this year).

Was working on compiling my old tcx file plotter last night - realised the fastlibs I need are stuck (possibly) on a dead computers hard drive. At the mo I've no way of accessing them (my current dev machine is a laptop with no E-Sata connectors). I found some fastlibs online, retailing at 10 or 12 dollars, which ain't much I know - but I'll have to be patient and wait until I can access the old hard drives. After all, I'm spending 200 quid this morning on brake discs, pads, oil, oil filter and airfilter for the old workhorse.

In the interim - compiled the code in this thread again - just a year after the first time - and made this years chrimbo message (almost etch-a-sketch style) , with a little help from Paint3D - a rather brill paint package by Microsoft. Yeah, my tree needs a bit of work ;)

BLitz3D, IDEal, AGK Studio, BMax, Java Code, Cerberus
Recent Hardware: Dell Laptop
Oldest Hardware: Commodore Amiga 1200 with 1084S Monitor & Blitz Basic 2.1