Java-Gaming.org Hi !
 Featured games (90) games approved by the League of Dukes Games in Showcase (749) Games in Android Showcase (226) games submitted by our members Games in WIP (838) games currently in development
 News: Read the Java Gaming Resources, or peek at the official Java tutorials
Pages: 1 ... 163 164 [165] 166 167 ... 198
 ignore  |  Print
 What I did today  (Read 2356238 times) theagentd and 1 Guest are viewing this topic.
bornander
 « Reply #4920 - Posted 2016-10-17 16:49:34 »

Been trying to start learning libGDX. Setting everything up for the first time is... definitely not easy.
It gets better, when you're on your second project it starts to make sense.

Try my Android games: Grapple | Hovercraft | Lala
lcass
 « Reply #4921 - Posted 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.
J0
 « Reply #4922 - Posted 2016-10-17 21:25:58 »

I don't know if this makes sense but I always try to keep as little divisions as possible, so I'd multiply everything by p/p, to give something like p(plnp)² / (px² + (plnp)² )

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..

Ps: not gonna use latex sorry not sorry

Longarmx
 « Reply #4923 - Posted 2016-10-17 22:30:34 »

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

SkyAphid
 « Reply #4924 - Posted 2016-10-18 08:29:13 »

I taught myself how to rig last night. Fully functional base rig + IK rig. Now, time to rig our giant robots.

it just werks
lcass
 « Reply #4925 - Posted 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  , 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.
Major_Sauce

Senior Newbie

Medals: 5
Exp: 5 years

 « Reply #4926 - Posted 2016-10-18 16:27:06 »

I did nothing and I´m proud of it, the only problem is that I always think "I´ll go on working on my project tomorrow" and the next day I think "I´ll go on working on my project tomorrow" and the next day I...

Still proud of not doing anything
philfrei
 « Reply #4927 - Posted 2016-10-18 22:19:48 »

Had some fun Saturday while at work, on my break, tweaking settings using a new SF/X tool I wrote. I was working on a bird tweet sound (thinking the sounds were quiet and wouldn't carry), and the store Manager poked her head into the break room. She said she thought a bird had gotten stuck in the attic or something. Success!

It took a few more days to track down some bugs in the system pertaining to using the Java file-choosing code (used in save/load of xml and export of wav). I found out, for example, that I didn't handle the case where one "cancels" the action and it was leading to the app hanging. Finally posted in WIP thread today. Fingers crossed, am hoping it is stable now.

matt_p
 « Reply #4928 - Posted 2016-10-19 07:36:17 »

tinkered around again with my action system, made it now finally possible to correctly chain them, leading to the first math 'unit' test:

 1  2  3  4  5  6  7  8  9  10  11  12 `    @Test    public void mathScriptTest() {        final MathAction m = new MathAction();        final GameContext context = GameContext.getContext();        context.setNumber("a", 9f);        context.setNumber("b", 8f);        m.parseFromScriptString("MATH res = (5 + MATH(MATH(a/2)*b))");        assertTrue(m.getResult() == 41f);    }`

As this is an action I could also execute its perform method, the result would then be set to a number with the name res.
It looks a bit odd that the string contains several math elements, but there could be other nested function calls - I currently don't rely on the operation sign alone...
Will update my projects thread once I actually include this in a new version with new more exciting examples
orange451

JGO Kernel

Medals: 358
Projects: 6
Exp: 6 years

 « Reply #4929 - Posted 2016-10-19 21:22:56 »

I sold all my gun skins in Counter Strike for just over \$1000
Turned out to be a profitable investment.

First Recon. A java made online first person shooter!
SkyAphid
 « Reply #4930 - Posted 2016-10-20 04:20:04 »

Thumbs up!

Rigged the robot last night. We still have some tweaking to make it perfect, but I'm getting excited about animating it for some really fun shenanigans.

it just werks
Icecore
 « Reply #4931 - Posted 2016-10-20 09:02:43 »

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?

Last known State: Reassembled in Cyberspace
End Transmission....
..
.
Journey began Now)
lcass
 « Reply #4932 - Posted 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?
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
MatthewNicholls
 « Reply #4933 - Posted 2016-10-20 22:02:18 »

