Game Development Community

T2D Abstraction Objects

by Jason Swearingen · in Torque Game Builder · 11/07/2005 (11:41 am) · 7 replies

So now that my .NET wrapper of t2d is done, it's time to simplify the SDK (make it easier for newbie .net developers to figure out)

My question to you: What are some confusing/hard-to-use areas of T2D and/or TorqueScript?


=======================

The general principle of this Abstraction layer will be to provide higher-level functionality to would-be game developers.

Here is the current functionality on my 'to do' list:

ImageMapCache object: to provide a consolidated point to lookup and retrieve imagemaps.

Parameter cleanup: Instead of passing in strings for everything, use Enums, int, float, and string where best. (Ex: a paramter that took a string such as "12.20 34.20" would be changed to take two float parameters)

Gametype abstraction First off will be a "Platformer" abstraction, next will be Isometric.

Any feedback (wishlist, rants, etc) would be appreciated.

PS: no, this isnt implemented in t2d.net yet. In a few weeks some of it will.

#1
11/07/2005 (12:24 pm)
As a .net junkie, I am really shocked that I haven't even tried this yet.

Am I to beleive that this is usable by C# and VB.net or just C#?

I'll get around to it as soon as my computer is up and running again either way
#2
11/07/2005 (1:41 pm)
@Charlie: t2d.net is usable by any.NET language (C#, vb.net, c++/CLI, python, j#, etc)
-------
I'm sure most people who own t2d are not .NET developers, as if you were then you wouldnt have bought t2d cuz it is all C++ or torquescript :P

So any feedback from those who have used t2d (torquescript) a lot, what your biggest pains are, would be great.
#3
11/08/2005 (12:45 am)
It would be really nice if it were possible to provide precompiled binaries for t2d.net. As long as those where made available only here in the private forums I gues it shouldn't be any problems - right?

Anyway - I think the whole collision-setup-thing can be hard to grasp - who's the sender/receiver etc. Maybe some clever renaming of objects would solve that...? Have you implemented onCollision as a callback function or as a delegate/event combo?

Cheers,
Johan
#4
11/08/2005 (2:05 am)
Well, considering that I am in t2d private forms, I guess I am a c++ kind of guy too :)
#5
11/08/2005 (2:47 am)
@Johan, I dont know if I can provide a pre-compiled binary for t2d.net, (licensing issues). Though I thought about this and i may be able to convince GG and Melv to allow this for development purposes if I time-bomb the simulation to shut-down after 5 min of running.

For callbacks, I have implemented these as delegates. (and tested to make sure all of them work) They are not setup as events right now however, just straight delegates. but I will be adding events to the abstraction layer i'm writing now. I reciently decided to not add bells and whistles to the wrapper, but to keep the wrapper as close to the C++/TorqueScript API's as possible.

so yeah, that basically means this abstraction layer is a wrapper of the wrapper ;)

It took me about 4 hours today to abstract fxImageMap2D, so it will take a few weeks before i have something for people to play with :)
#6
11/12/2005 (8:55 pm)
Here's some quick little ideas:
-properties instead of 1 argument get/set methods (ex. get/setVisible)
-strongly typed properties/methods w/ named arguments
-hmm here's some crazy talk but what about combining static/animation/chunked sprites into one sprite class and upgrading as necessary (i.e. start w/ static and if animation methods are used then upgrade to an animation sprite, etc). like i said, craazy talk!
-mmmmmm, precompiled binaries (i know, i know...nevermind this one, just wanted to throw my vote in there)
-methods that return ids could return objects instead (i.e. FxTileMap2D.GetTileLayer)
#7
11/13/2005 (12:57 pm)
@Dannon: sounds good, your suggestions (even your 'crazy' ones) are all what i'm planning actually.. I am not sure how I am going to combine the sprites all together, but yeah, i am planning on that too :)


I spent all of yesterday getting t2d.exe to compile and run as a DLL. It might not sound like much, but this is pretty important for a usability standpoint...

anyways, keep the ideas comming.. even crazy talk is good talk :)