Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (734)
Games in Android Showcase (222)
games submitted by our members
Games in WIP (811)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 ... 188 189 [190]
  ignore  |  Print  
  What I did today  (Read 1822840 times)
SkyAphid and 1 Guest are viewing this topic.
Offline dime26

JGO Ninja


Medals: 48
Projects: 7
Exp: 12 years


Should traffic wardens be armed?


« Reply #5670 - Posted 2017-08-01 22:39:29 »

I wrote part two of my LibGDX tutorial / code commentary:

https://carelesslabs.wordpress.com/2017/08/01/making-a-libgdx-roguelike-survival-game-part-2-adding-a-simple-island-gamedev/

When this is finished I may spend some time cleaning up the code and turning it into a series of videos.
Offline LiquidNitrogen
« Reply #5671 - Posted 2017-08-02 11:46:21 »

I tried improving my water by using a more complex algorithm, but it ran too slowly and I don't know enough about shaders/math to fix it. So instead I tried a simpler approach of adding several layers of moving normal maps onto the basic wave vertex shader, which manages to run fast and looks half decent.



Offline philfrei
« Reply #5672 - Posted 2017-08-02 16:42:10 »

The last couple of days, I've mostly been doing non-Java stuff: I worked through the A-Frame School tutorial for web VR/AR. It looks like I might get a chance (paid) to write code for a gallery of 360-degree photos that allows a virtual tour of a local battleship. Will learn more about that gig on Thursday. Meanwhile, will continue brushing up on JavaScript and work through more of the "Guides" provided at the site.

A-Frame reminds me a lot more of how JavaFX works than Swing, that's for sure. I'm glad I took time to get more acquainted with JavaFX.

If the contract is landed, I will stop accepting Java tutorial students through the online tutorial service I signed up with. Turns out it is possible to teach online and make a bit of side money. The competition is kind of steep though, as there are hotshots from all over also teaching. (One profile I saw: EE/CS "Cum Laude" graduate from Duke. And here I am with a Music Bachelors.) But they can't all teach at the same time, and student requests sometimes come in clumps. So I've managed to accumulate about 25 hours of work over the last 6 weeks. Every little bit helps. (All my ratings have been 5-stars, so that helps!)

I can't recall if I posted about finding a book "Digital Audio with Java" (Lindley) from 2000, at Half-Price Books. Over half the book is devoted to creating graphical interfaces PRE-Swing! But the algorithms that handle the actual processing are decent, and good starting points for rewrites. I made a Schroeder reverb a few weeks ago. The Lindley book references a truly standout book for learning about digital audio: Charles Dodge's "Computer Music, Synthesis, Composition, and Performance" from 1997. This book does the best job of any that I've seen of teaching about digital audio.

Having the Schroeder reverb (similar to the Freeberb implemented by @nsigma, but configured slightly differently) has me working a bit (on and off) once again on real-time mixing of music from live synths and samples. This reverb is decent sounding if you don't push it, but definitely has weaknesses for things like snare hits (can get a little "metallic") or when mixed high (one can hear ringing). I'm reading elsewhere about a later development with another layer of feedback (term for it escapes me at the moment) that should be codeable when the time comes.

music and music apps: http://adonax.com
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline dime26

JGO Ninja


Medals: 48
Projects: 7
Exp: 12 years


Should traffic wardens be armed?


« Reply #5673 - Posted 2017-08-03 00:50:44 »

I have added a 3rd and 4th part to my tutorials which is a game from scratch basically, is there a better place for me to post these updates to?

Part 3 - improved Texture loading
https://carelesslabs.wordpress.com/2017/08/02/making-a-libgdx-roguelike-survival-game-part-3-loading-media-refactored-gamedev/

Part 4 - Added hero class
https://carelesslabs.wordpress.com/2017/08/03/making-a-libgdx-roguelike-survival-game-part-4-i-need-a-hero-gamedev-indiedev/
Offline Icecore
« Reply #5674 - Posted 2017-08-07 12:08:09 »

Funny moment Smiley I accidentally find this one
https://en.wikipedia.org/wiki/Diamond-square_algorithm

I almost fell off my chair when i read this,
Because it's one-o-one algorithm that i am developed in 2012 for terrain generation,
I have nothing to know about fractal generation, and terrain generation (at that time)
All I knew: Minecraft is using perlin noise,
I don’t want use it (because I have no idea how implement it)
and I want make something more realistic
so, I spend on it couple weeks or even month, trying out different ideas,
(upgrading my previous generation from 2011)
And I receive this:
http://www.java-gaming.org/topics/world-of-change/23947/msg/241892/view.html#msg241892