To day I implemented normal mapping for my multi-textured terrain. Still have a lot of improving to do, but just happy to have something to show for it.

Edit: replaced picture after fixing the normal mapping fragment shader. Now the proper normal maps are applied to the right textures. Before they where all being mixed together.

"...Muahahhah... pull the lever Egor!" ..."Yesh mashter"..click... click...click..buzzzzz".......Its Alive!
J0
 « Reply #4934 - Posted 2016-10-22 19:07:11 »

Wrote a ~working version of Breakout in JavaScript, I think I'm going to be playing around with js a bit

Bearded Cow

Senior Devvie

Medals: 3
Projects: 1
Exp: 1 year

¬..¬

 « Reply #4935 - Posted 2016-10-22 21:23:20 »

Your collision handling is slightly wrong, for example when coming from the top of the blocks it will delete the block but won't bounce/rebound off at all it will just fall through.
J0
 « Reply #4936 - Posted 2016-10-23 09:57:33 »

I know, I know... But, meh, good enough.

leSpace

Senior Devvie

Medals: 14
Exp: 1 year

 « Reply #4937 - Posted 2016-10-23 10:02:14 »

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.
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.
I might be a bit late, but precomputing (p ln p)² in the range needed should speed up the function, then another way of speeding up your function might be linear approximation, in fact after drawing your function fx(p)=(p ln p)² / (x² + (p ln p)² / p ), we can clearly see that after a set p , the function can be seen as a linear function. Example with f100 from p = 17, f100 looks pretty close to g(p)=p*1,0331625-7.819.
Spasi
 « Reply #4938 - Posted 2016-10-23 22:25:05 »

Finished a single week project, one day late. It parses the Vulkan XML registry and asciidoc documentation and generates the LWJGL 3 Vulkan bindings. It was painful (tons of details to cover, bugs in the registry, bugs in asciidoctor, etc), but I'm hoping it'll save a lot of time (and my sanity) in the future. The Vulkan javadoc is also now much more complete and consistent.

Fun fact: The source code is 3 Kotlin files that compile to 105 Java classes.
Archive
 « Reply #4939 - Posted 2016-10-24 03:29:41 »

All of the characters in the sentence (the quick brown fox jumps over the lazy dog) are represented as a 64-bit long value
and drawn to the screen by extracting the bits!

EDIT:
Fixed the X

dime26

JGO Ninja

Medals: 64
Projects: 7
Exp: 12 years

Should traffic wardens be armed?

 « Reply #4940 - Posted 2016-10-24 15:44:29 »

I have been playing with Box2D vehicles for a few hours and decided it would be neat to overlay some 3D buildings like GTA 1. I am using a 2D camera for the floor objects although there are only Box2D debug lines at the moment and then a Perspective camera for the 3D models.

Need to find the correct way to translate 2D to 3D co ordinates, currently I worked out the differences by hand but must be a neater way to do this.

http://imgur.com/gallery/fmTYV

J0
 « Reply #4941 - Posted 2016-10-24 16:08:12 »

Is it really necessary to use 3D in that case? I mean, as it is now, a simpler way (imo) would be to just draw 2D quads with edges that go towards the center of the frame to simulate perspective

dime26

JGO Ninja

Medals: 64
Projects: 7
Exp: 12 years

Should traffic wardens be armed?

 « Reply #4942 - Posted 2016-10-24 18:02:05 »

Is it really necessary to use 3D in that case? I mean, as it is now, a simpler way (imo) would be to just draw 2D quads with edges that go towards the center of the frame to simulate perspective

Always willing to try different approaches, will have a search but any links etc would be great thanks for the advice.
nsigma
 « Reply #4943 - Posted 2016-10-25 11:22:10 »

AMEN \$ Mother Function : having some fun doing a live-coded single function demolition of the most ubiquitous sample in modern music (takes a little while to get going)

This is why they added lambdas to Java 8, right?!

Praxis LIVE - hybrid visual IDE for (live) creative coding
Jono
 « Reply #4944 - Posted 2016-10-26 07:53:48 »

Started work on a logic engine for use in (my) games. I got the main design done and unification working.

 1  2  3  4  5  6 `Parser p = new Parser();Term f1 = p.parseTerm("foo(X,b)");Term f2 = p.parseTerm("foo(a,Y)");System.out.println(f1.unify(f2));System.out.println(f1);System.out.println(f2);`

