Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (539)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (603)
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]
1  Game Development / Newbie & Debugging Questions / Re: Drawing Tiles & Player speed on: 2014-02-17 20:11:07
First of all, you don't know how to render stuff and you're making online game? Just don't do that..

To move the map, render everything at certain offset, which could be something like -player.x, - player.y;

Hehe yes, but I did, the player can walk a tile in the server and client, but without the movement effect, I need to know how to calculate the offset in each frame, any way, thanks for reply..
2  Game Development / Newbie & Debugging Questions / Drawing Tiles & Player speed on: 2014-02-17 19:14:01
Hi people,

I have two questions:

1- I'm trying to develop a game like Tibia, and I need some example how to implement the movement effect that we have in Tibia, where the player is always in the center of the map and the map moves, may some one help me? Some details: each player has a speed, and the game is online, the server confirms the movement and send the next parts of the map...

2- What is the best way to draw the images of the map? I don't have an sprite sheet, but each image (32x32) is loaded separately... Currently I'm drawing like this:
1  
graphics.drawImage(obj.getGfx()[frame], this.x, this.y, 0, 0, 32, 32, 32 * scale, 32 * scale);


(I'm using Slick2D) Is it the best way?

Thanks!
3  Game Development / Performance Tuning / Re: Loading a large map in server on: 2013-11-28 19:03:52
May someone help me?  Huh
4  Game Development / Performance Tuning / Re: Loading a large map in server on: 2013-11-27 18:47:19
When you have an MMO, why do you send the complete Map to each client?

Only send each client the dynamic objects (changed delta data) in the clients relevant "area".

Static Leveldata, like hills, trees etc (everything that cant change) should be locally in the clients resources at the start.

If you need to change the map, offer pathces or an downloader to the clients.
These changes can remain on a standard file-webserver.

---

if you meant, that you server-side map, (needed for the gamelogic) is too big,
then you made a structural error on how much data your serverside map actually needs.
It (the mapdata representing the world) only needs relevant data for collision detection, events and dynamic objects. This should be quite compact in
the size of this should be only few megabytes when you handle your data efficiently.

Damocles, I'm sending to client only the relevant part of the map, only what the player can see. The problem maybe is the structure of my object on the server-side. Follow the structure of them:

1  
2  
3  
4  
public class Mapa extends AbstractMap { //AbstractMap there are only methods

         protected HashMap<Position, Tile> tiles = new HashMap<Position, Tile>();
}


1  
2  
3  
4  
5  
6  
7  
8  
public class Tile {

   private final Position position;
   private Item ground;
   private final Mapa mapa; //there is only one instance of Mapa on server
   private List<Item> itens = new LinkedList<Item>();
   private List<Creature> creatures = new LinkedList<Creature>(); //I'm not loading creatures in the map load...
}


1  
2  
3  
4  
5  
6  
public class Position {
       
    private int x;
    private int y;
    private int z;
}


1  
2  
3  
4  
public class Item {

    private ItemType itemType;
}


1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
public class ItemType {

    protected Group group; //it's an Enum
    protected EnumSet<ItemAttribute> attributes;
    protected int serverId;
    protected int clientId;
    protected String article;
    protected String name;
    protected String pluralName;

}
5  Game Development / Performance Tuning / Re: Loading a large map in server on: 2013-11-27 10:54:50
Yes Danny02, I setted -Xmx3048m -XX:MaxPermSize=2048m and it consumes all the memory. The map has thereabout 13437971 tiles, with at least one item (the ground), it's a lot of objects Lips Sealed kkk
6  Game Development / Performance Tuning / Re: Loading a large map in server on: 2013-11-26 18:56:21
The map I'm trying to load is the global Tibia map, so it is very big! Maybe the problem is the structure of my objects.  Clueless Is there any best practices to struct this kind of objects?
7  Game Development / Performance Tuning / Loading a large map in server on: 2013-11-26 15:55:33
Hi people,

I've been trying to develop a 2D MMORPG (like tibia Tongue) using Java. The server of my game loads all the map and store all the objects (tiles, itens, player, monster) in memory. But when I try to load a map very big, it consume all the memory of my computer Sad, the question is: what is the best way to load a big map and handle with the objects?

Thanks.

p.s: sorry my english
Pages: [1]
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

rwatson462 (30 views)
2014-12-15 09:26:44

Mr.CodeIt (23 views)
2014-12-14 19:50:38

BurntPizza (49 views)
2014-12-09 22:41:13

BurntPizza (83 views)
2014-12-08 04:46:31

JscottyBieshaar (44 views)
2014-12-05 12:39:02

SHC (58 views)
2014-12-03 16:27:13

CopyableCougar4 (56 views)
2014-11-29 21:32:03

toopeicgaming1999 (122 views)
2014-11-26 15:22:04

toopeicgaming1999 (112 views)
2014-11-26 15:20:36

toopeicgaming1999 (32 views)
2014-11-26 15:20:08
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

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
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!