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.
UPDATE - 5/5/09
Ok, here's a small update. This is a quick little example of lighting. As you can see, there are some problems I have to work out with the lighting on tiles.

ets9z7.png

Demo: Link

Don't Forget:
I still need help with art and with moral support!
Please contact me if you are a 3D artist.
If you want to offer moral support, keep posting!


Old Releases:

Alright guys, big goings-on. I can now successfully make 3D maps using the 2D map editor! Now, this time around it is pretty simple-- all tiles are simply cubes and the id of the tile determines which texture the cube gets. This, however, proves the validity of using RMXP to make 3D games.

Now, not only is drawing these 2D maps in 3D with my tool possible, it is also, so far, much much faster than drawing the maps in 2D using RGSS Graphics Module. In fact, during my testing I get 250+ frames per second.

Alright, so enough talk. Let's get to the awesome: *BIG Image Warning*
2zzknwh.png


2mydffc.png


npnrsh.png


332m98m.png


Now, the RGSS code running the demo: (No explanatory comments this time, guys :p)
Code:
 

  DF_GameWindow.set_dimensions(0,0,0,0)

  device = DF3DDevice.new(Video::EDT_DIRECT3D9, [800,600], 32, false)

  smgr = device.scene_manager

  driver = device.video_driver

  camera = smgr.add_camera_scene_node_FPS

  camera.set_position(-100,300,-100)

  camera.set_target(0,0,0)

  $data_tilesets      = load_data("Data/Tilesets.rxdata")

  $data_common_events = load_data("Data/CommonEvents.rxdata")

  $game_map = Game_Map.new

  $game_map.setup(1)

  

  for i in 0...20

    for j in 0...15

      for k in 0...3

        if $game_map.data[i,j,k] != 0

          node = smgr.add_cube_scene_node(64)

          node.set_position(i * 64, k * 64, j * 64)

          node.set_material_flag(Video::EMF_LIGHTING, false)

          texture_name = ($game_map.data[i,j,k] - 383).to_s + ".png"

          node.set_material_texture(0, driver.get_texture(texture_name))

        end

      end

    end

  end

  

        

  

  lasttime = Time.now

  while device.run

    DF_Input.update

    

    if DF_Input.trigger?(DF_Input::KEY_F)

      p driver.get_fps

    end

    

    time = Time.now

    if time - lasttime > 5

      Graphics.update

      lasttime = Time.now

    end

    driver.begin_scene(true, true, [255, 160, 160, 255])

    smgr.draw_all

    driver.end_scene

  end

  

  device.drop

 

And, of course, there's a demo to be had!
Keys:
Arrow Keys to move (for now. I will change it later so you can use WASD)
F to show FPS
CTRL + F4 to quit

Link: Download Now!

Alright guys, now it's time to show you something really cool. I don't have a demo, but instead I have a screen shot and some real RGSS code to do with it.

213m49e.png


