Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411279 Posts in 69323 Topics- by 58380 Members - Latest Member: bob1029

March 28, 2024, 04:35:37 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Most portable development toolset?
Pages: 1 [2] 3
Print
Author Topic: Most portable development toolset?  (Read 11711 times)
raigan
Level 5
*****


View Profile
« Reply #20 on: April 01, 2008, 06:20:01 AM »

If OpenGL had support for vector graphics then that would be a pretty ideal solution. Anyone know if there's an add-on for that anywhere?

What do you mean by vector graphics? If you mean displaying svg, you'll need a library, but OpenGL can do some pretty good vector-art-type graphics -- all you need is the ability to draw polygons and lines.

You might want to look into some libraries like http://www.amanith.org/blog/index.php or http://www.antigrain.com/
Logged
Gnarf
Guest
« Reply #21 on: April 01, 2008, 08:56:58 AM »

ShivaVG exists also. Haven't tried it or anything, but might be worth a damn.
Logged
Problem Machine
Level 8
***

It's Not a Disaster


View Profile WWW
« Reply #22 on: April 01, 2008, 10:24:02 AM »

I'm going to be checking out some openGL tutorials; I'm noticing a lack of subpixel accuracy in Allegro's vector drawn graphics, and this displeases me  :D

Seeing as I'm going to have to write code to interpret whatever vector graphics format I need, having native support for importing them isn't actually a big deal. In fact, I may yet get some use out of all of that time I spent learning AS3 by making a tool in it to import pre-made vector images and export them in whatever proprietary format I need for this project.
Logged

justinfic
Level 1
*



View Profile WWW
« Reply #23 on: April 01, 2008, 11:00:42 AM »

Just a question.  You mean using sdl to set up a window etc. and opengl for drawing?    I remember when I first used sdl I thought it was rendering using openGL but I think I was wrong about that.  SDL renders in software  not hardware right?

Yeah. I use SDL for setting up my window and OpenGL, handling events and joysticks, and the game clock. SDL_mixer handles all my sound, and SDL_image handles loading textures from file that I can use in OpenGL. Altogether, they take care of a lot of the lower-level stuff I really don't want to get dirty with. After that, OpenGL handles all my rendering- I don't use any of SDL's drawing routines at all.

And I'll vouch for OpenGL's 2D capabilities. Just like you mentioned, thousands of sprites all blending and rotating together makes for some sweet 2D / 2.5D. I still haven't used 3D models for anything-- don't need to. You can even have OpenGL give you an orthographic view for pure 2D, or keep the perspective view if you want to play with 2.5D.
Logged

Twitter | Current Project: Heavy drinking
mjau
Level 3
***



View Profile
« Reply #24 on: April 01, 2008, 11:34:31 AM »

Yeah, OpenGL gives you a lot of features essentially for free.  Also nice when you have to support broken LCD monitors/drivers that can't scale an image to native resolution without blurring it to oblivion while completely ignoring the aspect ratio Lips Sealed

OpenGL is also the only way you can get vsync with SDL.
Logged
Problem Machine
Level 8
***

It's Not a Disaster


View Profile WWW
« Reply #25 on: April 01, 2008, 12:54:57 PM »

Okay, the reason I keep on harping on the vector graphics thing is because I want to be able to modify the fills in real time based upon position. If my understanding is correct, doing 2d in openGL is basically a matter of disabling the perspective and just using the z axis for sorting out occlusion, then doing everything with basically textured planes: Is that correct?
So, in those terms, what I need to be able to do is draw to those planes with fairly powerful vector tools in real time, ideally with a toolset that would make direct conversion from common vector formats relatively easy. Although, I suppose if OpenGL can support THAT many bitmaps maybe I could do the same thing with multiple layered images... hmmm. Well that's an idea  Undecided
Logged

dustin
Level 6
*


View Profile
« Reply #26 on: April 01, 2008, 12:59:33 PM »

usually people use textured plains for sprites that is correct.  However because your game will be vector based it would probably just be flat filled triangles and so you would just need some way to convert your vector shapes into opengl style shapes...  You don't have to just use plains.
Logged
Alec
Level 10
*****



View Profile WWW
« Reply #27 on: April 02, 2008, 09:47:49 AM »

Textured Quads / 2 Triangles, yeah.

I can definitely vouch for C++/SDL/OpenGL!

I'd recommend not using SDL_Mixer if you can afford to avoid it, though. It has a couple of annoying issues, mainly laggy sound playback and non-seamless stream looping. (i.e. sounds you play will feel like they're playing late, and if you're trying to loop streamed seamless OGGs there will be a skip at the loop point)

FMODex is great, and free for non-commercial use. The shareware license is also pretty affordable. (around $100)

BASS Audio Library is another solid audio library, but it doesn't support as many platforms.
Logged

jcromartie
Level 0
***


View Profile
« Reply #28 on: April 03, 2008, 07:25:22 AM »

Okay, the reason I keep on harping on the vector graphics thing is because I want to be able to modify the fills in real time based upon position. If my understanding is correct, doing 2d in openGL is basically a matter of disabling the perspective and just using the z axis for sorting out occlusion, then doing everything with basically textured planes: Is that correct?
So, in those terms, what I need to be able to do is draw to those planes with fairly powerful vector tools in real time, ideally with a toolset that would make direct conversion from common vector formats relatively easy. Although, I suppose if OpenGL can support THAT many bitmaps maybe I could do the same thing with multiple layered images... hmmm. Well that's an idea  Undecided

