Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (754)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (842)
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  Java Game APIs & Engines / OpenGL Development / Re: Access violation problem in v0.98 (fmod) on: 2005-08-29 09:47:35

Thanks to your help, I got a bit further. Download of a separate fmod.dll is not explicit in JME starter guide. That's why I missed that point.

Thanks again
2  Java Game APIs & Engines / OpenGL Development / Access violation problem in v0.98 (fmod) on: 2005-08-26 16:00:14

While experimenting jME on my office PC, I encountered this problem running HelloIntersection tutorial.
It's related to lwjgl.

org.lwjgl.fmod3.FMODException: Unable to load fmod library
   at org.lwjgl.fmod3.FMOD.create(
   at com.jmex.sound.fmod.SoundSystem.<clinit>(Unknown Source)
   at jmetest.TutorialGuide.HelloIntersection.setupSound(Unknown Source)
   at jmetest.TutorialGuide.HelloIntersection.simpleInitGame(Unknown Source)
   at Source)
   at Source)
   at jmetest.TutorialGuide.HelloIntersection.main(Unknown Source)
# An unexpected error has been detected by HotSpot Virtual Machine:
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x17fe353a, pid=992, tid=288
# Java VM: Java HotSpot(TM) Client VM (1.5.0_04-b05 mixed mode, sharing)
# Problematic frame:
# C  [lwjgl-fmod3.dll+0x353a]
# An error report file with more information is saved as hs_err_pid992.log
# If you would like to submit a bug report, please visit:

OS: Windows 2000 Build 2195 Service Pack 4

I'm running version 0.98 of lwjgl.
I checked the version of my audio drivers just in case and they seem up to date.
Any clue ?

Let me know if you want me to post the entire log file or anything.

3  Java Game APIs & Engines / Xith3D Forums / Re: Animated models : format and tools on: 2005-08-19 15:17:31
Ok I will give a try to MD2.

I'm also going to try milkshape3D. It seems many here use it. Blender is a bit oversized for what I need and is more high-polygon oriented. Moreover its non-windows style interface is not userfriendly to me.

4  Java Game APIs & Engines / Xith3D Forums / Animated models : format and tools on: 2005-08-17 11:37:20
(I moved this topic from the java3d forum since xith is concerned)


I'm currently thinking of how to realize the models for my hobby game : a turn based strategy game.
Whereas I have not experimented it yet, I guess that xith could save me a lot of work so I need a format for my models that xith understands.

The models should be animated in these ways :

1- permanent physical animation : radar spining on top of the building or vehicle, hovercrafts hovering with a slight floating movement...
2- lights animation : generator glowing, plane lights flickering...
3- eventual animation 'inside' the model : tank turret spining to aim at target...
4- unit movements
5- shots and explosions

I think 1- and 3- can be done with 'bone' animations, 2- with texture animation, 4- xith handles it and 5 - I don't have a clue but not that important for now.

I've played a bit with blender and gamespace for modeling. Is their animation module helpfull doing all this ?
What kind of tool(s) would you use ? And what kind of format can save the model + anim info while being understandable by xith ?

thanks for your help
5  Game Development / Newbie & Debugging Questions / Re: script interpreter/compiler (custom language) on: 2004-12-17 09:28:29
ok merci Wink
6  Game Development / Newbie & Debugging Questions / Re: script interpreter/compiler (custom language) on: 2004-12-16 07:47:17
I think we will be able to help you more if you will exactly describe the roles in your game. Who is writing scripts, who is running them, who can be 'bad' and who is trusted, etc.


Please describe your use cases in detail.

Ok here we go :

- end user will be able to use this language to make his own ai scripts
- this game is a turn based strategy game (standalone application) that will be playable offline but also through internet, the way warcraft can be played for instance.
- the scripts should not be too complicated since they will be used by many units (maybee 100 per player) and it's not a RPG so basic functions are : find enemy, attack one of them depending on some parameters, repair when too much damaged and so on...
- scripts should be editable in-game for ease of use/test. So no external tools should be used.
- ai is hierarchical

7  Game Development / Newbie & Debugging Questions / Re: script interpreter/compiler (custom language) on: 2004-12-16 07:00:42

