Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (744)
Games in Android Showcase (225)
games submitted by our members
Games in WIP (825)
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] 2 3 ... 29
1  Game Development / Newbie & Debugging Questions / maintaining direction with change of centre of rotation on: 2017-07-18 23:30:02
I have a system where an object rotates about its centre of mass however its centre of mass can change.

How do I maintain the direction (ie it doesn't change its angle of rotation) when I change the centre of mass, most helpful solution would be just involving a change in the angle of rotation.
2  Game Development / Newbie & Debugging Questions / Re: EXCEPTION ACCESS VIOLATION on: 2017-07-18 11:29:39
I have found the issue , turns out I was enabling my uniform shader inputs as vertex arrays for some reason so it was allocating all the GPU memory after a few minutes of render calls.
3  Game Development / Newbie & Debugging Questions / EXCEPTION ACCESS VIOLATION on: 2017-07-17 23:25:42
When running my code I get the error EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000076d7c567, pid=7920, tid=12236 , this only started happening after about 50 runs of my program so and I think its due to the VBO cleanup I am doing but I dont know what is wrong with my dispose methods. Below are the methods for deallocating memory on program close.
main vbo class , each buffer object represents an independent VBO
1  
2  
3  
4  
5  
6  
7  
8  
   public void dispose(){
      for(BufferObject buffer : buffer_objects){
         buffer.dispose();
         GL15.glDeleteBuffers(buffer.vertex_id);
         GL15.glDeleteBuffers(buffer.texture_id);
      }
      vbo_core.dispose();
   }

shader
1  
2  
3  
4  
5  
public void dispose(){
      particle_shader_class.dispose();
      line_shader_class.dispose();
      shaderclass.dispose();
   }

Buffer object dispose
1  
2  
3  
4  
public void dispose(){
      memFree(verticies);
      memFree(textures);
   }

Mem allocation
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
public int create_buffer(int size,Texture t){//texture must be set even if it's null
      int index = buffer_objects.size();
      BufferObject buffer = new BufferObject(memAllocFloat(size * 12),memAllocFloat(size*12),0,GL15.glGenBuffers(),GL15.glGenBuffers(),t,new Vertex2d(0,0,0,0));
      buffer_objects.add(buffer);//designed for dealing with squares as they make up the majority of the game , if other objects are used i'll put in custom methods for them.
      GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, buffer.vertex_id);
      GL15.glBufferData(GL15.GL_ARRAY_BUFFER, buffer.verticies, GL15.GL_STREAM_DRAW);
      GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, buffer.texture_id);
      GL15.glBufferData(GL15.GL_ARRAY_BUFFER,   buffer.textures, GL15.GL_STREAM_DRAW);
      GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, 0);
      render.add(false);
      return index;//the index is the current position of the item in the arraylist , NEVER DELETE VBO'S ONLY MODIFY
   }

Error occurs here
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
public void extend_buffer(int index , Vertex2d[] data){
      BufferObject buffer = buffer_objects.get(index);
      buffer.set_to_write();
      for(Vertex2d vertex :data){
         buffer.verticies.put(vertex.x);
         buffer.textures.put(vertex.u);
         buffer.verticies.put(vertex.y);
         buffer.textures.put(vertex.v);
         buffer.vert_count += 2;
      }
      buffer_objects.set(index,buffer);
      buffer.rewind();
      GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, buffer.vertex_id);
      GL15.glBufferSubData(GL15.GL_ARRAY_BUFFER,0, buffer.verticies);
      GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, buffer.texture_id);
       GL15.glBufferSubData(GL15.GL_ARRAY_BUFFER,   0, buffer.textures);
      GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, 0);
     
   }

on the glBufferSubData calls this exception is thrown.

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000076d7c567, pid=11848, tid=1976
#
# JRE version: Java(TM) SE Runtime Environment (8.0_25-b18) (build 1.8.0_25-b18)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.25-b02 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C  [nvoglv64.DLL+0xfdc567]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#

---------------  T H R E A D  ---------------

Current thread (0x000000001d609000):  JavaThread "Thread-0" [_thread_in_native, id=1976, stack(0x000000001e0b0000,0x000000001e1b0000)]

siginfo: ExceptionCode=0xc0000005, reading address 0x0000000000000000

Registers:
RAX=0x000000001fbd0654, RBX=0x000000001f718ae8, RCX=0x0000000000000300, RDX=0xffffffffe042f9ac
RSP=0x000000001e1aefc8, RBP=0x000000000000001c, RSI=0x0000000000000000, RDI=0x000000001fbd0654
R8 =0x0000000000000030, R9 =0x0000000000000030, R10=0x0000000000000000, R11=0x000000001fbd0654
R12=0x0000000000000000, R13=0x0000000075da0000, R14=0x0000000000000002, R15=0x000000001f718828
RIP=0x0000000076d7c567, EFLAGS=0x0000000000010203

Top of Stack: (sp=0x000000001e1aefc8)
0x000000001e1aefc8:   00000000768e654a 000000001d579100
0x000000001e1aefd8:   000000005060e35b 0000000000000004
0x000000001e1aefe8:   000000007678450b 000000001d609000
0x000000001e1aeff8:   0000000000000030 0000000000000000
0x000000001e1af008:   000000000048810b 000000001f718828
0x000000001e1af018:   00000000768e7332 000000001f718080
0x000000001e1af028:   0000000000000004 0000000000000000
0x000000001e1af038:   000000005061ed1b 000000001d609000
0x000000001e1af048:   000000001e1af140 000000001af3cce8
0x000000001e1af058:   0000000000000000 000000001af2fc78
0x000000001e1af068:   0000000002d15b74 000000001af3cce8
0x000000001e1af078:   000000001e1af100 000000001af2fc78
0x000000001e1af088:   0000000002d077b0 0000000000000000
0x000000001e1af098:   0000000000000030 000000001af54ec8
0x000000001e1af0a8:   000000001e1af0e8 000000001af55030
0x000000001e1af0b8:   0000000023bf0f08 000000001e1af0c0

