Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411475 Posts in 69369 Topics- by 58424 Members - Latest Member: FlyingFreeStudios

April 23, 2024, 02:17:07 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityTownhallForum IssuesArchived subforums (read only)Tutorials2D Turn based RPG tutorials [beginner]
Pages: [1]
Print
Author Topic: 2D Turn based RPG tutorials [beginner]  (Read 3563 times)
atsiitech
Level 0
**



View Profile WWW
« on: August 15, 2014, 11:17:53 AM »

Hello Durr...?,

As I'm prototyping a 2D RPG game I'm also writing what I discover - in tutorial form. I'd appreciate any feedback. My approach with the tutorials is Keep It Simple. Start simple, add fluff later, etc.

Part 1: Grid movement

Part 2: Camera control

Part 3: Lighting the map

Part 4: Enemy/NPC AI (moving)

I'll update this post when I add more.
« Last Edit: August 20, 2014, 09:13:52 AM by atsiitech » Logged

eyeliner
Level 10
*****


I'm afraid of americans...


View Profile
« Reply #1 on: August 18, 2014, 12:46:34 AM »

Good jog, dude. Keep'em coming!
Logged

Yeah.
tsamf
Level 0
*


View Profile
« Reply #2 on: August 18, 2014, 06:06:16 AM »

Great tutorials, they cleared up more than one aspect of unity that I was unsure about .
Logged
atsiitech
Level 0
**



View Profile WWW
« Reply #3 on: August 18, 2014, 07:23:13 AM »

Hey, thanks a lot for checking them out!

Next up is some very simple AI and how to call it from other scripts. Also some adjustments to the player movement code. Soonish.
Logged

atsiitech
Level 0
**



View Profile WWW
« Reply #4 on: August 20, 2014, 09:14:41 AM »

Part 4 has now been added. Let me know if it looks too mush and not understandable.
Logged

tsamf
Level 0
*


View Profile
« Reply #5 on: August 25, 2014, 02:44:40 PM »

Not a bad tutorial at all~ but there are a few things I noticed

An interface isn't what allows your other scripts to call methods in your enemy class. You have a public access modifier on the ExecuteAI() method which allows other scripts to access it. The intended purpose of an interface is to define attributes that a class must have to inherit said interface.

For example: if all of your enemies were going to have health you could define a health property in your interface for inheriting classes to define, ensuring that all enemies have a health bar.

The second thing is that you are putting your enemy controller in the player controller. This causes a dependency between the two when they should be modular and separate objects. For example, maybe you have a level with no enemies but you have a player. When you drag your player object into the scene with your player controller script attached, it's going to have all of that unused enemy controller code attached too. The way you've coded this may cause an issue. This design choice also makes your code less clean and will be harder for others to look at and debug through.

I hope this helps!
Logged
analaura
Level 0
*


View Profile
« Reply #6 on: August 26, 2014, 05:14:30 AM »

so gggood jogos de cozinhar
« Last Edit: September 03, 2014, 04:43:47 AM by analaura » Logged
atsiitech
Level 0
**



View Profile WWW
« Reply #7 on: September 01, 2014, 10:44:03 AM »

@tsamf

Thanks for the tips. The use of the interface was a bit of a brain fart, I fear. I will revise the code and make it better and by your suggestions.

@analaura
Thanks!  Grin
Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic