Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (739)
Games in Android Showcase (224)
games submitted by our members
Games in WIP (820)
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 ... 34
1  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-10-22 22:21:46
@theagentd

Ah, so the scenario is essentially 1 source of gravity where the precise positions of the ships/particles affected by it comes to play? But then why is the calculations so taxing? What makes this so different than anything else? The precision? The magnitude/amount of bodies? Why wouldn't e.g. a QuadTree based solution work?
Simulating the physics takes 0.27 ms for ~1 million ship, and this is GPU bandwidth limited, so I an have up to 8 sources of gravity before I get any drop in performance. If it's just the simulation, it can easily be done for over 10 million ships. The problem is the collision detection really. Hierarchical data structures are usually not very efficient on the GPU, and constructing them on the CPU would require reading the data back, constructing the quad tree, then uploading it again to the GPU, which is gonna be too slow. In addition, actually querying the quad tree on the GPU will be very slow as well; GPUs can't do recursion and computations happen in lockstep in workgroups, so any kind of branching or uneven looping will be very inefficient. It's generally a better idea to use a more fixed data structure, like a grid instead, but that's a bad match in this case. The large scale of the world, the extremely fast speed of the ships and the fact that ships will very likely be very clumped up into fleets means that even a uniform grid will be way too slow.

The idea of sorting the ships along one axis and checking for overlap of their swept positions (basically treating each ship as a line from its previous position to its current position) was inspired by Box2D's broadphase actually. I concluded that sorting was a simpler problem to solve than creating and maintaining a spatial data structure (especially on the GPU), but after testing it out more I'm not sure it's a good solution in this case. For a fleet orbiting in close formation, there's a huge spike in sorting cost when the orbit reaches the leftmost and rightmost edges of the orbit when the order of the entire fleet reverses. There are also problems when two large fleets, one moving left and the other right) cross each other, again due to the two fleets first intermixing and then swapping positions in the list once they've crossed... Finally, there's a huge problem with just fleets travelling around together. A fleet of 10 000 ships moving very quickly together will have overlapping swept positions, so all 10 000 ships will be collision tested against each other.

I got a lot of thoughts on this problem, so if you want to have more of a discussion about this, I'd love to exchange ideas and thoughts on this through some kind of chat instead.

A very insightful clarification covering several levels of analysis, thank you~

My time is limited as of late, not that I'd necessarily be able to contribute anything meaningful to the discussion anyway. But it's an interesting topic I don't think anyone here wouldn't mind seeing more posts of in the future.
2  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-10-22 19:56:36
@theagentd

Ah, so the scenario is essentially 1 source of gravity where the precise positions of the ships/particles affected by it comes to play? But then why is the calculations so taxing? What makes this so different than anything else? The precision? The magnitude/amount of bodies? Why wouldn't e.g. a QuadTree based solution work?
3  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-10-22 15:08:17
@theagentd

How "realistic" does it have to be, though? Wouldn't something like the Barnes-Hut algorithm be "good enough" for most cases?

http://arborjs.org/docs/barnes-hut
https://en.wikipedia.org/wiki/Barnes%E2%80%93Hut_simulation
http://www.cs.princeton.edu/courses/archive/fall03/cs126/assignments/barnes-hut.html
4  Game Development / Newbie & Debugging Questions / Re: Hosting game/demo file for download on: 2017-10-06 18:32:40
The strawmanning is real ITT.
5  Game Development / Newbie & Debugging Questions / Re: Hosting game/demo file for download on: 2017-10-04 17:26:39
@Icecore
I'm being racist? Really? Do you even know what it means? What makes the hammer and sickle logo any less murderous, reprehensible or pathological than, say, the swastika?

I'm all for criticism by the way. I think it's vital for a free society to be able to criticize anything and everything. That goes both ways of course.
6  Game Development / Newbie & Debugging Questions / Re: Hosting game/demo file for download on: 2017-10-03 20:54:44
It's a nice guide indeed but it's not as "simple" as that. ISP's won't let you host your own server willy nilly not to mention availability, reliability and robustness without even thinking about security yet. Ease of use and maintenance also have value.

@gouessej could use a little less propaganda ( for lack of a better word ) though. I mean the hammer and sickle logo isn't very flattering for one thing. :d
7  Game Development / Newbie & Debugging Questions / Re: Hosting game/demo file for download on: 2017-09-30 11:40:40
And you can create temporary public links to your private resources on S3 among other things.
8  Game Development / Newbie & Debugging Questions / Re: Hosting game/demo file for download on: 2017-09-29 18:49:51
Amazon S3
9  Game Development / Newbie & Debugging Questions / Re: 2 questions, coding MMORPG in Java on: 2017-08-15 17:42:08
1. It's a silly question to begin with -- why restrict yourself arbitrarily?