Instructions: (pc=0x0000000076d7c567)
0x0000000076d7c547:   0f ba 25 71 a2 10 01 01 0f 83 ab 01 00 00 49 8b
0x0000000076d7c557:   c3 4c 8b df 48 8b f9 49 8b c8 4c 8b c6 49 8b f2
0x0000000076d7c567:   f3 a4 49 8b f0 49 8b fb c3 0f 10 02 41 0f 10 4c
0x0000000076d7c577:   10 f0 0f 11 01 41 0f 11 4c 08 f0 48 8b c1 c3 66


Register to memory mapping:

RAX=0x000000001fbd0654 is an unknown value
RBX=0x000000001f718ae8 is an unknown value
RCX=0x0000000000000300 is an unknown value
RDX=0xffffffffe042f9ac is an unknown value
RSP=0x000000001e1aefc8 is pointing into the stack for thread: 0x000000001d609000
RBP=0x000000000000001c is an unknown value
RSI=0x0000000000000000 is an unknown value
RDI=0x000000001fbd0654 is an unknown value
R8 =0x0000000000000030 is an unknown value
R9 =0x0000000000000030 is an unknown value
R10=0x0000000000000000 is an unknown value
R11=0x000000001fbd0654 is an unknown value
R12=0x0000000000000000 is an unknown value
R13=0x0000000075da0000 is an unknown value
R14=0x0000000000000002 is an unknown value
R15=0x000000001f718828 is an unknown value


Stack: [0x000000001e0b0000,0x000000001e1b0000],  sp=0x000000001e1aefc8,  free space=1019k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C  [nvoglv64.DLL+0xfdc567]
C  [nvoglv64.DLL+0xb4654a]
C  [nvoglv64.DLL+0xb47332]
C  0x0000000002d15b74

Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j  org.lwjgl.system.JNI.callV(JIII)V+0
j  org.lwjgl.opengl.GL11.glDrawArrays(III)V+11
j  com.lcass.graphics.Graphics_handler.render()V+256
j  com.lcass.graphics.core_util.render()V+7
j  com.lcass.graphics.core_util.start_tick()Ljava/lang/Object;+210
j  com.lcass.core.Core.run()V+272
v  ~StubRoutines::call_stub

---------------  P R O C E S S  ---------------

Java Threads: ( => current thread )
  0x000000001d7f4800 JavaThread "Java2D Disposer" daemon [_thread_blocked, id=3556, stack(0x0000000023d30000,0x0000000023e30000)]
  0x0000000002c00800 JavaThread "DestroyJavaVM" [_thread_blocked, id=9924, stack(0x0000000002b00000,0x0000000002c00000)]
=>0x000000001d609000 JavaThread "Thread-0" [_thread_in_native, id=1976, stack(0x000000001e0b0000,0x000000001e1b0000)]
  0x000000001d573000 JavaThread "Service Thread" daemon [_thread_blocked, id=10236, stack(0x000000001deb0000,0x000000001dfb0000)]
  0x000000001d4f1000 JavaThread "C1 CompilerThread3" daemon [_thread_blocked, id=11432, stack(0x000000001ddb0000,0x000000001deb0000)]
  0x000000001d4ea000 JavaThread "C2 CompilerThread2" daemon [_thread_blocked, id=11756, stack(0x000000001dcb0000,0x000000001ddb0000)]
  0x000000001d4db000 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, id=11728, stack(0x000000001dbb0000,0x000000001dcb0000)]
  0x000000001d4d6800 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=11940, stack(0x000000001dab0000,0x000000001dbb0000)]
  0x000000001d4d3800 JavaThread "Attach Listener" daemon [_thread_blocked, id=11732, stack(0x000000001d9b0000,0x000000001dab0000)]
  0x000000001d4df800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=8384, stack(0x000000001d8b0000,0x000000001d9b0000)]
  0x0000000002cf6000 JavaThread "Finalizer" daemon [_thread_blocked, id=10596, stack(0x000000001d3b0000,0x000000001d4b0000)]
  0x0000000002cef000 JavaThread "Reference Handler" daemon [_thread_blocked, id=11260, stack(0x000000001d2b0000,0x000000001d3b0000)]

Other Threads:
  0x000000001b4b8000 VMThread [stack: 0x000000001d1b0000,0x000000001d2b0000] [id=11904]
  0x000000001d575000 WatcherThread [stack: 0x000000001dfb0000,0x000000001e0b0000] [id=11924]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

Heap:
 PSYoungGen      total 67072K, used 22153K [0x0000000775c00000, 0x000000077a680000, 0x00000007c0000000)
  eden space 57856K, 38% used [0x0000000775c00000,0x00000007771a2738,0x0000000779480000)
  from space 9216K, 0% used [0x0000000779d80000,0x0000000779d80000,0x000000077a680000)
  to   space 9216K, 0% used [0x0000000779480000,0x0000000779480000,0x0000000779d80000)
 ParOldGen       total 153088K, used 0K [0x00000006e1400000, 0x00000006ea980000, 0x0000000775c00000)
  object space 153088K, 0% used [0x00000006e1400000,0x00000006e1400000,0x00000006ea980000)
 Metaspace       used 9857K, capacity 9917K, committed 10240K, reserved 1058816K
  class space    used 876K, capacity 897K, committed 1024K, reserved 1048576K

Card table byte_map: [0x00000000120c0000,0x00000000127c0000] byte_map_base: 0x000000000e9b6000

Marking Bits: (ParMarkBitMap*) 0x0000000050d3d490
 Begin Bits: [0x0000000013470000, 0x0000000016c20000)
 End Bits:   [0x0000000016c20000, 0x000000001a3d0000)

Polling page: 0x00000000013b0000

CodeCache: size=245760Kb used=2681Kb max_used=2692Kb free=243078Kb
 bounds [0x0000000002d00000, 0x0000000002fb0000, 0x0000000011d00000]
 total_blobs=1413 nmethods=585 adapters=742
 compilation: enabled