Here raw code img (if I made it today it may looks better ^^)


Simple imagine I also have random value to mix it in to result (because without it, it looks like waves)
same as in Diamond-square algorithm(that was developed from wiki in 1982)

p.s This is example why its not copy past or lame implementation: I have static parameter to set size of square at some size it can’t be divided by 2 in midle iteration like 3 / 2 for 8x8 square
So I made this:
1  
2  
3  
4  
if((MaxX - MinX) % 2 > 0){
   MinX++;
}  
int midlX = (MaxX + MinX) / 2;


why I even need to make square like 8x8 that have problems to divide middle parts?
- because I trying many options, searching best possible solution
//
And you saying, something about intellectual property rights and patents?
Its bullshat: random ppl in different parts of the world can implement same algorithms and technologies without knowing each others.
(and if “Diamond-square algorithm” was patented and I used something similar to it I may even lose in law court)

Last known State: Reassembled in Cyberspace
End Transmission....
..
.
Offline SHC
« Reply #5675 - Posted 2017-08-07 14:50:32 »

I thought I need a better way to keep track of what resources are in memory, and decided that Scene should be able to define dependencies on resources. To make this easier, I thought I might define a DSL. So here is it:

1  
2  
3  
4  
5  
6  
public static class LevelResourceTable extends ResourceTable<Resource>
{{
    texture(Resource.PLAYER, FilePath.getResourceFile("player.png"));
    texture(Resource.ENEMY, FilePath.getResourceFile("enemy.png"));
    texture(Resource.SKY, FilePath.getResourceFile("sky.png"));
}}

Where Resource is a simple enum.  I can then simply let the scene declare the dependencies. I'd be having different tables like these, and scenes will be declaring them as:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
public class Scene1 extends Scene
{
    @Override
    public List<ResourceTable> getDependencies()
    {
        return Arrays.asList(
            new LevelResourceTable(),
            new GlobalResourceTable()
        );
    }
}

I'm still thinking of an even easy method of having returning the dependent resource tables from a scene. Seems Java can have the beauty of these DSLs right?

Offline LiquidNitrogen
« Reply #5676 - Posted 2017-08-09 11:15:56 »

I made some very simple procgen trees which sway around individually in the wind gusts, and some slightly creepy triangular people.

Offline philfrei
« Reply #5677 - Posted 2017-08-10 23:53:05 »

I finally reconnected to the git project SiVi, yesterday. Haven't done an update since 2014! Today, was playing around with "fixing" a couple things--wanted to have the channel outputs and master on the mixer display numbers that were easier to use/more informative. While changing that (have yet to upload changes back to the project), I took a little time to play with the "gif making" tool. This one is about 44MB.
Click to Play


Also, played a bit with Glitch and A-Frame, and loaded SiVi-generated png graphics to see if they would work as textures:


I'm hiding the border lines (rotated away). I *think* I can use a variant of the algorithm similar to what is being used to "wrap" the gifs into smooth loops to make the edges of the texture graphics meet up smoothly. Looking forward to having time to test that out.

music and music apps: http://adonax.com
Offline tariqbroadnax

Junior Devvie


Medals: 2
Exp: 3 years



« Reply #5678 - Posted 2017-08-11 00:15:58 »

Stuff I've done in last week

- Taking a break from game dev.

- Started working a MS Paint clone for more GUI and MVC experience. Also, creating productivity software helps learn how to use other productivity software quickly.
Learned about Robot and Desktop class. Definitively learned the difference between actions and actionlisteners. Extremely irritated that some Actions I programmed were already accessible by clicking the top left of a JFrame (i.e. Move, Minimize, Maximize, etc.).
I have absolutely no idea how I am going to reproduce the ribbon.

- Finished 4 animes: New Game S1, Seisen Cerberus, Tanaka-kun wa Itsumo Kedaruge, Bungou Stray Dogs S1.

- Finished 2 games: Anna's Quest and Children of Zodiarcs. Still haven't managed to quit LoL.

- Cooked my biggest meal ever: Blackened Tilapia, Bean Salad, and Banana Bread (Cooking Time: 1:30)

- Started reading 2 books on Python and Perl (made by some "special" people). Keep procrastinating reading this Javascript book.
 
