Java-Gaming.org Hi !
Featured games (85)
games approved by the League of Dukes
Games in Showcase (615)
Games in Android Showcase (173)
games submitted by our members
Games in WIP (659)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2 3 ... 10
 1 
 on: 2015-09-04 04:29:14 
Started by Archive - Last post by Archive
(first of all I do get that this is probably not the most serious of projects)

Pretty nice, as a pretty blank slate I reckon it's got quite a bit of potential. From the thumbnail I thought it was a clone of an early GTA game.

There are a number of visual glitches that happen when you go off the map. I'm not certain for which direction this happens, but when you go off the map in one direction the screen will begin to fill up gradually from the bottom with what looks to be strips of the map.

I also noticed a bit of skipping with the car, like the camera perspective jumped a tad, I'm not sure why though.

Just a personal thing though - I know it mightn't be of use to everyone but is it possible for you to add an option for a small yet widescreen resolution (e.g. 1280 x 720)? Just that I do most things on a laptop so the resolutions are either too small or too big.

Quick tip too if you're using OS X and want to just screenshot the screen, use Cmd+Shift+4 and then the space bar to take screenshots of just the window instead of drawing a rectangle around it first.
Thank you for the feedback. I am aware of these visual glitches, it happens in all directions. Obviously the player is not meant to go off of the map if this game becomes a real game.

Thanks for the tip with screenshots on OS X. Also I'll consider adding that display mode.

 2 
 on: 2015-09-04 04:20:20 
Started by Archive - Last post by Coldstream24
(first of all I do get that this is probably not the most serious of projects)

Pretty nice, as a pretty blank slate I reckon it's got quite a bit of potential. From the thumbnail I thought it was a clone of an early GTA game.

There are a number of visual glitches that happen when you go off the map. I'm not certain for which direction this happens, but when you go off the map in one direction the screen will begin to fill up gradually from the bottom with what looks to be strips of the map.



I also noticed a bit of skipping with the car, like the camera perspective jumped a tad, I'm not sure why though.

Just a personal thing though - I know it mightn't be of use to everyone but is it possible for you to add an option for a small yet widescreen resolution (e.g. 1280 x 720)? Just that I do most things on a laptop so the resolutions are either too small or too big.

Quick tip too if you're using OS X and want to just screenshot the screen, use Cmd+Shift+4 and then the space bar to take screenshots of just the window instead of drawing a rectangle around it first.

 3 
 on: 2015-09-04 03:31:53 
Started by Archive - Last post by Archive
Thumbnail:

BY ENVEL GAMES

Screenshots:
Please note that these images are doctored and are meant to be sarcastic.




DOWNLOAD
http://www.mediafire.com/download/w9xp53lcm1nfmd6/VSimDemo.jar

Written in Java, software rasterized.
2D physics currently.

Features to be expected in next update:
1. Drifting skid marks on ground
2. New car model
3. Translucent windows
4. Better physics
5. Movable car parts (like the front wheels)

Maybe List:
1. Rear and front lights working

Credits:
Car model is not mine, downloaded a while ago from a site I cannot remember, but it was free.

"Yoo this is cool af" - My cousin

 4 
 on: 2015-09-03 23:40:58 
Started by Neoptolemus - Last post by theagentd
Ah, my bad. xd

 5 
 on: 2015-09-03 23:03:28 
Started by Neoptolemus - Last post by KaiHH
LibGDX has a really useful function where you can generate a quaternion from the rotation between two vectors. I find my self in need of such a function right now. Might be useful to add?
This is already available. Look at Quaternionf.rotationTo and .rotateTo

 6 
 on: 2015-09-03 22:12:26 
Started by NivaGameStudios - Last post by NivaGameStudios
Cute dragons you have there!

these dragons, give them items such as shields

Nitpick: How does a four legged dragon use a shield? Better give them some armor Wink


You definantly have a point, I have no idea why I have not realized that. Tongue Coming to the next build: Dragon Armour

 7 
 on: 2015-09-03 21:50:43 
Started by galileo79 - Last post by galileo79
Buccaneer's Quest a puzzle game for all ages get it now for free on Google Play or buy the PC version at itch.io



Check the game's Facebook page

 8 
 on: 2015-09-03 21:43:47 
Started by Neoptolemus - Last post by theagentd
LibGDX has a really useful function where you can generate a quaternion from the rotation between two vectors. I find my self in need of such a function right now. Might be useful to add?

EDIT: http://stackoverflow.com/questions/1171849/finding-quaternion-representing-the-rotation-from-one-vector-to-another

 9 
 on: 2015-09-03 21:43:39 
Started by Coldstream24 - Last post by bilznatch
Make sure you do all of your rendering last so that your render matches what the game state is, otherwise you'll be 1 frame behind.
Beyond this, make sure you're checking that the object has ACTUALLY collided, not if it's GOING to collide, otherwise that'll be 1 more frame.

 10 
 on: 2015-09-03 21:26:55 
