|
Post by ghost9000 on Jul 5, 2024 22:05:38 GMT -6
I suggest: Integrating this irrlicht.sourceforge.io/ but making it simple to use in RCBASIC Like Load3DObject ("object.obj"). Using technologies that already exist like Visual Studio Code for IDE. This would be a popular language if it was as simple as Dark basic Pro and had enough features to make a game with. I have been using Blockbench 3D for models and Godot 4 but it's overkill sometimes and the Unity people have come and are constantly trying to change it to make it more difficult to use. I wished with all my heart there was a BASIC language that had good 2D and 3D support so I can just make games and not worry about all the other bullshit. I heard there might be a BlitzBasic 3D 2. I came across RCBASIC and I love all the work put in. I decided to update it so that it has a manual and can be used with Visual Studio Code or have it's own IDE. Thats all that's really holding it back.
|
|
|
Post by ghost9000 on Jul 5, 2024 22:06:41 GMT -6
Here is a step closer to using Visual Studio Code by putting this in a install.py:
import os import json
# Define the project structure and content project_structure = { ".vscode": { "tasks.json": { "version": "2.0.0", "tasks": [ { "label": "build", "type": "shell", "command": "C:/path/to/rcbasic_build.exe", "args": ["${file}"], "group": {"kind": "build", "isDefault": True}, "problemMatcher": [] }, { "label": "run", "type": "shell", "command": "C:/path/to/rcbasic.exe", "args": ["${fileDirname}/${fileBasenameNoExtension}.cbc"], "group": {"kind": "test", "isDefault": True}, "problemMatcher": [] } ] }, "keybindings.json": [ { "key": "ctrl+shift+b", "command": "workbench.action.tasks.build", "when": "editorTextFocus" }, { "key": "ctrl+shift+r", "command": "workbench.action.tasks.runTask", "args": "run", "when": "editorTextFocus" } ] }, "rcbasic": { "rcbasic.language-configuration.json": { "comments": { "lineComment": "'" }, "brackets": [ ["{", "}"], ["[", "]"], ["(", ")"] ], "autoClosingPairs": [ {"open": "{", "close": "}"}, {"open": "[", "close": "]"}, {"open": "(", "close": ")"}, {"open": "\"", "close": "\""}, {"open": "'", "close": "'"} ], "surroundingPairs": [ {"open": "{", "close": "}"}, {"open": "[", "close": "]"}, {"open": "(", "close": ")"}, {"open": "\"", "close": "\""}, {"open": "'", "close": "'"} ] }, "rcbasic.tmLanguage.json": { "fileTypes": ["bas"], "name": "RCBasic", "patterns": [{"include": "#statements"}], "repository": { "statements": { "patterns": [ { "match": "\\b(PRINT|IF|THEN|ELSE|END IF|FOR|TO|NEXT|WHILE|WEND|FUNCTION|END FUNCTION)\\b", "name": "keyword.control.rcbasic" } ] } }, "scopeName": "source.rcbasic" } }, "example.bas": [ "' Example RCBasic Program", "", "PRINT \"Hello, RCBasic!\"", "", "FOR i = 1 TO 10", " PRINT \"Count: \" + STR(i)", "NEXT", "", "IF 1 = 1 THEN", " PRINT \"This is an IF statement.\"", "END IF", "", "FUNCTION TestFunction()", " PRINT \"This is a function.\"", "END FUNCTION" ] }
def create_files(base_path, structure): for name, content in structure.items(): path = os.path.join(base_path, name) if isinstance(content, dict): os.makedirs(path, exist_ok=True) create_files(path, content) else: with open(path, "w") as file: if isinstance(content, list): if isinstance(content[0], str): file.write("\n".join(content)) else: json.dump(content, file, indent=4) else: json.dump(content, file, indent=4)
# Define the project base path base_path = "rcbasic-project"
# Create the project structure and files create_files(base_path, project_structure)
print(f"RCBasic project setup completed in '{base_path}' directory.")
|
|
|
Post by ghost9000 on Jul 5, 2024 22:11:42 GMT -6
or another great library that would be nice to have integrated would be www.raylib.com/ it has 2D and 3D
|
|
|
Post by n00b on Jul 6, 2024 11:46:00 GMT -6
I have been using Calamity3D as a base for how to structure the 3D library so that it integrates well with how 2D already worked.
Here is an example of what 3D looks like right now:
OpenWindow("My Window", 640, 480, 0, 1) 'Opens Window c = OpenCanvas(640, 480, 0, 0, 640, 480, 0) 'Opens a canvas to draw on
ShowCanvas3D(c, true) 'Enables 3D rendering on the canvas. By default, canvases are just 2D so this function must be used on canvases that you want to show 3d in.
mesh = LoadMesh("model.obj") 'Loads a 3d model into memory
actor1 = CreateActor(mesh) 'Adds the model to the current scene actor2 = CreateActor(mesh) 'Adds the model to the current scene
SetActorPosition(actor1, 10,5,3) 'Sets x,y,z position of the actor SetActorPosition(actor2, 22,5,14) 'Sets x,y,z position of the actor
'This is a basic loop to draw everything While True Update() Wend
The reason for having to load a mesh and create an actor is that meshes are resources that can be reused without having to reload them. Actors have positions, rotations, materials, etc., that can be different for each actor that uses a mesh.
|
|
|
Post by n00b on Jul 6, 2024 12:09:42 GMT -6
Also, RC4 is pretty far in development right now so we are kinda locked on the rendering library we are using. I currently have a few repos setup for RC4 development. The port of all the window, canvas, and graphics routines is pretty much done. RC4 is going to have some pretty good 3d graphics capabilities while also improving performance for the runtime vm. And it will be pretty easy to use if you already know RCBasic. The only thing I have not really put much thought into is how the physics library will look in RC4. Currently tbird is working on that so he may be able to provide more info on that. I think we are probably going to integrate the physics objects directly into the actors and allow you to set physics shapes for the actors once they are created.
|
|
|
Post by ghost9000 on Jul 6, 2024 23:00:12 GMT -6
irrlicht would be great! Maybe raylib in the future? raylib does 2D and 3D and works perfectly with c++ I respect all the work that everyone is doing and Im excited to see 2D/3D RCBASIC! For cross capability in 3D blender has everyone beat and blockbench 3D(cross platform) can make lowpoly models not just minecraft models and it has animation support. Here is a way raylib handles collisions www.raylib.com/examples/models/loader.html?name=models_box_collisions Assigning a collisions object would be good good. What are you going to use for 3D levels though? BSP? trenchbroom.github.io/ would be nice to use.
|
|
|
Post by n00b on Jul 7, 2024 8:52:31 GMT -6
irrlicht would be great! Maybe raylib in the future? raylib does 2D and 3D and works perfectly with c++ I respect all the work that everyone is doing and Im excited to see 2D/3D RCBASIC! For cross capability in 3D blender has everyone beat and blockbench 3D(cross platform) can make lowpoly models not just minecraft models and it has animation support. Here is a way raylib handles collisions www.raylib.com/examples/models/loader.html?name=models_box_collisions Assigning a collisions object would be good good. What are you going to use for 3D levels though? BSP? trenchbroom.github.io/ would be nice to use. Irrlicht also has built-in collision detection but we are choosing to use the bullet physics engine for that instead. As far as level editors, you will be able to use trenchboom, QTRadiant, Quark, and any other doom/quake level editor. Irrlicht has built in support for BSPs and even supports PAK files. Blender will also work just fine but if you want to export animations from blender then currently you will need to use *.x for *.b3d files. I am working on GLTF support but it probably won't make it into 4.0 since I don't feel like that one feature is critical enough to delay release for. I personally use anim8or ( www.anim8or.com/) which does not have a way of exporting animation currently. Thats why I had to write custom code specifically for using it but blender supports basically everything so you should be good.
|
|
|
Post by ghost9000 on Jul 8, 2024 6:10:11 GMT -6
If animation for .x works then github.com/kusaanko/Blender_XFileSupport_BVE this plugin should work. If I can use that and trenchboom I'm good. Bullet physics would be great! I haved used anim8or but I find blender a lot faster.
|
|
|
Post by n00b on Jul 8, 2024 7:35:25 GMT -6
If animation for .x works then github.com/kusaanko/Blender_XFileSupport_BVE this plugin should work. If I can use that and trenchboom I'm good. Bullet physics would be great! I haved used anim8or but I find blender a lot faster. Thats cool. I think most people would prefer blender. I had to give anim8or support myself since it does not have the large amount of community support that blender does. I prefer progams with simple user interfaces myself since I tend to get confused by too many options. Currently I am working on materials and after that, I will be rewriting the matrix routines so they use Irrlicht's matrix library rather than the one I wrote for the current version of RCBasic. The audio and networking functions are just going to be brought over from RC3 with minimal changes for now. There is also a few other new features I haven't announced yet but I will talk more about them as we get closer to release.
|
|
|
Post by ghost9000 on Jul 8, 2024 9:25:03 GMT -6
I like Anim8or a lot. I tried to use it instead of Blender after many nights of frustration. But most people are going to want Blender 3D and MSCode to work with. I might use this for documentation www.doxygen.nl/index.html.
|
|
|
Post by ghost9000 on Jul 8, 2024 9:29:45 GMT -6
|
|