- Finished my IT internship. Now off to my last year of undergrad. Hopefully I can continue my daily reading, gaming, anime watching, and programming alongside my part-time job and school.
Offline Opiop
« Reply #5679 - Posted 2017-08-11 00:25:11 »

I re-designed astimefades.com in anticipation of our first EP! Still working on it, but I'm pretty happy with it so far. Also I used NodeJs, Mongo and EJS to build out the new site! Crazy to be moving away from good old Java + Spring Boot Smiley If anyone wants to go check it out and leave feedback that would be great!

Here's a screenshot:
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Apo
« Reply #5680 - Posted 2017-08-13 11:52:13 »

Worked on more games fpr my games-calendar. At the moment: 15 games are ready. Here you can see some screenshots of the games


Offline Icecore
« Reply #5681 - Posted 2017-08-13 15:09:24 »

Why you must never use float with sensitive data
(it's literally everything except img, audio out, and maybe AC out)
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
float fff_1 = 65536.0f;
float fff_2 = 0.0039f; // or 0.003f
float fff_3 = fff_1 + fff_2;// = 65536.0f == fff_1

/**
65536 = 65535(2 byte) + 1(1 byte) = 3(byte)
1 / 256 (1 byte) = 0.00390625
0.0039 (2 byte) - because its less 0.00390625 (8 Bits accuracy)
3(byte) + 2(byte) = 5(byte) and float have only 4(byte)
*/

float fff_4 = 65536.0f + 0.00390626f;// 65536.01
float fff_5 = 65536.0f + 0.00390625f;// 65536.0

You even can't epsilon compare it because its 3 digits after zero.

Last known State: Reassembled in Cyberspace
End Transmission....
..
.
Offline vfmachado

Junior Devvie


Medals: 9
Exp: 4 years



« Reply #5682 - Posted 2017-08-13 16:59:18 »

I've start the code for GUIs on my Game Engine.


https://prnt.sc/g7z93v
Offline abcdef
« Reply #5683 - Posted 2017-08-13 17:07:55 »

Icecore, I am not sure you understand how the float data is stored. To get a float number from the 4 bytes you use the below

First bit s for sign
Next 8 bits x for the exponent
Next 23 bits m for the mantissa

(2^(x−151) ) (1−2s)(m+2^(24))
Offline Roquen
« Reply #5684 - Posted 2017-08-13 19:46:11 »

The point is it's single precision "floating point" (da dum tish!).  You have 24 significant bits and there you have it.  Notions of "epsilon" seem to add more confusion than clarity.
Offline Icecore
« Reply #5685 - Posted 2017-08-13 20:20:08 »

When you receive this:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
float fff_5 = 65536.0f + 0.003f;
float fff_6 = 65536.0f + 0.001f;
float e = 0.0001f;
if(Math.abs(fff_5 - fff_6) >= e){
   System.out.println("not same");
}
else{
   System.out.println("same");
}

fff_5 = 65535.0f + 0.003f;
fff_6 = 65535.0f + 0.001f;
if(Math.abs(fff_5 - fff_6) >= e){
   System.out.println("not same");
}
else{
   System.out.println("same");
}


wiki data about "Single-precision floating-point format" can’t save you or help solve problem)
1  
2  
3  
4  
5  
6  
7  
FV:0.001     Hex:3a83126f Bits:111010100000110001001001101111
FV:0.003     Hex:3b449ba6 Bits:111011010001001001101110100110
FV:65535.0   Hex:477fff00 Bits:1000111011111111111111100000000
FV:65536.0   Hex:47800000 Bits:1000111100000000000000000000000

FV:65536.01  Hex:47800001 Bits:1000111100000000000000000000001
FV:65535.004 Hex:477fff01 Bits:1000111011111111111111100000001

only double fix it =)