Started by Coldstream24 - Last post by Coldstream24
So, as per your suggestions, I've made some changes to the collision detection code. Largely it works much better, so thank you all for your help in that aspect - but I've got one more question. The action of an entity snapping to the respective edges of the entity that it's colliding with, it shows a visible snapping effect, as if the entity still goes too far before being pushed 'back'. Does anyone have any suggestions on how to prevent this? It's what I was trying to achieve with my old solution.

Updated code:
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  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
public void doCollisionsForEntity(BaseEntity b) {
        calcIndexSet(b.x, b.y, b.width, b.height);
        testedWith.clear();

        for (int x = iSet.eOX; x <= iSet.eEX; x++) {
            if (x < 0) {
                continue;
            }

            for (int y = iSet.eOY; y <= iSet.eEY; y++) {
                if (y < 0) {
                    continue;
                }

                //System.out.println("x: " + x + ", y: " + y);
                if (grid[x][y].inUse) {
                    for (BaseEntity bEnt : grid[x][y].entlist) {
                        if (bEnt != b && !testedWith.contains(bEnt)) {
                            if (bEnt.x + bEnt.width <= b.x || b.x + b.width + b._xvel<= bEnt.x) {
                                continue;
                            }

                            if (bEnt.y + bEnt.height <= b.y || b.y + b.height + b._yvel <= bEnt.y) {
                                continue;
                            }

                            testedWith.add(bEnt);

                            //System.out.println("Testing " + b.targetName + " with: " + bEnt.targetName);
                            int distanceR = (bEnt.x - (b.x + b.width));
                            int distanceL = (b.x - (bEnt.x + bEnt.width));
                            int distanceB = (bEnt.y - (b.y + b.height));
                            int distanceT = (b.y - (bEnt.y + bEnt.height));

                            //System.out.println(b.targetName + "&" + bEnt.targetName + " - l dist: " + distanceL + ", r dist: " + distanceR + ", t dist: " + distanceT + ", b dist: " + distanceB);

                            boolean collidingR = ((distanceR <= 0) && bEnt.x > b.x);
                            boolean collidingL = ((distanceL <= 0) && bEnt.x < b.x);
                            boolean collidingB = ((distanceB <= 0) && bEnt.y > b.y);
                            boolean collidingT = ((distanceT <= 0) && bEnt.y < b.y);

                            //System.out.println(b.targetName + "&" + bEnt.targetName + " - cl: " + _cL + ", cR: " + _cR + ", cB: " + _cB + ", cT: " + _cT);
                                                       
                            if (collidingR && b._xvel > 0) {
                                b.x = bEnt.x - b.width;
                                b._xvel = 0;
                            }
                                                       
                            if (collidingL && b._xvel < 0) {
                                b.x = bEnt.x + bEnt.width;
                                b._xvel = 0;
                            }
                           
                            if (collidingT && b._yvel < 0) {
                                b.y = bEnt.y + bEnt.height;
                                b._yvel = 0;
                            }
                           
                            if (collidingB && b._yvel > 0) {
                                b.y = bEnt.y - b.height;
                                b._yvel = 0;
                            }
                        }
                    }
                }
            }
        }
    }


This is the code in my EntityManager class that actually handles the updating of positions, and the order in which the chain of logic is executed is as follows:
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  
public void updateEntities() {
        if (entGrid == null) {
            return;
        }

        for (BaseEntity b : entityTree) {
            if (!b.dormant) {
                if (MapManager.onScreen(b.x, b.y, b.width, b.health) || b.neverIgnore) {
                    if (b.doesCollide) {
                        entGrid.doCollisionsForEntity(b);

                        //save TIME updating positions and grid indices!
                        if (b._xvel != 0 || b._yvel != 0) {
                            entGrid.removeEntity(b);
                           
                            b.x += b._xvel;
                            b.y += b._yvel;

                            entGrid.addEntity(b);
                        }
                    }
                }
            }
        }
    }

So my question is: is there a way to prevent the visible snapping effects that this code produces?

Thank you for your help.

Pages: [1] 2 3 ... 10
 
Coldstream24 (15 views)
2015-09-03 00:41:28

Andrew_3ds (24 views)
2015-09-01 19:08:10

afikri (16 views)
2015-08-31 09:30:22

afikri (24 views)
2015-08-31 09:30:07

afikri (12 views)
2015-08-31 09:27:24

afikri (16 views)
2015-08-31 09:26:40

Roquen (23 views)
2015-08-29 11:30:54

GamerC4 (34 views)
2015-08-22 20:38:50

GamerC4 (32 views)
2015-08-22 20:37:18

GamerC4 (37 views)
2015-08-22 20:37:01
HotSpot Options
by Roquen
2015-08-29 11:33:11

Rendering resources
by Roquen
2015-08-17 12:42:29

Rendering resources
by Roquen
2015-08-17 09:36:56

Rendering resources
by Roquen
2015-08-13 07:40:51

Networking Resources
by Roquen
2015-08-13 07:40:43

List of Learning Resources
by gouessej
2015-07-09 11:29:36

How Do I Expand My Game?
by bashfrog
2015-06-14 11:34:43

List of Learning Resources
by PocketCrafter7
2015-05-31 05:37:30
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!