Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

[On hold indefinitely] Full 3D in RMXP

Status
Not open for further replies.
ZOMFG!!!!!!!!!!!!!!!!! thats freaking amazing!!!!!!!!!!!!! i have a nvida geforce 9500 GS so i dont know if that makes a diffrence, but no lagg and looks amazing!!!!!! let me be the first to say kick ass job man :)
 
It still doesn't work for me... Im really want to test it out, but something make it to crash in all options. Do you have added a .def file for defining the DLL functions?, if not the dll may not work sometimes in RMXP.
 
I actually feel as you just say "Where is your God, now ?".
This amazing !!! <-- you are the first programmer ever I gave three exclamation points.

My 3D project looks very poor now...
I have a very big interest in your project.

Can you right now use 2D sprites ?
You said in my topic that you are working on your own GUI system.
But as soon as you have 2D sprites, I will be able to put my GUI on your system. This GUI still works with RMXP, RUDL and Rubygame.
I was thinking on finally work with Gosu, but your project seems more interesting.


You have my moral support, of course. ;)
 
Glad you like it so far, guys!

@vgvgf: Sorry man, I am trying to find out why it won't work for you. Perhaps Cremno is right and it is just a redistributable proble,

@cremno: Thanks, I've been trying to figure out which DLLs I need to include XD I haven't been using MSVCPP for very long, I used to just use MingW and do makefiles by hand XD. However, I kind of doubt that this is the problem vgvgf is having. He would get a LoadLibrary error, I think.

@KingKadelfek: Thanks for the compliment. As for the Sprites and GUI: Yes, it fully supports 2D (though you won't be able to use RGSS sprites, you have to use Irrlicht sprites) BUt you don't have to port your GUI to irrlicht, because irrlicht has a GUI built in :D. When I was talking about making my own GUI, it was for another set of scripts I am working on.

@Xilef: That will come in due time. It will be a little while, though, because I have to export all of the 3D functions first.

For those of you interested in seeing what coding with this looks like so far:

Scene_DriverChoice
Code:
 

class Scene_DriverChoice

  def main

    # Make system object and data (Can't make command windows with out 'em! :D)

    $game_system = Game_System.new

    $data_system        = load_data("Data/System.rxdata")

    # Make command window

    s1 = "Software - IrrlichtEngine Driver"

    s2 = "Hardware - Direct3D9"

    s3 = "D3D8 DOES NOT WORK!"

    s4 = "Hardware - OpenGL"

    s5 = "Software - Burning's Video"

    @command_window = Window_Command.new(300, [s1, s2, s3, s4, s5])

    @command_window.x = 320 - @command_window.width / 2

    @command_window.y = 100

    # Execute transition

    Graphics.transition

    # Main loop

    loop do

      # Update game screen

      Graphics.update

      # Update input information

      Input.update

      # Frame update

      update

      # Abort loop if screen is changed

      if $scene != self

        break

      end

    end

    # Prepare for transition

    Graphics.freeze

    # Dispose of command window

    @command_window.dispose

  end

  #--------------------------------------------------------------------------

  # * Frame Update

  #--------------------------------------------------------------------------

  def update

    # Update command window

    @command_window.update

    # If C button was pressed

    if Input.trigger?(Input::C)

      $scene = Scene_3DTest.new(@command_window.index)

    end

  end

end

Scene_3DTest
Code:
 

class Scene_3DTest

  def initialize(drivertype = 0) #the scene before this one let's you pick a driver

                                 #this is just a simple int:

                                 # 0 - Software

                                 # 1 - Direct3D9

                                 # 2 - Direct3D9

                                 # 3 - OpenGL

                                 # 4 - Burning's Video

    DF_3DRMXPSDK::START3D_FUNC.call(drivertype) #start our 3D window

    DF_GameWindow.set_dimensions(0,0,0,0) #move the 2D window out of the way

    DF_3DRMXPSDK::CREATELEVEL_FUNC.call("20kdm2") #load our level

                                                  #note that passing that string

                                                  #doesn't actually do anything.

                                                  #That's just an example of what

                                                  #it will look like

    DF_3DRMXPSDK::CREATEFPCAMERA_FUNC.call #create our first person camera

                                           #this call will also attach a collision

                                           #animator so our camera won't fall

                                           #through the ground. Now, this function

                                           #also gives permission for the 3D engine

                                           #to handle input on it's own. As you will

                                           #see in the update method, we are not giving

                                           #any instructions in here for the camera to move

                                           #In a later release, I will make it so you can

                                           #use RGSS to tell things to move, but I was

                                           #having problems, and I wanted to show you guys

                                           #a playable demo, so I did it the cheap way

                                           #and I handle most input in the DLL :D

  end

    

  def main

    lasttime = Time.now #this keeps track of when we call Graphics.update

    loop do

      if DF_3DRMXPSDK::RUN_FUNC.call == 0 #If the device has been closed

        #exit the game

        $scene = nil

        break

      end

      

      DF_Input.update #update the input. This is my own special input module :D

                      #This input module will be included as well.

 

      time = Time.now #get the time

      if time - lasttime > 5 #has it been 5 seconds since we called Graphics.update?

        Graphics.update #better call it now

        lasttime = Time.now#reset the timer

      end

      

      update #call our update method

      

      

      break if $scene != self #break if scene has chnaged

    end

    

    DF_3DRMXPSDK::END3D_FUNC.call #dispose of the 3D window

  end #end main

  

  def update

    DF_3DRMXPSDK::STEPTEST_FUNC.call #this function is just like calling Graphics.update

 

    #Ok, since I can't use Input to move the camera just yet, take a look here

    #This part here will take user input and then ask the DLL what the framerate

    #is and print it out.

    if DF_Input.pressed?(DF_Input::KEY_F) #if F Key is pressed?

      p DF_3DRMXPSDK::GETFPS_FUNC.call #print out the current FPS!

    end

    

  end #end update

end# end scene

 

As you can see, it is a little bit ugly right now. I will be working on re-objectifying all of the functions after I export them.
 

Jason

Awesome Bro

I've found that it works better with the OpenGL option, I get on average 60FPS, I just have a few suggestions;

Would it be possible to rewrite the controls so that we can use WASD, and have Spacebar as jump instead of looking up and moving, this way it gives it more of a Firstperson feel, and also, would it be possible to add a model to the screen and change the camera distance so you'd basically be toggling first and third person.

This is very impressive and as I've said before, I'm really looking forward to this. :thumb:
 
Interesting, you guys get better performance with OpenGL? For me, with this demo, I get about the same with either D3D9 or OpenGL, but in general D3D9 is usually about 50% faster for me.

Yeah, jbrist, all of that stuff is possible. This was just a simple demo using the defaul control scheme, but that will be fully customizable. I will also plan on including, by defauly, a toggleable First/Third person camera. Just be patient, though. This is gonna take a lot of time XD
 
Yeah, this demo works for me this time. And it's pretty damn incredible. I never thought anyone would ever manage to get a 3D engine working with RMXP, but you've managed it. Congratulations. You have just expanded the boundaries of XP game making.
 
@fox5: That's great news. I'm glad works for you. Thanks for the compliment ^^

@jbrist: Yes of course. Keep them coming, they help me think!
 
Ok, I'm waiting for some examples of interactions between Ruby and all this 3D. :)

Yes, it fully supports 2D (though you won't be able to use RGSS sprites, you have to use Irrlicht sprites) BUt you don't have to port your GUI to irrlicht, because irrlicht has a GUI built in :D.
I never think to use 3D libraries in order to make 2D games. Is it a good idea ? (I'm talking about the power needed by the computer)
 
While it is true that, in general, using a 3D engine for 2D is overkill and can (but not always) affect performance, The RM* Graphics modules are particularly bad examples of a 2D library, and I am almost 100% sure that Irrlicht's 2D will be faster than RMXP's. If I remember correctly, Irrlicht's 2D and 3D rendering are separate anyway, and so Irrlicht's 2D portion is plenty fast.

The Irrlicht engine is very high performance, and I am pretty sure that even it's 3D will be a lot faster than RMXP's 2D. Of course, the only downside is that Irrlicht is a lot more dependant on the machine, meaning not everyone who can use RMXP will be able to use the 3D. You can do 2D with a cheap onboard video card, while you cannot do 3D with said card.

I hope that in the next demo I will be able to show you a little bit of what it will look like when I re-objectify the functions.
 
OMG - I downloaded the new demo (though I never downloaded the original one) and everything works and looks great (except for the Irrlicht engine, which only seemed to render things one or two steps away from me).
 
Yeah, I could explain to you why the IrrlichEngine Software Renderer does that, but I'd rather not XD. Note that the only reason you would want to use that renderer is if none of the others work. It's just there in case someone's video card can't handle hardware, but they have a strong CPU. Also, it is there for platform independence. The Irrlicht Engine is cross platform, so it can work in places where Hardware Acceleration is not possible.

Thanks for the comments, guys, keep 'em coming! I am working on the next release which will use RGSS to control more.
 

arev

Sponsor

If I wanted to do an animated character, to actually use in game (meaning some frames for idle pose, some frames for walking) are there any guidelines for that? Does importing from 3ds support animations?
 
That it does, that it does. And how you described the animation is just one of the ways you can animate.

The 3 main ways you can do animation (by default) are:

-Frame Based. You just tell it to play certain frames, and whether or not it should loop. You can choose the animation speed etc.

-Bone Based. Last time I checked, this was still a little buggy. The idea, though, is that you export your mesh with the skeleton and tell the bones where to move. This method is good if you want to program your own real-time dynamic animations. Chances are you won't actually want to try this one with this project XD. Doing AI calculations that complex in Ruby is not recommended.

-MD2 Animation. The engine supports importing Quake 2 format animated meshes that have the named animations, and you can use those if you want.


Chances are the frame based will be the most popular XD.

So, arev, did I read your earlier post right, that you may be willing to help with meshes after your done helping TM?
 
This is cool and all, but wouldn't it be significantly easier to just learn to program or use a program that was, oh, I don't know, designed to support 3D? =/
 
Status
Not open for further replies.

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top