Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (702)
Games in Android Showcase (203)
games submitted by our members
Games in WIP (775)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 ... 3 4 [5] 6 7 ... 10
 41 
 on: 2016-12-06 18:53:00 
Started by MrPork - Last post by Kefwar
...
Synchronization did not work.
Well, since you said you were not using multiple threads you don't have to bother with synchronization.
Providing additional information may be useful if you want to receive help, such as a stack trace including line numbers in your code snippets.
At least for me it isn't clear where the error exactly occurs.

 42 
 on: 2016-12-06 18:48:44 
Started by MrPork - Last post by MrPork
Looks to me like you're attempting to use the isLoading flag as a mutex.

That's unlikely to be thread safe.
You need to use proper synchronization.

Synchronization did not work.

 43 
 on: 2016-12-06 18:36:49 
Started by vfmachado - Last post by Spasi
1. What can be considered the best format to work with animations using opengl?

There are many formats that can do the job. My personal favorite was dotXSI, but Autodesk bought and killed Softimage 3D, so...

The hardest part is setting up a decent pipeline between your artists and your engine. The actual format used to get data out of your DCC app is not very important.

2. There is any Java library to work / load this models?

LWJGL recently added assimp bindings (currently available in the nightly builds). Here's a tutorial on how to import Blender animations using assimp.

 44 
 on: 2016-12-06 18:04:07 
Started by MrPork - Last post by MrPork
I am also not using multiple threads.

 45 
 on: 2016-12-06 18:01:08 
Started by MrPork - Last post by MrPork
The only times I iterate over the itemList is when I'm rendering() and updating() the objects. They are not called elsewhere but in the class. I am in the process of using synchronization to see if @Abuse 's help works.

 46 
 on: 2016-12-06 17:10:53 
Started by bmanmcfly - Last post by bmanmcfly
I'm having a hard time understanding exactly what you would be using tweens for, especially when you mention that you want to apply tween to movement.

So, here's what I had imagined in my head when looking at the examples of what can be done with the tween engine :
First, and most importantly, I was thinking that it could be useful to control NPC movement, or someone runs past to tell you something when crossing a checkpoint type of thing, then I thought it would be useful for the flashing effect...

Then, I got creative, and I thought, "hey, I could use it for controls too, like when you start running the speed could be interpolated from the standing (speed = 0) to max run speed, or a jump could change the speed from the jump speed to max fall speed, etc...

Having had the chance to look a little deeper, it seems that this type of interpolation would get real messy real quick, and it seems that it's best that there be "triggers" and while the trigger is active start a set of tweens and return control (except things like flashing which doesn't impact motion on its own)


Quote
My understanding of tweens is the manipulation of sprites and effects such as your example of a sprite flashing, not necessarily physics. If you need something to handle physics and angles, you could try and look into Box2D physics which could make your life easier, or maybe even just apply your own collision.

Actually, I already have the collision detection scheme working (why I would only play with speed, not position)... I tried with box2d, and I could not find a way to get the controls as "fast" as I wanted without the player treating every slope up as a ramp to fly off of.

I did find a bit more about using tweens for controls, and while it does seem like it's doable, it seems that it would require a fair bit of refactoring... and I've done that too many times as it is (first go, I was using box2d, which I could not figure out how to get the controls the way I wanted... so, I ripped out box2d.  Then, I had poorly planned the project structure, so I refactored to make an entity system.)

What I wound up using was the intersector class with libgdx, where the desired position is calculated, any intersections are calculated from that position, and if needed speed gets recalculated to exactly arrive at the collision.... it works even with absurd speeds.

Quote
As far as tweens go, I feel you can get away with using Actors or Shaders in order to apply effects to your character. All in all I feel it just depends on your approach to how you want to make things like cut scenes. For cut scenes in games, I've seen developers directly manipulate the velocity/position of their models. For example a warcraft cut scene where your character is being controlled, or even in the classic mario brother games when you win a level and he jumps on the flag at the end. Alternatively the larger studio games actually have amazing cinematic scenes that overlap the real game screen, like world of craft and many others... It just depends on how you want to do it.

I'm still a noob, so the tweens / cut scenes I'd be looking at would be FAR CLOSER to Mario style than world of Warcraft style...

Quote
Just to answer you question, yes an Actor will use a Stage which can be used on a Screen. If you are using Sprites with Spritebatch, then you'll be familiar with having to use spritebatch.begin()/end(). Actors and their Stage object are just like a Sprite/batch with their batch object, but they just offer more features. Check out this post: http://stackoverflow.com/questions/10619394/when-to-use-actors-in-libgdx-what-are-cons-and-pros

Hmm... thanks for the link, I'll look it up...

As it stands, I have :
baseEntity: has the shape, position, speed, and whether or not it will be updated
groundEntity: is a base entity that has the extra data for handling terrain collisions (like the walkpath of terrain)
player: adds the sprite....

it might be worth looking into to make use of extra functionality if it doesn't add too much grief.


Quote
Here is my personal example of my main game Screen, which is by no means a definitive go-to guide. I just feel it's helpful to show a different approach to different problems:

Actors - I use them for my in-game UI, because I like applying effects/actions to certain UI buttons. It's as easy to make Actors and have them part of a Stage, because all you need to do is just put that stage into your render() method, and run it. Going deeper, I add my Actors to a Table, which helps me organize my UI so that it's easy to align on my screen. It also helps with resolution scaling because I'm making a desktop game, and my Table will automatically re-scale the properties of all my UI depending on the resolution.

