Java-Gaming.org Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (808)
Games in Android Showcase (239)
games submitted by our members
Games in WIP (872)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Game Development / Newbie & Debugging Questions / Re: Creating builds from Windows (LWJGL3) for Linux and macOS using JarSplice on: 2019-04-21 09:50:41
1  
gl = canvas.getContext('experimental-webgl');

WebGL 1.0 is not experimental a few years already. Even new WebGL 2.0 is not experimental already too. But I use WebGL 1.0 because it supported on all modern browsers (expecting Opera Mini).

WebGL 1.0: https://caniuse.com/#feat=webgl
WebGL 2.0: https://caniuse.com/#feat=webgl2

SHC, thank you for posting your solution. I think it will be useful for me in the future. Maybe. Bye guys. Good luck.
2  Game Development / Newbie & Debugging Questions / Re: Creating builds from Windows (LWJGL3) for Linux and macOS using JarSplice on: 2019-04-21 09:42:51
Your Unity demo is terribly slow on my machine. This similar demo (tutorialspoint.com) using WebGL without Unity is much faster:
Unity is one of the best for native builds (like Exe, apk and so on), but WebGL build will not work, for example, on mobile devices. I will use Unity for native builds and for Web (for fun, for everyone who have good laptop or PC). I study pure WebGL but JavaScript is very terrible. TypeScript is better. I wrote simple prototype of classic Snake game in pure WebGL and TypeScript. You can play in Sandbox and you can see source code: https://plnkr.co/edit/7gjdZi2GNHZvtHQEMc4Y?p=preview

This is another my game in pure WebGL and TypeScript: https://8observer8.github.io/WebGL/Bitballoon/ I wrote this game one year ago.

TypeScript is very similar to C# and it is good for me to study these languages together. Author of  C# and TypeScript is Anders Hejlsberg. He was created Delphi and Turbo Pascal too.

JarSplice isn't the panacea. Maybe you could try JarSplicePlus, Oracle Java Packager tool and/or jlink.
Maybe in the future. I cannot spend my time. I need to study how to earn money by foreign freelance. I spend a lot of time to study: English, pure WebGL, TypeScript, Unity, C# and so on. I want to make cross-platform applications but with Lwjgl it is too complicated for me. I cannot spend time on it now.
3  Game Development / Newbie & Debugging Questions / Re: I need a tool for distributing LWJGL3 applications on: 2019-04-21 09:21:08
I already told you that Unity may drive your WebGL program a lot slower on some machines and WebGL without using Unity can be slow on some hardware for some reasons I could repeat once more.
But Unity allows to create native executable from Windows for Windows, Linux, MacOS, Android, iOS and so on. Unity WebGL works on Desktop. If uses do not want (or cannot) to run Unity WebGL build he (or she) can download native build for his OS, for example, for Android. I use pure WebGL (and TypeScript) too because I can solve a lot of tasks with pure WebGL. Or I can use any WebGL wrapper: Phaser/Pixi.js (for 2D) or Three.js/Babylon.js (for 3D). This frameworks works on all mobile devices. You can check what browsers support WebGL: https://caniuse.com/#feat=webgl For example, Phaser framework is special for Mobile:
Quote
Desktop and Mobile HTML5 game framework. A fast, free and fun open source framework for Canvas and WebGL powered browser games.

I will use Unity for creating native executables for different operation systems and WebGL/TypeScript for cross-platform web-applications. Everyone can run pure WebGL by one click. I write it one and I do not need to rebuild it. Plugins are not required. Pure WebGL is very alternative for Java Applets (that was killed).

I advise you to use a nice build tool allowing to choose which line ending character to use in your files, for example Apache Ant.

philfrei mentioned Inno Setup but Nullsoft Scriptable Install System can be used with Apache Ant:
https://sourceforge.net/p/nsis-ant/code/ci/master/tree/
I am a beginner. I need very simple step by step instruction. As simple as all step by step instructions about how to create executables builds from Windows for Linux and MacOS from Unity. Or not so complicated. I have only one OS - Windows. Why cannot JarSplice make builds for Linux and MacOS correctly? Why is it so complicated for beginners in Lwjgl? I can make all build from Unity by a few clicks. And it is very easy for me to create pure crass-platform WebGL application. Lwjgl is good but it does not allow me to create crass-platform builds from Windows as simple as Unity builds and pure WebGL/TypeScript.
4  Game Development / Newbie & Debugging Questions / Re: [HELP] 3D Programming in pure java. on: 2019-04-09 17:58:05

You can edit your links to make them directional links.

Source Code: https://dl.dropboxusercontent.com/s/z2xltl9tyw6h39x/3DLibrary.rar