2. Same as 1.

3. Most likely not. Possibly. Definitely the other way round. Net code is hard and can't simply be slapped on.

Also, as a tip, since you're way out in the water swimming with sharks -- why not try something a bit more tangible first -- make 2d multiplayer game with HTML5 for example with the backend in NodeJS/Socket.IO -- relativiely easy setup into networking with the tools to draw stuff on the screen.
10  Game Development / Game Play & Game Design / Re: Raycasting in a 3d game to create hitscan weapons on: 2017-08-13 21:17:41
..aren't you already using raycasting when rendering the game?

Essentially raycasting is casting a bunch of rays/projectiles in an arc around the camera -- these rays/projectiles have a direction they step through and check for collisions -- when they hit something they stop and you'll know the distance they travelled (so that you can draw the walls/etc big/small based on how far away they are from the camera).

eg:
https://github.com/talmobi/raycast/blob/master/app.js#L177
http://ray.jin.fi/
11  Discussions / General Discussions / Re: Steam Greenlight to be replaced with Steam Direct on: 2017-07-19 02:08:11
games have a gender?
12  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-07-01 12:22:17
Ah...cunt + straight pride week?  Nope, he's being an ass.  Even if being straight was illegal and/or got you killed in some places the cunt bit would ruin any potential point.

<snip> the cunt bit would ruin any potential point.

lmao. That's retarded.

I like how you use the words "potential" to insinuate there's no point behind the tweet -- and the word "ruin", almost as a synonym for "invalidate" (but you can't use that word since that would suggest that there indeed was a point behind the tweet), to suggest that even if there was one it would be of no merit due to the way it was presented.

Obviously he's being an ass but cmon bruh.
13  Game Development / Networking & Multiplayer / Re: Online networking question(s) on: 2017-06-05 14:13:52
You're mixing layers https://en.wikipedia.org/wiki/OSI_model

Generally TCP and UDP are used. Depends on the game. Most likely there's already some kind of API that does most of the heavy lifting for you so you don't have to deal with the Transport layer yourself too much.

I suggest you stick to TCP unless there's a specific reason why you would need UDP.

TCP and UDP in itself are quite low level -- there's so much more to net code in games.

eg: https://www.youtube.com/watch?v=vTH2ZPgYujQ
14  Discussions / Miscellaneous Topics / Re: Silly Programming Mistakes on: 2017-06-05 07:17:55
Only since 7.6. And if you got callback hell you're probably doing something wrong to begin with.

Not that there's anything wrong with Promises (async/await) per se as long as you know what you're doing.

@kingroka123

You should avoid using the 'new' keyword entirely, it's not necessary (unless some odd api requires it for some god forsaken reason).
15  Game Development / Game Mechanics / Re: Isometric Mouse Collision? on: 2017-05-29 14:12:05
Perhaps s.width / s.height doesn't correspond to the actual tile width/height (not necessarily the same as sprite width/height)

Nevertheless if the error remains constant on all the tiles it's just a small offset issue -- try adding +- offsets to the tiles until you get the correct behavior -- then you will know the actual error offsets in numbers and it might help you pinpoint the actual issue.
16  Game Development / Game Mechanics / Re: Isometric Mouse Collision? on: 2017-05-29 00:42:10
Seems like a sprite anchoring issue (should be top corner pixel of your isometric sprite) (the first tile top corner should be smack middle on the top left corner of the screen) -- that or screen offset issue.
17  Discussions / General Discussions / Re: Coding music! on: 2017-04-22 19:14:25
And here's a bit of a different mix from the previous genre

