Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (580)
Games in Android Showcase (162)
games submitted by our members
Games in WIP (632)
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 ... 22
1  Game Development / Game Mechanics / Re: Calculate Derivatives for Newton's Method on: 2015-02-16 15:12:18
You typically only use a newton raphson method when you have a analytical result for the derivative. You have to be quite careful with a finite difference as this adds significant stability issues.

Basically if you don't know what your doing, and by the sounds of it you don't. Start with a bisection method. It does the same thing, but is much simpler and always converges with a correct starting bracket.
2  Discussions / General Discussions / Re: What's your day job? on: 2015-02-16 15:07:03
I am a scientist at the EPFL in switzerland. Previously I was at the Vienna University in Austria. I write Coalescent simulators that roughly simulate evolution on DNA. Its not going well and i am probably going to drop science at the end of the year. No idea what is next. Would love to go off grid and hitchhike around the world with nothing more than a change of cloths and a passport. My wife is not keen on the idea.

In a previous life/s I was in telecos, computer security, physics and of course i did try and get a commercial pilots licence. But due to parking a motobike in the side of a police car at 50km/h a head injury meant no more class one medical. 
3  Discussions / Miscellaneous Topics / Re: Bit pissed off at uk school system... on: 2015-02-11 14:40:49
My daughter was 14 when we moved to Austria. In Austria your almost legally an adult. As in that is the age of consent (assuming both parties are only like 1 or 2 years apart in age) and its when you can get permanent criminal record. There are even rules about if i can even see her report. Once she is 16 she has to sign to give permission for us to see it! So searches by teachers was simply not allowed anymore than any other random person is allowed to do that.

I can see both sides of the argument, but i must ultimately come up on the side of individual rights. How does searching a students phone make for a better school for anyone? It doesn't.
4  Game Development / Performance Tuning / Re: Fast way to filter through data on: 2015-02-09 13:46:27
The quickest way if its already in memory just iterate over the whole thing with an insertion point... this is O(n), you can't do better and this is quite a bit faster than sorting.

For an array... something like this: (probably with some +1 -1 error.... )

1  
2  
3  
4  
5  
6  
7  
8  
int insert=0;
for(int i=0;i<size;i++){
    if(list[i] passes keep test){
        list[insert]=list[i];
        insert++;
    }
}
//set everything from insert+1 to size to some "empty value"
5  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-02-03 16:00:41
I started a 2 year project again from scratch, and just said .. Oh god boss i am so sorry about that old version. He was happy and I get to finish this contract. So I have a job till the end of the year.

Perhaps now i can have some spare time for the game code. I got plans you know.
6  Discussions / Miscellaneous Topics / Re: The joys of game dev in C++ on: 2015-02-02 12:54:11
Yea in C++ even in single threaded apps, random hard to reproduce seg faults kept me awake at night. We had one bug that we could never reproduce when compiled with debug symbols.

Also conisder that in java a NPE is dealing with things properly, there is a chance that the memory is only partly "freed" and that you end up with "unspecified behaviour".  One of the favorite things in the C/C++ specs.
7  Game Development / Newbie & Debugging Questions / Re: Textbook for Java NIO Networking. on: 2015-01-31 15:43:49
nio is loosely based on a non blocking C api. Most people don't like it, and have found it buggy. I however didn't really have any problems and only had to spend a day with the docs to write a pretty good network layer for my stuff.

These days with at least unix OSes and linux in particular large numbers of threads with the old blocking api works very well, and last but not least green threads from riven can also do this even more efficiently across platforms. You really need to consider the problem you are trying to solve. If it is for very highly scalable servers, then i would argue that perhaps your doing it wrong for an indie game.  And if you still want to do that then well i would say try green threads first.

nio had and probably has its place. Just not for most of us.
8  Game Development / Newbie & Debugging Questions / Re: Starting to develop games. on: 2015-01-22 21:06:33
Start with simple games, like tic tac toe. Or minesweeper. Go from there.
9  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-01-22 14:24:42
Ah yes the curse of the day job. Well mine is going so badly right now i may well not have one really soon  Undecided