p.s And yes i know that float part in 65536 is not 1 byte(8 Bits) its 7 bits
and when integer data grow float part is decreased not by bytes but by bits
(on top post was raw example ^^ because no one cares this bits magic unless it solves the problem and it doesn't =))
1  
2  
3  
4  
5  
6  
FV:65535.004 Hex:477fff01 Bits:10001110111111111111111_00000001
FV:65535.996 Hex:477fffff Bits:10001110111111111111111_11111111
FV:65536.01  Hex:47800001 Bits:100011110000000000000000_0000001
FV:65536.99  Hex:4780007f Bits:100011110000000000000000_1111111
FV:65537.0   Hex:47800080 Bits:100011110000000000000001_0000000
FV:65537.01  Hex:47800081 Bits:100011110000000000000001_0000001

Last known State: Reassembled in Cyberspace
End Transmission....
..
.
Offline Roquen
« Reply #5686 - Posted 2017-08-14 06:52:27 »

Looking at it that way doesn't seem useful.  For singles we have the 24 most significant bits so looking at in hex format and showing all 24 bits and aligning the decimal point gives (the '-' are bit positions beyond 24):

65536.0   0x1p+16               10000000000000000.00000000------
0.00300   0x1.89374cp-9                          .00000000110001001001101110100


So even the highest bit of 0.003 is too small to contribute (by one) so:  65536.0+0.00300 = 65536.0

If we were to multiply that by two and then add then it could:

65536.0+2*0.00300 = 65536.007812 = 0x1.000002p+16 = 10000000000000000.0000001

The exponents from the first are +16 and -9, so 16-(-9)=25 so too large a gap to contribute.
Offline Icecore
« Reply #5687 - Posted 2017-08-14 12:53:05 »

I was thinking more about concept of float structure,
In theory format may use only max 8 bits float part(with 0.0039 tick) and 4 bits exponent its adds more integer data to use

But he was design in different way – so it hold as many float part as he can.

And after more thinking I suddenly find explaining why)
Because it was designed to return div accurate result
– and not for holding big value)
This is a purpose of float and not to hold 300000.005f =)
1  
2  
3  
4  
5  
6  
int a = 100000;
int b = 100001;
float f = (float)b / a;//1.00001
int c = (int) (f * a);//100001
if(c == b)System.out.println("same");
else System.out.println("not");

Last known State: Reassembled in Cyberspace
End Transmission....
..
.
Offline dime26

JGO Ninja


Medals: 48
Projects: 7
Exp: 12 years


Should traffic wardens be armed?


« Reply #5688 - Posted 2017-08-14 13:40:17 »

Still working through LibGDX tutorial series: https://carelesslabs.wordpress.com/2017/08/14/making-a-libgdx-roguelike-survival-game-part-9-screen-shake-inventory-gamedev/

Next will go through progressing an inventory system.

Click to Play
Offline LiquidNitrogen
« Reply #5689 - Posted 2017-08-14 14:16:18 »

I spent another day messing around with my water and lighting. Fixed up the sun light to allow for seasonal rise/set time and angle variation, which helped improve the coloring.



Offline vfmachado

Junior Devvie


Medals: 9
Exp: 4 years



« Reply #5690 - Posted 2017-08-14 18:26:57 »

It is so beautiful!!! Smiley
Offline Roquen
« Reply #5691 - Posted 2017-08-15 09:11:10 »

But he was design in different way – so it hold as many float part as he can.

Exactly, the point is to maintain the most significant part of a (sub)result.  The simplest example is multiply, if we think of our two numbers as consisting of a 24 bit integer (all fractional part so: 0.24) and an exponent, then the product simply adds the integer exponents and to store the new fraction part would require: 0.24 x 0.24 = 0.48, so 48 bits for the significand.  Since we're using a fixed number of bits those 48 bits are rounded to 24.
Offline abcdef
« Reply #5692 - Posted 2017-08-16 04:34:15 »

Icecore - this floating point conversation reminded me of this pbsinfinite series episode (why computers are bad at algebra) on YouTube

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

It talks about 64 bit floats but you can apply easily to 32 bit
Offline Roquen
« Reply #5693 - Posted 2017-08-16 10:52:19 »

Didn't watch video but symbolically, computer's are actually quite excellent at algebra given a good piece of software...and getting there on verifying and generating proofs.
Offline ra4king

JGO Kernel


Medals: 495
Projects: 3
Exp: 5 years


I'm the King!


« Reply #5694 - Posted 2017-08-17 08:31:31 »

Not really today, but on Monday I started at my first full time job out of university at Google. I'm at their Mountain View headquarters in the Bay Area (Silicon Valley). Pretty happy to say the least Smiley

Pages: 1 ... 188 189 [190]
  ignore  |  Print  
 
 

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

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

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

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

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

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

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

theagentd (1126 views)
2017-03-24 15:32:08

Rule (1101 views)
2017-03-19 12:43:22

Rule (1078 views)
2017-03-19 12:42:17
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

SF/X Libraries
by SkyAphid
2017-03-02 06:38:56

SF/X Libraries
by SkyAphid
2017-03-02 06:38:32

SF/X Libraries
by SkyAphid
2017-03-02 06:38:05

SF/X Libraries
by SkyAphid
2017-03-02 06:37:51
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!