Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (701)
Games in Android Showcase (203)
games submitted by our members
Games in WIP (774)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1] 2 3 ... 14
1  Discussions / Miscellaneous Topics / Re: What I did today on: 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? Wink
2  Discussions / Business and Project Management Discussions / Re: Mentor Needed! on: 2016-10-17 12:29:16
My recommendation – try out Unity, Unreal
And when you have more experience - you can try create own engine from packs of libraries Wink
3  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-10-15 19:56:19
Can someone explain me this?

http://pastebin.java-gaming.org/baee259814e1d

Up: Caution MAY freeze System on couple min's (it create only 2 gb)
but it may lags on not clean Disk!!!!! - because of fragmentation or other background IO operations

(sorry for code it's very raw example)
It create and write 2 GB Data
for 3.1679208 sec its 631 mb/s

p.s if you have same results and it not some trick (that i don't understand at this point)
pp.s maybe i made some mistakes in code that can explain such result)

Up Solved: Trying create 5 files for 2 gb with 4 Gb Ram - And its freezes after Write 3.5 Gb =)
and write next very slow == it's some system(Java) cache that give only illusion of such cool speed Wink
(Yes-Yes MappedByteBuffer.force() - but it freezes whole system for me on couple min's Sad )
Most interesting is: this Write IO is in - some low Core Sys
- because none of Sys profilers(and external profilers) not show any IO activity at all but all lags as Hell untill All IO ends
4  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-10-13 22:30:36
Why VHD? because its easy to backup – copy 1 file, faster read write, even may have dynamic grow Size, but need separate important data to different VHDs to not copy all, one big piece.
Microsoft:  'Do you really think you can run away so easily - Wink
VHD – dynamic have 25% performance and creating static takes eternityyyy 2 Gb created in 2 min or so

Yes it definitely faster to copy-paste - especially full Git rep – 1 file

But this not save you from nightmare of defragmentation
(because inside VHD you still have same Logic disk =))

P.s IMO Best way to copy Git is: -bundle or git -archive for only data – but VHD Faster XD
pp.s try Deferment disk 8 gb it take 2 hrs Wink no I event don't want try it on 500 gb

IMHO: Best way defragment disk is – copy all important data to another disk – and let it BURN
Recreate Disk Volume – with full format XDDDDD

Up:
Recreate 500 gb partition - separate it
- all backs to normal Write speed 20-50 mb/s on big file =)
not bad for 7 year old HDD in everyday Use XD
5  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-10-12 22:17:47
Hope tomorrow sort all my HDD Data and finally move it To VHD
Because Window f**k up Disk with 500 gb all over the time (especially git folder XD)
first I even think its problem with my HDD – but no, I test it on bad sectors in DOS and
it find only 1 bad sector
I have 70 gb free space NTFS but once i fill 499 GB and it was start of all problems
now Windows can't defragment it in background
(manual I even don't want try - it's take 5 or even 10+ hrs)
today hi finally kill my patience when I try copy 1 gb file on same disk(500 gb-70 gb free)
and hi give me 500 kb/s write speed

Why VHD? because its easy to backup – copy 1 file, faster read write, even may have dynamic grow Size, but need separate important data to different VHDs to not copy all, one big piece.

but VHD have 1 problem if Win f**k up this 1 big file - chances that hi restore it almost 0 ^^
but i use VHD for backup - it easy to do copy, so even if this happen data can be restored from copy
or maybe google how restore broken VHD =)
Logical copy better then hope in win chkdsk:
that maybe hi restore all broken files
- no he don't – I check many time in 50% cases hi simple lost files

p.s Reminder for self – Never-ever do Logical disk with 100 gb's+ on old file system like NTFS
except maybe Windows Sys – because it writes all crap without asking - at same disk
6  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-10-06 20:25:18
After a couple weeks of learning C++, I think I'm starting to think in C rather than Java... I tried to create a pointer persecutioncomplex
You can create pointer in Java)
1  
2  
3  
   public class Ptr_Obj<T>{
      public T P;
   }
7  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-10-05 11:33:57
Should I keep it??  Grin
No - trow it away )
Even Diablo 3 don't have rotate )
Its looks cool, but hard to use by players + create Motion sickness
(in top down - isometric style game)