<a href="http://www.youtube.com/v/tGunmdqA82I?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/tGunmdqA82I?version=3&amp;hl=en_US&amp;start=</a>
<a href="http://www.youtube.com/v/Jd4TgKaE6FI?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/Jd4TgKaE6FI?version=3&amp;hl=en_US&amp;start=</a>
<a href="http://www.youtube.com/v/Nr_z2Imadn4?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/Nr_z2Imadn4?version=3&amp;hl=en_US&amp;start=</a>
<a href="http://www.youtube.com/v/BsEu1EAma48?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/BsEu1EAma48?version=3&amp;hl=en_US&amp;start=</a>
<a href="http://www.youtube.com/v/_1FagYg2m5c?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/_1FagYg2m5c?version=3&amp;hl=en_US&amp;start=</a>
<a href="http://www.youtube.com/v/BEmgRaHt2tc?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/BEmgRaHt2tc?version=3&amp;hl=en_US&amp;start=</a>
<a href="http://www.youtube.com/v/pA0VMbVgeQw?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/pA0VMbVgeQw?version=3&amp;hl=en_US&amp;start=</a>
<a href="http://www.youtube.com/v/r8pIfZ1EIbA?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/r8pIfZ1EIbA?version=3&amp;hl=en_US&amp;start=</a>
18  Discussions / General Discussions / Re: Coding music! on: 2017-04-22 18:45:59
<a href="http://www.youtube.com/v/LYOtZvwNCsc?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/LYOtZvwNCsc?version=3&amp;hl=en_US&amp;start=</a>
<a href="http://www.youtube.com/v/BMOsLAz4II4?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/BMOsLAz4II4?version=3&amp;hl=en_US&amp;start=</a>
<a href="http://www.youtube.com/v/rSGnNMnvM6M?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/rSGnNMnvM6M?version=3&amp;hl=en_US&amp;start=</a>
<a href="http://www.youtube.com/v/zJqLH8EA2rM?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/zJqLH8EA2rM?version=3&amp;hl=en_US&amp;start=</a>
<a href="http://www.youtube.com/v/A9ew7glBHy0?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/A9ew7glBHy0?version=3&amp;hl=en_US&amp;start=</a>
<a href="http://www.youtube.com/v/e_63m0rwhLc?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/e_63m0rwhLc?version=3&amp;hl=en_US&amp;start=</a>
<a href="http://www.youtube.com/v/HL_3D4b3UZM?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/HL_3D4b3UZM?version=3&amp;hl=en_US&amp;start=</a>
<a href="http://www.youtube.com/v/QpDn4-Na5co?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/QpDn4-Na5co?version=3&amp;hl=en_US&amp;start=</a>
<a href="http://www.youtube.com/v/sFwcLC5HC9I?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/sFwcLC5HC9I?version=3&amp;hl=en_US&amp;start=</a>
<a href="http://www.youtube.com/v/1AHNQZwCkd8?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/1AHNQZwCkd8?version=3&amp;hl=en_US&amp;start=</a>
<a href="http://www.youtube.com/v/l3NoYyNKSXQ?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/l3NoYyNKSXQ?version=3&amp;hl=en_US&amp;start=</a>
<a href="http://www.youtube.com/v/rShyYcdWeK0?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/rShyYcdWeK0?version=3&amp;hl=en_US&amp;start=</a>
<a href="http://www.youtube.com/v/whRcgZrUWwU?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/whRcgZrUWwU?version=3&amp;hl=en_US&amp;start=</a>
<a href="http://www.youtube.com/v/2Cw0lK6n5Y8?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/2Cw0lK6n5Y8?version=3&amp;hl=en_US&amp;start=</a>
<a href="http://www.youtube.com/v/Dj173JEwJR8?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/Dj173JEwJR8?version=3&amp;hl=en_US&amp;start=</a>
<a href="http://www.youtube.com/v/KdbNc8QzXpo?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/KdbNc8QzXpo?version=3&amp;hl=en_US&amp;start=</a>
<a href="http://www.youtube.com/v/mv1XUyRqcGU?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/mv1XUyRqcGU?version=3&amp;hl=en_US&amp;start=</a>
<a href="http://www.youtube.com/v/UJsUpeXK6Jo?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/UJsUpeXK6Jo?version=3&amp;hl=en_US&amp;start=</a>
<a href="http://www.youtube.com/v/1Vsf3zYppP4?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/1Vsf3zYppP4?version=3&amp;hl=en_US&amp;start=</a>
<a href="http://www.youtube.com/v/SHCY9a0KEvs?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/SHCY9a0KEvs?version=3&amp;hl=en_US&amp;start=</a>
<a href="http://www.youtube.com/v/yergWdn968o?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/yergWdn968o?version=3&amp;hl=en_US&amp;start=</a>
<a href="http://www.youtube.com/v/DY1s9SmrQRE?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/DY1s9SmrQRE?version=3&amp;hl=en_US&amp;start=</a>
<a href="http://www.youtube.com/v/MB5mRTkJmFA?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/MB5mRTkJmFA?version=3&amp;hl=en_US&amp;start=</a>
<a href="http://www.youtube.com/v/qApOLaLYZb0?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/qApOLaLYZb0?version=3&amp;hl=en_US&amp;start=</a>
<a href="http://www.youtube.com/v/UF9GNLzaIwg?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/UF9GNLzaIwg?version=3&amp;hl=en_US&amp;start=</a>
<a href="http://www.youtube.com/v/HMLrn_bLmT0?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/HMLrn_bLmT0?version=3&amp;hl=en_US&amp;start=</a>
<a href="http://www.youtube.com/v/d_HlTGzkKeE?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/d_HlTGzkKeE?version=3&amp;hl=en_US&amp;start=</a>
19  Discussions / Miscellaneous Topics / Re: What I did today on: 2017-04-18 02:14:48
Played around with ffmpeg and headless browsers:

