Java-Gaming.org Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (804)
Games in Android Showcase (239)
games submitted by our members
Games in WIP (868)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 ... 17 18 [19] 20 21 ... 216
  ignore  |  Print  
  What I did today  (Read 3667299 times)
0 Members and 3 Guests are viewing this topic.
Offline theagentd
« Reply #540 - Posted 2014-09-13 18:26:54 »

I technically did this yesterday, but here goes.

Although most of WSW's engine has always supported rendering the scene from multiple views (e.g. both the camera's view and the views of lights to render their shadow maps), I still had certain parts that I assumed would only need to be rendered from the main camera view were limited to a single view. I rewrote those parts to allow the engine to support any number of camera views and shadow map views. This makes it possible to do 3 new interesting things:

 - Support for splitscreen offline multiplayer, for any number of players. Even better, I could even have 3 different players on each of the 3 monitors I have since my 3 monitors are presented as a single logical monitor to LWJGL thanks to Nvidia Surround. AMD Eyefinity should work in the same way for AMD users. In theory I could have 4 player splitscreen per monitor for a total of 12 players on a single computer. Obviously, GPU performance would be the only thing that holds me back.

 - Proper support for anaglyphic 3D, active shutter 3D monitors and Oculus Rift. Although I can't get OpenGL quad buffering working on my Nvidia cards (stupid driver limits it to Quadro cards -___-'), I can easily render side-by-side 3D which a 3D TV can convert to proper 3D (although at half resolution for each eye), or even make my own anaglyphic 3D support. I intend to actually try out quad buffering on my AMD test PC as well.

 - Better quality multi-monitor gaming. I have 3 monitors, but on the side monitors the game looks extremely stretched. This is due to the fact that GPUs assume that the monitor is flat, so angling the side monitors in towards me breaks that assumption. With one view for each monitor I could easily compensate for the angle of the monitors so that the quality remains perfect at the cost of some performance.

Myomyomyo.
Offline ags1

JGO Kernel


Medals: 367
Projects: 7


Make code not war!


« Reply #541 - Posted 2014-09-13 19:11:26 »

Good work theagentd, plus I learned something from that :-)

Offline Longor1996

JGO Wizard


Medals: 116
Projects: 2
Exp: 8 years


The cake is probably a lie.


« Reply #542 - Posted 2014-09-13 20:22:42 »

Today I added Python-scripting to my sandbox.
Why did nobody ever tell me that Python can be fun?!

(Also, more boxes, now of different scale and color) EDIT: replaced image with better example


This picture was made with this script:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
s = 32

for x in range(-s,+s):
   for z in range(-s,+s):
      fx = x * 16.0
      fz = z * 16.0
     
      w = mathutil.random(0.1, 8.0)
      l = mathutil.random(0.1, 8.0)
      h = mathutil.random(0.1, 8.0)
     
      datbox = bulletutil.mkBox(fx,0,fz, 0.0, 0.0, 0.0, w, h, l, 0.0, False)
      world.addRigidBody(datbox)


Edit:
Have a prototype.
  • Not guaranteed to work!
  • 18 MB RAR

The cake is probably a lie... but it's a delicious lie!
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline lcass
« Reply #543 - Posted 2014-09-14 16:37:16 »

fixed some rather annoying bugs when using the buttons.
Offline Slyth2727
« Reply #544 - Posted 2014-09-14 16:52:01 »

Figured out how to render a pseudo-3D box in a 2D projection using min and max values of a player. I'm rendering with DirectX over a C# form which is set up to basically acting as an overlay to a 3D game. Using my reverse engineering "skills" to mess with Battlefield 4.
Offline ags1

JGO Kernel


Medals: 367
Projects: 7


Make code not war!


« Reply #545 - Posted 2014-09-14 17:55:56 »

Made a truckload of android layouts for 280dp, 300dp, 350dp, 400dp, 450dp, 550dp and 700dp width screens. I needed so many for my word puzzle game because the words are nine letters (buttons) wide, so for phones I have to squeeze the maximum button size in for the available screen width.

I had some clever code to resize the buttons at runtime, but font resizing did not work well enough. In the end it was faster to crank out an XML clone army.

http://www.java-gaming.org/topics/verbal-the-fast-paced-thinking-word-game/34313/msg/323648/view.html#msg323648

Offline CopyableCougar4
« Reply #546 - Posted 2014-09-14 20:46:21 »

I just took a look at an old problem of mine, and realized a simple solution Smiley Anyways, I present to you RotatingRectangle collision in 98 lines (including some cropped parts in this code).

Quote from: CopyableCougar4
I may just have to put my "wonderful" rotating collision detection on hold, as I am unsure whether I have the brainpower to solve this problem...
The brainpower has returned to me Smiley