but its ok for cinematics =)
+you can try keep it for gameplay  - like nice looking fresh idea)
8  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-10-02 15:11:24
2.  this probably has to do with my computer, but probably once every 3 or 4 minutes, the program freezes and wont respond for maybe 10-20 seconds.  It's annoying because its easy to lose your train of thought when it happens.
I think i have something same long time ago - simple now: i use clean Java eclipse
without additional plugins and even version without eclipse git (i use git external)
All works like a charm ^^
(except on every launch it recompile 1-3 min my project with 2000 errors XD)

up
p.s i also remove git from OS autorun - because background git:
make synchronizeon every file change, it looks nightmare for me - it call HDD billion times
(I may be wrong about git synchronize, maybe someone who know how git background works - fix me Wink)
9  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-10-01 19:19:09
Eclipse, it always randomly hides blocks of code and refuses to open them until I launch it again)
Have same problem in every Eclipse version that i use
sometimes hiden blocks refuse to open in big file (like 1000 lines+)
i call it "Eclipse eat lines"
becouse if you try delete or write in visible part of hiden block it simple delete Whole BLOCK
so i try - not use hide at all
10  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-09-30 10:21:07
I also started doing freelance programming for some pocket money and wow does it pay well.
Simple interesting what freelance sites you using?)
(never try freelance Sad )
11  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-09-29 22:27:43
Spend last 6 days wring char(Byte) Sequence search (aka Regex)
Technically it search at once for multiple Sequences like “Language parser”
It was hardest thing that I wrote for a couple of years – it simple melt my brain.

It build Sequence tree not simple
check Text - for every Sequence
^^
with speed O(n) – only 1 check for 1 char in text
(I hope, i understand “O” right)
1  
2  
3  
4  
5  
//not regex style its debug data :)
[ab]11qq[ab]'32' //32 its space – End char

Returns :'aaababababb11qqabba'
From 'qqq aaababababb11qqabba ab'

Still may have billions bugs XD
Need more time for testing
12  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-09-25 11:51:58
Find this:
How To Start Your Game Development:
its video playlist
https://www.youtube.com/watch?v=z06QR-tz1_o&list=PLhyKYa0YJ_5BkTruCmaBBZ8z6cP9KzPiX&index=7
13  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-09-23 20:39:21
What I meant is the fact that the new methods just points to the deprecated one, and that just sounds plain cheap.
=)
java.awt.Polygon was created in 1.0
in 1.2 it Implementing Interface Shape
Shape have getBounds
getBoundingBox can't be removed or rename by legacy support ^^

https://docs.oracle.com/javase/7/docs/api/java/awt/Polygon.html
https://docs.oracle.com/javase/7/docs/api/java/awt/Shape.html

getBounds and getBoundingBox
have same code, do you really want duplicate it?

Yes this looks better
1  
2  
3  
4  
5  
6  
7  
8  
public Rectangle getBounds() {
    // snipped, irrelevant
}

@Deprecated
public Rectangle getBoundingBox() {
    return getBounds();
}

but in any case it devs decision how separate code

p.s and even Open source Java have many bugs (not this small code style mistakes)
same as other big companys products - its natural
14  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-09-23 20:17:04
Now I get that the second method is probably deprecated in order to change the name but... I wonder if the entire source code is full of examples like this? persecutioncomplex
Sometimes you can't change name because of legacy)
and
getBounds();
is part of
Shape interface
15  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-09-21 13:03:49
Interesting video:

https://www.youtube.com/watch?v=A5Xv0p0dm8E

In case 60 min video is long for you:
Guy works for Microsoft 15 years was fired in 2014 with thousand other ppls
And now have own popular youtube channel
(Because Microsoft dismiss “Test department” so all testing do End Users XD)

up:
IMHO:
So as you understand after dismiss Test department in 2014
all Microsoft product have Unstable patch’s and release’s ^^

It so strange that it happen in same time,
as some ppl decide that: “trow away $2.5 billion in a window” is smart decision,

I can’t say that these events are interconnected,
but $2.5 billion did not appear out of thin air,
And 18000 people has been fired Sad
(ppl’s that work many years for company)
16  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-09-20 22:08:56
Makes me happy, found this Smiley

Creating a 4D World: The Technology behind
<a href="http://www.youtube.com/v/vZp0ETdD37E?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/vZp0ETdD37E?version=3&amp;hl=en_US&amp;start=</a>