Compilation events (10 events):
Event: 6.103 Thread 0x000000001d4f1000  579       3       java.io.RandomAccessFile::readFully (45 bytes)
Event: 6.103 Thread 0x000000001d4f1000 nmethod 579 0x0000000002f9a8d0 code [0x0000000002f9aa60, 0x0000000002f9adf8]
Event: 6.107 Thread 0x000000001d4f1000  581       3       java.util.zip.InflaterInputStream::available (15 bytes)
Event: 6.107 Thread 0x000000001d4f1000 nmethod 581 0x0000000002f9a010 code [0x0000000002f9a180, 0x0000000002f9a468]
Event: 6.150 Thread 0x000000001d4f1000  582       3       org.lwjgl.system.Checks::checkFunctionAddress (18 bytes)
Event: 6.151 Thread 0x000000001d4f1000 nmethod 582 0x0000000002f99b90 code [0x0000000002f99d00, 0x0000000002f99f28]
Event: 6.153 Thread 0x000000001d4f1000  583       3       org.lwjgl.glfw.GLFW::glfwWindowShouldClose (29 bytes)
Event: 6.153 Thread 0x000000001d4f1000 nmethod 583 0x0000000002f99590 code [0x0000000002f99720, 0x0000000002f99a38]
Event: 6.159 Thread 0x000000001d4ea000  585       4       org.lwjgl.glfw.GLFW::glfwWindowShouldClose (29 bytes)
Event: 6.160 Thread 0x000000001d4ea000 nmethod 585 0x0000000002f98f10 code [0x0000000002f99060, 0x0000000002f990e8]

GC Heap History (0 events):
No events

Deoptimization events (0 events):
No events

Internal exceptions (10 events):
Event: 5.786 Thread 0x000000001d609000 Exception <a 'java/security/PrivilegedActionException'> (0x0000000776bea358) thrown at [D:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u25\1677\hotspot\src\share\vm\prims\jvm.cpp, line 1312]
Event: 5.937 Thread 0x000000001d609000 Exception <a 'java/security/PrivilegedActionException'> (0x0000000776e6c790) thrown at [D:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u25\1677\hotspot\src\share\vm\prims\jvm.cpp, line 1312]
Event: 5.939 Thread 0x000000001d609000 Exception <a 'java/security/PrivilegedActionException'> (0x0000000776e6e6f8) thrown at [D:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u25\1677\hotspot\src\share\vm\prims\jvm.cpp, line 1312]
Event: 5.941 Thread 0x000000001d609000 Exception <a 'java/security/PrivilegedActionException'> (0x0000000776e70508) thrown at [D:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u25\1677\hotspot\src\share\vm\prims\jvm.cpp, line 1312]
Event: 5.942 Thread 0x000000001d609000 Exception <a 'java/security/PrivilegedActionException'> (0x0000000776e71810) thrown at [D:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u25\1677\hotspot\src\share\vm\prims\jvm.cpp, line 1312]
Event: 5.944 Thread 0x000000001d609000 Exception <a 'java/security/PrivilegedActionException'> (0x0000000776e72ef8) thrown at [D:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u25\1677\hotspot\src\share\vm\prims\jvm.cpp, line 1312]
Event: 5.945 Thread 0x000000001d609000 Exception <a 'java/security/PrivilegedActionException'> (0x0000000776e74dc8) thrown at [D:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u25\1677\hotspot\src\share\vm\prims\jvm.cpp, line 1312]
Event: 5.947 Thread 0x000000001d609000 Exception <a 'java/security/PrivilegedActionException'> (0x0000000776e76ee0) thrown at [D:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u25\1677\hotspot\src\share\vm\prims\jvm.cpp, line 1312]
Event: 5.948 Thread 0x000000001d609000 Exception <a 'java/security/PrivilegedActionException'> (0x0000000776e78358) thrown at [D:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u25\1677\hotspot\src\share\vm\prims\jvm.cpp, line 1312]
Event: 5.951 Thread 0x000000001d609000 Exception <a 'java/security/PrivilegedActionException'> (0x0000000776e79ec0) thrown at [D:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u25\1677\hotspot\src\share\vm\prims\jvm.cpp, line 1312]

Events (10 events):
Event: 5.973 Thread 0x000000001d609000 DEOPT PACKING pc=0x0000000002f5abba sp=0x000000001e1aea70
Event: 5.973 Thread 0x000000001d609000 DEOPT UNPACKING pc=0x0000000002d475bf sp=0x000000001e1ae7d0 mode 0
Event: 5.974 Thread 0x000000001d609000 DEOPT PACKING pc=0x0000000002f5abba sp=0x000000001e1aea70
Event: 5.974 Thread 0x000000001d609000 DEOPT UNPACKING pc=0x0000000002d475bf sp=0x000000001e1ae7d0 mode 0
Event: 5.974 Thread 0x000000001d609000 DEOPT PACKING pc=0x0000000002f5abba sp=0x000000001e1aea70
Event: 5.975 Thread 0x000000001d609000 DEOPT UNPACKING pc=0x0000000002d475bf sp=0x000000001e1ae7d0 mode 0
Event: 5.975 Thread 0x000000001d609000 DEOPT PACKING pc=0x0000000002f5abba sp=0x000000001e1aea70
Event: 5.975 Thread 0x000000001d609000 DEOPT UNPACKING pc=0x0000000002d475bf sp=0x000000001e1ae7d0 mode 0
Event: 5.976 Thread 0x000000001d609000 DEOPT PACKING pc=0x0000000002f5abba sp=0x000000001e1aea70
Event: 5.976 Thread 0x000000001d609000 DEOPT UNPACKING pc=0x0000000002d475bf sp=0x000000001e1ae7d0 mode 0