gif reverser thing:

http://i.imgur.com/7hYptTI.gif
http://gifr.jin.fi/http://i.imgur.com/7hYptTI.gif
http://gifr.jin.fi/https://lovelace-media.imgix.net/uploads/413/3b2629e0-9542-0133-6dce-0e87cd6e10c7.gif


Opens a url, flips the images, transforms a's to å's and o's to ö's

http://nordicshot.jin.fi/http://java-gaming.org
http://nordicshot.jin.fi/https://imgur.com


And a site thumbnail shortcut thing:

http://qs.jin.fi/?url=https://slashdot.org
20  Game Development / Networking & Multiplayer / Re: Saving characters online. on: 2017-04-08 17:37:39
WoW uses Oracle RDBMS which is an SQL like thing. Relational databases aren't going anywhere - pretty much every MMO should be built around one.

SQL in general is not waning in usage. There are many flavours of it.

NoSQL databases have their place but won't probably ever compete with relational databases.

Use what make sense. A lot of big projects use many databases for different purposes. Redis is quite popular as a cache for example.

Big messy projects like an MMO will (should) definitely use a relational/SQL database. NoSQL databases don't even come close for those kinds of use cases. At least not yet, probably never.

My favourites in these categories are Postgres (SQL), MongoDB (NoSQL) and Redis (message broker, cache)
21  Game Development / Newbie & Debugging Questions / Re: 3D dungeon crawler on: 2017-03-19 22:30:57
There is no best way.
22  Java Game APIs & Engines / Java 2D / Re: Axonometric Projection? on: 2017-03-07 14:30:19
LiquidNitrogen has the right idea; what were you even thinking with `Math.atan(0.5)`?

Note that the order of the transforms matter (scaling, rotating, translating); May vary between implementations/engines.

Demo I made out of boredom: https://jsbin.com/gadevexuwi/1/edit?html,output
23  Game Development / Game Mechanics / Re: Simulating orbital gravity with a prediction of trajectory (Multiple attractors) on: 2017-02-22 21:58:40
Yeah, so simulate it.
24  Game Development / Game Mechanics / Re: Simulating orbital gravity with a prediction of trajectory (Multiple attractors) on: 2017-02-20 18:47:25
Just run the simulation, why would you need to predict anything?
25  Game Development / Game Play & Game Design / Re: Too much abstraction? on: 2017-02-07 18:01:31
Highly recommend: https://www.youtube.com/watch?v=mVVNJKv9esE&feature=youtu.be
26  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Ongoing project: Type-Safe access to ByteBuffers on: 2017-02-05 13:17:46
I don't understand. What are you trying to accomplish? And why isn't JNI an option?
27  Games Center / Contests / Re: Urgent announcement about java4k.com on: 2017-02-04 21:28:50
I spend more money on a cup of coffee a day than a single domain name per year..
28  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Advantages of Ant? on: 2017-01-29 19:26:23
What's wrong with npm? It's great.

Usually it's a good idea to use exact versions for your dependencies regardless because sometimes people use semver wrong, either unknowingly or unintentionally, and break stuff.

Speaking of npm, the ecosystem has gone through a few task runners itself: grunt, gulp, bundlers (browserify, webpack, rollup...) and more recently npm scripts to name a few.
29  Discussions / General Discussions / Re: How do you Guys manage it? on: 2017-01-25 16:20:41


This is the extent of my personal artistic ability. Good luck.
30  Discussions / Miscellaneous Topics / Re: What's in your gamedev software rig ? on: 2017-01-24 22:47:36
Hardware:
MacBook Air 2014Q4 (1.3Ghz i5, 8GB RAM, Intel Graphics 5000)

Software:
Vim
Tmux
Chrome

Not really make proper games though, more akin to shitty demos, like:
http://ray.jin.fi/
http://flapmmo.jin.fi/
http://tetris.jin.fi/
http://jin.fi/projects/Misc/pocketcraft/
http://jin.fi/projects/Misc/ld29/
http://gof.jin.fi/
http://jin.fi/projects/Misc/pairs-game/
http://jin.fi/projects/Misc/twin/
http://codepen.io/talmobi/pen/RWVBzG
Pages: [1] 2 3 ... 34
 
Ecumene (56 views)
2017-09-30 02:57:34

theagentd (79 views)
2017-09-26 18:23:31

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

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

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

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

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

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

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

theagentd (1325 views)
2017-03-24 15:32:08
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!