; Blitz3D code, as it was written: runs in ArcBasic as it isGraphics3D 640, 480, 0, 2SetBuffer BackBuffer()Type Alien Field ent, speed#End Typecamera = CreateCamera()PositionEntity camera, 0, 0, -10light = CreateLight()For i = 1 To 5 a.Alien = New Alien a\ent = CreateSphere() PositionEntity a\ent, i * 2 - 6, 0, 0 a\speed = Rnd(0.5, 2)NextWhile Not KeyHit(1) For a.Alien = Each Alien TurnEntity a\ent, 0, a\speed, 0 Next UpdateWorld RenderWorld FlipWendEnd
The same
- The language: integer, float and string variables with
%,#and$;Dimarrays and[ ]arrays;Type,Field,New,Delete,Each,First,Last,Before,After,Insert,HandleandObject; fields with a backslash; functions with type tags and default parameters;If,Select,For,While,Repeat,Goto,Gosub, labels,Data,Read,Restore,Const,Global,LocalandInclude. - The commands: 2D graphics, images, fonts and buffers; keyboard, mouse and joystick; sound and music; files, folders and banks; TCP, UDP and multiplayer networking; and the 3D commands for entities, cameras, lights, meshes, surfaces, brushes, textures, collisions, picking, animation, terrains and sprites. Each has a page in the command reference.
- Data files:
WriteInt,ReadInt,WriteFloat,PeekIntand the rest read and write the same sizes, so existing save files and level files still load. - Models:
.xand.3dsmodels, with their animation, and.md2models withLoadMD2.
Different
- .b3d models aren't supported yet. Convert them to
.glb,.xor.3ds, for example with Blender. - Not available yet: movies (
OpenMovieand the other movie commands), BSP levels (LoadBSP),CallDLL,JoyUDirandJoyVDir. A program that uses one stops with a message naming it. - One texture layer: only layer 0 of
EntityTextureandBrushTextureis drawn so far, soTextureBlend,TextureCoordsandRotateTexturehave no visible effect yet, and cube maps (SetCubeFace,SetCubeMode) aren't supported. - Whole numbers are 64-bit rather than 32-bit. Code that relied on numbers wrapping round at about 2 billion, or on
Shrof a negative number, gives different answers. Files and banks still use 32 bits, as above. Notat the start of an expression applies to all of it:Not a And bmeansNot (a And b). Brackets, as in(Not a) And b, make it clear either way.- Commands for old hardware do nothing, as modern computers don't need them:
SetGamma,UpdateGamma,LockBuffer,UnlockBuffer,Dither,WBuffer,HWMultiTex,SetGfxDriver,TerrainDetail,TerrainShading,LoaderMatrix,SetAnimKeyandPlayCDTrack.AddAnimSeqdoesn't add a sequence; useExtractAnimSeqorLoadAnimSeq. - The display: the colour depth given to
Graphicsis ignored, as ArcBasic always uses full colour, and the picture scales to fit the window or screen. - Saving: a finished game writes its files in the player's own data folder, so it keeps working when installed somewhere it can't write.
New in ArcBasic
- Physics: rigid bodies, joints, characters, vehicles, ragdolls and soft bodies, all moved by
UpdateWorld. - Looks: real-time shadows, glow and ambient occlusion.
- Models:
.glb,.gltf,.fbxand.obj, with animations you can find by name and blend. - Fields with a dot as well as a backslash:
alien.xmeansalien\x. - Named constants such as
KEY_SPACEandMOUSE_LEFT. - Create Executable builds a finished game for Windows and macOS, with its files packed in and optionally encrypted.
Blitz3D is a trademark of its owners. ArcBasic is an independent project, not affiliated with or endorsed by them.