Runnable Jar: https://dl.dropboxusercontent.com/s/duy8nif69a32re5/3DTest.jar
5  Game Development / Newbie & Debugging Questions / Re: Creating builds from Windows (LWJGL3) for Linux and macOS using JarSplice on: 2019-04-09 14:30:21
I did not find how to create standalone executables from Windows (analog JarSplice for Lwjgl3). But I found the solutions for myself. I will use WebGL / TypeScript for creating cross-platform Web applications and Unity / C# for creating cross-platform native desktop applications.

I created these builds from Windows 10. You can try to run this example if you want:

Click to Play
6  Game Development / Newbie & Debugging Questions / Re: I need a tool for distributing LWJGL3 applications on: 2019-04-09 13:38:10
Current documents on deployment that I've seen all say that you have to compile on the system that you want the program to run on.
For example, this tool, called Unity, allows to create standalone executables from Windows (and from Mac OS X) for different platforms.

I created these builds from Windows 10. You can try to run this example if you want:

Click to Play
7  Game Development / Newbie & Debugging Questions / Re: I need a tool for distributing LWJGL3 applications on: 2019-04-09 09:39:14
Could JarSplice running on a Windows PC really make programs that could run on a MacOS?
It should be but it does not work in reality.

8  Game Development / Newbie & Debugging Questions / Re: I need a tool for distributing LWJGL3 applications on: 2019-04-07 20:51:37
Thank you for your reply.

Quote
For MacOS, you might consider using the tool Packages.
I think I should have a computer with macOS or I should install macOS on VirtualBox but I do not want to do it because I work on laptop and I do not have so many space that masOS requires. I need analog of JarSplice that can create standalone executables from Windows for Linux and macOS. JarSplice was released in 2012. I this it is too old. I think this is reason why JarSplice creates standalone executables for Lwjgl incorrectly. Is exits so simple tool like JarSplice?
9  Game Development / Newbie & Debugging Questions / Re: Creating builds from Windows (LWJGL3) for Linux and macOS using JarSplice on: 2019-04-07 12:55:00
I rewrote my example to TypeScript and WebGL. You can run it in your browser by one click: TheQuad_WebGL

It must work on Window, Linux, macOS and mobile devices. You need only one click to run it from any OS like it was in deprecated Java Applets.

10  Game Development / Newbie & Debugging Questions / Re: Creating builds from Windows (LWJGL3) for Linux and macOS using JarSplice on: 2019-04-07 12:19:15
Thank you very much for your test. Where is a problem? Inside of JarSplice? Is exist any analog of JarSplice? I want to create .exe, .app, and .sh from Windows.
11  Game Development / Newbie & Debugging Questions / I need a tool for distributing LWJGL3 applications on: 2019-04-07 10:12:36
Hello,

I need a tool that will create executable files (.exe for Windows, .app for macOS, and executable file for Linux, for example: ".sh"). I want to make builds from Window for three OS.

I tried JarSplice. But this tool has problems with LWJGL3.

First problem. For example, if you want to create .exe you need to add these two JARs:
  • lwjgl-glfw.jar
  • lwjgl-glfw-natives-windows.jar

But these JARs contains the same files:
  • glfw.dll.sha1
  • glfw32.dll.sha1

JarSplice shows the error message:

Quote
duplicate entry: glfw.dll.sha1

I solved this problem. I deleted duplicate files (for example, glfw.dll.sha1) from lwjgl-glfw.jar and another JARs. Windows build works correctly. Please, try on your computer with Windows: TheQuad_Windows.zip

Second problem (Linux). JarSplice creates the .sh file with CRLF but Linux requires LF. You can run the build on Linux: TheQuad_Linux.zip But you need manually to delete CR on Linux at the beginning of the .sh file. I tried to replace CRLF with LF, please, try it on your computer with Linux: TheQuad_Linux.zip

Third problem (macOS). JarSplice creates an executable file that does not work on macOS. Please, try to run: TheQuad_macOS.zip
12  Game Development / Newbie & Debugging Questions / Re: Creating builds from Windows (LWJGL3) for Linux and macOS using JarSplice on: 2019-04-06 22:08:08
Please, help me to run my application on macOS and Linux. I cannot install these OS on VirtualBox because I do not have a free space on my hard drive. I am trying to make builds for macOS and Linux during 3-4 days. I have read a lot of forums, tutorials, docs, videos but I do not understand what is wrong. I just add all required JARs to JarSplice. What information do you need to help me? I deleted all duplicate of files from lwjgl.jar, lwjgl-glfw.jar, for example: lwjgl.dll.sha1, liblwjgl.dylib.sha1 and so on because they are in lwjgl-natives-linux.jar, lwjgl-natives-macos.jar and so on. Should I public list of JARs that I added to JarSplice? What information should I post here to help you to find my mistakes?

