by date
Plan for Joe Rossi
Plan for Joe Rossi
| Name: | Joe Rossi | ![]() |
|---|---|---|
| Date Posted: | Nov 06, 2005 | |
| Rating: | Not Rated | |
| Public: | YES | |
| Comments: | YES | |
| RSS Feed: | or Subscribe with . | |
| Profile Page: | View profile page for Joe Rossi |
Blog post
Some of the junk I've been messing with.
So this is my first plan. Let me start by saying I think this is a great community we have here, lots of smart people, and if everyone can contribute just a little we will end up with a lot. That said I hope to be contributing two things in the near future...
#1 Compressed DDS support.
DDS (DirectDraw Surface) is a compressed texture format that allows graphics cards to deal with texture data in a much more efficient way. Converting a few textures to this format will probably increase the FPS of any hardware accelerated game. Users will need a card that supports the GL_EXT_texture_compression_s3tc extension, but most every card has since circa 2002. Even crappy onboard cards do these days. Anyway this compression is lossy so expect some images to lose quality at higher compression ratios. To compress textures you can use ATI's Compressionator, NVidia DDS Tools, and (maybe?) GIMP's DDS plugin...but I've only tested with ATI's utility and in DirectX DXT mode.
So far I've loaded DXT3 and DXT5 compressed textures. I'll may stop there since those work, I'm not sure if I'll do DXT1. The one challange I have now is making it work in DirectX mode. I probably need to hack the OpenGL2d3d.DLL. I'm not exactly an expert at hacking Torque! So it only works in OGL for now. Don't expect a resource anytime soon. I'd like to make sure it works and is compatible with the new version of T2D before I send it out. This should work for TGE too BTW.
#2 Lua support
I've** managed to create a funky ScriptObject that allows Torque and Lua to get and set each others variables, execute each others scripts and other arbitrary code. This is great for me because I really enjoy coding in Lua and I already built a game logic codebase in Lua for another project.
The benefits of Lua are many, and I feel that Lua can offset any weakness of TorqueScript. Lua has some language features that (I think) TorqueScript is lacking like coroutines, function closures etc, and Lua may handle some things more efficiently. Don't get me wrong, Torque has a nice script language that I'm sure is very efficient for most things. Otherwise I'd have removed it completely. I just think some things can be easier with Lua. It only adds a few hundred KB to the EXE, too! Pretty cool. I plan to use Lua for the bulk of my game logic, TorqueScript for the rest. This could also enable some people to create editors with mostly Lua code.
**Creds to John Vanderbeck for his BasicObject code.
Edit: My Lua bridge code is nearly completed, at least for now. It's based on Lua 5.1 BETA, so I think I'll wait until that version is complete (before the end of the year, they're in code-freeze now I believe...) because this new version seems much better than the previous ones. I don't know what else to add to this. I made an "LUA_DEBUG" flag that will exit Torque gracefully and print errors if you mess up, and you can shut it off for release (if you know there are no mistakes in your scripts!). The main file is <500 lines of code. Maybe I'll make a little demo? Hmm.
Edit2: I've been able to emulate Torque engine calls using Lua tables. Now we can probably access all of TGE/T2D inside Lua scripts! I think I'll need a new plan for that. FYI it looks just like TorqueScript, but without the funny operators and C syntax :D It also takes very little code.
Until next time...
#1 Compressed DDS support.
DDS (DirectDraw Surface) is a compressed texture format that allows graphics cards to deal with texture data in a much more efficient way. Converting a few textures to this format will probably increase the FPS of any hardware accelerated game. Users will need a card that supports the GL_EXT_texture_compression_s3tc extension, but most every card has since circa 2002. Even crappy onboard cards do these days. Anyway this compression is lossy so expect some images to lose quality at higher compression ratios. To compress textures you can use ATI's Compressionator, NVidia DDS Tools, and (maybe?) GIMP's DDS plugin...but I've only tested with ATI's utility and in DirectX DXT mode.
So far I've loaded DXT3 and DXT5 compressed textures. I'll may stop there since those work, I'm not sure if I'll do DXT1. The one challange I have now is making it work in DirectX mode. I probably need to hack the OpenGL2d3d.DLL. I'm not exactly an expert at hacking Torque! So it only works in OGL for now. Don't expect a resource anytime soon. I'd like to make sure it works and is compatible with the new version of T2D before I send it out. This should work for TGE too BTW.
#2 Lua support
I've** managed to create a funky ScriptObject that allows Torque and Lua to get and set each others variables, execute each others scripts and other arbitrary code. This is great for me because I really enjoy coding in Lua and I already built a game logic codebase in Lua for another project.
The benefits of Lua are many, and I feel that Lua can offset any weakness of TorqueScript. Lua has some language features that (I think) TorqueScript is lacking like coroutines, function closures etc, and Lua may handle some things more efficiently. Don't get me wrong, Torque has a nice script language that I'm sure is very efficient for most things. Otherwise I'd have removed it completely. I just think some things can be easier with Lua. It only adds a few hundred KB to the EXE, too! Pretty cool. I plan to use Lua for the bulk of my game logic, TorqueScript for the rest. This could also enable some people to create editors with mostly Lua code.
**Creds to John Vanderbeck for his BasicObject code.
Edit: My Lua bridge code is nearly completed, at least for now. It's based on Lua 5.1 BETA, so I think I'll wait until that version is complete (before the end of the year, they're in code-freeze now I believe...) because this new version seems much better than the previous ones. I don't know what else to add to this. I made an "LUA_DEBUG" flag that will exit Torque gracefully and print errors if you mess up, and you can shut it off for release (if you know there are no mistakes in your scripts!). The main file is <500 lines of code. Maybe I'll make a little demo? Hmm.
Edit2: I've been able to emulate Torque engine calls using Lua tables. Now we can probably access all of TGE/T2D inside Lua scripts! I think I'll need a new plan for that. FYI it looks just like TorqueScript, but without the funny operators and C syntax :D It also takes very little code.
Until next time...
Recent Blog Posts
| List: | 01/21/08 - New and Improved TGB AudioManager 08/10/07 - RPG progress and new font tool 02/19/07 - Working towards an RPG in TGB 12/13/06 - Building onto Torque Game Builder 03/18/06 - IUP: Use Lua scripted GUIs with Torque 02/02/06 - Lots of new changes 11/06/05 - Plan for Joe Rossi |
|---|
Submit your own resources!| Adrian Tysoe (Nov 06, 2005 at 03:53 GMT) |
| Joseph Euan (Nov 06, 2005 at 04:02 GMT) |
Theres a link to the bounty list in the TSE forum.
| Joe Rossi (Nov 06, 2005 at 20:40 GMT) |
| Joseph Euan (Nov 07, 2005 at 11:23 GMT) |
| Joe Rossi (Nov 07, 2005 at 19:29 GMT) |
Edited on Nov 08, 2005 09:00 GMT
| BillyJack Drain (Jan 26, 2006 at 04:40 GMT) |
You must be a member and be logged in to either append comments or rate this resource.



Not Rated


