Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (769)
Games in Android Showcase (230)
games submitted by our members
Games in WIP (855)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 ... 52 53 [54] 55 56 ... 206
  ignore  |  Print  
  What I did today  (Read 2896045 times)
0 Members and 4 Guests are viewing this topic.
Offline ags1

JGO Kernel


Medals: 367
Projects: 7


Make code not war!


« Reply #1590 - Posted 2015-02-03 20:13:17 »

Got beaten up by the DITA-OT Ant build scripts... again.

Offline divxdede
« Reply #1591 - Posted 2015-02-03 21:10:20 »

I work since this week-end on an implementation of a LinearGradient paint.

The LinearGradient supports a gradient vector with differents color-stop in order to perform a multiple gradient paint.

With this code :

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
// rainbow
LinearGradient gradient =
{
   Color c1 = new Color(255,0  ,0  );
   Color c2 = new Color(255,255,0  );
   Color c3 = new Color(0  ,255,0  );
   Color c4 = new Color(0  ,255,255);
   Color c5 = new Color(0  ,0  ,255);
   Color c6 = new Color(255,0  ,255);
         
   gradient = new LinearGradient(0 , 0 , 800 , 300 , new Color[]{c1,c2,c3,c4,c5,c6},new float[]{0f,0.15f,0.30f,0.5f,0.65f,0.80f} , RepeatPolicy.CLAMP );
}


and

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
    @Override
   public void paint(Window window) {
      Graphics2D g2d = window.createGraphics();

      g2d.setPaint(gradient);
      g2d.fillRect(0, 0, window.getWidth() , window.getHeight() );
      g2d.setColor( Color.WHITE );
      g2d.drawLine( 0 , 300 , 800 , 300 );
   
      g2d.dispose();
   }


I obtain this :
 

My custom implementation can be viewed here : http://i.imgur.com/Wk0rGsW.png
The same test with a swing implementation here : http://i.imgur.com/MDmbygs.png
The rasterized form of the gradient (texture generated) : http://i.imgur.com/GIWaWUM.png

As we can see, i have some little bit differences with the swing version !!
I must go further on it to find why !! i must have an issue somewhere but it's late and i don't find it !!!

Edit:
I found my issue this morning (it was my rotation point that was badly computed) and now i obtain exactly the same result than the swing version.
I updated images on this thread accordingly this correction !!! I can now consider my implementation completed (after some code cleanup and comments)


Séb.

Offline Slyth2727
« Reply #1592 - Posted 2015-02-04 04:12:19 »

Not really programming related, but I played guitar and sang for my girlfriend who is currently sick; she loved it.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline gopro_2027
« Reply #1593 - Posted 2015-02-04 06:53:18 »

Redid my games generation... http://pastebin.com/ysWZww8G
Online princec

« JGO Spiffy Duke »


Medals: 1058
Projects: 3
Exp: 20 years


Eh? Who? What? ... Me?


« Reply #1594 - Posted 2015-02-04 08:47:39 »

Replaced the LWJGL vecmath packages with libgdx ones in SPGL (my "framework"). Discovered libgdx vecmath is not threadsafe and everything broke. Grr.

Cas Smiley

Offline kappa
« League of Dukes »

JGO Kernel


Medals: 123
Projects: 15


★★★★★


« Reply #1595 - Posted 2015-02-04 17:41:10 »

Replaced the LWJGL vecmath packages with libgdx ones in SPGL (my "framework"). Discovered libgdx vecmath is not threadsafe and everything broke. Grr.

Cas Smiley
Any plans to move to LWJGL3? or going to stick to LWJGL2 for now?
Online cylab

JGO Kernel


Medals: 185



« Reply #1596 - Posted 2015-02-04 18:30:14 »

Replaced the LWJGL vecmath packages with libgdx ones in SPGL (my "framework"). Discovered libgdx vecmath is not threadsafe and everything broke. Grr.

Cas Smiley

Mathias - I Know What [you] Did Last Summer!
Online cylab

JGO Kernel


Medals: 185



« Reply #1597 - Posted 2015-02-04 21:23:36 »

Today I made a video of the Texture Synthesis Shader I did 3 days ago Wink
<a href="http://www.youtube.com/v/iQllSZyT6TU?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/iQllSZyT6TU?version=3&amp;hl=en_US&amp;start=</a>

Mathias - I Know What [you] Did Last Summer!
Offline Mike

« JGO Spiffy Duke »


Medals: 149
Projects: 1
Exp: 6 years