Hm, make them add a ';' at the end of each line and you compile it with a javac ?

Using javac would also allow users to use the entire java language which implies that the ai scripts would not be lightweight anymore.
Since the kind of game I'm working on is a turn based strategy game and that each unit could have a customised ai script, you probably guess what would happen...
So I must keep users inside boundaries of lightweight.
8  Game Development / Newbie & Debugging Questions / Re: script interpreter/compiler (custom language)I on: 2004-12-16 06:53:49
If you're really interested, I have a complete course about writing a compiler:

1. lexical check (spelling mistakes)
2. syntax check
3. type and name check for var's and functions
4. produce the code

This is exactly what you need to do if you want to write your own small language and interpet it afterwards. Instead of producing code as does a compiler, you need to run the specific commands in your program.

Yes that's what i figured out. I've got some background with that kind of stuff although I have not practiced since university.


ATTENTION: this is a course given in 3rd year university so if you don't want to really dig into this, then just forget what I've written.

If you're interested, the slides (they are in french but java code is pretty self-explanatory) document everything from start to end.

I also have a nearly-complete program running that takes a source code and generates a tree-structure. It has several visitor techniques to run through the tree and check for sth. You just need to write a new visitor and call the stuff you need to call.

Gimme a quick msg if you're interested.

Ok. I'll see if I need them. Thanks. And by the I'm french so it's ok.
9  Game Development / Newbie & Debugging Questions / Re: script interpreter/compiler (custom language) on: 2004-12-14 13:39:01
It's not that I don't trust scripters or whatever. I just do not want them to play too much with memory or cpu because that's not the purpose.
What I want is create a scripting language a bit like baldur's gate's.

This is exactly the kind of stuff I want them to write : (this is a draft of course)

** beginning of the ai script **
if (damageLevelOf(myself) > 80)
    moveTo(nearestBuilding(ally, repairSation))

Unit lastAttacker=lastAttackerOf(myself)
if (lastAttacker)

[ and so on... ]
** end of the ai script **
10  Game Development / Newbie & Debugging Questions / Re: script interpreter/compiler (custom language) on: 2004-12-13 13:00:20
er no... That's not what I meant either.

What I'm looking for is a tool that helps me creating my own programming language and the interpreter or compiler that goes with. Like lex or yacc.
But I found an interresting pointer
Someone knows it ?
11  Game Development / Newbie & Debugging Questions / Re: script interpreter/compiler (custom language) on: 2004-12-13 12:50:48
ok but I want to prevent user from using java and only allow the use of my custom language exclusively.

I already had a look at beanshell and janino but AFAIK they are compiling java, which I do not want to do.
12  Game Development / Newbie & Debugging Questions / script interpreter/compiler (custom language) on: 2004-12-13 12:12:01

I'm trying to do a custom language for AI scripting. This language will have a set of basic functions for detection and actions which are the exclusive entry points of my java AI engine, a simple expression evaluator for basic arithmetic/boolean operations and some control statements such as foreach and if/then/else.

I'm not trying to do java scripting at all but really a custom language.

So do you think there is already an existing free licence API that could help me doing this ?

13  Game Development / Newbie & Debugging Questions / Re: tint a texture with openGL on: 2003-12-10 13:24:25
Sadly this extension is not included in GL bindings for SWT. Can someone explain me what is the theory bind additive coloring of textures so that I can make it 'by hand' ?
Could it just be averaging texture RGBs to get a grey value of the texel and then average again with wanted color ?

14  Game Development / Newbie & Debugging Questions / OpenGL : curved lines on: 2003-12-10 13:06:27

Still with my OpenGL experimentation for my tile based 2D game, I now want to draw curved lines.

I want to border a zone of any shape made of entire tiles with a line following the tiles' edges. It's not difficult do do it with GL_LINE_LOOP but I would like it to look better by "rounding" corners. Tiles are square so line angles are always 90 degrees.

How would you do it ? GL Evaluators ?

15  Game Development / Newbie & Debugging Questions / Re: tint a texture with openGL on: 2003-11-23 12:45:28
Thanks for your replies.

