Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (482)
Games in Android Showcase (110)
games submitted by our members
Games in WIP (550)
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: BitmapFont in libGDX problem on: 2012-10-14 22:46:00
I got the font coloring to work. It was a really dumb error made by me that I didn't see until now. I placed the new font files in the wrong folder so I kept using the same ones..  Emo
2  Game Development / Newbie & Debugging Questions / Re: BitmapFont in libGDX problem on: 2012-10-14 21:52:41
This is really off-topic but jhallenberg you were using Slick2D a week or two ago, what made you switch over to LibGDX? The reason I'm asking is because I'm working on a Slick2D game but I've learned that LibGDX is a superior engine. I'm not sure if I should finish my game in Slick2D or switch over to LibGDX first, what did you experience with the two engines? Thanks in advance in you have time to reply.
I switched due to libGDX having built in box2d mainly, I didn't get very far into using slick2d either so it wasn't a big deal.
3  Game Development / Newbie & Debugging Questions / Re: BitmapFont in libGDX problem on: 2012-10-14 19:38:36
I've tried fonts created with "Hiero" and "BMFont", both look/behave the same.
4  Game Development / Newbie & Debugging Questions / Re: BitmapFont in libGDX problem on: 2012-10-14 13:48:58
Tried changing the batch color to something else, no change.
Tried changing batch color to white and font color to something else and no change.
5  Game Development / Newbie & Debugging Questions / Re: BitmapFont in libGDX problem on: 2012-10-14 13:25:13
That doesn't seem to work. The characters in the font.png are all white, but they always display as black ingame.
6  Game Development / Newbie & Debugging Questions / Re: BitmapFont in libGDX problem on: 2012-10-14 02:55:56
Thanks, davedes.
Another question I have:
Is it possible to change the text/font color without changing the file itself?
7  Game Development / Newbie & Debugging Questions / Re: BitmapFont in libGDX problem on: 2012-10-13 23:58:22
I open the font in the image viewer and the background is transparent.
Here's the loading/declaration
1  
BitmapFont font = new BitmapFont(Gdx.files.internal("data/font.fnt"), false);

And the rendering code
1  
2  
3  
4  
5  
6  
batch.begin();
     
font.draw(batch, "blabla", 10, 10);
stage.draw();
     
batch.end();
8  Game Development / Newbie & Debugging Questions / BitmapFont in libGDX problem on: 2012-10-13 23:12:08
When I try to draw a string in libGDX using a BitmapFont I only get filled boxes instead of characters, with the specified font color.
I haven't found any information googling so I'm asking here.
9  Game Development / Newbie & Debugging Questions / A quick question about Slick2D "Scale" on: 2012-10-04 20:31:33
Hello, that Graphics class used in Slick2D has a setScale function and what I'm wondering is if using that to scale things is better than just defining a rectangle to draw within yourself?
10  Game Development / Newbie & Debugging Questions / Re: Need help with 2d camera on: 2012-10-02 03:41:38
I'm going to have to try that.
I have another question on a similar/related topic to this.
Is the scaling of the whole graphics context increasing performance or would it be faster to "scale" it yourself by adding a draw width/height variable to the render functions?
If it makes no difference I'll just make a modified TiledMap/Layer/TileSet class for my needs.
11  Game Development / Newbie & Debugging Questions / Re: Need help with 2d camera on: 2012-10-01 21:41:49
The method I have in my code would work if the map was drawn with the original size.
In Slick2D however, to "zoom" a TiledMap you have to set the scale of the entire graphics object, it's not possible to just supply the desired width/height to be drawn in.
In turn this scaling puts the clamp calculation wrong, even if you do for example "clampvalue * scale".
12  Game Development / Newbie & Debugging Questions / Need help with 2d camera on: 2012-09-30 10:49:13
Hello, I'm trying to make the camera clamp so it doesn't go outside the tiled map, although the scaling of the map rendering is interfering and I'm not sure what else to try.

Render code
1  
2  
3  
4  
    public void render(GameContainer gc, Graphics grphcs) throws SlickException {
        grphcs.scale(scale, scale);
        map.render((int) -camera.x, (int) -camera.y, 0);
    }

Portion of the update code to clamp the camera
1  
2  
3  
4  
5  
        float w = ((map.getTileWidth()) * map.getWidth());
       
        if (camera.x > w) {
            camera.set(w, camera.y);
        }


I'm using Slick2D if that has any relevance. Thanks for reading.
13  Game Development / Newbie & Debugging Questions / Re: What "technique" is Notch using? on: 2012-09-27 09:25:30
Yeah that makes sense, I guess it's nothing to go for if you're not going to be using a lot of the same textures.
14  Game Development / Newbie & Debugging Questions / Re: What "technique" is Notch using? on: 2012-09-27 09:20:42
I think that sounds pretty interesting. Is it performance efficient or just to skip colouring the textures?
15  Game Development / Newbie & Debugging Questions / Re: What "technique" is Notch using? on: 2012-09-27 09:15:35
Okay. The game he was developing when I was watching was "MiniCraft" I believe.
16  Game Development / Newbie & Debugging Questions / What "technique" is Notch using? on: 2012-09-27 09:08:07
When I was watching Notch develop a game for a competition, I noticed that his textures/sprites are all gray on file, but in-game they are coloured? I've been trying to figure out what that technique is called. Could someone tell me if they know?

Thanks.
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.

CopyableCougar4 (14 views)
2014-08-22 19:31:30

atombrot (28 views)
2014-08-19 09:29:53

Tekkerue (25 views)
2014-08-16 06:45:27

Tekkerue (23 views)
2014-08-16 06:22:17

Tekkerue (15 views)
2014-08-16 06:20:21

Tekkerue (22 views)
2014-08-16 06:12:11

Rayexar (61 views)
2014-08-11 02:49:23

BurntPizza (39 views)
2014-08-09 21:09:32

BurntPizza (31 views)
2014-08-08 02:01:56

Norakomi (37 views)
2014-08-06 19:49:38
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

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!