so similar to my old article
http://www.java-gaming.org/index.php?topic=29604.0

p.s and no he not use my idea, he have working prototype in 2009, we simple try some same crazy idea ^^
17  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-09-17 18:51:43
I expect 2000 installs on the morrow*
Even if all Active Java-Gaming users install it will still don't be even 1000 Sad

* Unless somehow you're one of those Apple people, in which case a) WHAT ARE YOU DOING IN HERE and b) you'll have to wait a couple more days
Or my device is Android 2.3 Tongue
(I even not sure if it can give stable 30 Fps for such cool graphics ^^)
18  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-09-16 18:48:35
Its old discriminating game Tongue
Why I can have only 1 Lover?
And one Job…
Why i can't convert Friend to lover?
and many other discriminations
19  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-09-15 08:34:41
I got depressed a bit.
http://xkcd.com/1732

I think increasing 3-6 degree of temperature is smallest that will bother you
When you be swimming in trash and eating food grooved on trash, breathe dirty air filled big count CO2

http://factmyth.com/factoids/there-is-a-plastic-garbage-island-in-the-ocean/
http://blog.theraceison.co.uk/index.php/2011/08/15/how-space-junk-is-destroying-our-planet-from-above/
and mass felling of trees near you

But like always humanity find way and start build Biodomes ^^
(for rich of course)
20  Game Development / Newbie & Debugging Questions / Re: manipulating SourceDataLine on: 2016-09-14 18:29:58
I'm pleased with the results. I think the only thing I can do now is go into Audacity and get those edits juuust right...

Major thanks to @philfrei and @Icecore for their willingness to share knowledge and expertise!
 
You're welcome

That's explains a lot, but can somebody pleased explain to me why the block is synchronized on sdl, and not ais or ais_swap?  Huh
Because ais and ais_swap is changed by both threads during synchronize

This how it works “Raw explain”:
Every object have boolean value –
is_synchronized


When Thread enter synchronized block
Thread check
1  
2  
3  
4  
5  
6  
if(is_synchronized){
wait
}
is_synchronized = true;
on leave block
is_synchronized = false;


null object don’t have any Object data
and for changeable object
you have
obj1, obj2

Thread1 synchronized(obj1)

then swap links
obj1 = obj2 

Thread2 try use synchronized(obj1)
and shi use it, because
Technically obj1 is different object hi have
is_synchronized = false

Even when Thread1 still in synchronized block above

I also reread about
drain
you can use it only on Thread stop
Drain = wait, until all written data - played to end
It prevents clipping sound on Force thread Stop, but don’t have any result on filling new data to buffer
21  Game Development / Newbie & Debugging Questions / Re: manipulating SourceDataLine on: 2016-09-14 10:22:22
1) Convert the byte data to PCM values (very likely to -32768 to 32767 range if 16-bit data).
2) Add the values from each input (and check to prevent going out of range).
3) Convert back to byte data and ship it out.
I'm not sure about step 2 Smiley
Yes it works and almost everyone use it, but is it right?
Its same as Add 2 Red colors bytes, when you must add luminance of colors...

I’m interesting if record audio from mic between 2 instruments that play one Note
How sound changes?
I doubt that simple multiply Hz of played note on 2.
At least it must be some exponential Curve for Raw adding,
But for more clear it must be something Like LAB space in Color

up find this:
http://atastypixel.com/blog/how-to-mix-audio-samples-properly-on-ios/
http://www.voegler.eu/pub/audio/digital-audio-mixing-and-normalization.html

little offtop:)
Warcraft II - Tides of Darkness - Human 2 Midi
https://www.youtube.com/watch?v=GU7UWhPn-pQ
https://www.youtube.com/watch?v=V_FYOI91eLE&list
22  Game Development / Newbie & Debugging Questions / Re: manipulating SourceDataLine on: 2016-09-14 10:03:03
For synchronization you need any non changeable(not null) object that you can access from 2 threads
https://docs.oracle.com/javase/tutorial/essential/concurrency/locksync.html

I use sdl like example – because in many cases you don’t want create new SourceDataLine object in Audio thread.
But to make code clean better create separate syn object
1  
public static final Object Syn = new Object();