Without knowing exactly what you are doing, I will recommend checking out Cairo.  It is a graphics library that handles many aspects of vector graphics, such as strokes, fills, line widths, line caps, etc..  It can be used to create textures for OpenGL to then render on the screen.  You would have to take care to not be copying too much texture data every frame, though, because it tends to be pretty expensive.

If I had a better idea of what you wanted to accomplish I might be able to give better advice.
Logged
Terry
TIGSource Editor
Level 10
******



View Profile WWW
« Reply #29 on: April 03, 2008, 08:13:00 AM »

FMODex is great, and free for non-commercial use. The shareware license is also pretty affordable. (around $100)

About that, did Aquaria qualify for the shareware license or did you have to go with the commercial licence? It's just that I had a look at the conditions and they seem very restrictive...
Logged

Problem Machine
Level 8
***

It's Not a Disaster


View Profile WWW
« Reply #30 on: April 03, 2008, 11:27:12 AM »

Okay, I think I can do what I was thinking of doing with vector stuff with a bunch of layered Raster components and color transforms. With that in mind, OpenGL is looking more and more appealing, though I've yet to get into the guts of it. Sorry if this is coming across as flaky and indecisive, I'm just trying to learn a lot of new stuff at once here.
Logged

iarwain
Level 0
***



View Profile WWW
« Reply #31 on: April 03, 2008, 12:53:28 PM »

I can definitely vouch for C++/SDL/OpenGL!

There's also a pretty good OpenGL-based, object oriented alternative to SDL called SFML.

It also includes sound (OpenAL-based if my memory’s good) and network support. It runs under Win, Linux & Mac. Not sure for potential future console versions. It has an API currently accessible from C, C++, Ruby and Python.

I thought I'd use this thread to introduce an open-source game engine I've been working on for a couple of years and whose main focuses are portability, extensibility and efficiency. However, as of today it doesn't support vector graphics nor 3D display (even if objects are in a 3D space), it'd probably be of no help for this request.
I'd still like to introduce it more in details mostly because lot of work has been put into it and it has some interesting and uncommon features. I'm not sure though in which forums I should post.

Sorry for this long digression. Smiley
Logged
Chris Whitman
Sepia Toned
Level 10
*****


A master of karate and friendship for everyone.


View Profile
« Reply #32 on: April 03, 2008, 03:10:13 PM »

Hmm... reading the site makes it sound pretty awesome. I'll have to take a look at that one.
Logged

Formerly "I Like Cake."
Problem Machine
Level 8
***

It's Not a Disaster


View Profile WWW
« Reply #33 on: April 04, 2008, 12:11:40 PM »

I've been reading through the SFML tutorials and so far I really like what I see. It seems like this could provide an interface nearly as painless as Flash's and FAR faster. No decisions yet, but as I said, I like what I see here.
Logged

iarwain
Level 0
***



View Profile WWW
« Reply #34 on: April 05, 2008, 12:06:27 AM »

I've been using SFML for almost a year now and it's a pretty good library. I've never tested its network part though.

It still lacks some useful features like being able to render on a texture and not on screen without hacking the library, but the author told me he would add it in a future version, and lot of other stuff is already appearing in the dev version.
Logged
raigan
Level 5
*****


View Profile
« Reply #35 on: April 05, 2008, 07:15:05 AM »

It still lacks some useful features like being able to render on a texture and not on screen without hacking the library

Can't you just ask OpenGL to do this directly? Or am I missing something?
Logged
iarwain
Level 0
***



View Profile WWW
« Reply #36 on: April 05, 2008, 12:51:36 PM »

Yes, but for this you have to hack SFML. The modification is only one line of code but then people can't use your code with the original SFML library. You can't do it outside of SFML because the library won't let you access its internal data directly.
« Last Edit: April 05, 2008, 12:55:23 PM by iarwain » Logged
raigan
Level 5
*****


View Profile
« Reply #37 on: April 06, 2008, 04:09:47 PM »

Yes, but for this you have to hack SFML. The modification is only one line of code but then people can't use your code with the original SFML library. You can't do it outside of SFML because the library won't let you access its internal data directly.

Crap -- I was looking forward to using SFML rather than SDL, since it seemed a lot nicer/cleaner/modern, but.. all I want is for it to make an openGL context for me -- other than that, I want to be able to just use openGL calls. It actually prevents you from directly making ogl calls without some hackery? Stupid!!!
Logged
Gnarf
Guest
« Reply #38 on: April 06, 2008, 04:25:03 PM »

Chances are I'm wrong, but the way I understood it you can make OpenGL calls as much as you'd like, but you messing with the OpenGL state won't have any effect on stuff you're doing with SFML. So if you're just using it to set up an OpenGL context, that's fine, but you can't throw some OpenGL call in there to make subsequent SFML sprite-rendering stuff draw to a texture.
Logged
iarwain
Level 0
***



View Profile WWW
« Reply #39 on: April 06, 2008, 04:48:39 PM »

Gnarf is right. You can use OpenGL along SFML. You're even encouraged to do so. Here's a short tutorial the author wrote on his page.
It's just that SFML automatically renders on the "screen" surface: it doesn't let you do it on any arbitrary one and it doesn't provide any accessors to its internal MyGLTexture of its Image object. I haven't checked the WIP SVN version, but it was still like this in the 1.2 one.
Logged
Pages: 1 [2] 3
Print
Jump to:  

Theme orange-lt created by panic