Dynamic libraries:
0x00007ff71e650000 - 0x00007ff71e684000    C:\Program Files\Java\jre1.8.0_25\bin\javaw.exe
0x00007ffaf9580000 - 0x00007ffaf972d000    C:\Windows\SYSTEM32\ntdll.dll
0x00007ffaf6c00000 - 0x00007ffaf6d3e000    C:\Windows\system32\KERNEL32.DLL
0x00007ffaf6ae0000 - 0x00007ffaf6bf5000    C:\Windows\system32\KERNELBASE.dll
0x00007ffaf5280000 - 0x00007ffaf530e000    C:\Windows\system32\apphelp.dll
0x00007ffae4900000 - 0x00007ffae4953000    C:\Windows\AppPatch\AppPatch64\AcGenral.DLL
0x00007ffaf8f70000 - 0x00007ffaf901a000    C:\Windows\system32\msvcrt.dll
0x00007ffaf64a0000 - 0x00007ffaf64ce000    C:\Windows\SYSTEM32\SspiCli.dll
0x00007ffaf7070000 - 0x00007ffaf70c4000    C:\Windows\system32\SHLWAPI.dll
0x00007ffaf6d40000 - 0x00007ffaf6eb7000    C:\Windows\system32\USER32.dll
0x00007ffaf7740000 - 0x00007ffaf78d4000    C:\Windows\system32\ole32.dll
0x00007ffaf78e0000 - 0x00007ffaf8e0a000    C:\Windows\system32\SHELL32.dll
0x00007ffaf5c70000 - 0x00007ffaf5c91000    C:\Windows\SYSTEM32\USERENV.dll
0x00007ffaf9350000 - 0x00007ffaf93fa000    C:\Windows\system32\ADVAPI32.dll
0x00007ffae5c80000 - 0x00007ffae5c9e000    C:\Windows\SYSTEM32\MPR.dll
0x00007ffaf8e20000 - 0x00007ffaf8f61000    C:\Windows\system32\RPCRT4.dll
0x00007ffaf92f0000 - 0x00007ffaf9349000    C:\Windows\SYSTEM32\sechost.dll
0x00007ffaf70d0000 - 0x00007ffaf72e1000    C:\Windows\SYSTEM32\combase.dll
0x00007ffaf73b0000 - 0x00007ffaf74ff000    C:\Windows\system32\GDI32.dll
0x00007ffaf66d0000 - 0x00007ffaf66e5000    C:\Windows\SYSTEM32\profapi.dll
0x00007ffaf4c40000 - 0x00007ffaf4cf2000    C:\Windows\SYSTEM32\SHCORE.dll
0x00007ffaf94e0000 - 0x00007ffaf9516000    C:\Windows\system32\IMM32.DLL
0x00007ffaf75e0000 - 0x00007ffaf7732000    C:\Windows\system32\MSCTF.dll
0x00007ffaf4330000 - 0x00007ffaf45ab000    C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.9600.18006_none_623f33d3ecbe86e8\COMCTL32.dll
0x00000000502d0000 - 0x00000000503a2000    C:\Program Files\Java\jre1.8.0_25\bin\msvcr100.dll
0x0000000050560000 - 0x0000000050dba000    C:\Program Files\Java\jre1.8.0_25\bin\server\jvm.dll
0x00007ffaee750000 - 0x00007ffaee759000    C:\Windows\SYSTEM32\WSOCK32.dll
0x00007ffaf2e40000 - 0x00007ffaf2e62000    C:\Windows\SYSTEM32\WINMM.dll
0x00007ffaf9020000 - 0x00007ffaf9027000    C:\Windows\system32\PSAPI.DLL
0x00007ffaf9520000 - 0x00007ffaf957a000    C:\Windows\system32\WS2_32.dll
0x00007ffaf2e00000 - 0x00007ffaf2e2a000    C:\Windows\SYSTEM32\WINMMBASE.dll
0x00007ffaf8e10000 - 0x00007ffaf8e19000    C:\Windows\system32\NSI.dll
0x00007ffaf6a90000 - 0x00007ffaf6adf000    C:\Windows\SYSTEM32\cfgmgr32.dll
0x00007ffaf54d0000 - 0x00007ffaf54f8000    C:\Windows\SYSTEM32\DEVOBJ.dll
0x0000000050550000 - 0x000000005055f000    C:\Program Files\Java\jre1.8.0_25\bin\verify.dll
0x0000000050520000 - 0x0000000050548000    C:\Program Files\Java\jre1.8.0_25\bin\java.dll
0x0000000050500000 - 0x0000000050516000    C:\Program Files\Java\jre1.8.0_25\bin\zip.dll
0x00007ffac2da0000 - 0x00007ffac2eb7000    C:\lwjgl 3\native\lwjgl.dll
0x00007ffaf6640000 - 0x00007ffaf664b000    C:\Windows\SYSTEM32\CRYPTBASE.DLL
0x00007ffaf64d0000 - 0x00007ffaf6533000    C:\Windows\SYSTEM32\bcryptPrimitives.dll
0x00007ffad7720000 - 0x00007ffad775c000    C:\lwjgl 3\native\glfw.dll
0x00007ffaf5350000 - 0x00007ffaf5479000    C:\Windows\system32\uxtheme.dll
0x00007ffad7640000 - 0x00007ffad7682000    C:\Windows\SYSTEM32\dinput8.dll
0x00007ffae8020000 - 0x00007ffae802d000    C:\Windows\SYSTEM32\xinput1_4.dll
0x00007ffaf4a40000 - 0x00007ffaf4a61000    C:\Windows\SYSTEM32\dwmapi.dll
0x00007ffad6380000 - 0x00007ffad64ab000    C:\Windows\SYSTEM32\opengl32.dll
0x00007ffad6350000 - 0x00007ffad637e000    C:\Windows\SYSTEM32\GLU32.dll
0x00007ffad6250000 - 0x00007ffad6348000    C:\Windows\SYSTEM32\DDRAW.dll
0x00007ffad64c0000 - 0x00007ffad64c9000    C:\Windows\SYSTEM32\DCIMAN32.dll
0x00007ffaf5890000 - 0x00007ffaf589d000    C:\Windows\SYSTEM32\HID.DLL
0x00007ffaf9110000 - 0x00007ffaf92ea000    C:\Windows\system32\SETUPAPI.DLL
0x00007ffaf67a0000 - 0x00007ffaf67f1000    C:\Windows\system32\WINTRUST.dll
0x00007ffaf68b0000 - 0x00007ffaf6a8f000    C:\Windows\system32\CRYPT32.dll
0x00007ffaf6780000 - 0x00007ffaf6791000    C:\Windows\system32\MSASN1.dll
0x00007ffad1b80000 - 0x00007ffad1c09000    C:\Windows\SYSTEM32\vulkan-1.dll
0x00007ffaef5f0000 - 0x00007ffaef622000    C:\Windows\SYSTEM32\ntmarta.dll
0x0000000075da0000 - 0x0000000077ffd000    C:\Windows\SYSTEM32\nvoglv64.DLL
0x00007ffaf2b40000 - 0x00007ffaf2b52000    C:\Windows\SYSTEM32\WTSAPI32.dll
0x00007ffaf2e30000 - 0x00007ffaf2e3a000    C:\Windows\SYSTEM32\VERSION.dll
0x00007ffacd570000 - 0x00007ffacd747000    C:\Windows\system32\nvspcap64.dll
0x00007ffaf9040000 - 0x00007ffaf9101000    C:\Windows\system32\OLEAUT32.dll
0x00007ffaf1c40000 - 0x00007ffaf1d09000    C:\Windows\SYSTEM32\WINHTTP.dll
0x00007ffaf2540000 - 0x00007ffaf296c000    C:\Windows\system32\nvapi64.dll
0x00007ffaf5270000 - 0x00007ffaf527b000    C:\Windows\SYSTEM32\kernel.appcore.dll
0x00007ffaf6670000 - 0x00007ffaf66b6000    C:\Windows\SYSTEM32\powrprof.dll
0x00007ffaf65e0000 - 0x00007ffaf663a000    C:\Windows\SYSTEM32\WINSTA.dll
0x00007ffad4dc0000 - 0x00007ffad4dfb000    C:\lwjgl 3\native\jemalloc.dll
0x0000000050130000 - 0x00000000502c8000    C:\Program Files\Java\jre1.8.0_25\bin\awt.dll
0x00007ffaf5f40000 - 0x00007ffaf5f60000    C:\Windows\SYSTEM32\CRYPTSP.dll
0x00007ffaf5b60000 - 0x00007ffaf5b96000    C:\Windows\system32\rsaenh.dll
0x00007ffaf6190000 - 0x00007ffaf61b6000    C:\Windows\SYSTEM32\bcrypt.dll
0x00000000504e0000 - 0x00000000504fa000    C:\Program Files\Java\jre1.8.0_25\bin\net.dll
0x00007ffaf5ee0000 - 0x00007ffaf5f39000    C:\Windows\system32\mswsock.dll
0x00007ffaf0690000 - 0x00007ffaf06ba000    C:\Windows\SYSTEM32\IPHLPAPI.DLL
0x00007ffaf0660000 - 0x00007ffaf066a000    C:\Windows\SYSTEM32\WINNSI.DLL
0x00007ffaf0500000 - 0x00007ffaf0516000    C:\Windows\SYSTEM32\dhcpcsvc6.DLL
0x00007ffaf04e0000 - 0x00007ffaf04fa000    C:\Windows\SYSTEM32\dhcpcsvc.DLL
0x00000000504c0000 - 0x00000000504d1000    C:\Program Files\Java\jre1.8.0_25\bin\nio.dll
0x00007ffadcf60000 - 0x00007ffadd0e9000    C:\Windows\SYSTEM32\dbghelp.dll

