Closed kadirnar closed 2 years ago
Hi!
The Python script is explicitly invoking the Windows version of the assets compiler. I did a quick fix here
Could you pull the changes and let me know if this works for you ? :warning: You will have to install the binaries of assetc in this folder
Thanks again :)
https://github.com/harfang3d/dogfight-sandbox-hg2/tree/main/bin/assetc
How am I supposed to run the commands here from the terminal screen? When I download the library again, it gives the same error.
Compiling assets...
0%| | 0/100 [00:00<?, ?it/s]Traceback (most recent call last):
File "/home/kadir/Desktop/kadirnar/github/dogfight-sandbox-hg2/source/main.py", line 32, in <module>
dc.run_command("..\\bin\\assetc\\assetc assets -quiet -progress")
File "/home/kadir/Desktop/kadirnar/github/dogfight-sandbox-hg2/source/data_converter.py", line 79, in run_command
for line in execute_com(exe):
File "/home/kadir/Desktop/kadirnar/github/dogfight-sandbox-hg2/source/data_converter.py", line 74, in execute_com
p = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
File "/usr/lib/python3.8/subprocess.py", line 858, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.8/subprocess.py", line 1704, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '..\\bin\\assetc\\assetc assets -quiet -progress'
0%| | 0/100 [00:00<?, ?it/s]
Thanks for the feedback.
Can you please list the content of your bin\assetc
folder ?
(you are not supposed to run any command line, except python3 main.py
)
(If you want to run the sandbox from the cloned repository, you will need to copy the Python and HARFANG binaries as well as the other modules in the bin folder). Follow the instructions detailled in the readme files found in each folder.
I just saw this post😅
Do I need to install them all? Is it enough for me to just download the python version?
There is only the readme.md file inside the bin\assetc file.
OK, fine. You just need to download and unpack the AssetC archive (the last item on the list). This is the binary tool that will compile all the graphic assets for your platform (textures, shaders, ...)
You need to unpack (unzip) the content directly into the bin\assetc
folder (when you only have a readme at the moment).
'hope this helps :)
is this file path correct for linux?
dc.run_command("..\\bin\\assetc\\assetc assets -quiet -progress")
Error Mesage:
FileNotFoundError: [Errno 2] No such file or directory: '..\\bin\\assetc\\assetc assets -quiet -progress'
0%| | 0/100 [00:00<?, ?it/s]
The harfang library is not used in this repo. None of the harfang modules are active.
Hi. This specific issue ('assetc cannot be found on Linux') is fixed. Could you update, try it, and let me know if this improve the situation ? Thanks in advance!
(regarding PyCharm not being able to find Harfang, this might be a false positive).
You are amazing👏👏👏 Now ubuntu is running as well. But there is a small problem. The screen turns upside down.
Ah yeah. I was expecting this one. We're using OpenGL on Linux and DirectX on Windows. The framebuffer isn't oriented the same way between these 2 APIs and we need to take handle this.
I will fill a new issue as this is a complete different problem. Thanks for your help!
You should still be able to start the simulation by pressing [SPACE]
the [i]
to enable the autopilot.
Would you tell me how is the framerate ?
How can I see the framerate?I
@kadirnar we adressed most of the issues you had with the early version of the sandbox. Could you give a try and let us know if it works for you ? Thanks in advance.
Hi @astrofra,
Have you ever tested for linux? harfang package installation fails.
pip install harfang
ERROR: Could not find a version that satisfies the requirement harfang (from versions: none)
ERROR: No matching distribution found for harfang
Hi ! Yes, HARFANG & the Dogfight were tested on Linux and it works like a charm on Ubuntu 20.04LTS. Your problem comes from the fact that the Linux wheel of HARFANG is not available from the Pypi repository (we are currently working out this problem).
You simply need to download the Linux wheel from here: github.com/harfang3d/harfang3d/releases/download/v3.2.1/harfang-3.2.1-cp32-abi3-linux_x86_64.whl
and then, from your local download directory:
pip3 install harfang-3.2.1-cp32-abi3-linux_x86_64.whl
Does it work in python 3.10 version?
Have you tried running it in vscode?
Error: FileNotFoundError: [Errno 2] No such file or directory: '../config.json'
I fixed the code.
file_name="config.json"
Error:
FileNotFoundError: [Errno 2] No such file or directory: '/home/kadir/dogfight-sandbox hg2/../bin/assetc/assetc'
0%| | 0/100 [00:00<?, ?it/s]
It looks like there is a problem with the file paths?
Hi.
Please keep in mind the current working directory is source\
.
There is no reason why it shouldn't work with VSCode, providing the code is running in the proper environement :)
It also worked successfully on linux. But windows also works more stable. Advice: Planes are too slow. I prefer fighter jets to be faster.Can we choose a plane in combat mode?
Hi ! you can find the missions descriptions here: https://github.com/harfang3d/dogfight-sandbox-hg2/blob/main/source/Missions.py#L577
Creates your own ones ! ;)
Considering the initial subject of this issue, I think we can consider it solved and closed. @kadirnar if you have any other topic we would like to address, feel free to open a new issue or join our Discord server (follow www.harfang3d.com).
When I run the main.py file it gives the following error:
What could be the cause of this error?