Using Direct synchronized from another Thread its rude, same as static Syn object,
but for raw example its ok, and it works just fine

but I'm not seeing why synchronization is needed.
Its prefers for using Sync, i show why:
1  
2  
3  
4  
5  
6  
7  
8  
//Thread 2 set ais_swap
if(ais_swap != null){//Thread 1
   //Thread 2 set ais_swap = null
   //but Thread 1 already pass null check
   ais = ais_swap;//Thread 1 ais = null;
   ais_swap = null;
   swap = true;
}

Yes its rare, very rare but you can simulate this in debug mode
(stop threads, step line by line for 1, 2 Thread as you want)
synchronized block Prevent this.
23  Game Development / Newbie & Debugging Questions / Re: manipulating SourceDataLine on: 2016-09-13 22:22:58
Forgot add IO check)
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
while(true) 
   boolean swap = false;
   synchronized(sdl){
      if(ais_swap != null){
         ais = ais_swap;
         ais_swap = null;
         swap = true;
      }
   }
   nBytesRead = ais.read(data, 0, data.length));
   if(nBytesRead < 0){
      break;
   }
   if(swap){
      sdl.drain();
   }


Technical you can mix audio in Byte Array befor send it
but I have no idea how mix "byte Audio data" )
(I believe simple + 2 data's is wrong)
24  Discussions / Miscellaneous Topics / Re: What I did today on: 2016-09-13 21:42:54
I got depressed a bit.

http://xkcd.com/1732
I think the fact people still don't believe this is insane , it's obviously getting worse and population increase plays a huge role! Us java developers need to get into gear to make games that stop people from wanting to have more children so that we can save the environment!
I think more reliable way will be eliminate humanity ^^
(Like true programmers we must fix problem rather than hide bugs XD)
or build many walls Tongue
25  Game Development / Newbie & Debugging Questions / Re: manipulating SourceDataLine on: 2016-09-13 21:07:28
However, looping the SourceDataLine requires draining and closing the old DataLine, shutting down the thread, starting the new thread, and creating, opening, and starting the new DataLine.
Who say you this?)

as i said
then you can send any data in any order as you want to SourceDataLine

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  
//Thread 1
AudioInputStream ais_swap = null;
while(true)
   synchronized(sdl){
      if(ais_swap != null){
         ais = ais_swap;
         ais_swap = null;
      }
   }
   nBytesRead = ais.read(data, 0, data.length));
   offset = 0;
   System.out.println(name + " reading...");
   while (offset < nBytesRead){
      System.out.println(name + " writing...");
      offset += sdl.write(data, 0, nBytesRead);
    }
   if(killThread){
      System.out.println(name + " killing...");
      break;
   }
   System.out.println(name + " reading...");
}
//Thread 2
   synchronized(sdl){
      ais_swap = new AudioInputStream
   }

*if AudioInputStream's have same AudioFormat

Perfect will be after swap - drain previous data
- but this step can be skipped because it's coupl MS time of sound before swap new track
***
byte[] data
SourceDataLine depends only on AudioFormat it dont care what data you write in

p.s Auido in java is hard - MIDI even harder
Easiest way – try change exist “audio tutorials code” as small as possible Wink
26  Game Development / Newbie & Debugging Questions / Re: manipulating SourceDataLine on: 2016-09-13 10:50:24
"SourceDataLine" is works like Data buffer
https://docs.oracle.com/javase/7/docs/api/javax/sound/sampled/SourceDataLine.html
it have size depend on "AudioFormat"
FormatSize * channels == time (1 sec or ms not remember sure)

so you need load file "wav"
offset header data (header data needed for creating AudioFormat)
then you can send any data in any order as you want to SourceDataLine

simple remember: to not broke this loop - its important to be so (because of multy thread)
1  
2  
3  
while (offset < nBytesRead){
   offset += sdl.write(data, 0, nBytesRead);
}

up:
i reread comments about SourceDataLine.write
and remembered that hi blocked thread until fill full data so “while” in theory can be skipped
27  Discussions / Miscellaneous Topics / Re: CuBBool Pixel language on: 2016-09-12 15:25:25
- in some way its even better then QR codes because you can decode text manually

If it were better than QR-Codes, it'd have some form of error correction. Does it?
It's chars:)
what error corection you want in chars?)
Simple paint it bigger size so 1 pixel become 4x4
Or you can add same check_sum or correction data in finished text Block)