VM Arguments:
jvm_args: -Djava.library.path=C:\lwjgl 3\native -Dfile.encoding=Cp1252
java_command: com.lcass.core.Core
java_class_path (initial): D:\workspace\spess-battle\bin;C:\lwjgl 3\jar\lwjgl.jar
Launcher Type: SUN_STANDARD

Environment Variables:
PATH=C:/Program Files/Java/jre1.8.0_25/bin/server;C:/Program Files/Java/jre1.8.0_25/bin;C:/Program Files/Java/jre1.8.0_25/lib/amd64;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Windows Live\Shared;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\nodejs\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Skype\Phone\;C:\Users\Asus\AppData\Roaming\npm;E:\Microsoft VS Code\bin;C:\eclipse;
USERNAME=Asus
OS=Windows_NT
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 60 Stepping 3, GenuineIntel



---------------  S Y S T E M  ---------------

OS: Windows 8.1 , 64 bit Build 9600

CPU:total 8 (4 cores per cpu, 2 threads per core) family 6 model 60 stepping 3, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, avx2, aes, clmul, erms, lzcnt, ht, tsc, tscinvbit, bmi1, bmi2

Memory: 4k page, physical 14595592k(5575124k free), swap 29275656k(18018956k free)

vm_info: Java HotSpot(TM) 64-Bit Server VM (25.25-b02) for windows-amd64 JRE (1.8.0_25-b18), built on Oct  7 2014 14:25:37 by "java_re" with MS VC++ 10.0 (VS2010)

time: Mon Jul 17 22:20:51 2017
elapsed time: 6 seconds (0d 0h 0m 6s)

4  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-11-18 18:01:39
Had a mock interview for oxford today , here is a fun little question how many consecutive zeros are there at the end of 2016!?
5  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-10-20 09:38:18
I sold all my gun skins in Counter Strike for just over $1000
Turned out to be a profitable investment.
I have only one question:
And how many money you spend on keys to unlock them? Wink
Depends on how long it took , a KWH of power is an extremely cheap amount of power only a few cents , most computers run at less than a KWH often at a third of that so I would assume he would have made atleast $500 profit with power costs included.  This of course makes it a better short term investment than bit coin
6  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-10-18 09:56:53
As for a fast way to deal with ln, I guess you could try the usual series lnx ~ x-1 - 0.5(x-1)(x-1) + 0.33(x-1)(x-1)(x-1) - ... and shorten it to the smallest number of terms that would still produce acceptable results..