Java guru wannabe


« Reply #1598 - Posted 2015-02-04 23:09:09 »

Today I realized what a difference good looking clouds and normal mapping on the ground can do for the graphics! Smiley

(Click for full size)


Mike

My current game, Minecraft meets Farmville and goes online Smiley
State of Fortune | Discussion thread @ JGO
Offline HeroesGraveDev

JGO Kernel


Medals: 382
Projects: 11
Exp: 4 years


┬─┬ノ(ಠ_ಠノ)(╯°□°)╯︵ ┻━┻


« Reply #1599 - Posted 2015-02-04 23:16:36 »

Today I realized what a difference good looking clouds and normal mapping on the ground can do for the graphics! Smiley

(Click for full size)


Mike

One day you're going to upload a photo and we won't even notice.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Online princec

« JGO Spiffy Duke »


Medals: 1058
Projects: 3
Exp: 20 years


Eh? Who? What? ... Me?


« Reply #1600 - Posted 2015-02-05 00:08:11 »

Replaced the LWJGL vecmath packages with libgdx ones in SPGL (my "framework"). Discovered libgdx vecmath is not threadsafe and everything broke. Grr.

Cas Smiley
Any plans to move to LWJGL3? or going to stick to LWJGL2 for now?
Sticking to 2 for now until LWJGL3 moves at least to beta. I can't keep on shifting the goalposts or I'll never get this bloody game done.
I've fixed all the horribly static-ridden code in the libgdx vecmath package with ThreadLocals but I have no idea how to submit a patch or anything. Or even why it was done with statics in the first place (don't you guys use threads!?)

Cas Smiley

Offline Riven
Administrator

« JGO Overlord »


Medals: 1356
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #1601 - Posted 2015-02-05 00:17:41 »

ThreadLocals have quite an impact on performance. Whether that is relevant to your use is another matter Smiley

For LibStruct I wrote this hacky, yet super fast workaround:
https://github.com/riven8192/LibStruct/blob/master/src/net/indiespot/struct/runtime/FastThreadLocal.java#L33
(see .get() / .set(...))

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

« JGO Spiffy Duke »


Medals: 1058
Projects: 3
Exp: 20 years


Eh? Who? What? ... Me?


« Reply #1602 - Posted 2015-02-05 00:22:48 »

It certainly is relevant... I need to transform about 30,000 sprites' vertices by each sprite's matrix and write the results out to VBOs - I spend a lot of time doing Matrix4.mul() via various routes. I'll see if that helps.

Cas Smiley

Offline BurntPizza

« JGO Bitwise Duke »


Medals: 485
Exp: 7 years



« Reply #1603 - Posted 2015-02-05 00:24:15 »

@Riven
Would inflate memory usage a little bit, but multiplying/dividing by some factor (>= 8) to index into the threadid2value array might improve performance under contention by eliminating false sharing. I would expect it to be faster anyway.

EDIT: if/when writes are occuring
Offline Riven
Administrator

« JGO Overlord »


Medals: 1356
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #1604 - Posted 2015-02-05 00:31:34 »

@BurntPizza: In LibStruct I mainly use .initialValue() and .get(), so it's pretty much read-only, which means contention is not an issue. Feel free to benchmark / optimize for your use case.

@Cas: FastThreadLocal instances are rather memory hungry, so I'd advice you to make only 1 FastThreadLocal with a pointer to some class that holds all your (previously static) references to 'scratch' objects.
1  
2  
myFastTL.get().vec3tmp.x += 4.1f;
myFastTL.get().mat4tmp.m33 += 4.2f;

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

« JGO Spiffy Duke »


Medals: 1058
Projects: 3
Exp: 20 years


Eh? Who? What? ... Me?


« Reply #1605 - Posted 2015-02-05 00:54:25 »

A good plan.

Cas Smiley

Offline Roquen

JGO Kernel


Medals: 518



« Reply #1606 - Posted 2015-02-05 10:17:06 »

Found out Tom Forsyth agrees with me about the value of unit-tests:

Online princec

« JGO Spiffy Duke »


Medals: 1058
Projects: 3
Exp: 20 years


Eh? Who? What? ... Me?


« Reply #1607 - Posted 2015-02-05 10:23:08 »

I'm glad that I'm not the only one who thinks TDD is a hilariously poor methodology.

Cas Smiley

Offline kevglass

« JGO Spiffy Duke »


Medals: 319
Projects: 25
Exp: 22 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #1608 - Posted 2015-02-05 10:25:14 »

