Game Development Community

Two problems stopping me from using TX2D - any help?

by Brian Carter · in Torque X 2D · 01/11/2010 (3:16 pm) · 6 replies

I've been developing my game in XNA for a couple of weeks, so it's still in the early stages. I'm at the stage of trying to settle on my development technologies. XNA is a no brainer, but the reason I'm now looking at TX2D is for the added functionality like collision detection, physics, and the particle system. I've played with TGB in the past, so I'm fairly familiar with what it can do in that area; however, I feel like I'm at a crossroads.

I really want to use TX2D; however, I'm having a hard time breaking away from the standard XNA update and draw way of doing things. First off, let me say that I'm developing a Windows game, and have no intention of porting to XBOX.

Problem #1: Update on XNA allowed me to easily check for keyboard, gamepad, AND mouse events, but I can't seem to locate any mouse support in TX2D - Please correct me if I'm wrong, or if somebody knows of an easy way for me to check on mouse events on an object.

Problem #2: Probably connected to the above, I can't seem to get GUITextEdit to function. I can get it to display a piece of text on the screen, but I can't edit the text. I need some form of GUI capability that lets me enter a players name from the keyboard.

On the up side, I love the Builder, and how it ties in with the framework, but the above two problems are really show stoppers for me unless I can overcome them. Any help or advice would be welcome. I'm sure I must be overlooking something fundemental, but I can't for the life of me find out what it is. I searched in GUITextEdit and found no examples or solutions - I can't be the only one needed text entry.


#1
01/11/2010 (6:44 pm)
I don't know about the GUITextEdit, right now documentation is pretty sparse, there are however mouse support issues... I just read in the roadmap. You are using the demo or the CC version I assume?

www.torquepowered.com/community/blogs/view/18955

#2
01/11/2010 (8:18 pm)
Not sure what a CC version is, but I'm running the version that comes with the source code, not the demo.

Feeling very torn right now, but I'm starting to drift back to carrying on in raw XNA and see what, if anything, happens on this mouse / gui front. The GUI just seems like such a fundemental chunk to be skipped over. Yes it's there, but I wouldn't call it user friendly - especially with no documented examples.

How are you dealing with text entry? Or don't you use that in your games?

Theres an awesome GUI API called NeoForce that sits on top of XNA as a third party framework, but I'm not sure that it would mesh with TX2D. Might try fiddling around with that next, but even still, if the mouse support isnt there then it's a lost cause.
#3
01/11/2010 (8:46 pm)
I make everything for Xbox so I don't deal with text or have not so far. CC is the creators club edition that you get when you join XNA creators club so you can publish on Xbox Live Indie Games. It's a binary only, so you have definitely gone down the right path. There are some others who have worked with the mouse, do a forum search and good luck.
#4
01/11/2010 (10:27 pm)
I'm not too familiar with either as I predominantly do xbox, but it shouldn't be to hard to do. Since I'm on my phone and I'm the least up to date on the mouse I won't comment on it right now.

On the visual text editting, it might just be easier to code your own system. All you'd need to do is create q custom GUI object based or including q guitext object. On its update or processtick you can have it check the keyboard and update the string accordingly. It's not quite as simple as I describe, but definitely doable.

If I get a chance. I'll look into the mouse and maybe post q code sample from my computer.
#5
01/11/2010 (11:16 pm)
Thanks Chris, appreciate any help in this area. This isn't an urgent need at this moment, because I'm concentrating on game mechanics and "behind the scenes" type stuff; however, there will come a point in the next month wnen I will need to make a final decision one way or the other - meaning commit to TX2D (which I would like to do because the builder will make life so much easier on asset layout, not to mention particles etc..), or to carry on with pure XNA.

Anyhoo, appreciate your reply, and any help is most welcome.
#6
02/05/2010 (3:36 am)
Good to see that blog post. I just got this strange-ish feeling it wasn't really supported and sort of this side project of GG. I wish they would do more stuff like components and things for free for the community until the community becomes more self-sustaining.