Just be warned that this will only produce a 'valid' approximation for about 0 < x < 2.

Edit: Since
(plnp)^2 / p
and
(plnp)^2
should both be calculated per light (correct, or am I thinking of this variable wrong?), this optimization matters less than the optimization of the equation
y=s/(x^2+t)
where
s=(plnp)^2
and
t=(plnp)^2/p
.

Ps: also not gonna use latex sorry not sorry
Genius coder I forgot this was only happening once per light  Roll Eyes , i'll fix that.  The divisions cannot be optimised easily as that equation cannot be simplified much further than it already is however by precalculating p and lnp then using them when neccessary it can be made much faster.
7  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-10-17 18:29:56
Updated my algorithm a little bit , gives a nicer result with light regions getting larger on the darker colours. with range being defined as plnp + p.
This produces the nice result shown below.

It would be nice to make this faster , as lighting calculations don't need to be exact is there any decent and rapid approximation to ln p , of course p^2 ln p can be approximated but the only implementations I have found don't have much explanation.
8  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-10-15 14:58:36
Updated my lighting system to produce a nice inverse square type spread , came up with this equation to model it where k is the range of the light and p is the power. This functions so that it doesn't require a square root calculation and that y<1 when x = k.
9  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-10-11 21:27:14
UCAS for Oxbridge is so damn early.
I wasn't planning to apply until about 3 weeks before , really was quite pressured. Have to sit the MAT in a few weeks aswell , that is going to be interesting...
10  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-10-10 20:28:14
Sent off my UCAS application to oxford to study mathematics.
11  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-09-13 19:21:57
I got depressed a bit.

http://xkcd.com/1732
I think the fact people still don't believe this is insane , it's obviously getting worse and population increase plays a huge role! Us java developers need to get into gear to make games that stop people from wanting to have more children so that we can save the environment!
12  Game Development / Newbie & Debugging Questions / Re: Level Design And "Level Data" file formats on: 2016-09-06 15:43:11
Here is how I do this , initially I setup an enum storing each obj/tile type with names and sprite positions along with an ID for it. Advantages of this? an object can have the same function and interaction however it will have a different appearance and can have a different name , this can of course be expanded for other things like bounds.
For instance my enum class looks like this :
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
public enum tileid {
   SPACE(new space(),"aaa"),
   METAL_WALL(new metal_wall(),"a"),
   METAL_FLOOR(new metal_floor(),"b");
   public tile type;
   public String id;
   tileid(tile t,String letter){
      type = t;
      id = letter;
   }
}


For loading the world it stores a list of all the ID's next to their corresponding obj/tile and then iterate through a string which stores all the map data and create this.
Here is the code for loading/saving the map:
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  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
public void save_world(){
      String output = "";
      int x;
      int y;
      for(y = height - 1;y >= 0;y--){
         String x_output = "";
         for(x = 0;x < width ;x++){
            String y_output = "";
            tile t = world[x][y];
            if(t == null){
               y_output = "aaa";
            }
            else{
               obj[] objs = t.get_items();
               y_output = get_tile_id(t);
               for(obj o : objs){
                  y_output += "#";
                  y_output += get_obj_id(o);
               }
            }
            if(x != width - 1 ){
               y_output += ",";
            }
            x_output += y_output;
         }
         x_output += ";";
         output += x_output;
      }
      System.out.println(output);//the actual map
     
   }
   public void build_world(){
      String file = map_file.gettext("./src/com/maps/map1");
      String[] rows = file.split(";");
      int x = 0;
      int y = height - 1;
      for(String row : rows){
         x = 0;
         String[] columns = row.split(",");
         for(String column : columns){
            String[] point_data = column.split("#");
            boolean tile = false;
            for(String data : point_data){
               if(!tile){
                  tile = true;
                  tile t = getnew(tileset.get(data));
                  if(t == null){
                     t = new space(new Vertex2d(x,y));
                     
                  }else{
                     t.init(new Vertex2d(x,y));
                  }
                  add_tile(t);
                  continue;
               }
               obj o = getnewobj(objset.get(data));
               if(o == null){
                  continue;
               }
               o.init(oh,new Vertex2d(x,y));
               add_obj(o);
            }
            x++;
         }
         y --;
      }
      for(x = 0; x < width;x++){
         for(y= 0;y < height;y++){
            if(world[x][y] == null){
               add_tile(new space(new Vertex2d(x,y)));
            }
         }
      }
      clear_paused_lights();
      update();
   }

So how does this work? Lets start with loading the world first , the code initially iterates through the input string and splits it into individual coordinates (each tile/obj has exact world coordinates) with rows being defined by ; and each individual index being split by , . This also stores items and it does so by splitting them from the tiles with #.

For example a world that is 4 by 4 with tile a on the top row and tile b the rest of the map with each alternating index storing an item with ID c would look like this :
1  
a#c,a,a#c,a;b#c,b,b#c,b;b#c,b,b#c,b;b#c,b,b#c,b;