You're not the only one

ME <-----

Kev

Offline ags1

JGO Kernel


Medals: 367
Projects: 7


Make code not war!


« Reply #1609 - Posted 2015-02-05 11:29:10 »

Of course TDD is rubbish, but it is less rubbish than the alternative. My tests regularly catch errors and regressions, and writing the tests improves the initial code too.

Online princec

« JGO Spiffy Duke »


Medals: 1058
Projects: 3
Exp: 20 years


Eh? Who? What? ... Me?


« Reply #1610 - Posted 2015-02-05 11:32:04 »

Now, what would you say the alternative was? (I notice you used the singular)

Cas Smiley

Offline ags1

JGO Kernel


Medals: 367
Projects: 7


Make code not war!


« Reply #1611 - Posted 2015-02-05 11:38:27 »

Either you test, or you don't. It's a boolean! (I know there are many different ways of not testing, but all of those are compatible with testing too).

Online princec

« JGO Spiffy Duke »


Medals: 1058
Projects: 3
Exp: 20 years


Eh? Who? What? ... Me?


« Reply #1612 - Posted 2015-02-05 12:10:11 »

This will rapidly devolve into an "exciting thread" so I shall make a new one!  Pointing

Cas Smiley

Offline matheus23

JGO Kernel


Medals: 138
Projects: 3


You think about my Avatar right now!


« Reply #1613 - Posted 2015-02-05 21:55:10 »

Kopied the kinda popular game "Dont touch the Spikes!".



Implemented in haskell using my libs and a tiny little bit of FRP.
(Code: https://github.com/matheus23/DontTouchTheSpikesHaskell)

See my:
    My development Blog:     | Or look at my RPG | Or simply my coding
http://matheusdev.tumblr.comRuins of Revenge  |      On Github
Offline Ecumene

JGO Kernel


Medals: 197
Projects: 4
Exp: 8 years


I did not hit her! I did not!


« Reply #1614 - Posted 2015-02-06 03:07:35 »

Got my new SSD in, and installed ubuntu. I can't play space engineers, but I'm learning allot about linux. Cheesy

Also got a Rosewill THOR chassis too... Thing's huge...

Offline SHC
« Reply #1615 - Posted 2015-02-06 03:11:12 »

I finally got this on my hackintosh:



A CPU Panic!! Seeing it for the first time in my life! Problem is due to the wrong kernel extension for CPUPowerManagement.

EDIT: As a bonus, I also got my 1 TB HDD completely broken. I can't see any partitions in it now.

Offline nerb
« Reply #1616 - Posted 2015-02-06 06:24:11 »

and installed ubuntu. I can't play space engineers, but I'm learning allot about linux. Cheesy

It's a good bit of fun, isn't it? (learning Linux). I did similar a few months ago, and haven't looked back. I was a bit reluctant to take the plunge, but glad I did.
Offline Gibbo3771

JGO Kernel


Medals: 128
Projects: 5
Exp: 1 year


Currently inactive on forums :(


« Reply #1617 - Posted 2015-02-06 09:43:33 »

I applied to a volunteer organisation that helps young, disabled and elderly people with little to no IT skills learn how to use computers for everyday use. I will be teaching classes starting next Thursday. Really looking forward to it!

It is though a 7.5 mile cycle from my home to there, then another 7 mile to college afterwards then 8 mile home from college. Yay! Fitness \o/.

"This code works flawlessly first time and exactly how I wanted it"
Said no programmer ever
Offline Roquen

JGO Kernel


Medals: 518



« Reply #1618 - Posted 2015-02-06 10:04:56 »

I've always had bad luck with ubuntu.  Mint and centos seems to work better for me.
Offline LiquidNitrogen
« Reply #1619 - Posted 2015-02-06 11:07:53 »

Finished off upgrading one of the tile sets for a guys roguelike game.

Pages: 1 ... 52 53 [54] 55 56 ... 206
  ignore  |  Print  
 
 

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

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

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

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

nelsongames (1173 views)
2018-04-24 18:15:36

nelsongames (1639 views)
2018-04-24 18:14:32

ivj94 (2395 views)
2018-03-24 14:47:39

ivj94 (1606 views)
2018-03-24 14:46:31

ivj94 (2691 views)
2018-03-24 14:43:53

Solater (883 views)
2018-03-17 05:04:08
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

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20

Deployment and Packaging
by philfrei
2018-08-19 23:54:46
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!