Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Gosu Showcase / Really simple 3D modeler
- - By bestguigui Date 2012-09-25 11:52
Hi all !

I created yesterday a simple and useful tool to create simple 3D objects. The idea is to use 2D sprites and to place them (move, rotate) in a 3D environnement to create a 3D object.  The render will always be simple, which is the idea, and that way I don't have to use a commercial and / or complicated software to get such a simple result :

http://www.youtube.com/watch?v=aEP9vzGE3DE&list=UU1gGK-jOC2k3RqN1QNhrXEA&index=1&feature=plcp

It's still WIP, but already functionnal. I'm working on a map editor too, which will be able to load the text files generated by this tool.
Parent - - By Spooner Date 2012-09-25 18:05
Suspect this works a little like those software rendering games like Rubynstein or Prelude of the Chambered (the latter was ported to JRuby).

Why use distorted sprites though (presume you mean you are using Gosu::Image#draw_as_quad, but maybe you mean just using textured quads to draw with rather than skinning models?), rather than raw OpenGL? Wouldn't that make it unnecessarily slow in Ruby?

Good to hear you are still breaking the boundaries of what is possible in Ruby! You might be interested in taking a look at my Ashton gem and also that Hanmac is creating bindings for Ogre3D.
Parent - - By bestguigui Date 2012-09-25 18:37
Hi Spooner ! It's full 3D actually, using Ruby-OpenGL. I don't even know how to create a Wolfenstein engine. ;) I guess you thought that because of my "2D sprites" talking... I never know how to describe them, since they are actually 3D planes.

I'll check your Ashton gem, don't know at all what it is about ;) And about a port to Ogre, why not : I love to create all from scratch, but I have to admit that lot's of features are really hard to recreate.
Parent - - By Spooner Date 2012-09-25 18:47
Just amuse yourself by running the examples then ;) Probably not much use for you, since you eschew Gosu for doing everything in opengl and all it is is lots of wrapped openGL (shaders/framebuffers/etc), but maybe it could be useful for you in some way to save a bit of time rolling your own all the time :D
Parent - - By bestguigui Date 2012-09-25 19:44
I just love the shockwave effect ! I should really give shaders a try, the possibilities are interesting :)
Parent - By Spooner Date 2012-09-25 21:56
I have only provided a few example shader effects in Ashton, but the possibilities are literally endless. Since they are run on the graphics card and run massively in parallel, they really do open up a lot of doors for things we were struggling to do beforehand. Admittedly, they use yet-another-language, but it is pretty close to C and since you only have to write a little code to get a big effect, I don't mind too much (compared to writing a complete game in C++).

The big problem, I've found, is that if you want full compatibility, you can't use any of the newer shader code/functions/effects (I'm using GLSL 1.10, but I think new cards are using 4.30. As it is, GLSL 1.10 needs OpenGL 2.0 support, compared to Gosu only requiring OpenGL 1.1).

Probably should stop discussing my stuff in your thread though :D Bug me in Ashton thread or directly if you want to discuss the joys of shaders :)
Parent - - By RavensKrag Date 2012-09-26 00:22
Is Hanmac doing a fresh port, or is he building on older stuff? I think there's a really old ruby Ogre binding, but it's old and incomplete.

I've been thinking of wrapping part of Ogre actually, but I'm not sure if it'd be better to work with a good deal of C++ and just use ruby to control big chunks, or if a full-on wrapper would actually be worth it.  Regardless, thanks for making me aware of such a thing :D
Parent - - By Spooner Date 2012-09-26 00:27
Not entirely sure. He lives in #ruby if you want to poke him about it, though I don't think it is anywhere near public release.
Parent - By RavensKrag Date 2012-09-26 00:33
I assume he uses the same screenname on Github, so I took a quick poke over there.  Looks like slightly more than nothing at the moment.  Though the idea is sure promising.