What did i do today? Broke even more code that was suppose to be released months ago.
10  Game Development / Game Mechanics / Re: Where to correct position in collision detection (best practice) on: 2015-01-19 11:55:36
In the past, i have found just moving out of intersection + some damped velocity works best, depending on the level of accuracy of simulation. Moving it out means you don't get accumulated velocity added frame to frame and eventually flies off at unrealistic velocity, add some velocity means it bounces off. Damping again just prevents everything from running away due to time quantization and rounding errors.

I am assuming a game, where accuracy is generally far less important than stablity/stupid results.
11  Game Development / Game Mechanics / Re: Represent 3D map on: 2015-01-19 11:50:45
For learning and well for *not* learning, KISS (Keep It Simple Stupid). You will learn more finishing something that works than something you don't. So a 3d array is a good start. Yea memory will be an issue for a large map. Don't worry about that at the start. small maps can be turned into a "chunk" type maps easy enough. The interaction to the map is always just a "what is at location x,y,z"  or the slightly more advanced method of "height of  ground at x,y". Then later, if you want to try more advanced quad tress or something, you don't need to change the rest of the code.

But just start with a 3d array. 100x100x100 bytes is not that much ram and more than big enough to get started with all the challenges you will face just getting that much to work.
12  Discussions / Miscellaneous Topics / Re: If OS==linux && isInstalled(Steam) --> ABORT! ABORT! on: 2015-01-19 11:43:38
The reason i set up a special user for things like steam, and wine.

Oh and backups. 24/7 backups.

Linux is no panacea of OSes, its just better than the other one i can realistically use on my hardware. And well steam is putting in the effort. I like that.
13  Game Development / Game Mechanics / Re: Should I make a physics engine? on: 2015-01-19 11:40:03
There are physics engines and there are physics engines. JBullet is designed to work fairly easily in a real time setting. Despite the glitches you get, it is doing a good job. Just look at all that code to deal with edge cases! It is just that hard to do stable Newtonian mechanics.

Now i have worked on real physics engines, ones where you take the results and tell people that you haven't designed your building well enough. Or that your airplane will fall out of the sky. Now they are not so glitchy, but represent 10,000 of man hours programming in them (and many PhDs thesis ). A good example of how hard it gets, it consider the classic container of balls being tipped into a hopper. To model this properly you need to model the times of every single impact. That is right, it isn't time stepped anymore, because you can show unbounded errors in that case. But you work out when the first ball collides with something and move to that time, then the second and move forward to that time..... In our code we march forward a given amount, check for a collision and then rewind the simulation to that point in time of the collision. This sort of thing is the only way to get rid of the glitches. Much more work in the field has been done since i left however.
14  Discussions / General Discussions / Re: Would it be worth porting to c++? on: 2015-01-16 15:25:12
C++ is bloody hard to write fast code in. Really. Java is much more forgiving in this respect.

Portability is indeed something to consider. But if your not trying to sell out to a console out of a gate, it is probably not such a concern. If you are, use the native tools for that console, or give unity a go. C# is not all gold, but i would work with it sooner than C++.

BTW i did a lot of contract C++ work back in the day. And i shudder every time i recollect those days.
15  Discussions / General Discussions / Re: New rules regarding Game Engine topics on: 2015-01-14 14:15:54
This is a great idea. Don't write libraries or engines. Write games.

20 years of programming experience, and i still need to relearn this every now and then.
16  Discussions / Miscellaneous Topics / Re: How memory works? on: 2014-11-26 16:24:17
If you really want to understand better. Try some assembly:

http://schweigi.github.io/assembler-simulator/

All programming languages makes somethings easy and other things hard. There is no silver bullet. I use Assembly for example on microcontrollers fairly often even today. I find it easier than even C for that sort of thing.
17  Discussions / Miscellaneous Topics / Re: How memory works? on: 2014-11-24 15:53:29
Princec, I think I did the same. Back in the days when a user interface was a basic compiler. Sometimes.

