Quote: "DBP pretty much can't be used to make commercial games anymore"
Are you trying to say that the only game that is worth to develop is AAA-type game with $$$ budget?
Quote: "Indie game dev used to be a hobbyist's pleasure, but now everyone wants to get rich and famous off it."
This.
This post is addressed to anyone as my thoughts are melted through the thread.
Also, what
player cares of what type of arrays are inside of game? No-one.
DBP is a tool. Tool is not a game. A game is a game. If you want to make a good game - you will make it "even" on DBP.
DBP allows to make game from scratch with ease.
Wanna see how OpenGL code for just soft particles looks like?
//
// Example of soft particles in OpenGL
//
// Author: Alex V. Boreskoff <steps3d@narod.ru>
//
#include "libExt.h"
#ifdef MACOSX
#include <GLUT/glut.h>
#else
#include <glut.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include "libTexture.h"
#include "TypeDefs.h"
#include "Vector3D.h"
#include "Vector2D.h"
#include "boxes.h"
#include "GlslProgram.h"
#include "utils.h"
#include "Camera.h"
Vector3D eye ( -1.5, -1.5, 1.5 ); // camera position
unsigned decalMap; // decal (diffuse) texture
unsigned stoneMap;
unsigned teapotMap;
unsigned depthMap;
unsigned particleMap;
float angle = 0;
float yaw = 0;
float pitch = 0;
float roll = 0;
Camera camera ( eye, 0, 0, 0 ); // camera to be used
GlslProgram program;
void displayBoxes ();
void reshape ( int w, int h );
void displayBoxes ()
{
glMatrixMode ( GL_MODELVIEW );
glPushMatrix ();
drawBox ( Vector3D ( -5, -5, 0 ), Vector3D ( 10, 10, 3 ), stoneMap, false );
drawBox ( Vector3D ( 3, 2, 0 ), Vector3D ( 1, 2, 1.5 ), decalMap, true );
drawBox ( Vector3D ( 1, 3, 0 ), Vector3D ( 1, 1, 1.5 ), decalMap, true );
drawBox ( Vector3D ( -2, 1, 0 ), Vector3D ( 1, 1, 1.5 ), decalMap, true );
glBindTexture ( GL_TEXTURE_2D, teapotMap );
glTranslatef ( 0.2, 1, 0.7 );
glRotatef ( angle * 45.3, 1, 0, 0 );
glRotatef ( angle * 57.2, 0, 1, 0 );
glutSolidTeapot ( 0.5 );
glPopMatrix ();
}
void displayParticle ( const Vector3D& pos, float r )
{
glMultiTexCoord4f ( GL_TEXTURE1_ARB, pos.x, pos.y, pos.z, r );
// now setup particle
glBegin ( GL_QUADS );
glMultiTexCoord2f ( GL_TEXTURE0_ARB, 0, 0 );
glVertex3fv ( pos );
glMultiTexCoord2f ( GL_TEXTURE0_ARB, 0, 1 );
glVertex3fv ( pos );
glMultiTexCoord2f ( GL_TEXTURE0_ARB, 1, 1 );
glVertex3fv ( pos );
glMultiTexCoord2f ( GL_TEXTURE0_ARB, 1, 0 );
glVertex3fv ( pos );
glEnd ();
}
void display ()
{
glClear ( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
camera.apply ();
displayBoxes ();
glActiveTextureARB ( GL_TEXTURE1_ARB );
glBindTexture ( GL_TEXTURE_2D, particleMap );
glActiveTextureARB ( GL_TEXTURE0_ARB );
glBindTexture ( GL_TEXTURE_RECTANGLE_ARB, depthMap );
glCopyTexImage2D ( GL_TEXTURE_RECTANGLE_ARB, 0, GL_DEPTH_COMPONENT, 0, 0, 640, 480, 0 );
glDepthMask ( GL_FALSE );
glEnable ( GL_BLEND );
glBlendFunc ( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
program.bind ();
displayParticle ( Vector3D ( 0, 0, 0.5 ), 1 );
displayParticle ( Vector3D ( 1, 1, 0.5 ), 1 );
displayParticle ( Vector3D ( 1, 2, 0.5 ), 1 );
program.unbind ();
glDepthMask ( GL_TRUE );
glDisable ( GL_BLEND );
glutSwapBuffers ();
}
void reshape ( int w, int h )
{
camera.setViewSize ( w, h, 60 );
camera.apply ();
}
void key ( unsigned char key, int x, int y )
{
if ( key == 27 || key == 'q' || key == 'Q' ) // quit requested
exit ( 0 );
else
if ( key == 'w' || key == 'W' )
camera.moveBy ( camera.getViewDir () * 0.2 );
else
if ( key == 'x' || key == 'X' )
camera.moveBy ( -camera.getViewDir () * 0.2 );
else
if ( key == 'a' || key == 'A' )
camera.moveBy ( -camera.getSideDir () * 0.2 );
else
if ( key == 'd' || key == 'D' )
camera.moveBy ( camera.getSideDir () * 0.2 );
glutPostRedisplay ();
}
void specialKey ( int key, int x, int y )
{
if ( key == GLUT_KEY_UP )
yaw += M_PI / 90;
else
if ( key == GLUT_KEY_DOWN )
yaw -= M_PI / 90;
else
if ( key == GLUT_KEY_RIGHT )
roll += M_PI / 90;
else
if ( key == GLUT_KEY_LEFT )
roll -= M_PI / 90;
camera.setEulerAngles ( yaw, pitch, roll );
glutPostRedisplay ();
}
void mouseFunc ( int x, int y )
{
static int lastX = -1;
static int lastY = -1;
if ( lastX == -1 ) // not initialized
{
lastX = x;
lastY = y;
}
yaw -= (y - lastY) * 0.02;
roll += (x - lastX) * 0.02;
lastX = x;
lastY = y;
camera.setEulerAngles ( yaw, pitch, roll );
glutPostRedisplay ();
}
void animate ()
{
static float lastTime = 0.0;
float time = 0.001f * glutGet ( GLUT_ELAPSED_TIME );
angle += 2 * (time - lastTime);
lastTime = time;
glutPostRedisplay ();
}
int main ( int argc, char * argv [] )
{
// initialize glut
glutInit ( &argc, argv );
glutInitDisplayMode ( GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH );
glutInitWindowSize ( 640, 480 );
// create window
glutCreateWindow ( "OpenGL Soft Particles example" );
// register handlers
glutDisplayFunc ( display );
glutReshapeFunc ( reshape );
glutKeyboardFunc ( key );
glutSpecialFunc ( specialKey );
glutPassiveMotionFunc ( mouseFunc );
glutIdleFunc ( animate );
init ();
initExtensions ();
assertExtensionsSupported ( "EXT_framebuffer_object" );
decalMap = createTexture2D ( true, "../../Textures/oak.bmp" );
stoneMap = createTexture2D ( true, "../../Textures/block.bmp" );
teapotMap = createTexture2D ( true, "../../Textures/Oxidated.jpg" );
particleMap = createTexture2D ( true, "maskSmoke.bmp" );
if ( !program.loadShaders ( "sf.vsh", "sf.fsh" ) )
{
printf ( "Error loading shaders:\n%s\n", program.getLog ().c_str () );
return 3;
}
// create depth texture
glGenTextures ( 1, &depthMap );
glBindTexture ( GL_TEXTURE_RECTANGLE_ARB, depthMap );
glTexParameteri ( GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE );
glTexParameteri ( GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE );
glTexParameteri ( GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
glTexParameteri ( GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
glTexImage2D ( GL_TEXTURE_RECTANGLE_ARB, 0, GL_DEPTH_COMPONENT, 640, 480, 0,
GL_DEPTH_COMPONENT, GL_UNSIGNED_BYTE, NULL );
program.bind ();
program.setTexture ( "depthMap", 0 );
program.setTexture ( "particleMap", 1 );
program.unbind ();
camera.setRightHanded ( false );
glutMainLoop ();
return 0;
}
I am happy that I choosed Dark Basic Classic back then and Pro now. I don't want to touch C with a 20 feet stick.