It's quick it's dirty but it does the job and doesn't require serializable.
13  Discussions / Miscellaneous Topics / Re: HTML/CSS Is Gross on: 2016-08-30 23:36:25
"I'm gonna make my own HTML , with black jack ... and hookers!" - Hydroque 2016
14  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-08-24 22:44:05
Got my new renderer working and my god it is so much simpler to use , GUI's and stuff are still a *bit* of a challenge requiring a seperate set of buffer storage. It would be great to know how people usually handle modular layering.
15  Game Development / Newbie & Debugging Questions / Re: LWJGL 3 rendering issues on: 2016-08-23 22:33:13
Discovered I hadn't enabled the GLFW contexts , seems to have fixed it. Thanks SHC for the tutorial.
16  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-08-23 21:32:53
Started rewriting my entire graphics engine , to be perfectly honest the previous one was pretty shoddy now looking at it...
It is so much better to have tried, and learned from the process, than done nothing at all.
And then try again and fail because you can't write GLSL XD.
17  Game Development / Newbie & Debugging Questions / Re: LWJGL 3 rendering issues on: 2016-08-23 21:14:50
I am forcibly setting the colour of the shape within my frag shader. Here they are.
vertex
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  
attribute vec2 position;
attribute vec2 texin;
uniform vec2 transform;
uniform vec2 dimension;
vec2 convertback(vec2 data){
float tx = data.x * dimension.x;
float ty = data.y * dimension.y;
vec2 stage1 = vec2(tx,ty);
tx = stage1.x + dimension.x;
ty = stage1.y + dimension.y;
return vec2(tx,ty);
}
vec2 convertto(vec2 data){
float tx = data.x ;
float ty = data.y;
vec2 stage1 = vec2(tx - dimension.x,ty - dimension.y);
vec2 stage2 = vec2((stage1.x )/dimension.x,(stage1.y )/dimension.y);
return stage2;
}
void main(){
   
   vec4 offset = vec4((position.x+transform.x),(position.y+transform.y),1,1);
   gl_Position = offset;


}

frag
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
uniform sampler2D bgl_RenderedTexture;

void main(){
   vec4 tex = texture2D(bgl_RenderedTexture,vecdata);
    if(tex.rgb == vec3(1.0,0,1.0)){
         discard;
    }
    else{
    gl_FragColor = vec4(1.0,0,1.0,1);
    }
   
   
  }
   
   


I'll show the GLFW init code along with the full render code.


1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
public void create_display(int width, int height, String name, int framerate) {

      GLFW.glfwInit();
      core.window = GLFW.glfwCreateWindow(width, height,
            name, 0, 0);
      this.width = width;
      this.height = height;
      GLFW.glfwMakeContextCurrent(core.window);
      GLFW.glfwSwapInterval(1);
      GLFW.glfwShowWindow(core.window);
      GL.createCapabilities();
      vbo_core = new CoreVBO();
      GL11.glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
      GL11.glEnable(GL11.GL_BLEND);
      GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);

   }


1  
2  
3  
4  
5  
6  
public void render() {
      core.graphics.render();
      for(int i = 0; i < render_methods.size();i++){//manual rendering , must be done through the graphics handler
         render_methods.get(i).call();
      }
   }
18  Game Development / Newbie & Debugging Questions / LWJGL 3 rendering issues on: 2016-08-23 18:47:09
I'm probably being an absolute idiot here ( as usual ) , i'm trying to render a simple shape in my new graphics engine and while the window is shown no image is shown on the screen. Below is the relative 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  
public void render() {
      GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT);
      int index = 0;
      for(index = 0; index < buffer_objects.size();index++){
         BufferObject render_object = buffer_objects.get(index);
         vbo_core.bind_shader();
         GL11.glEnable(GL11.GL_BLEND);
         GL11.glBindTexture(GL11.GL_TEXTURE_2D, render_object.texture.id);
         GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, render_object.vertex_id);
         GL20.glEnableVertexAttribArray(vbo_core.locationattribvertex);
         GL20.glEnableVertexAttribArray(vbo_core.locationattribtex);
         GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER,render_object.vertex_id);
         GL20.glVertexAttribPointer(vbo_core.locationattribvertex, 2,
               GL11.GL_FLOAT, false, 0, 0);
         GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, render_object.texture_id);
         GL20.glVertexAttribPointer(vbo_core.locationattribtex, 2,
               GL11.GL_FLOAT, false, 0, 0);
         // Draw the textured rectangle
         GL20.glUniform2f(vbo_core.locationdimension, width, height);
         GL20.glUniform2f(vbo_core.locationtransform, render_object.translation.x,
               render_object.translation.y);
         GL11.glDrawArrays(GL11.GL_TRIANGLES, 0, render_object.vert_count);
         
         GL20.glDisableVertexAttribArray(vbo_core.locationattribvertex);
         GL20.glDisableVertexAttribArray(vbo_core.locationattribtex);

         GL11.glEnable(GL11.GL_BLEND);
         vbo_core.un_bind_shader();
      }
     
   }

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
public int create_buffer(int size , Vertex2d[] data,Texture t){
      int index = create_buffer(size,t);
      BufferObject buffer = buffer_objects.get(index);
      for(Vertex2d vertex :data){
         buffer.verticies.put(vertex.x);
         buffer.textures.put(vertex.u);
         buffer.verticies.put(vertex.y);
         buffer.textures.put(vertex.v);
         buffer.vert_count+=2;
      }
      buffer_objects.set(index,buffer);
      buffer.flip();
      GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, buffer.vertex_id);
      GL15.glBufferData(GL15.GL_ARRAY_BUFFER, buffer.verticies, GL15.GL_STREAM_DRAW);
      GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, buffer.texture_id);
      GL15.glBufferData(GL15.GL_ARRAY_BUFFER,   buffer.textures, GL15.GL_STREAM_DRAW);
      GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, 0);
      return index;
   }