So I've tried glColor3f and it sort of do the trick.  But now I know that it isn't really the effect that I was looking for as green textures obviously go brown when applying a red filter whereas I wanted to have it in levels of red. So I guess the only thing to do is making a grey level texture from each texture and use it when original texture should be "tinted".

So now my problem is : how do you make grey levels in a simple manner ? Is there some sort of GL functions to do this or will I have to average all the RGBs at loading time ?

And by the way Orangy Tang and Princec could you please explain in a few words what glColorMaterial and glTexEnvi are supposed to do ? I'm not sure to understand.

Thanks again for your help.
16  Game Development / Newbie & Debugging Questions / tint a texture with openGL on: 2003-11-21 13:23:14

Now that I have managed to make a basic openGL rendering for my 2D tile based strategy game, I'm trying to impove it.

What I would like to do now is tint terrain in red when it's in unit's fire radius. The terrain is oubviously rendered with textures mapped on squares. So I would like to tint these textures with a transparent red color so that it looks like it is seen through a red glass. 'hope this is clear  :-/

So how could I achieve this in an efficient way ? Playing with lights ? Create an already tinted texture beforehand ? Or another mean ?

Just one thing : I do not want to draw a transparent red circle since the fire *radius* does not mean a circle in my case. I really need a tile based processing.

Thanks for your help.  Smiley
17  Game Development / Game Play & Game Design / Re: zoomable tile based map on: 2003-11-10 13:37:43

[...]I stumbled on a bug again, in the openGL plugin this time : it does not handle RGBA transparency as it should. It's a bug in the image conversion method of the GL GC class.

Ok. I managed to fix the bug today : I just don't use the picture conversion routine from the GL wrapper plugin and made my own instead. Anyway that routine was 100% java/SWT so I'm not loosing in efficiency. Here is some tips to know about it :
* texture dims must be a power of 2 (2,4,8,16,32,64,128...),
* SWT ImageData (and probably all plateform independant API as said in GL doc) have BGR format by default (GL_BGR_EXT or GL_BGRA_EXT types for openGL)
* 8bits gif pics with transparency must be converted to RGBA format using palette and ImageData.transparentPixel property. Be carefull (pixel values / byte array) size can be bigger than the number of pixels of the image (a multiple of 100 probably).

Let me know if you need example source code.

So now I have a good looking and quick GUI with a powerfull way of drawing. Cool ! Grin
18  Game Development / Game Play & Game Design / Re: zoomable tile based map on: 2003-11-05 12:59:04
It's interesting that you considered using SWT for a game. I'm doing the same for a very simple strategy game right now but I'm not sure whether I could live without antialiased graphics (doing all graphics in Java2D and blitting the result into an SWT canvas would work but nullifies one advantage of SWT - no dependency on AWT)

Graphics quality is obviously of importance to me. That's why I experimented J2DA then chose to use OpenGL directly since J2DA does not allow zooming easily (yet?). As I still was interrested in SWT for the native widgets it offers I used the OpenGL wrapper plugin for SWT and I had some good nice looking results with zooming. It was not as hard as I had thought to learn the parts of OpenGL I needed for this with the help of the links given by Orangy Tang. But I stumbled on a bug again, in the openGL plugin this time : it does not handle RGBA transparency as it should. It's a bug in the image conversion method of the GL GC class. It was 2 weeks ago and I did not have time to work on it again. Maybe if someone here wants to help with it, we could at last have an efficient way of mixing OpenGL with a quick good looking windowed GUI. I looked for another solution of making good graphics with nice looking and quick widgets (at least these : multicolumns list, checkbox, combo, radiobuttons and slider) but I could not find any.
For the GL bug fix I'm almost sure we won't have support from the eclipse team since this plugin is experimental. Although I haven't tried yet.


You're right about the mouse wheel issue - I recommend to file a bug if you need this feature. Generally, the Eclipse team is very helpful. At least on Windows, it shouldn't be a problem to receive and fire mouse wheel events. You'd have to overwrite WM_MOUSEWHEEL() in a subclass of Canvas in the same package because of visibility restrictions - that is you'd have to kind-of-modify SWT Sad

