Jump to content

Cole Chapman

Members
  • Posts

    138
  • Joined

  • Last visited

Posts posted by Cole Chapman

  1. Yeah I know, I have used it before without a problem. Is there anything special I have to do because its Windows 8? I just get the same error =/ I have had issues with BMAX with OpenB3D and people said the test I wrote out worked so perhaps later I will try clean the drive and try again

  2. I think the united states will recover and so will europe because free countries have that something extra that non democratic countries lack, namely the goodwill of their people.

     

    haha your adorable.

  3. Very attention grabbing title. This is either a confirmation that the code is not accurate or its a confirmation that the title is correct (though that goes against what I know). Code is below. If anyone needs, I can upload both that includes the exes.

     

    C++ File: 628 KB - Average FPS: 300 (Made with Dev C++)

    //	====================================================================
    //	This file was generated by LEBuilder
    //	http://leadwerks.com/werkspace
    //	====================================================================
    
    #include "engine.h"
    #include <iostream>
    #include <string>
    
    const int 	ScreenWidth = 800;
    const int 	ScreenHeight = 600;
    const char* MediaDir =  "C:/Leadwerks Engine SDK";
    const char* AppTitle = "Leadwerks";
    
    void ErrOut( const std::string& message ) { std::cerr << message << std::endl; }
    
    //	-------------------------------
    int main( int argn, char* argv[] )
    {
    // Initialize
    if( !Initialize() )
    	return 1;        
    SetAppTitle( AppTitle ) ;
    RegisterAbstractPath( MediaDir ); 
    
    // Set graphics mode        
    if( !Graphics(ScreenWidth,ScreenHeight) )
    {                
    	ErrOut( "Failed to set graphics mode."  );
    	return 1;        
    }
    
    // Create framework object and set it to a global object so other scripts can access it
    TFramework fw = CreateFramework();        
    if( fw == NULL )        
    {
    	ErrOut( "Failed to initialize engine." );                
    	return 1;        
    }        
    
    // Set Lua framework object        
    SetGlobalObject( "fw", fw );                
    
    // Set Lua framework variable        
    BP lua = GetLuaState();        
    lua_pushobject( lua, fw );        
    lua_setglobal( lua, "fw" );        
    lua_pop( lua, 1 );        
    
    // Get framework main camera        
    TCamera camera = GetLayerCamera( GetFrameworkLayer(0) );        
    PositionEntity( camera, Vec3(0,0,-2) );        
    
    // Create cube
    TMaterial material = LoadMaterial( "C:/Leadwerks Engine SDK/Materials/Cobblestones/cobblestones.mat" );        
    TMesh mesh = CreateCube();        
    PaintEntity( mesh, material );        
    
    // Create ground
    TMesh ground = CreateCube();        
    ScaleEntity( ground, Vec3(10,1,10) );        
    PositionEntity( ground, Vec3(0,-2,0) );        
    PaintEntity( ground, material );        
    
    // Add some light
    TLight light = CreateDirectionalLight();        
    RotateEntity( light, Vec3(45,45,45) );        
    
    // Spin cube until user hits Escape
    while( !KeyHit() && !AppTerminate() )        
    {                
    	if( !AppSuspended() )
    	{
    		TurnEntity( mesh, Vec3( AppSpeed()*0.5f ) );     
    
    		UpdateFramework();                
    		RenderFramework();                
    
    		Flip( 0 );        
    	}
    }                
    
    return Terminate();
    }
    
    

     

     

     

    BlitzMax File: 2,141 KB - Average FPS: 465 (Made with BlitzMax...)

    '       ====================================================================
    '       This file was generated by LEBuilder
    '       http://www.leadwerks.com/werkspace 
    '       ====================================================================
    
    SuperStrict
    
    Framework leadwerks.ENGINE
    
    Local world:TWorld
    Local gbuffer:TBuffer
    Local camera:TCamera
    Local mesh:TMesh
    Local light:TLight
    Local ground:TMesh
    Local material:TMaterial
    
    GCSetMode(2)
    
    RegisterAbstractPath( "C:/Leadwerks Engine SDK" ) 
    
    Graphics(800,600)
    
    world=CreateWorld()
    If Not world RuntimeError "Failed to create world."
    
    gbuffer=CreateBuffer(GraphicsWidth(),GraphicsHeight(),BUFFER_DEPTH|BUFFER_COLOR0|BUFFER_COLOR1|BUFFER_COLOR2)
    
    camera=CreateCamera()
    PositionEntity camera,[0.0,0.0,-2.0]
    
    material=LoadMaterial("abstract::cobblestones.mat")
    
    mesh=CreateCube()
    PaintEntity mesh,material
    
    ground=CreateCube()
    ScaleEntity ground,[10.0,1.0,10.0]
    PositionEntity ground,[0.0,-2.0,0.0]
    PaintEntity ground,material
    
    light=CreateDirectionalLight()
    
    RotateEntity light,[45.0,45.0,45.0]
    
    Repeat
    GCCollect()
    
    TurnEntity mesh,[AppSpeed()*0.5,AppSpeed()*0.5,AppSpeed()*0.5]
    
    If KeyHit(KEY_ESCAPE) Exit
    If AppTerminate() Exit
    
    UpdateAppTime()
    UpdateWorld(AppSpeed())
    
    SetBuffer(gbuffer)
    RenderWorld()
    SetBuffer(BackBuffer())
    RenderLights(gbuffer)
    
    SetBlend(1)
    DrawText(UPS(), 0, 0)
    SetBlend(0)
    
    Flip(0)
    
    Forever
    
    gbuffer=Null
    FreeEntity light
    GCCollect()
    End
    
    

     

    Some flaw in the code maybe?

  4. Definately, but with things requiring some variables I may keep the option open for not using parentheses.

     

    For example:

    MovePlayerToPlayer(Player1, Player2)

    or

    MovePlayerToPlayer Player1, Player2

     

    I could then splice the string to get things before and after the comma. Ill be sure to check out the Regex module

  5. I am trying to figure out what the best way is to import a user made script into a blitzmax application. I want the application to be able to work with new scripts even after a build so I was thinking of something like

     

    (Main.bmx) - pseudocode

    Readfile "Scriptfile.scr"
    
    If Readfile contains "Start" Then
         Start()
    Endif
    
    Function Start()
         Local I:int = 800
         Local y:int = 600
         'Ect'
    EndFunction
    

     

    Reading the file and seeing if it contains keywords for functions and then executing functions. If anyone else has any better ideas though, feel free to help me out :)

  6. lol Im not sure 3d software has a high or steady resell value :) (for anyone whos interested) A good very short term investment could be bitcoins. If you know when to buy and sell, you can make a little bit of cash. (How the whole thing works in general eludes me though).

     

    Im still soaking in the sweet sweet incline of gold prices. up to 1774 as im typin this :)

  7. Ha my brother has been preaching about it for a while. I gave in a while ago and bought gold with my some of my savings. So far its been a good investment :)

×
×
  • Create New...