Game Development Community

dev|Pro Game Development Curriculum

Tile-Based Build/Exploration Game DevBlog 3

by Jesse Allen · 12/28/2013 (4:34 am) · 5 comments

You can find the last blog here:Tile-Based Build/Exploration Game DevBlog 2

Happy Holidays! As we approach the new year, we all have many things to be thankful for. Personally, I've been very thankful for the input from the Community and the progress thus far on the game. Because it is the Season, of course, some of my major goals are still under investigation (sometimes building trainsets with family takes precedence!). However, this does not mean that I have not been extremely busy with improving the project. Quite the contrary, I've managed to squeeze in quite a few improvements since my last update.

My 'Major Goals' at the end of my last blog:
  • Tile orientation......work in progress.
  • Biome generation enhancements/refintements......complete!
  • Biome loading/unloading scheme......work in progress.
  • Get picking operations working across multiple CompositeSprite objects......complete!

Half of the main goals within a week, I'll take it! Both the tile orientation and loading/unloading schemes are being investigated, and I'm currently testing out different ways of setting up the triggers for the latter. I'll go into more detail about the Biome Generation (which I'm quite proud of) shortly but first here's a list of other things that have been improved upon since the last blog:

Updates:(build 049.4)
  • Varying Scrollers added/tested.
  • 'True Randomization' scripts and behaviors created.
  • Updated layering for fore- and back- ground trees/foliage.
  • Player 'Wheel Joint' movement testing.
  • Various fixes/updated heirarchy.