In reality you ask the OS to store like say 500 numbers, the OS returns the *first* address and says you can use this address and the next 499 for your storage. But the idea of abstraction with programming languages is that you don't need to worry about these details.
18  Discussions / Miscellaneous Topics / Re: Is drinking half a bottle of vodka safe? on: 2014-11-24 15:43:22
Well i want to chime and speak for the third type of person, or in this case, drinker. The one who perhaps drinks a little much and has a great time doing it.

I am pushing 40, work in science and am surrounded by regular drinkers to heavy drinkers. I have not noticed any lack of brain function, and quite frankly seem to be getting older and wiser. The people i work with are all very smart. Well most of them are.

BUT by god you can't make me grow up! I am having the time of my life, and have been for 30 years. It just keeps getting better. Sure i can't blame alcohol for that, but fairly regular nights out are a part of it.

Why do i drink. I get euphoric with alcohol. And super euphoric with even more. Lucky that because it means i get very polite to police officers, which is a very good thing after drinking Mojitos all day in Puerto Rico..

However i have never just sat down and sculled spirits like that on purpose (how that happen on accident is a long story). It just something you shouldn't do. Sure have a lot of back to back shots. But don't bottoms up a bottle. How much you have eaten etc with have a very large effect on the outcome as well, so just because it worked out once does not mean it will again. 

My wife however doesn't like it and won't come out and party often at all. That is fine, she also plays video games that make no sense, while she doesn't like eve online. Different people like and enjoy different things. There is no write or wrong about it.

The only thing that i get upset about is the driving. Doing the alcohol thing to yourself is one thing. Putting others in danger is not!
19  Java Game APIs & Engines / OpenGL Development / Re: LWJGL 3; how's it getting along? on: 2014-11-24 14:50:22
So for a project that is starting now, is using lwjgl 3 a good idea? Or is using 2.x and porting later the recommended route.
20  Game Development / Game Mechanics / Re: Getting into multi-threading. on: 2014-08-18 14:32:44
The trick with multithreading is to have a fairly simple communication model with the data used in the treads. That is there is not a lot to synchronize because each thread is using almost 100% "thread local" data or immutable data. Commutation is done with a producer consumer queues. It works pretty well.

For a game.. well i can't really see it making much difference for an indie game. We are not talking AAA titles here and we are probably not overly taxing the GPU either. So a simple game loop may be all you need and it some make life very simple.

I run a game engine thread and a graphics thread and the are not synchronized. "Snap shots" of the state are sent to the graphics thread. Its quite a bit more complicated than normal game loop. 
21  Discussions / Miscellaneous Topics / Re: Life is like a strategy game sort off on: 2014-08-06 16:01:31
Define success.
22  Discussions / Miscellaneous Topics / Re: What I did today on: 2014-08-06 15:00:08
I finally dusted off some game code and realized that i have been working on it on and off for almost 10 years!

I should probably finish it sometime. Oh and i decided to refactor it Cheesy
23  Game Development / Networking & Multiplayer / Re: Moving from a String based approach? on: 2014-07-30 11:49:03
Whatever you do, DON'T use CORBA. You would be better off stabbing yourself in the face with a blunt axe.

Yes i have used it extensively in the telecoms i once worked at. God i hope they moved on by now.

Seriously what is wrong with plain text. It is much much easier to debug since network inspection tools work out of the box. Performance is almost never needed and even if it is in the future i would always have a plain text fallback/debug mode.
 
24  Discussions / General Discussions / Re: So... state of the art 3D "engines" in Java on: 2014-07-30 08:36:49
Everyone i know uses Unity. So i dont' think anyone really thinks about it anymore. The few people not using unity seem to be using the steam one, whatever its called.

I always wondered what was wrong with scene graphs. I know they are still used a bit for CAD software.

I have found for my own stuff, opengl is so easy to just have a pretty basic ordered rendering list. Its really simple. The hard part would be adding GUI elements, and i use TWL for that. Of course i don't need to push the boundaries of what can be done. So no unlimited worlds or metatextures or anything like that. 
25  Discussions / General Discussions / Re: Component Systems: Artemis style systems vs. traditional fat entities on: 2014-07-28 13:38:20
Well i always think these debates are pretty Meh. But i still read them.