I know, not impressive, I just felt I should post it Smiley

(Let me know if I should make this a pastebin)

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  
public class RotatingRegion {
   
   private Line2D.Float[] lines = new Line2D.Float[4];
   
   private float cx, cy;
   
   public RotatingRegion(float x, float y, float width, float height, float angle){
      cx = x + (width / 2);
      cy = y + (height / 2);
      float[] point1 = rotateAroundCenter(x, y, angle);
      float[] point2 = rotateAroundCenter(x + width, y, angle);
      float[] point3 = rotateAroundCenter(x + width, y + height, angle);
      float[] point4 = rotateAroundCenter(x, y + height, angle);
      lines[0] = new Line2D.Float(point1[0], point1[1], point2[0], point2[1]);
      lines[1] = new Line2D.Float(point2[0], point2[1], point3[0], point3[1]);
      lines[2] = new Line2D.Float(point3[0], point3[1], point4[0], point4[1]);
      lines[3] = new Line2D.Float(point4[0], point4[1], point1[0], point1[1]);
   }
   
   public float[] rotateAroundCenter(float x, float y, float angle){
      float dx = x - cx;
      float dy = y - cy;
      float distance = (float) Math.sqrt(dx * dx + dy * dy);
      float originalAngle = getAngle(cx, cy, x, y);
      float newangle = originalAngle + angle;
      float ndx = distance * (float)Math.sin(newangle);
      float ndy = distance * (float)Math.cos(newangle);
      float nx = cx + ndx;
      float ny = cy + ndy;
      return new float[]{nx, ny};
   }
   
   public boolean intersects(float x, float y){
      for(int index = 0; index < lines.length; index++){
         if(lines[index].contains(x, y)){
            return true;
         }
      }
      return false;
   }
   
   public boolean contains(RotatingRegion region){
      for(int index1 = 0; index1 < region.lines.length; index1++){
         for(int index = 0; index < lines.length; index++){
            if(lines[index].intersectsLine(region.lines[index1])){
               return true;
            }
         }
      }      
      return false;
   }
   
   private static float getAngle(float mousex, float mousey, float playerx, float playery){
      float deltax = mousex - playerx;
      float deltay = mousey - playery;
      double rawangle = Math.atan2(deltay, deltax);
      float degrees = (float) Math.toDegrees(rawangle);
      degrees += 90.0f; // add 90 so opengl can use it
      if(degrees < 0){
         degrees += 360.0f; // fix all angles less than 0
      }
      if(degrees > 360.0f){
         degrees -= 360.0f; // fix all angles more than 360
      }
      degrees %= 360.0f;
      return (float) Math.toRadians(degrees);
   }

}


CopyableCougar4

Either wandering the forum or programming. Most likely the latter Smiley

Github: http://github.com/CopyableCougar4
Offline lcass
« Reply #547 - Posted 2014-09-14 20:51:07 »

I just took a look at an old problem of mine, and realized a simple solution Smiley Anyways, I present to you RotatingRectangle collision in 98 lines (including some cropped parts in this code).

Quote from: CopyableCougar4
I may just have to put my "wonderful" rotating collision detection on hold, as I am unsure whether I have the brainpower to solve this problem...
The brainpower has returned to me Smiley

I know, not impressive, I just felt I should post it Smiley

(Let me know if I should make this a pastebin)


CopyableCougar4
Anything that is made with good intentions and done well is impressive. I found this useful the idea of rotating collision just makes me want to go nope . Same with skeletal joint movement.
Offline CopyableCougar4
« Reply #548 - Posted 2014-09-14 21:06:42 »

If anybody is interested for the non-trimmed source:

https://github.com/CopyableCougar4/Rotating-Region

CopyableCougar4 Smiley

Either wandering the forum or programming. Most likely the latter Smiley

Github: http://github.com/CopyableCougar4
Offline Longor1996

JGO Wizard


Medals: 116
Projects: 2
Exp: 8 years


The cake is probably a lie.


« Reply #549 - Posted 2014-09-14 22:56:57 »

What I did today (expressed in commits):
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
Added TimeWasteThread to increase System-Time precision.
Added Key/MouseEvent to GUIPanel.
Added transparent grid to the world, and changed deletionDepth-Grid to use the same system.
Working on GUI-System.
Scripting derpiness.
BugFix: NullPointerException if too many objects get deleted too fast.
BugFix: Weird micro-stuttering in camera interpolation.
BugFix: Removal of objects can corrupt the Artemis-ECS.
BugFix: System.GC() after init() to free post-startup memory and reduce initial frame-lag.
Marked some colors for easier color-search.
Added vsync.
Added EntityComponentSystem (ARTEMIS).
Changed Debug-Rendering.
Added TimerTask-class.
Scripting derpiness ensued.
Work on GUI.
Made the FlyCamera use interpolation, results in a smoother movement/rotation.
Added code to allow the XPNG-system to use any kind of OpenGL texture-filtering.
Worked on the BasicGeometry?D classes.
Added sphere RigidBody/Shape creation and caching to BulletUtil.


And a picture, because pictures:


Also, note that the application eats up less than 10 megabyte. Yay for correct memory management!

The cake is probably a lie... but it's a delicious lie!
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline CopyableCougar4
« Reply #550 - Posted 2014-09-14 23:15:24 »

Just threw together a small, simple A* pathfinding in like 20 minutes Smiley still needs lots of changes/tweaks, but I was really proud of myself Smiley

Sneak peak, about 20% done all I want to do with it Smiley


CopyableCougar4

Either wandering the forum or programming. Most likely the latter Smiley

Github: http://github.com/CopyableCougar4
Offline Ecumene

JGO Kernel


Medals: 200
Projects: 4
Exp: 8 years


I did not hit her! I did not!


« Reply #551 - Posted 2014-09-14 23:24:40 »

What I did today (expressed in commits):
-snip-

Looks awesome
Is the repo public? I would love to see the source!

Offline Longor1996

JGO Wizard


Medals: 116
Projects: 2
Exp: 8 years


The cake is probably a lie.


« Reply #552 - Posted 2014-09-15 13:41:27 »

What I did today (expressed in commits):
-snip-

Looks awesome
Is the repo public? I would love to see the source!

Yes, its public (I just made it public).
But mind that:
  • The code has badly designed code everywhere in it.
  • Lots of dependencies.
https://bitbucket.org/longor1996/sandbox

The cake is probably a lie... but it's a delicious lie!
Offline 65K
« Reply #553 - Posted 2014-09-15 16:47:10 »

Updated the game trailer for Biodrone Battle:

<a href="http://www.youtube.com/v/0Opd0037RIg?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/0Opd0037RIg?version=3&amp;hl=en_US&amp;start=</a>

Lethal Running - a RPG about a deadly game show held in a futuristic dystopian society.
Offline Longor1996

JGO Wizard


Medals: 116
Projects: 2
Exp: 8 years


The cake is probably a lie.


« Reply #554 - Posted 2014-09-15 19:52:10 »

Finished the GUI in my Sandbox-game, and some other things...

(listing of commits)
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
Removed 'U' ("Reset World") keybinding.
Finished up GUI-Work and a bunch of other things.
Added a wireframe-box to show how big the world is.
Added wraparound to camera Y rotation.
Sphere rendering now actually uses textures (for real this time!).
Added 3 new methods to GUIRenderer.
Added texturing to sphere drawing, and reduced polycount for spheres.
Fixed bug that the mouse-pos is inverted.
Added method to set color before drawing a string.
Added normals to sphere rendering.
Added methods to draw gradients to BasicGeometry2D.
Refactoring, optimization and bug-fixes. Added controls.txt file. Added source-metrics.


(Also, screenshot)

The cake is probably a lie... but it's a delicious lie!
Offline Roquen

JGO Kernel


Medals: 518



« Reply #555 - Posted 2014-09-16 07:18:00 »

XKCD inspired me to comment some code:



(Strangely enough I'm actually working on some parsing)
Offline MatthewNicholls
« Reply #556 - Posted 2014-09-16 16:35:06 »

Managed to write a shader to show bone weights.

 

Still trying to get my skinning code to work....

my blog My YouTube

"...Muahahhah... pull the lever Egor!" ..."Yesh mashter"..click... click...click..buzzzzz".......Its Alive!
Offline basil_

« JGO Bitwise Duke »


Medals: 418
Exp: 13 years



« Reply #557 - Posted 2014-09-16 18:06:40 »

this looks awesome! Cheesy
Online princec

« JGO Spiffy Duke »


Medals: 1146
Projects: 3
Exp: 20 years


Eh? Who? What? ... Me?


« Reply #558 - Posted 2014-09-16 18:35:31 »

More horror in the land of C# and Unity for me. Put in the logic behind crafting items for Basingstoke.

Cas Smiley

Offline ags1

JGO Kernel


Medals: 367
Projects: 7


Make code not war!


« Reply #559 - Posted 2014-09-16 22:00:48 »

I gave in and decided to use textures.

Offline SHC
« Reply #560 - Posted 2014-09-17 12:48:07 »

Having some progress with my beginner targeted C++ IDE:



P.S: Anyone to help me test this? PM me if you are interested.

Offline Riven
Administrator

« JGO Overlord »


Medals: 1371
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #561 - Posted 2014-09-17 12:50:07 »

Brought back JGO, among other things...

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings!
Offline ra4king

JGO Kernel


Medals: 508
Projects: 3
Exp: 5 years


I'm the King!


« Reply #562 - Posted 2014-09-17 16:29:22 »

What happened to JGO?

Offline Hamenopi

Senior Newbie


Medals: 1
Exp: 4-6 months


Oh Hai!


« Reply #563 - Posted 2014-09-17 17:46:38 »

Huzzah for JGO Resurrection!

I did some spriting and animation today

Click to Play

Offline kpars
« Reply #564 - Posted 2014-09-17 17:55:16 »

I (hackishly) changed the basic setup of Core's in Mercury (JGO Post Here).
Pretty good stuff.

Old boilerplate code would normally look like this:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
public class MyClass extends Core {
    Runner runner = Runner.getInstance();

    public MyClass() {
        super("Example");

        runner.init(this, 800, 600, false);
        runner.run();
    }

    public void init()              {}
    public void update(float delta) {}
    public void render(Graphics g)  {}
    public void cleanup()           {}

    public static void main(String[] args) {
        new MyClass();
    }
}

Now it looks like this:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
public class MyClass extends Core {
    public MyClass() {
        super("Example", 800, 600, false);
    }

    public void init()              {}
    public void update(float delta) {}
    public void render(Graphics g)  {}
    public void cleanup()           {}

    public static void main(String[] args) {
        new MyClass().run();
    }
}

You can read more about this here. Not the biggest change in the world, but still neat IMO.

I actually did this two days ago, but I figured I might as well post about it. Smiley

- Jev
Offline lcass
« Reply #565 - Posted 2014-09-17 19:33:35 »

I (hackishly) changed the basic setup of Core's in Mercury (JGO Post Here).
Pretty good stuff.

Old boilerplate code would normally look like this:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
public class MyClass extends Core {
    Runner runner = Runner.getInstance();

    public MyClass() {
        super("Example");

        runner.init(this, 800, 600, false);
        runner.run();
    }

    public void init()              {}
    public void update(float delta) {}
    public void render(Graphics g)  {}
    public void cleanup()           {}

    public static void main(String[] args) {
        new MyClass();
    }
}

Now it looks like this:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
public class MyClass extends Core {
    public MyClass() {
        super("Example", 800, 600, false);
    }

    public void init()              {}
    public void update(float delta) {}
    public void render(Graphics g)  {}
    public void cleanup()           {}

    public static void main(String[] args) {
        new MyClass().run();
    }
}

You can read more about this here. Not the biggest change in the world, but still neat IMO.

I actually did this two days ago, but I figured I might as well post about it. Smiley

- Jev
With java about to implement lambda you could utilize this to make your widgets and function calling classes much cleaner (more of an internal upgrade , isntead of nested ifs),such as buttons or clickables , maybe even certain interactions from objects.
Offline BurntPizza

« JGO Bitwise Duke »


Medals: 486
Exp: 7 years



« Reply #566 - Posted 2014-09-19 03:14:44 »

After all the pathfinding questions going around recently I implemented A* myself:
(hadn't actually ever done that  persecutioncomplex)

Red areas are high cost, redder being higher and grey areas are infinite cost, they don't even show up to the algorithm.
Click to Play


Some of it seems a bit wonky, for instance the initial BFS always went crazy, something to do with queue vs. stack floodfill impl.

Paging Riven: [IMG width=...] doesn't seem to work on gifs now with the blocker... not super important but it might be any easy fix.

Here's the code, essentially a 1-to-1 translation of this: http://pastebin.java-gaming.org/30d824f780e1f
Offline tinfoilboy
« Reply #567 - Posted 2014-09-19 03:23:24 »

I added rebindable keys to my game, as well as increased performance significantly.

Offline Ecumene

JGO Kernel


Medals: 200
Projects: 4
Exp: 8 years


I did not hit her! I did not!


« Reply #568 - Posted 2014-09-19 03:26:08 »

Paging Riven: [IMG width=...] doesn't seem to work on gifs now with the blocker... not super important but it might be any easy fix.

Also, for some reason Markus' profile is pretty messed up too... http://www.java-gaming.org/index.php?action=profile;u=3168

Offline ra4king

JGO Kernel


Medals: 508
Projects: 3
Exp: 5 years


I'm the King!


« Reply #569 - Posted 2014-09-19 04:09:33 »

I finally finished applying to a million internships for Microsoft, Google, Ebay, IBM, etc...

Pages: 1 ... 17 18 [19] 20 21 ... 216
  ignore  |  Print  
 
 

 
Riven (581 views)
2019-09-04 15:33:17

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

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

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

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

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

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

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

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

nelsongames (5115 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!