gives:
Quote
true
foo(a,b)
foo(a,b)

and Prolog-style lists:
 1  2  3  4 `Term t1 = p.parseTerm("[Y,b,c]");Term t2 = p.parseTerm("[a|[X|[c|[]]]]");t1.unify(t2);System.out.println(t1);`

gives:
Quote
[a|[b|[c]]]

Next up are knowledge bases, rules and backtracking.
Coldstream24

JGO Ninja

Medals: 81
Projects: 1
Exp: 4 years

You can fill that void inside with programming, but you'll never return a value.

 « Reply #4945 - Posted 2016-10-26 10:57:50 »

Long time, no post
I've been working on a really nice particle system. I started work yesterday, it's come far enough for my liking, although dancing around Java2D's limitations is a bit of a headache.

There's been a lot of work on my engine recently - mainly graphics tweaks but some cool features are coming.
That and I bumped it up to version 0.3 - don't know why, but incrementing version numbers on a project like this feels pretty great.

Feel free to like the engine's facebook page, too

My website: http://www.onedropgames.com/
My soundcloud: http://www.soundcloud.com/coldstream24
Creator of the Morningside Engine, co-founder of Onedrop Games.
J0
 « Reply #4946 - Posted 2016-10-26 13:16:30 »

I've been working on a really nice particle system.

Post a gif, post a gif, post a gif, post a gif!

philfrei
 « Reply #4947 - Posted 2016-10-27 04:37:24 »

Quote
I've been working on a really nice particle system. I started work yesterday, it's come far enough for my liking, although dancing around Java2D's limitations is a bit of a headache.
A JavaFX particle system == fewer headaches?

[EDIT: What you have posted so far looks cool. Writing a particle system is neat, no mean feat! Forgive me for being a bit of a JavaFX partisan. I switched over from Java2D/Swing in Feb. 2016, and am glad to have made the choice and only mean to encourage others to consider doing the same, not discourage them from doing cool things via their preferred libraries.]

philfrei
 « Reply #4948 - Posted 2016-10-27 23:02:03 »

Mostly doing practice questions, today, for a Java 7, Level I, Certification test tomorrow. I think I know the material pretty well, but 80 questions/3 hours is a long haul. My brain starts to get fried at about the 25-30 question point and I start blowing obvious gotchas and trick questions. I've been getting 80+ % scores on practice tests when I limit myself to 30-40 questions. Beyond that, the percentage starts to plummet.

[EDIT: passed with 85% score. I'll take it.]

princec

« JGO Spiffy Duke »

Medals: 1009
Projects: 3
Exp: 20 years

Eh? Who? What? ... Me?

 « Reply #4949 - Posted 2016-10-28 10:01:09 »

You know, if anyone ever asked me to take a Java certification exam, at any level, I think I might roll up the test paper and shove it up their arse.

Cas

Pages: 1 ... 163 164 [165] 166 167 ... 198
 ignore  |  Print

 Solater (10 views) 2018-03-17 05:04:08 nelsongames (29 views) 2018-03-05 17:56:34 Gornova (31 views) 2018-03-02 22:15:33 buddyBro (78 views) 2018-02-28 16:59:18 buddyBro (53 views) 2018-02-28 16:45:17 xxMrPHDxx (457 views) 2017-12-31 17:17:51 xxMrPHDxx (138 views) 2017-12-31 17:15:51 xxMrPHDxx (214 views) 2017-12-28 18:11:33 Ecumene (477 views) 2017-09-30 02:57:34 theagentd (592 views) 2017-09-26 18:23:31
 Java Gaming Resourcesby philfrei2017-12-05 19:38:37Java Gaming Resourcesby philfrei2017-12-05 19:37:39Java Gaming Resourcesby philfrei2017-12-05 19:36:10Java Gaming Resourcesby philfrei2017-12-05 19:33:10List of Learning Resourcesby elect2017-03-13 14:05:44List of Learning Resourcesby elect2017-03-13 14:04:45SF/X Librariesby philfrei2017-03-02 08:45:19SF/X Librariesby philfrei2017-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