Sprites - I use these for my player/enemy entities. Since I'm making a 2D game, I can get away with simply rotating my sprites when I'm changing direction, and you can swap textures of those sprites with other textures if you want to emulate some sort of complex animation(Or just use 2D Particle Editor).

Shaders - You can use shaders for different types of transition/color effects. This is applied to mostly my sprites, but I already try and make my own solutions before I may use shaders.

Actually, that's what I thought was the use for actors / stage was to handle UI, but that it would be possible to use it for simple collision detection, etc...

That's more or less where I'm at now with sprites, although I don't bother rotating the sprites for slopes... and I'm still debating if I want to mirror the sprites (at least the main player character) or if I want to do like Metroid and ensure that no matter what the gun arm is always on the right...

I have a feeling I'll have to learn more about shaders... but that can wait until I'm a little deeper in.  I gotta stop talking about it so much because it's still in a state that's even too pathetic to put on WIP.

 47 
 on: 2016-12-06 16:36:59 
Started by vfmachado - Last post by basil_
welcome man. these are good questions. i'm curious too. what do you guys think ?

my own experience is not too good. everytime i dig into this topic i see myself running away.

 48 
 on: 2016-12-06 16:26:27 
Started by Lunch - Last post by Lunch
Hi everyone. As you can see this is my first post on here. I've lurked for a while now and I've decided to join the community.

I'm still inexperienced with LibGDX and i'm working on developing my first 3D project. I'm having issues when using an Orthographic Camera, hit detection with the Camera Ray and Bullet collision detection. I've been struggling on this for a while and i can't find a solution. When i have the Camera positioned at (5, 5, 10) the RayCallback works perfectly. I can click on the objects and a hit is registered inside the TouchDown code. However, when i pan around the map i get this camera clipping effect which cuts out the lower area of map which i am trying to view.

Click to Play


Here is a preview of the RayCallback detecting hits on the objects.

Click to Play


I have tried changing the Camera position to make it much further out (such as 50,50,50 or 100,100,100) and also changing the Camera.near/Camera.far values. This fixes the map clipping issue and the view of the map looks exactly the same, but it causes my hit detection on my RayCallback to stop detecting anything. I don't understand why it works at 5,5,10 and not 100,100,100?

Here is a preview of a Camera which i have positioned at 50,50,50 no longer clipping the map but the hit detection has stopped working

Click to Play


Alternatively i have tried using a different RayCallback using this code;

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
    public int getObject (int screenX, int screenY) {
        Ray ray = cam.getPickRay(screenX, screenY);
        int result = -1;
        float distance = -1;
        for (int i = 0; i < instances.size; ++i) {
            final GameObject instance = instances.get(i);
            instance.transform.getTranslation(position);
            position.add(instance.center);
            float dist2 = ray.origin.dst2(position);
            if (distance >= 0f && dist2 > distance) continue;
            if (Intersector.intersectRaySphere(ray, position, instance.radius, null)) {
                result = i;
                distance = dist2;
            }
        }
        return result;
    }


Like the RayCallback code, It works at 5,5,10 but instead of not working at 50,50,50 - it fills the entire world map. I receive a hit no matter where i click on the screen.

I don't normally ask for help because i can find the answers to most of my questions through a quick google search. Apologies if this question has been asked before - i can't find anything on it.

You can view my full code here.

 49 
 on: 2016-12-06 15:51:54 
Started by vfmachado - Last post by vfmachado
Hello everyone,

first topic here at Java-Gaming.org. Hopefully in the correct section.

I'm a developer passionate for games and after all these years of programming I'm starting to game program (from scratch) to understand and improve concepts about game architecture, math, phisics and related stuff.

I'm using LWJGL, version 3.1 to create a simple engine, just to added models, textures, lights, whatever... Just for studies puporses for now Tongue

Therefore, I'm really worried about how to added animation for this models. Let me clarify some things, I don't want translate/rotate models... I want export an animation from Blender and run it on my openGL application.

I know that there is a lot of different format for this export, example Collada (.dae), FBX (.fbx), MD5 (.md5) and it continues.. Also I had look into gLTF (GL Transmission Protocol)... Anyway, I didn't spent a lot of time researching because I have found a lot of different comments in the web.

Finally, my questions...

1. What can be considered the best format to work with animations using opengl?
2. There is any Java library to work / load this models?

Sorry about the long topic for small questions, just contextualizing  =)

I hope to be active in this community and, when be possible I'll create some tutorials about what I'm doing.
Thank you all!

 50 
 on: 2016-12-06 14:36:28 
Started by BurntPizza - Last post by SkyAphid
I finally finished setting up the images for our tutorial dialogs in RF. I think I can finally start on the trailer now. Hype!

Been working on AI for my game, came across this paper on the bots in Quake 3 today:

http://www.kbs.twi.tudelft.nl/docs/MSc/2001/Waveren_Jean-Paul_van/thesis.pdf

If anyone is interested in that sort of thing, you can check it out.

I glanced at the doc and didn't expect it to be so full of content! I'm definitely saving this for later. It may come in handy for WSWs AI. And AI is always one of my favorite programming topics. Thanks for sharing!

Pages: 1 ... 3 4 [5] 6 7 ... 10
 
Lunch (61 views)
2016-12-06 16:01:40

ral0r2 (286 views)
2016-11-23 16:08:26

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

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

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

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

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

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

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

Roquen (468 views)
2016-10-22 01:57:43
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!