IMHO:QR codes is Scam everywhere except official documents papers
Don’t be surprised if after scanning random code on street you’r phone be infected by malware

up:
http://blog.qr4.nl/page/QR-Code-Data-Capacity.aspx
Do you know that for 29x29 pixels(841 pixels) QR have only 208 bits of data With error corecton 30%
paint 4 same imgs 15x15 (225 pixels) in cube 30x30 and you receive 75% error correction Roll Eyes

up2:
QR codes newer was design to be public stuff  - it was created as for “only in company usage“  Clueless
like some fast madden software to optimize production process (with terable GUI ^^).
Small change like add more colors – let say 6 can increase Data capacity of Code in ~6 times Tongue

All knew that – but all don’t care XD
28  Discussions / Miscellaneous Topics / Re: CuBBool Pixel language on: 2016-09-12 15:00:16
Can I ask what are your motivations for doing this?
First I want make smallest readable font as possible, so I make this encoding for fun
But after I finish it
it looks so cool (have full chars encodings with Extra symbols)
–even better then https://en.wikipedia.org/wiki/Braille
(its even harder with “Braille multy languages")

If separate pixels for dots even noob can read it after explaining:
–transfer data to decimal, find char in Alphabet
-because chars have bounds writer don't need to make holes - only dots.

+its Bits math - easy to understand(calculate, generate) and decode (From img)
Easy to predict next letter (not like next pixel img after ‘A’  become pixels ‘B’ )

+semi chars size (even XY size can be align same)
+multi usage – any language can be added: even chinese (in bigger matrix)

-in some way its even better then QR codes because you can decode text manually

p.s It looks like language from cyber future XD
29  Discussions / Miscellaneous Topics / Re: CuBBool Pixel language on: 2016-09-11 14:09:52
Don't know what to do with spacing between chars:
For 6 x 6 (on imgs up)
I used 4 pixels for X space and it looks ok, 1-2 pixels for me blends text
For Y - i try 2 pixel and it looks ok
So 6 x 6 char become
10 x 8 pixels

Comparing to Green chars (LucidaTypewriterRegular" S = 12)
Its 8 x 15 pixels in text, can be Trimmed (between spacing chars without harm visual)
to 7 x 14

Smallest readable Font i find out is (LucidaTypewriterRegular" S = 9)
6 x 11 Trimmed
to 5 x 10

up:
You can ask What difference? pixel smaller – pixel bigger..

Let say you have Window 700 pixels Y
7 x 14 = 50 Text (code) lines Y  - Base
5 x 10 = 70 Text (code) lines + 40%
10 x 8 =  87 Text (code) lines + 74%
10 x 7 =  100 Text (code) lines + 100%
30  Discussions / Miscellaneous Topics / Re: CuBBool Pixel language on: 2016-09-11 13:23:37
Different color may be used for better performance


for multi language support, in one text, with small matrix
- can be colored any Non Data Bits group ("Always_On" or "Layouts").

That allow change encoding on fly - with any Data(Text) color blending
Pages: [1] 2 3 ... 14
 
ral0r2 (182 views)
2016-11-23 16:08:26

ClaasJG (322 views)
2016-11-10 17:36:32

CoffeeChemist (416 views)
2016-11-05 00:46:53

jay4842 (469 views)
2016-11-01 19:04:52

theagentd (480 views)
2016-10-24 17:51:53

theagentd (468 views)
2016-10-24 17:50:08

theagentd (426 views)
2016-10-24 17:43:15

CommanderKeith (423 views)
2016-10-22 15:22:05

Roquen (394 views)
2016-10-22 01:57:43

Roquen (299 views)
2016-10-17 12:09:13
List of Learning Resources
by elect
2016-09-09 09:47:55

List of Learning Resources
by elect
2016-09-08 09:47:20

List of Learning Resources
by elect
2016-09-08 09:46:51

List of Learning Resources
by elect
2016-09-08 09:46:27

List of Learning Resources
by elect
2016-09-08 09:45:41

List of Learning Resources
by elect
2016-09-08 08:39:20

List of Learning Resources
by elect
2016-09-08 08:38:19

Rendering resources
by Roquen
2016-08-08 05:55:21
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!