And here is the magical RGSS code that does it. (Normally, you would put this in a scene, but you guys know how to make scenes so I didn't bother)

Code:
  #First, let's move the 2D window out of the way:

  DF_GameWindow.set_dimensions(0,0,0,0)

  #next, let's create out device. The parameters are:

  #Driver type, screen size (in an array), bits per pixel, and fullscreen

  #This device is the central point of the 3D engine. Absolutely everything

  #can be accessed through this device.

  device = DF3DDevice.new(Video::EDT_DIRECT3D9, [800,600], 32, false)

  #Now, let's get our scene manager. The scene manager does stuff like adding nodes

  #and cameras

  smgr = device.scene_manager

  #Now, let's get our driver. The driver handles actually rendering.

  driver = device.video_driver

  #Let's get our mesh! (Note that you should probably add error handling here.

  #smgr.get_mesh will return nil if it can't find the file so make sure you

  #always check that the mesh was actually created. I didn't do any error handling

  #but a simple check for nil would suffice)

  mesh = smgr.get_mesh("sydney.md2")

  #Let's create an animated scene node from the mesh. Again, normally you

  #want to check for errors.

  node = smgr.add_animated_mesh_scene_node(mesh)

  #now, let's add a camera to the scene node! Camera are how you view everything

  #in the scene. Note that it is possible to have more than one camera and

  #you can switch between them, or even have them render to different parts

  #of the screen.

  camera = smgr.add_camera_scene_node

  #move our camera, since both the camera and scene node are at the same, default

  #position right now. (Which is (0,0,0)) Note that the parameters here are x, y, z.

  #when your camera is at (0,0,0) and has no rotation, x is sideways, y is up,

  #and z is forwards/backwards

  camera.set_position(100,100,100)

  #Rememeber how I said that the default position is 0,0,0? Well, since we never moved

  #our node, it is at 0,0,0 right now. So, Let's tell the camera to look there:

  camera.set_target(0,0,0)

  

  lasttime = Time.now

  while device.run #check if our device is still running

    #begin rendering the scene. I will not explain what these parameters are yet

    #it's not important right now, and it's kind of complicated XD

    driver.begin_scene(true, true, [255, 160, 160, 255])

    smgr.draw_all #draw all of the scene nodes

    driver.end_scene #finish rendering the scene

    #this junk is just so Graphics doesn't whine.

    time = Time.now

    if time - lasttime > 5

      Graphics.update

    end

  end

  

  #Now, alway always always remember to drop your device when you are done.

  #The device is something you should only drop at the end of your game, after

  #the device no longer runs.

  device.drop



Hey guys! I just finished a new demo! This one allows you to actually walk around, so you guys can see that this is actually practical for making a game, and not just taking screenshots. You can also choose which renderer to use. Note that the 2 software renderers are very slow, and D3D8 does not work at all. OpenGL or D3D9 are your best bet.

I will post the RGSS code tomorrow, so you can see what it is like, but I am out of time.

Alright, first a screenshot. ON this screenshot I only took a picture of the 3D window, since you guys know it is actually RMXP (vgvgf can vouch for me, since he actually decrypted the project and looked XD)

oatz7d.png


And the new demo can be downlaoded here:
3D RMXP Walking Demo

KEYS:
Arrow keys to walk
Mouse to look
F to print current FPS (Please tell me what you get)
Ctrl+F4 to quit (not alt, note that alt is disabled while running this)

2i8ao8p.png


Do I have it now? Good. That is exactly what it looks like: a 3D program running from RMXP. (I will explain why there are two windows, the little one and the big one*)

Don't believe me? Try it yourself:
RMXP in 3D Demo
 
Pfffft.

*MY* 3D is waaaaaay better. ;P :devil:


I don't know what I can offer besides moral support. This is tres cool. It's actually gobsmacking really.
 
I've downloaded the demo, and I'll try it later. But, this does look very impressive (I tried the older demo not too long ago), and a quick suggestion: Do not use the mouse for rotation *ever*. It disables the closing of the window, and makes it very hard to steer.

A couple of features/requests.

- Keyboard Config that doesn't affect other rmxp games, very important to me!

- Would it be possible to make it work with the XAS Action RPG system, without
much editting? The surefire way for me to port my game to this system ^^

- First Person View, man! I'd love to port my FPS system to this. (I'm using Behemoth's Raycasted Tilemap script at the moment)
 
Thanks for the comments guys, keep them coming.

@Incognitus: You can't contend man, you can't contend :D


@Near:

-What do you mean by the first one? You mean making it so changing the keyboard config in one game does not change the others? Well, for me, that one is a-given :D. This 3D stuff will include my Advanced Input Script and Custom Resolution Script that I made a couple days ago. Most of the annoying stuff like that will be fixed here.

-Well, I am planning on making a 3D battle system to go with it, so it will probably not work with XAS *by default*. However, it will be possible for you to make a couple minor edits to put XAS instead (But the XAS would be 2D, like it is right now)

-Yeah, first person view will definitely be an option by default. You can choose 1st or 3rd person.

As for the mouse rotation, in a 3D game you generally do not use the mouse to close a window, you use alt+f4 or navigate the menus. For older demo, it was the former. The problem making it hard to steer was a matter of fine tuning some settings, which I had not done.
 
Is the system in Ruby? I guess not, but if it is, how well does it perform?

How are models managed? I mean, file format, editor (blender/maya/3DS)...
 
The majority of this project will be C++ functions called by RUby through external DLLs. The currently supported model files are:
* Irrlicht scenes (.irr, r/w)
* Irrlicht static meshes (.irrmesh, r/w)
* 3D Studio meshes (.3ds, r)
* B3D files (.b3d, r)
* Alias Wavefront Maya (.obj, r/w)
* Lightwave Objects (.lwo, r)
* COLLADA 1.4 (.xml, .dae, r/w)
* Microsoft DirectX (.x, r) (binary & text)
* Milkshape (.ms3d, r)
* OGRE meshes (.mesh, r)
* My3DTools 3 (.my3D, r)
* Pulsar LMTools (.lmts, r)
* Quake 3 levels (.bsp, r)
* Quake 2 models (.md2, r)
* Quake 3 models (.md3, r)
* DeleD (.dmf, r)
* FSRad oct (.oct, r)
* Cartography shop 4 (.csm, r)
* STL 3D files (.stl, r/w)

So, to sum up, my code is in C++, but you will be able to use it with Ruby.
 
Ah, thanks.

My first question was about the key config, and how the usual F1 method made it different for every rm game you played.

Also, what kind of battle system? I liked the Golden Sun battle system myself. But if it will be an ABS kind of system, I'm all good.
 
Probably very similar to the default RMXP battle system. For the most part I will just be converting default scripts to 3D to give an example of how to use the 3D API. You guys will get to look at my scripts and be able to make your own stuff :D.

Actually, the more I think about it the more I think it will probably be some sort of animated battle. Not sure exactly what yet. By the way, Near, how did the demo run for you?
 
Not good.

Script 'DF_SystemTools' line 28 : RuntimeError
Load Library: DFRMTools

There is a 'DFRMTools.dll', but I don't know whats messing it up.
 

Jason

Awesome Bro

Well it runs pretty fine for me, no problems whatsoever, saying that, my computer is pretty much the god of all specifications, lol, as for the battle system, if it's going to be animated, perhaps you could take a look at having it similar to Final Fantasy X, and maybe if you're tricky, you could get the dynamic cameras, so the camera follows the attacker, lol.

This seems like a really interesting project, and I'd love to try it out when a usable release is, well, released. Although I am pretty sorry that I can only offer my support, as I have absolutely no experience with 3D modelling.

Hope all goes well while making it, and I look forward to seeing results ! :thumb:
 
If DFRM tools is messing up I think it means I included the wrong MFC. I will try to fix that.

@jbrist: thanks for the comments! Your moral support will be greatly appreciated, just keep churning out suggestions XD

As for the FFX battle system, I hated that battle system with a passion XD Sorry XD


So guys, tomorrow I hope to have a demo where you can walk around and junk, ok? Keep the comments coming!

Also, don't forget, I need some models still!
 

Jason

Awesome Bro

DeM0nFiRe":qs82mjq7 said:
If DFRM tools is messing up I think it means I included the wrong MFC. I will try to fix that.

@jbrist: thanks for the comments! Your moral support will be greatly appreciated, just keep churning out suggestions XD

As for the FFX battle system, I hated that battle system with a passion XD Sorry XD


So guys, tomorrow I hope to have a demo where you can walk around and junk, ok? Keep the comments coming!

Also, don't forget, I need some models still!

:eek:: , You're the first person to ever tell me that you hated the FFX battlesystem, everyone else I know who's played it loved the battlesystem, lol.

Hmm, although it may be tricky to set up where the characters move, maybe you could go for a Chrono Trigger approach to the battlesystem ? I mean, it'd be great if it could be implemented, but making sure that when you encounter an enemy, your characters don't do something dumb and run over a tree could provide difficult, unless I'm completely wrong and it's something easy, lol.

Or how about going for a different approach to the battlesystem, obviously it'd be turnbased as most RPG's are, however;
You see your character from directly behind, slightly overhead so you can see the enemies directly ahead of you, and when you attack/cast skill etc., the camera angle changes to behind and slightly overhead of the enemy, so you see your character running/walking/crawling/rolling towards them and hit them, it may be something worth experimenting with...

And ooh, a moving demo, that could provide useful, as people will be able to see the playability in this and see that it's not just a fancy visual, but infact a fully working moving game.
 
I do need to learn some 3D modeling... i'll give it a try, when i get my good comp fixed.
Sorry, but it could take another 2-3 weeks...
 
Yeah, good discussion on the battle system, keep the ideas coming. I think you have convinced me to not just remake the default battle system. Not sure I like the ideas so far, though. I think you are assuming this is harder than it is. Once I have the 3D API working, the rest won't be too hard at all.

And yeah, I think a walking demo will spark some more interest and prove that this is real.

@Near, can you please try this: http://www.box.net/shared/37l6qh7cc5

Thanks guys!
 
You should change to RMVX. RMVX doesn't need Graphics.update to be called between some time, it's better that way, no HangUp error.

Also, it don't works for me. It throws me an "Game.exe has detected an error and have to close." message window. I'm using WinXP SP3 and RMXP 1.02E. Nice project, anyway, keep working on it.
 
@Near: Hmm, I will keep looking for possible solution to your problem.

@vgvgf: Well, I am doing it in RMXP just because I started learning object oriented programming in Ruby through RMXP. Seeing as this is like my farewell to RM, I thought it was fitting. I will probably port this to RMVX later.

As for your error, I think that was an upload error, let me reupload it...

Ok, try redownloading it.
 
Redownloaded, extracted, and still doesn't work. Maybe I need to have something installed that I haven't, a programming error, or else I don't know.
 
Can't be a normal programming error. I mean, it must be in some way, but not like a normal error. I'll have to look at it to see if I am missing anything. I have an idea of what it may be. You have SP3, right? I think SP3 introduces some memory security that would get in my way. I need someone else with SP3 to test it as well.
 
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