This is the code:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
import static org.lwjgl.glfw.GLFW.*;
import static org.lwjgl.opengl.GL11.*;
import org.lwjgl.opengl.GL;

public class Program
{
    public Program()
    {
        if (!glfwInit())
        {
            System.err.println("GLFW failed to initialize.");
            System.exit(1);
        }

        int width = 256;
        int height = 256;
        long win = glfwCreateWindow(width, height, "002. Quad", 0, 0);
       
        glfwShowWindow(win);
       
        glfwMakeContextCurrent(win);
       
        GL.createCapabilities();
       
        while (!glfwWindowShouldClose(win))
        {
            glfwPollEvents();
           
            glClear(GL_COLOR_BUFFER_BIT);
           
            glBegin(GL_QUADS);
            {
               glColor3f(1f, 0f, 0f);
               glVertex2f(-0.5f, 0.5f);

               glColor3f(0f, 1f, 0f);
               glVertex2f(0.5f, 0.5f);

               glColor3f(0f, 0f, 1f);
               glVertex2f(0.5f, -0.5f);
               
               glColor3f(1f, 1f, 1f);
               glVertex2f(-0.5f, -0.5f);
            }
            glEnd();
           
            glfwSwapBuffers(win);
        }
       
        glfwTerminate();
    }
   
    public static void main(String[] args)
    {
        new Program();
    }
}
13  Game Development / Newbie & Debugging Questions / Re: Creating builds from Windows (LWJGL3) for Linux and macOS using JarSplice on: 2019-04-06 16:26:07
I opened the ".sh" file in Notepad++:



I selected the UNIX format and saved:



Please, try: TheQuad_Linux.zip
14  Game Development / Newbie & Debugging Questions / Re: JarSplice + LWJGL 3 on: 2019-04-06 15:48:29
Quote
I think I solved this problem on Linux. Please, try to run this build: TheQuad_Linux.zip If it will work I will explain you how I solved the problem.
No, my idea does not work. I thought it will work if I would delete "lwjgl-natives-macos.jar" and "lwjgl-natives-windows.jar" from JarSplice JAR-list. Linux build works only if you will deleted 0x0D code at the beginning of the bash ".sh" file. But I do not understand where and how. I think it is impossible to deleted 0x0D on Windows.
15  Game Development / Newbie & Debugging Questions / Re: JarSplice + LWJGL 3 on: 2019-04-06 12:32:22
Quote
which is not an executable command.d the interpreter '/bin/sh
I think I solved this problem on Linux. Please, try to run this build: TheQuad_Linux.zip If it will work I will explain you how I solved the problem.
16  Game Development / Newbie & Debugging Questions / Re: JarSplice + LWJGL 3 on: 2019-04-06 10:55:16
My friend valen10 tried to run my example using Debian 10 and he received this error message:

Quote
$ ./TheQuad_Linux.sh
Failed to execute process './TheQuad_Linux.sh'. Reason:
', which is not an executable command.d the interpreter '/bin/sh

He opened .sh using hex-editor, replaced \r\n on \n and it works fine. How can I solve this problem on my side in JarSplice?
17  Game Development / Newbie & Debugging Questions / Creating builds from Windows (LWJGL3) for Linux and macOS using JarSplice on: 2019-04-06 10:09:38
Hello new forum. This is my first message.

I created very simple example using LWJGL 3 and deprecated OpenGL 1.1. I want to use this example for testing builds on your machines. I want to be sure that JarSplice works correctly. Please, run it and say that this example works on Linux and Mac. I created this builds from Windows 10. If you have Windows, please, try to run it on Windows.

Screenshot:
Pages: [1]
 
Riven (847 views)
2019-09-04 15:33:17

hadezbladez (5795 views)
2018-11-16 13:46:03

hadezbladez (2603 views)
2018-11-16 13:41:33

hadezbladez (6211 views)
2018-11-16 13:35:35

hadezbladez (1499 views)
2018-11-16 13:32:03

EgonOlsen (4734 views)
2018-06-10 19:43:48

EgonOlsen (5793 views)
2018-06-10 19:43:44

EgonOlsen (3276 views)
2018-06-10 19:43:20

DesertCoockie (4175 views)
2018-05-13 18:23:11

nelsongames (5501 views)
2018-04-24 18:15:36
A NON-ideal modular configuration for Eclipse with JavaFX
by philfrei
2019-12-19 19:35:12

Java Gaming Resources
by philfrei
2019-05-14 16:15:13

Deployment and Packaging
by philfrei
2019-05-08 15:15:36

Deployment and Packaging
by philfrei
2019-05-08 15:13:34

Deployment and Packaging
by philfrei
2019-02-17 20:25:53

Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!