Java-Gaming.org Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (799)
Games in Android Showcase (237)
games submitted by our members
Games in WIP (865)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 ... 119 120 [121] 122 123 ... 216
  ignore  |  Print  
  What I did today  (Read 3552012 times)
0 Members and 3 Guests are viewing this topic.
Offline jonjava
« Reply #3600 - Posted 2016-01-22 20:01:25 »

@DarkCart

1  
2  
3  
   remove : function(i) {
      internalArray = internalArray.splice(i, 1);
   },


Riven had it right the first time. Array.splice modifies the content of the array being called returning the deleted elements.

http://devdocs.io/javascript/global_objects/array/splice

Not to be confused with Array.slice which doesn't modify the original array.

Offline J0
« Reply #3601 - Posted 2016-01-22 20:07:21 »

I pointed it out in my earlier reply. (not that I insist to get the credit, but... wasn't my diff clear? persecutioncomplex)
Sorry, my bad, I posted my reply without noticing you had already pointed it out Emo

Offline NegativeZero

JGO Kernel


Medals: 347
Exp: 1 month or less


Zero but not.


« Reply #3602 - Posted 2016-01-23 10:37:36 »

I took another sunset photo on a beach tonight.



Note: the ball in the sky is actually the moon, not the sun.

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

JGO Kernel


Medals: 766



« Reply #3603 - Posted 2016-01-24 00:24:29 »

Today during my 6 hours train travel from work back home I read kinda everything about point-in-polygon tests, including Eric Haines' article about "Point In Polygon Strategies" - http://erich.realtimerendering.com/ptinpoly/ and all the strategies mentioned in it.
After that I emailed him at acm.org asking whether actually no one on earth ever considered the most intuitive and natural way of accelerating the "Crossings Test" (i.e. even/odd algorithm or "raycast algorithm") by using a freakin' dead simple binary tree?? Or am I just super unable to Google things up?
I mean what the hell?
Okay, granted, that article is from 1994, but that article talks about 1,000 vertices being representative for "large" polygons??? And the so far best algorithm taking 485 milliseconds to solve a point test with such a polygon? the hell? I can solve a point query for a 524,288 vertices polygon in under 0.6 microseconds.
Would someone knowledgable in this topic/field please tell me that there are such algorithms already out there?
Offline KaiHH

JGO Kernel


Medals: 766



« Reply #3604 - Posted 2016-01-24 13:52:33 »

After Eric's kind response and saying he would not know of such an algorithm publication he encouraged me to write one for the JCGT.
Those people only like C code, not Java Smiley , so translated to C: https://raw.githubusercontent.com/httpdigest/pointInPoly/master/intervalTreePolyPoint.c
Doing proper memory management in C is... tricky, but one can squeeze a tiny bit more performance out of it.

Here is a video of a small demo program showing interactive polygon drawing and mouse cursor inside testing: http://i.imgur.com/hPTRIW7.gifv
Offline mcela
« Reply #3605 - Posted 2016-01-24 15:29:54 »

http://i.imgur.com/KaCcOwv.gifv

I've been fiddling around with voxels a bit. Not going to do a Minecraft clone or anything, just experimenting with 3D.
Offline pitbuller
« Reply #3606 - Posted 2016-01-24 15:30:25 »

More reading. https://books.google.fi/books?id=WGpL6Sk9qNAC&pg=PA201&lpg=PA201&dq=real+time+collision+detection+point+in+polygon&source=bl&ots=Pn2PmJ7ddL&sig=-0ihjLz7vhEitGXa6VS6eh6hpBk&hl=en&sa=X&ved=0ahUKEwiMlrTX4cLKAhXGBywKHSm6C1YQ6AEIHTAA#v=onepage&q&f=true
Offline CopyableCougar4
« Reply #3607 - Posted 2016-01-24 18:28:38 »

Some of you may remember all of the posts I have made trying to figure out why my audio locks up or doesn't work.

I'm happy to say after many months I have finally narrowed down the issue Smiley My speakers (the device that OpenAL used) were causing the issues, because when I finally plugged a pair of nice headphones into my computer sound worked right away Smiley

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

Github: http://github.com/CopyableCougar4
Offline Slyth2727
« Reply #3608 - Posted 2016-01-25 04:13:05 »

Hell yes, SATs were delayed because of snow. Hoping to get a 2000+ this go Smiley got a 1890 something last time.
Online philfrei
« Reply #3609 - Posted 2016-01-25 05:49:37 »

Hell yes, SATs were delayed because of snow. Hoping to get a 2000+ this go Smiley got a 1890 something last time.

Good luck!

When I took the SAT (long ago) there were only two tests, English and math, 800 pts possible each. I "studied" for the English by reading lots of Huxley and looking up every word I didn't know. Only managed 700 on the English, but strangely it was at a higher percentile (of UCB applicants) than the 750 I got on the math. It got me into UC Berkeley, my goal. (But the lack of study skills--why study if you can get ok grades via cramming?--made getting through college very difficult.)

music and music apps: http://adonax.com
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Slyth2727
« Reply #3610 - Posted 2016-01-26 00:58:41 »

..

Wow! Congrats on getting in there, that's one of the colleges I'm looking at. Right now my top picks would be Duke, MIT, Berkeley, UVA, and Cal Tech. I have such a small chance of getting into all of those I have a lot of backups, but I'm hoping that I can get into one of them! Been working hard to get my GPA above a 4.0 before my junior year ends, and I think it's gonna happen.

As a sidenote, solved this monster today, as well as got two 9 second solves:

Offline SHC
« Reply #3611 - Posted 2016-01-26 04:11:01 »

... as well as got two 9 second solves...

Wow, that's awesome. I just got into the 2 minutes range with my Dayan Zhanchi 3x3x3 cube, where my best is 1:42. You'll be my inspiration.

Offline Slyth2727
« Reply #3612 - Posted 2016-01-26 05:17:55 »

Wow, that's awesome. I just got into the 2 minutes range with my Dayan Zhanchi 3x3x3 cube, where my best is 1:42. You'll be my inspiration.

Hey everyone starts somewhere! I'd suggest a bit of an upgrade. The zhanchi was good when it was released (really good) but now there are much better cubes out there. I personally am a fan of the Moyu Aolong and Congs Design Meiying. I've tried a dozen or so cubes and those three are the ones that have really stood out to me. If you're looking for a bit of a cheaper alternative, the QiYi Thunderclap is really good for $9. It almost became my main. Keep practicing and you'll be sub 20 in no time Smiley
Offline Longarmx
« Reply #3613 - Posted 2016-01-26 05:29:46 »

It's been mentioned before, but I finally started working on it:

https://projecteuler.net/

So far I've only gotten through 15 problems in about 6 hours (on and off), but it really pushes your thinking skills!

Offline theagentd
« Reply #3614 - Posted 2016-01-26 16:32:59 »

Distance field fonts!



Features:
 - Scales perfectly fine thanks to distance field fonts. Perfect anti-aliasing and quality at font sizes 10 to 200.
 - Cursive doable by just modifying vertex coordinates of the glyph quads.
 - Bold doable by just modifying distance field calculations.
 - Custom font shaders to allow for outline and shadow casting effects.
 - Manual line breaks on \n, automatic line breaks if a word would cause the line to become too long, and panic line breaks in the middle of words that are wider than the limit by themselves.
 - String width/height queries.
 - Support for command parsing in the form of {command}. The parsing support is in, but I've yet to implement the commands to change color/cursive/bold/etc in the middle of a string in a single batch.

Technical:
 - Fast, uses batched rendering. The multi-line string in the picture is actually rendered with one call to drawString() and with one draw call!
 - Font "profiles" combine a font texture and a shader, plus size, color, etc to allow the same font and shader to be reused in any number of combinations of fonts, shaders, size, color, etc.

EDIT: Getting 3500 FPS with the above text, and it's actually CPU limited. The above screenshot was taken with MSAA to anti-alias the bounds frame. >___> MSAA doesn't affect the actual font quality at all.

Myomyomyo.
Offline Drenius
« Reply #3615 - Posted 2016-01-27 11:58:36 »

Returned from the dead, which is to say my new computer finally arrived.
You really only notice how many programs actually play a part in your daily routine when you have to reinstall them all...
Offline CommanderKeith
« Reply #3616 - Posted 2016-01-27 15:08:20 »

Distance field fonts!
...

It very impressive, rendering text in openGL is a much bigger pain than it should be. Well done for making it as easy as java2D's drawString.
I hate to be a nit-picker, but is there a thin vertical white artifact (|) between some letters? Such as before the first i in '|ipsum', and on the second line before the second i in 'suscip|it'. Seems to only affect i's as far as I can tell.

Offline theagentd
« Reply #3617 - Posted 2016-01-27 20:10:47 »

Distance field fonts!
...
I hate to be a nit-picker, but is there a thin vertical white artifact (|) between some letters? Such as before the first i in '|ipsum', and on the second line before the second i in 'suscip|it'. Seems to only affect i's as far as I can tell.
Heh, you're right. It's due to texture bleeding from insufficient padding. I'll have to reconvert the font. xd It happens more frequently for smaller fonts, but I thought this was big enough...

Myomyomyo.
Offline Roquen

JGO Kernel


Medals: 518



« Reply #3618 - Posted 2016-01-28 08:20:38 »

Returned from the dead, which is to say my new computer finally arrived.
Hey!  Me too.  One of my RAID drives decided to explode so I took the opportunity to just replace everything.  Getting a new machine these days is tough.  Now on day 5 of setting the damn thing up.  (sigh)
Offline Roquen

JGO Kernel


Medals: 518



« Reply #3619 - Posted 2016-01-28 08:28:22 »

@theagentd: one distance per sample?  What's interesting to see is close in at (what should be)  sharp angles and very small...assuming either will happen.
Offline theagentd
« Reply #3620 - Posted 2016-01-28 09:53:15 »

@theagentd: one distance per sample?  What's interesting to see is close in at (what should be)  sharp angles and very small...assuming either will happen.
Yes, only one distance field. I don't specifically treat sharp edges differently. Generating such distance fields seemed really complicated. What this sharp angled and very small thing is that you're so fascinated with I can only imagine...

Myomyomyo.
Offline Roquen

JGO Kernel


Medals: 518



« Reply #3621 - Posted 2016-01-28 10:28:37 »

It's only interesting if your zooming in or out enough to be noticeable and it looks bad.
Offline theagentd
« Reply #3622 - Posted 2016-01-28 11:58:15 »

Enlarging the fonts a lot does introduce quite a few problems. Bilinear filtering leaves a lot to be desired, so bicubic filtering is best if you want the best quality or smooth curves will look like they're built from sharp edges. You can also get problems with bit precision (only 8 bits with large distances cause problems) and texture interpolation precision. Most hardware only supports 256 different values between the interpolated values, so if you oversharpen edges you may end up with huge artifacts. All in all, you're better off not upscaling more than 2x or so of the original font size, but at least I won't need multiple font textures for different font sizes.

Zooming out, it looks perfect until around font size 10. Any lower and the glyphs will turn into white rectangles due to mipmaps being too small causing glyphs to bleed together. With enough padding you can go lower, but at that point the text is already hard to read (although that might be because I'm on a 1440p monitor...).

Myomyomyo.
Offline Opiop
« Reply #3623 - Posted 2016-01-28 15:18:00 »

Created a Morse code interpreter for my new Arduino Uno last night, I forgot to create a gif of the blinking light spelling out 'JavaGaming' though Sad

In other news, Sketche's lack of native structs really disappoints me!
Offline Gjallar

JGO Knight


Medals: 47
Projects: 1


Follower of Nurgle


« Reply #3624 - Posted 2016-01-29 10:30:01 »

Mario Zechner aka @badlogicgames aka the godfather of libGDX is giving a talk for the Global Game Jam at my university today.
While I really want to attend this, i also just finished my last week of exams and want to do nothing else but play video games all day.

Sorry Mario, I choose videogames over you. I'm sure you understand.
Offline ags1

JGO Kernel


Medals: 367
Projects: 7


Make code not war!


« Reply #3625 - Posted 2016-01-29 11:04:09 »

Making final preparations for my new pen-and-paper RPG campaign tonight.

This weekend: build my new desktop PC!

Vangard, I haven't forgotten you...

Offline princec

« JGO Spiffy Duke »


Medals: 1128
Projects: 3
Exp: 20 years


Eh? Who? What? ... Me?


« Reply #3626 - Posted 2016-01-29 11:32:18 »

What! You should really go see Mario, @Gjallar. It could be enlightening, or at the very least, interesting.

Cas Smiley

Offline J0
« Reply #3627 - Posted 2016-01-29 16:11:26 »

@Gjallar I hope you went anyway!

Offline Gjallar

JGO Knight


Medals: 47
Projects: 1


Follower of Nurgle


« Reply #3628 - Posted 2016-01-29 17:38:10 »

@Gjallar I hope you went anyway!

I did not Sad
180 minute traveltime for a 30minute talk is a bit much.
Offline Roquen

JGO Kernel


Medals: 518



« Reply #3629 - Posted 2016-01-29 18:21:48 »

Have I ever mentioned that I despise self-righteous piracy? 

http://www.gamesindustry.biz/articles/2016-01-29-the-witness-is-being-heavily-pirated
Pages: 1 ... 119 120 [121] 122 123 ... 216
  ignore  |  Print  
 
 

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

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

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

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

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

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

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

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

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

nelsongames (4312 views)
2018-04-24 18:15:36
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

Deployment and Packaging
by gouessej
2018-08-22 08:03:45
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!