Any help an obvious error pointing out would be helpful.
19  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-08-22 21:31:18
Started rewriting my entire graphics engine , to be perfectly honest the previous one was pretty shoddy now looking at it. For the things I wanted to do it had too much overhead and required lots of micromanagement by the above programs. I have designed my new one to be much simpler to use with the core graphics handler class dealing directly with the openGL side of things and the renderer class dealing with with the graphics handler , interactions between world objects and the conversion of world coordinates to screen coordinates all with minimal input from the higher level classes. It has limitations in that it will only render squares ( tile based game so it doesn't make too much difference to the total function ) , the renderer can handle a maximum number of objects before it just starts declining them however this will always be precalculated by the world so that if it does happen something has probably gone wrong. All of the graphics handler is extendable up to the limit of the system though so it should work just fine for that , it's also made so that all my previous code will not require too much modification and if anything should become a lot simpler than previous especially in terms of memory efficiency which was my previous issue.

The graphics handler is the only class that will deal with floatbuffers and because of this memory leaks will hopefully be non existant , this class also directly deal with all of the vbo's and because of this no other classes are required to have a cleanup method.
20  Game Development / Newbie & Debugging Questions / Re: Floatbuffer memory leak on: 2016-08-21 20:19:19
Tries to fix memory leak , ends up rewriting entire graphics engine  Grin
21  Game Development / Newbie & Debugging Questions / Re: Floatbuffer memory leak on: 2016-08-21 15:22:16
I couldn't really find any tutorials on linking stacks with lwjgl and if anyone has any please let me know.

Not sure what you're looking for exactly. It's very simple:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
// Method 1: Explicit malloc/free, useful for "big" buffers and custom lifecycles 
FloatBuffer buffer = memAllocFloat(100);
// ..use buffer..
memFree(buffer); // buffer goes away (doesn't have to be in the same method)

// Method 2: Stack allocation, useful for "small" buffers, local-only
try ( MemoryStack stack = stackPush() ) {
   FloatBuffer buffer = stack.mallocFloat(100);
   // ..use buffer..
} // buffer goes away


Ahh thanks , so just entirely ignore BufferUtils and do it manually. I'll work on my method first and then implement this with it.
22  Game Development / Newbie & Debugging Questions / Re: Floatbuffer memory leak on: 2016-08-21 11:58:47
I think the method i'm going to go for instead is to still use floatbuffers however entirely leave them to the few VBO's I have and instead modify actual vertex data and pass it down to the VBOs. This basically means recoding the graphics engine but it isn't that bad , I couldn't really find any tutorials on linking stacks with lwjgl and if anyone has any please let me know.
23  Game Development / Newbie & Debugging Questions / Re: Floatbuffer memory leak on: 2016-08-21 10:06:38
Stacks seem perfect for this role , it's strange that these aren't really mentioned in any of the default LWJGL tutorials as it's really useful. Thanks for the links i'll implement them soon.
24  Game Development / Newbie & Debugging Questions / Floatbuffer memory leak on: 2016-08-21 00:27:54
So i've been trying to fix memory leaks within my code and it seems the cause of the entire issue is BufferUtils.createFloatBuffer(); when this is called it creates a float buffer and appears to leave it in memory , my test of just having a for loop call that ended up hogging memory. Is there a method of deleting the floatbuffer once it's purpose has been served as it's at the core of my code.
25  Game Development / Newbie & Debugging Questions / Re: Reference handler thread lag issues on: 2016-08-19 22:24:14
Hmm I found the problem , turns out my legacy code was creating 6 unnecessary float buffers all of monstrous size in a rather high traffic section of code which was basically bottle necking the entire code.
26  Game Development / Newbie & Debugging Questions / Reference handler thread lag issues on: 2016-08-19 22:19:07
So I'm working on a game with an open world esq environment and it currently is a bit of a memory whore which I'm working on however after running a memory check on the code I find that the memory is pretty well contained other than the graphics methods and yet I still get lag spikes, after investigating I found that the reference handler thread would spike up every now and again and seems to be the cause of the lag.

What causes this thread to actually spike up , I understand it's to do with the garbage collector so would reducing my use of throwaway objects for arguments (eg some_function(new Vertex(x,y))) help with this problem?
27  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-08-19 20:58:20
Searched for a memory leak within my code , turns out there are two sources one being in the core of the graphics system and the other being in a poorly implemented lighting handler , talking about gigabytes here that killed my computer when I tried to run it.
28  Game Development / Newbie & Debugging Questions / Re: multiple VBO transparency on: 2016-08-13 11:02:36
If this is not even possible then please let me know.
29  Game Development / Newbie & Debugging Questions / multiple VBO transparency on: 2016-08-11 19:04:02
So currently I have an overlay VBO object and a world VBO object , overlay is rendered after the world and I would like the overlay object to blend with the world object based on the alpha value. I know this can be done with a single VBO but that would mean rewriting the majority of my VBO code.
30  Game Development / Game Mechanics / Re: [java] Rapid trigonometric calculations on: 2016-04-19 19:41:24
See this link: http://www.java-gaming.org/topics/extremely-fast-sine-cosine/36469/view.html
Feel free to compare it against those implementations.

Thank you so much for that , I have copied over some of the methods and benchmarked against them , here are the results.

1  
2  
3  
4  
5  
6  
7  
[0]   Valcalc.defcos!..........   6.33ns
[1]   Valcalc.defsin...........   6.33ns
[2]   Valcalc.deftan........!..........   6.34ns
[3]   Valcalc.devsin..!..........   51.7ns
[4]   Valcalc.kappasin..........   5.37ns
[5]   Valcalc.lcasssin..........   5.70ns
[6]   Valcalc.lcasssincostan.........!....!..........   5.69ns


The reason I found that Devmaster's method was so slow was due to the use of modulo which if used for different angles would be pretty slow.
Compared to the others mine held up quite well , it is quite clear that it is more efficient to calculate all three methods at the same time as shown by both my methods having almost identical times even though one produces three values. Naturally Kappa's wins because it was built to be as fast as possible with errors being allowed , it would be great for an explanation of how it works as it seems magical like the inverse square root calculation.

All values above use PI/6 as the input value which is pre calculated in order to effect the results as minimally as possible.
Pages: [1] 2 3 ... 29
 
Ecumene (143 views)
2017-09-30 02:57:34

theagentd (207 views)
2017-09-26 18:23:31

cybrmynd (291 views)
2017-08-02 12:28:51

cybrmynd (283 views)
2017-08-02 12:19:43

cybrmynd (293 views)
2017-08-02 12:18:09

Sralse (286 views)
2017-07-25 17:13:48

Archive (954 views)
2017-04-27 17:45:51

buddyBro (1089 views)
2017-04-05 03:38:00

CopyableCougar4 (1655 views)
2017-03-24 15:39:42

theagentd (1422 views)
2017-03-24 15:32:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05
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!