I mostly had issues with what problem Entity stuff solved, as in i couldn't see the point all that much. I assumed because i didn't understand them. Turn out i did. Also turns out when the right problem came along then it did become clear what they are good for. I should also note i didn't use it for performance, since i got a few clusters i can use with over 5k cores. But it made the code small and fairly compact.

For smaller indie games however its less clear how it helps. Its up there with writing an engine. Write a game, not an engine. No one else is going to use it anyway.
26  Discussions / General Discussions / Re: Component Systems: Artemis style systems vs. traditional fat entities on: 2014-07-22 11:36:22
Well i am going to chime in and have my say...

I am using a Entity like system. Technically it is a Entity-attribute-value system. I think these things can work well for the right kind of problem.

The only 2 game cases i can think of are RPGs and MMOs. In both there are just huge amounts of different things yet the relative number of behaviours over all those things is small.

I am not using it for a game, but for work and have the same pattern. Lots and lots of different things where things can even change to be other things, yet only a fairly small set of behaviours over all possible things. I also need to be able to many cores.

So far its working out well. Java kind of suxs a little for cache coherency, but not much since the data size of entity's can change at runtime and would probably need attributes referenced anyway.
27  Game Development / Performance Tuning / Re: Can someone explain what is going on with this square rooting? on: 2014-07-18 12:04:13
You really really really shouldn't try to fix performance when you don't have performance issues. About the only time sqrt is going to matter in performance is if you do software lighting and transformations. Which these days you shouldn't be doing. At least not much.

Also you are doing microbenchmarks which are almost always wrong.
28  Game Development / Newbie & Debugging Questions / Re: Slow FPS Problems on: 2014-07-18 12:01:20
rar file? Is this a 90s warz site?

Cut it down to the smallest example you can. We are not going to read your whole project.
29  Game Development / Networking & Multiplayer / Re: How the structure of a multiplayer game should look like? on: 2014-05-16 07:12:25
No amount of networking magic will eliminate latency. For a signal traveling at the speed of light to get to where i am to NZ and back (say playing against my brother) takes 133ms. Actual pings are about 320-350ms.

The trick is have game play that is not sensitive to that sort of latency (see for example Eve online) or make sure people are much more local to each other. But even with the same ISP it is hard to do better than about 40-50ms because of network setup most ISPs use.

For most games that is not a problem and our primitive monkey brains adapt pretty well. But that sort of latency would make games like Marvel Super Heroes almost unplayable. At 60FPS  you have 16.6ms between frames. Basically i can't see such a game working outside a lan.

Of course you could change the networking to be higher level. ie packets say what combo you just did. Not individual movements or key presses. You could change the game play to be a little slower placed.

I would tend to use a peer to peer lock step networking model for a game like this. But with only loose lockstep. ie let slower clients fall behind the faster ones.
30  Discussions / General Discussions / Re: How do you keep profanity out of highscore boards? on: 2014-05-15 08:18:40
Also you can't stop it. You can only police it. Oh and what languages are you supporting Cheesy. Profanity in other languages is pretty common as well.

Its like piracy. If you get popular enough for it happen. You did something right. Until that point. Don't worry about it.
Pages: [1] 2 3 ... 22
 
Waterwolf (20 views)
2015-05-20 15:01:45

chrislo27 (24 views)
2015-05-20 03:42:21

BurntPizza (58 views)
2015-05-10 15:53:18

FrozenShade (45 views)
2015-05-07 09:11:21

TheLopais (208 views)
2015-05-06 13:36:48

TheLopais (191 views)
2015-05-06 13:35:14

TheLopais (198 views)
2015-05-06 13:33:39

TheLopais (214 views)
2015-05-06 13:32:48

TheLopais (214 views)
2015-05-06 13:31:28

ClaasJG (236 views)
2015-04-30 20:33:25
List of Learning Resources
by SilverTiger
2015-05-05 10:20:32

How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21

Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00
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!