Link to home
Start Free TrialLog in
Avatar of woodra
woodra

asked on

JPG?

just want to know how to display a jpeg( like a map of California) and maybe later, create objects to move around on it(by mouse events). OR... if anyone can think of something easier than openGL, that would be cool, too.
Avatar of kooheji
kooheji

I'm not sure what you're trying to make, but it seems that using Macromedia Flash would suffice to display a map and create objects on it. You can program your code using ActionScript. Maybe more details about your project would allow for better suggestions.
Avatar of woodra

ASKER

that sounds good, but the result has to be an executable
ASKER CERTIFIED SOLUTION
Avatar of fl0yd
fl0yd

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Then my second recommendation would be Macromedia Director. Better functionality than Flash, still easier than C++, and creates stand alone executables.
"does your other option allow me to read in a matrix from a text file, store it, and use the coordinates stored in the matrix to move multiple entities around the map?"

Macromedia Director does this, I remember doing something similar a couple of years ago but I completely forgot how. The downside is that it costs $1000. You can still download a free trial which works for a month and check it out.

For an alternative to OpenGL and programming in C++ have you looked into DirectDraw? There's a simple tutorial here http://www.gamedev.net/reference/articles/article608.asp and you can find many more on the web. Now there is a rather steep learning curve, and if you wanted to do the things mentioned above like mouse events you should have some experience in windows programming.

If you thinking you've learned OpenGL well enough, you could also "cheat" by creating a quad (just a Square) and putting a texture on it (your jpeg). Now position the camera so that all you see on screen is that quad! Now you load your file as you would always do in C++ and locate more textured quads (your objects) on top of your map. Downside is it won't work on systems that don't supposed OpenGL.

There are many ways to program anything. Many more than what I mentioned to. Just choose whatever you feel more comfortable with.
Avatar of woodra

ASKER

i checked out the specs on the director program and it said that you have to have shockwave to run the executables...  i'm still looking at that tutorial... what an awesome page
You have the option of creating a Shockwave Player (to reduce size because the user already has shockwave) or a built in player (Called the Standard Player) which bundles everything into your executable. I believe if you use advanced DLL's though you will need to bundle them with your player but nobody uses those.
or you could set up the map as a texture on a rectangle/square whatever you need in opengl and then just draw the othere objects you want.
If you are wanting to learn OpenGL texturing... Its very simple, and highly flexible, but involves C/C++ coding. Check out NeHe's tutorials to learn how to do this... (http://nehe.gamedev.net )

There it talks about BitMap textures (BMP files). If you want to load Compressed textures like GIF or JPEG, You can find libraries to load these on the net. I think Intel has a library for loading JPEG files.

But, all you want is just to create a simple presentation... I suggest using the Macromedia tools suggested by the other experts. Also, for great realistic 3D stuff, go with 3dsmax. But for your California map thingy, flash with action script should be enough.
 
I think you should be able to create standalone .EXEs in Flash too.

-- Vijay
Intel's jpeg library isn't free anymore. I still don't quite understand why you are twisting your brains so much when all you need is a ListView control as stated in my first post?

.f
Ok woodra, from my experience, i know that it is good to start small, as ur first question was stated,  
"just want to know how to display a jpeg( like a map of California) and maybe later, create objects to move around on it(by mouse events). OR... if anyone can think of something easier than openGL, that would be cool, too". First, if u would like to load JPEG's in open gl, there is a wonderful tutorial here:

http://www.gametutorials.com/Tutorials/opengl/OpenGL_Pg2.htm#TextureMapping

"Texture Mapping Part3 (JPEG)"

This tutorial is quite awsome as well as the others for other file formats. What you can do is get a feel for how it works then change it to your likings. What i do when i find a tutorial that i need, i convert it to a class, so i can use it in any other program. This tutorial should convert rather easily.
I hope this has helped you.

P.S. On your question of there being anyrhing easier, it all depends on what you want to do. If you plan on making a game or something of that complexity, OpenGL is the best route...I love DX myself, but right now, OGL is the easiest, yet well-balanced. If you wanted to do something else, like a simple image map or something, i'd stick with something like Macromedia, like the others have said, because you would need to develop your custom mose for opengl
You can try  DevIL, an cross-platform image library with
support for a great number of formats.

It supports openGL and the windows API...
woodra:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.