Biome Generation
Of all of what's been done, I am probably the most proud personally of the biome generation system. What I have here are various behaviors that will occur when our Biome is created. Finally, I have what I like to call 'True Randomization'. Whenever a Biome is called to be created, it can now randomly generate all of the following:

  • Biome Type (forest, mountain, alien, etc.)
  • Terrain height (low, mid, high)
  • Background (not sure if I'll use in this way yet but it can be generated with biome)
  • Trees, Bushes (foliage in general)
  • Clouds (including skybox to recycle cloud sprites)
  • Monsters, Critters, NPCs
  • Props (crates, collidables, etc.)

Wheel Joint Movement
This is something I started looking into just to try to make movement more precise, scalable, and possibly improve collision detection. I dug up an old thread on the boards about this and was able to get a 'Wheel Joint' attached to the bottom of my character sprite. So now it can 'roll' the character around. With a great deal of tweaking, it is now very functional and has added a slight bit of improvement to the overall 'feel' of character movement. Here's my teaser screenshot for this blog that shows the wheel at the character's feet (also placeholder images in the 'Alien' Biome):

i1213.photobucket.com/albums/cc466/rockoutsolid/Development/playerWheel_test.png

In Review
Much of my current time with Torque is being spent learning new concepts. I'll dig up an old tutorial and get fast to work with applying it in my own way. I'll find a posting that describes similar issues to those I am faced with and I'll just build off of that a lot of times. Just recently I stumbled on a great resource that had previously eluded me: the T2DTutorial repository on GitHub. Quite a few very useful modules in there, and I have just begun to crack some of those open! Overall, I feel as though I am making steady progress albeit slightly slowed at times due to learning as I go. At the end of the day, though, the entire process has been extremely thought-provoking and enlightening. I have developed a newfound respect for all those who have tread this same ground before me, and find myself thankful at every turn to be a part of the community here.

Looking ahead, I've set my sights on a few goals (always general of course):
  • Tile Orientation - Still need to peg this down, this will be probably the biggest challenge to overcome for quite some time.
  • Biome Loading/Unloading - Getting fairly close with this. Testing triggers and different ways of doing this right now. These tests will ultimately determine what my size constraints are going to be on these 'Biome' bodies.
  • Sound Testing - Need to get my feet wet experimenting with general sound effects.
  • Unit Behaviors - Need to experiment with basic AI behaviors.
  • GUI/Inventory - Need to study practical examples of inventory/gui.

The last few goals here are more exploratory in nature (as I am learning as I go of course), and will likely develop slowly over time. The first couple of goals are still major goals, and will require just a bit more application of my acquired knowledge thus far (and perhaps more!). As I progress, each week introduces me to new ways of doing things or a completely new functionality of the engine. I am finding things that used to seem like big problems I can now configure easily. I am struggling less with organization within my own project's file structure as well, which makes for a very much improved workflow as I become more familiar with the general layout of all my data. I feel as though the ball really is 'in my court' at this time and I'm just having to apply myself to progress. At every turn I need to learn, apply that knowledge, and then move on to learn more. All of this hinges off of material to study actually being available, and with a little searching I believe I've managed to find most of what I'm after for now via GitHub repositories.

Until next time, I'll be knuckling down and trying to expand my understanding of even more methods and script bindings. Cheers and Happy Holidays!



#1
12/29/2013 (2:57 am)
Great to see you keeping at it, Jesse!

Wheel Joint movement
That is actually something I briefly fiddled with, it definitely does at a certain awesomeness to basic character movement.

Behaviors
Behaviors are one of the more powerful (but somewhat confusing) parts of T2D; make sure to read the available tutorials and make sure to study the DeathBall Toy.

Once you are comfortable with how behaviors are instanced from templates, make sure to check out [url=https://github.com/GarageGames/Torque2D/wiki/Behavior-Connections]Behavior connections[/b], which allow behavior events to trigger events on other behaviors on the same object. It is a truly powerful system.

Gui

Read Mike's great tutorials on the subject and get ready to experiment a LOT with the GUI system to get it to work exactly how you want. One interesting option is to have a scene-based Gui system, where you use Sprite.attachGui(...) to make Gui elements automatically follow Scene objects around the screen, allowing you to use physics to make your gui system move more smoothly.

#2
12/29/2013 (7:20 pm)
@Simon: I plan to be at this for quite a while! The entire process of manipulating the data to solve problems intrigues me. It seems that the more I use Torque, the more I can see huge potential in what the engine can do. Thanks a lot for the direction, I've just cracked open the DeathBallToy to take a peek and I must say there is a lot of really good stuff going on in there! Really good lead, as I've just skimmed the main.cs a bit and learned all sorts of things.

About those joints...
Man these are fun to use and fairly easy to add to the object and manipulate. I've started using a different type of joint (DistanceJoint atm) to attach small collision sensors to NPC bodies. This is so that if the sensor hits a wall on one side I can have the NPC 'do stuff'. Atm I can get the echo to work with these sensors but I'm not having much luck with the sensors actually telling the NPC to perform its behaviors on collision. I think this has to do with the fact that the 'collision sensor' object is a separate object than the actual 'npc body' object.

I haven't done a ton of testing with it yet; the NPC will moveLeft() when he collides with the ground (but this is his 'npc body' colliding with the ground). When his attached sensor hits the left wall, I want him to stop what he is doing and moveRight(). All of the functions are created in his 'WanderBehavior.cs', I'm just not connecting the dots someplace ha!

Anyways off to study more of these examples, and make more sense of it all! Cheers and thanks for your help and support!
#3
01/03/2014 (2:49 am)
You're making really good progress Jesse, glad you are taking the time to post about it - it's enjoyable reading. Also glad the T2DTutorials modules repo is helping you, it's been ages since I've done anything with that. Happy New Year!

@Simon - those GUI tutorials on the wiki are Jesse's work - he should get most of the credit. I just edited and posted them.
#4
01/03/2014 (3:02 am)
@Mike : I didn't know that!

@Jesse : Congrats, dude! Making good documentation for the community is definitely awesome.

So to rephrase my last post

Quote:just read your own damn tutorials if you wanna learn

:)
#5
01/07/2014 (6:08 am)
I'm glad to have at least a couple folks interested in the project. Obviously it's a WIP and will be so for quite a while, but it's showing a lot of promise! Already I have fun just digging around the game and testing stuff :)

@Simon: Believe me I'm still learning a lot about the GUI. My tutorial documents are just the result of me documenting things as I've learned them and they cover absolute beginner material. I'm making great progress with the GUI though, and I managed to figure out a fix for custom cursors using only TorqueScript (I posted about this on the boards).

Anyways guys, stay tuned, in a couple days (9th) I hit my 2 month marker since I started this all up as a theory in a forum post. Look forward to the next blog soon!