Hello Guest

Author Topic: Adventure Game Tutorial Series  (Read 196330 times)

0 Members and 1 Guest are viewing this topic.

ericmbernier

  • Member
  • Posts: 35
  • Sometimes I make games.
    • View Profile
Re: Adventure Game Tutorial Series
« Reply #30 on: December 01, 2014, 11:30:20 AM »
Thanks for reporting the errors!

Unfortunately I don't have the bandwidth to keep the tutorial series up to date with each change that is made to Otter. My source code can be downloaded, which I've confirmed is working, but is using a slightly older version of Otter. I updated the entire series a couple of months ago, so it isn't too old, though you will have to tinker with the tweening calls.

Once Otter hits a 1.0 release, and seems a bit more stable I will likely update the tutorials once more.

EDIT - I last updated the entire series on September 30th.


« Last Edit: December 01, 2014, 11:37:42 AM by ericmbernier »

Ceric

  • Member
  • Posts: 3
    • View Profile
Re: Adventure Game Tutorial Series
« Reply #31 on: December 01, 2014, 10:56:59 PM »
No worries. I'll see if I can figure out a way to make it work. If I do figure it out, I'll post whatever solution I come up with here.

Commanderstitch

  • Member
  • Posts: 37
  • Personal Text
    • View Profile
    • commanderstitch Homepage (coming someday)
Re: Adventure Game Tutorial Series
« Reply #32 on: June 28, 2015, 12:12:21 PM »
hi ericmbernier,

i've enjoyed going through your tutorials. here's something i found on your tilemap page that i thought was interesting. nothing wrong, just thought it was funny.

http://screencast.com/t/oi19kaMkNC

If this is incorrect, that's fine, it was just something that i thought i noticed. I'm not always 10000% percent sure of things when i read through them you know. Great job though, i've really been enjoying seeing how otter does things. :-)
- Commanderstitch

Fatesauce

  • Member
  • Posts: 26
    • View Profile
Re: Adventure Game Tutorial Series
« Reply #33 on: June 30, 2015, 02:29:35 PM »
Hey great tut! Covers a wide range of features and techniques, which is a great help when learning a new framework. 

I ran across one issue.  Not sure if its me, or just just updates to Otter that have changed things, but this line of code isn't recognized:
Code: [Select]
Global.PlayerSession.Controller.Start.AddKey(Key.Return);The
Code: [Select]
Start component underlines with that pretty looking red squiggle.  Has something changed?  Everything else thus far works great.

EDIT:

Would this be an equivalent replacement?
Code: [Select]
Global.PlayerSession.Controller.AddButton("Start");
Global.PlayerSession.Controller.Button("Start").AddKey(Key.Return);
« Last Edit: June 30, 2015, 03:59:00 PM by Fatesauce »

Fruckert

  • Member
  • Posts: 60
  • Total Square
    • View Profile
Re: Adventure Game Tutorial Series
« Reply #34 on: June 30, 2015, 06:31:42 PM »
Yup, that's the new equivalent. Or you can swap out Controller with ControllerXbox360, which has those buttons already mapped to a joystick and named in properties.

Fatesauce

  • Member
  • Posts: 26
    • View Profile
Re: Adventure Game Tutorial Series
« Reply #35 on: June 30, 2015, 07:11:08 PM »
Righto, if i use the xbox360 class can I still bind the keyboard? or do i need to add it to the session seperately?

Fruckert

  • Member
  • Posts: 60
  • Total Square
    • View Profile
Re: Adventure Game Tutorial Series
« Reply #36 on: June 30, 2015, 10:46:57 PM »
Yeah, ControllerXbox360 has all the functionality of a normal controller. I think you have to do some casting stuff to make it work with Sessions, though, I can't really remember...
To be honest, it's been a little while since I've dev'd any 'x)

Kyle

  • Administrator
  • Member
  • Posts: 258
    • View Profile
Re: Adventure Game Tutorial Series
« Reply #37 on: July 01, 2015, 03:57:49 PM »
Here's an example of the controller stuff from one of my otter games:

Code: [Select]
            // Set up the session and the controls
            Core.PlayerSession = Core.Game.AddSession(SessionName.Player);
            Core.PlayerController = Core.PlayerSession.Controller;

            Core.PlayerController
                .AddAxis(Controls.Move)
                .AddButton(Controls.A)
                .AddButton(Controls.B)
                .AddButton(Controls.X)
                .AddButton(Controls.Y);

            Core.PlayerController.Button(Controls.A)
                .AddJoyButton(ControllerXbox360.JoyButtonA)
                .AddKey(Key.A);

            Core.PlayerController.Button(Controls.B)
                .AddJoyButton(ControllerXbox360.JoyButtonB)
                .AddKey(Key.S);

            Core.PlayerController.Button(Controls.X)
                .AddJoyButton(ControllerXbox360.JoyButtonX)
                .AddKey(Key.D);

            Core.PlayerController.Button(Controls.Y)
                .AddJoyButton(ControllerXbox360.JoyButtonY)
                .AddKey(Key.F);

            Core.PlayerController.Axis(Controls.Move)
                .AddJoyAxis(JoyAxis.X, JoyAxis.Y, 0)
                .AddJoyAxis(JoyAxis.PovX, JoyAxis.PovY, 0)
                .AddKeys(Key.Up, Key.Right, Key.Down, Key.Left);

You can use strings or enums to define a button, so "Start" does work in your case, but you can also make an enum called Controls and do something like Controls.Start (less prone to typos later)  The ControllerXbox360 class is a class that extends Controller that just has all of the set up for a 360 controller done already.

ericmbernier

  • Member
  • Posts: 35
  • Sometimes I make games.
    • View Profile
Re: Adventure Game Tutorial Series
« Reply #38 on: July 01, 2015, 06:23:42 PM »
@Commanderstitch I'll have to check that post. Looks like it might need some editing :)

@Fatesauce Sorry about that. I only updated the tutorials through Otter 0.9.4 or so, I believe. There might be some minor discrepancies with 0.9.6.

On a side note it's pretty cool that this tutorial still has new readers 1.5 years after I made it O_O. Hope it helped a few of you learn some things in this awesome framework Kyle made. :)

Kyle

  • Administrator
  • Member
  • Posts: 258
    • View Profile
Re: Adventure Game Tutorial Series
« Reply #39 on: July 01, 2015, 06:27:43 PM »
still feels like I made Otter only yesterday ;_;