I voted for the bug fix already. Maybe it will be fixed in next version with a little bit of luck. But there wasn't many votes so it's doubtfull. I will have to do it myself the way you say eventually. But I can live without for now.


Regarding scaling images: At least on Windows, SWT uses StretchBlt with COLORONCOLOR mode.  You might get better results with the HALFTONE mode - I never tried this and this would again require hacking SWT (but it's open source, you can do this!).

As I now use OpenGL, I'm not using SWT scaling anymore. But thanks for the tip.  Wink
19  Game Development / Game Play & Game Design / Re: zoomable tile based map on: 2003-10-16 10:14:23
It's me again  Grin

Just to let you know (if it can be of use) that I've been experimenting with Piccolo zooming API and that it doesn't filter anything with SWT support. In fact Piccolo is a kind of high level wrapper that relies on sub level APIs' scaling functions to do it's job. And as SWT doesn't filter, Piccolo won't either.

So I'm wondering if SWT is a good choice. I wanted to work with SWT as it's quicker than Swing and nicer than AWT. And I don't want to spend time on building my own GUI yet. The remaining solutions if I want to keep working with SWT and have a nice result is using a GL wrapper or a Java2D bridge. Another problem with SWT is that it doesn't support customizing mouse wheel events ! (Can you believe it ?  Roll Eyes ).

For now I'm considering experimenting J2DA as it seems
to integrate basic controls that I need.
@Dan : If I succed, I'll post the code.

20  Game Development / Game Play & Game Design / Re: zoomable tile based map on: 2003-10-10 16:58:03
thanks a lot
21  Game Development / Game Play & Game Design / Re: zoomable tile based map on: 2003-10-10 10:09:48
Argh ! too much APIs to choose from  Wink
But I will have to, since it seems to be the only way to reach the quality level I want.

So I looked at all this :

* J2DA : It doesn't seem to work with SWT so I would have to abandon it for AWT/Swing which I do not want to do.
* openGL : I can use the official OpenGL plugin for Eclipse/SWT and maybe JOGL but I am not sure that JOGL SWT interface is finished since I did not find clear info about this (However rob grzywinski said it would be finished by the end of june, so maybe...) But I will have to learn using OpenGL which could take much time since I haven't got a clue. Could someone just give me some hints about how to do want I want to ? I mean : what kind of functionnality should I look first in the docs and tutorials ?
* piccolo : it seems to do what I need but I'm still reading the doc. And I have to experiment for perf.
22  Game Development / Game Play & Game Design / Re: zoomable tile based map on: 2003-10-09 13:31:19
Concerning OpenGL, I'm only planning to do a 2D game so I did not want to use it. I may do it later but I think for now it would be to much for me to learn. And integration with SWT could cause trouble.

Concerning quality, it seems SWT does not offer filters (yet ?). Do you think that since SWT relies on hardware for scaling, some kind of filtering is done by default ?
If not, would it be possible to do it after the scaling is done ? I think that bilinear filtering is simply a way of calculating scaled pixels from the value of  the group of original pixels that make it, isn't it ?

23  Game Development / Game Play & Game Design / Re: zoomable tile based map on: 2003-10-09 13:07:12
@Erik :

Well with what I'm doing, hardware will already handle scaling since I'm using SWT. SWT's GC image copy method call an OS function which does scaling if necessary.

So I will do it simple and have a look at the result. Then think about it again if it doesn't look good.

Tanks for your help.

@Herkules : i'll have a look at it. Thanks also.
24  Game Development / Game Play & Game Design / zoomable tile based map on: 2003-10-09 11:25:05

I couldn't find info on this topic so if someone here has experience about this, it would be great.

I'm trying to do a scrollable, *ZOOMABLE* top-down tile based game. Zooming should be smooth and done with a slider, as it was done in Interplay's MAX for instance. - If you don't know this late 90's game, so you missed something Smiley -

My concern is obviously with perf problems. I can think of two ways of doing it.

I assume tiles are 40 pixels in side.

1° I will have to draw and maintain a 1:1 scaled image  and then scale and copy the part that is visible to the canvas. What it takes :
* memory for the 1:1 picture (let's say at max zoom out it would allow displaying 160x160 5 pix tiles map on a 800x800 canvas which makes an offsceen 1:1 pic of 6400x6400 32bits = about 16.4 MB)
* memory for the unitary ground textures and units (1:1 scale)
* a scale operation of the 1:1 pic each time the visible part of the map changes (unit movement, scrolling, zooming in/out) and a copy of the complete result to the canvas.
possible optimization : only scale and copy the part that has changed (for scrolling and unit movements only; not possible when scale factor changes - but i fear artifacts at the borders of the updated zone).

2° Maintain an offscreen buffer sized as the canvas and paint already scaled ground textures and units on it.
What it takes :
* memory for offscreen buffer (less than for the 1:1 pic however)
* memory for the unitary ground textures and units (1:1 scale)
* memory for the scaled textures and units
* a scale operation on the textures and units when zooming in/out and a complete redraw of the offscreen buf (only required for the visible ones).
* a 1:1 copy to the canvas of the part of offscreen buf that has changed.

I'd like a rather smooth graphical result when scaling. And I have the intuition that picture would be better with a global scaling as in 1° than with a assembly of "unitary" scalings as in 2°.

I can't rely on pre-scaled pics as scale level should also be smooth. I could probably have 2 or 3 textures scaled for each unit as an optimization but not more.

So do you have any advice on this or maybe a third option ?

thanks for your help

25  Java Game APIs & Engines / Java 2D / Re: SWT canvas performance problem on: 2003-10-09 10:15:02
Since nobody bothered answering - I wonder if my question was dumb or to clever Smiley -, I do it myself with information gathered on SWT website (mailing lists archive and newsgroup).

Setting the SWT.NO_BACKGROUND of the Canvas is the trick. Using Canvas' scroll method is also better since it should be OS optimized and it automatically sets GC clipping.

Hope this will help someone.
26  Java Game APIs & Engines / Java 2D / SWT canvas performance problem on: 2003-10-07 07:24:55
Hi !

I'm trying to draw on a SWT canvas and I am experiencing performance issue.

What I am trying to do exactly is painting a simple jpeg image (larger than the Canvas) and drag it with the right mouse button (i.e. make it scroll the way the mouse moves when right button is pressed).

When picture moves, it flickers. Image rendering is not heavy however since it's just the copy of the image part which is supposed to be viewable.
I wonder if some buffer strategy could help here since it would just do what I'm already doing : simply copy an image part.

Any clue ?

Thanks for your help

PS : Here is some code

Mouse move processing : ("pressed" is a boolean tracking right mouse button state)
            public void mouseMove(MouseEvent e)
                  if (pressed)
                        if (x<0) x=0;
                        else if (x>backgroundPic.getBounds().width) x=backgroundPic.getBounds().width;                  
                        if (y<0) y=0;
                        else if (y>backgroundPic.getBounds().height) y=backgroundPic.getBounds().height;


Paint listener :
            canvas.addPaintListener(new PaintListener(){
                  public void paintControl(PaintEvent e) {
                        GC gc=e.gc;
                        Canvas canvas=(Canvas)e.getSource();
                        int drawWidth=Math.min(canvas.getSize().x, backgroundPic.getBounds().width-x);
                        int drawHeight=Math.min(canvas.getSize().y, backgroundPic.getBounds().height-y);
                        gc.drawImage(backgroundPic, x, y, drawWidth, drawHeight, 0, 0, Math.min(canvas.getSize().x, drawWidth), Math.min(canvas.getSize().y, drawHeight));                        
Pages: [1]
DesertCoockie (20 views)
2018-05-13 18:23:11

nelsongames (68 views)
2018-04-24 18:15:36

nelsongames (65 views)
2018-04-24 18:14:32

ivj94 (749 views)
2018-03-24 14:47:39

ivj94 (79 views)
2018-03-24 14:46:31

ivj94 (595 views)
2018-03-24 14:43:53

Solater (95 views)
2018-03-17 05:04:08

nelsongames (168 views)
2018-03-05 17:56:34

Gornova (378 views)
2018-03-02 22:15:33

buddyBro (1038 views)
2018-02-28 16:59:18
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 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‑
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!