I should really get into using IRC again...
Parent - - By jlnr (dev) Date 2012-10-01 13:43
I absolutely love the retro look of the results. I would totally play a game in this setting. You should team up with lol_o2 to build one huge game. :D
Parent - - By erisdiscord Date 2012-10-02 01:12
Man, I'm liking this look too. It kind of reminds me of Xenogears. Did you ever play that?
Parent - - By jlnr (dev) Date 2012-10-02 11:27
I've never even heard of it :) Is it still worth getting into? I've always ignored the PSX because 3D was not only low-poly, but very stuttery. And the loading times! It was more like a caricature of a PC than a console. ;)
Parent - - By erisdiscord Date 2012-10-02 13:39
It's a pretentious JRPG with giant mecha and the story is incomplete because it was meant to be part of a series. You can probably safely skip it if that doesn't appeal to you. :D

Like the Saturn, where the PlayStation really shined was 2D, but 3D was the hip new thing back then unfortunately. If you want a good PlayStation game, try Tomba or Rayman!
Parent - - By jlnr (dev) Date 2012-10-03 11:35
I'm actually a huge Rayman fan, though I've played them all on PC - Rayman 1-3 and the VS-battle 3D Rayman. Rayman 2 was really outstanding for a 3D platform game outside of the Nintendoverse.

Tomba is on my list now. :)
Parent - - By RunnerPack Date 2012-10-04 01:42
A few more for your list:

Castlevania: Symphony of the Night
Skullmonkeys

And, although technically 3D, this one is close enough to 2D, and pretty fun:

Machine Hunter

Also, I agree with your assessment of Rayman 2. I played it on Dreamcast; it's one of the system's best games.
Parent - - By erisdiscord Date 2012-10-04 23:52
Oh hell, I can't believe I forgot Symphony of the Night. But really, who hasn't played that? :D
Parent - By RunnerPack Date 2012-10-04 23:57
I don't know how you forgot it, and I would also assume just about everyone's played it, but I thought it should be included for completeness ;)
Parent - - By jlnr (dev) Date 2012-10-05 04:48
Actually I have NOT yet played Symphony of the Night. They're all on the list now. :) Thanks.
Parent - - By bestguigui Date 2012-10-06 11:08
Thanks all ! Yeah, I totally know and love Xenogears, but there is still a lot to do before getting even close to Xeno's render.
I'm a very big fan of old psx games, especially when it mixes 3D and sprites. I'm thinking about using real 2.5 engine, like Klonoa or recent 2.5 games : 2D segments to represent walkable paths but in a 3D environnement. That way gameplay will be really simplified and sprites will always face camera, so that only side animations will be needed. It can get pretty interesting for 3D environnement, paths can be dynamic and go into the 3D background, up / down, near / far, with a pretty WYSIWYG thing into my editor.

Things are getting clearer in my head, I'll show you as soon as possible
Parent - - By bestguigui Date 2012-10-06 13:36 Edited 2012-10-06 18:29


I'm getting progress with maths here ! The purple rects represent points of the walkable path. White lines are the paths, connecting those points.
The blue rect is representing the character. When moving right or left, this blue rectangle is moving along the paths.

The red line represents the camera, targeting the blue rect and perpendicular to the white lines...

So it works in 2D, now I have to adapt this into 3D. Thanks Gosu for the Gosu::angle method ! :)

EDIT :



And now in 3D ! It works pretty well, I have to calculate the position with a y variation, not yet handled.

EDIT :



And now with Y variations ! I just have to calculate soft interpolation so that angles don't change brutally in one shot each new segment.

EDIT :

I'm so happy with that ! I wasn't expeding to go that far :

http://www.youtube.com/watch?list=UU1gGK-jOC2k3RqN1QNhrXEA&feature=player_detailpage&v=YWgmlOrRsxA
Parent - - By IgorJorobus Date 2012-10-06 19:43
You're making a great job, keep going my friend.
Parent - By bestguigui Date 2012-10-06 20:34
thanks !
Parent - By RunnerPack Date 2012-10-07 18:42
Wow, that is really impressive, so far! I can see this being used in some seriously good-looking and fun games.
Up Topic Gosu / Gosu Showcase / Really simple 3D modeler

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill