Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 [Tutorial]How to Make an RPG in Turing
Index -> Programming, Turing -> Turing Tutorials
Goto page Previous  1, 2
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Andy




PostPosted: Fri Nov 26, 2004 4:12 pm   Post subject: (No subject)

read up on textfile maps
Sponsor
Sponsor
Sponsor
sponsor
wtd




PostPosted: Fri Nov 26, 2004 6:36 pm   Post subject: (No subject)

Viper wrote:
ok im makin a rpg that is kinda like diablo and i wanna make a large map but i dont know how to make something larger than the screen and be able to see it(or move to it)


My suggestion: model your board in software as a multi-dimensional array of board squares. Something like:

code:
type Character :
   record
      name : string
      hitPoints : int
      evil : boolean
   end record

type Square :
   record
      roughTerrain : boolean
      name : string
      characters : flexible array 1 .. 0 of Character
   end record

var board : array 1 .. 200, 1 .. 200 of Square


Now, when you want to draw the currently visible map, you just draw the segment of that multi-dimensional array that's supposed to be onscreen.

Sort of like:

code:
procedure drawSquare (s : Square)
   % insert magic here
end drawSquare

procedure drawBoard (b : Square (1 .. *), startx, endx, starty, endy : int)
   for x : startx .. endx
      for y : starty .. endy
         drawSquare (b (x, y))
      end for
   end for
end drawBoard
seymournexus




PostPosted: Tue Dec 14, 2004 8:54 pm   Post subject: (No subject)

thank you, I like it very much and it also helped me very much
Shyfire




PostPosted: Tue Feb 08, 2005 12:02 pm   Post subject: ummmmm

yeah im having the same problem with my rpg i cant find a way to make a map that is larger than the screen!!!!!!!!
Very Happy o by the way good job on the tutorial Very Happy
Drakain Zeil




PostPosted: Sat Feb 12, 2005 11:43 am   Post subject: (No subject)

Make a text file map, or if you want to do it anotherway (why I don't know) just store it in an array... same idea, only it's just use of reading a file or not.

Anyway, what you want to do is load all of the images, then place on a (2-d array) grid where that image goes according to the number on it. If you can't get a map largen then you're window, what you're probably doing is developing the map around the screen, instead of the screen showing parts of the map (yes, I know I'm not good with explainations...) and only place images that are on the part of the array centered of your window, and out X number of tiles.

You could have a map that is in total... let's say 25600 x 25600 pixels, but you can only show... let's say 600x600 at any given time. You set up your game to figure out where your "view square" is, find the mid point of it on the map (not screen, map), and draw everything within 300x300 from that point. Another way is to just have one corner, and go 600x600 from that point... you really have a lot of choices here, but those two are generaly good. Anyway, lets say your tile set is 100 pixels, you map would only need 256x256 numbers (I suggest you use characters, then use the ord/chr to translate, unless you only WANT ten tiles, or an overly complicated system) and draw as it progresses.

... I have a feeling I didn't make somthing clear and have confused some one... I really need to work on communicating ideas... Confused

Well.. I hope this helped, if not ask and I'll try to clear it up.
The_$hit




PostPosted: Tue Mar 08, 2005 7:18 pm   Post subject: (No subject)

I am wondering in an rpg what do you do to make sure that you are not colliding with any other objects that you have place?
Cervantes




PostPosted: Tue Mar 08, 2005 8:38 pm   Post subject: (No subject)

Well, if the object is something like a tree, ie. something that is in your text file / map and never moves, compare the position of your character (and/or the positions around the character) with the value of the grid

code:

%map is a 2d array.  it contains all the information about the map.
%to compare player with the environment to his right
if map (player.x + 1, player.y) = 1 then %1 represents a cliff
  player.fall_off_cliff := true  %:D  lol
end if


If the object is something like a monster, ie. something that moves around, compare the x and y values of your character with the x and y values of the monster.

code:

if player.x = monster.x and player.y = monster.y then
  put "player and monster are overlapping / fighting"
end if

And, to save dodge the trouble, you could also use whatdotcolour.
All you're doing is collision detection. There's a few tutorials here, do a search for them. Smile
Alex C.




PostPosted: Wed Jan 11, 2012 3:52 pm   Post subject: RE:[Tutorial]How to Make an RPG in Turing

VERY impressive... O_O you wrote very well detailed help here!
Sponsor
Sponsor
Sponsor
sponsor
thegameprogrammer




PostPosted: Wed Jul 10, 2019 11:04 am   Post subject: Re: [Tutorial]How to Make an RPG in Turing

Quote:
How to make an RPG in Turing - Dated March 30th, 2003

This guide will help you through all the steps of creating an RPG. Be aware that in order to actually allow the user to "roleplay" their character, the better the experience, although this requires a lot more coding than a simple hack and slash game. Be warned, an RPG is very difficult to code, and will take many weeks, and months, or even years if you want it to be very well done.

Things to Know Before You Start

When making the RPG, make sure that you have knowledge of the following Turing concepts, and how to use them:

Displaying Text (Obviously)
Collecting Variables and using them
If statements (Very important)
Reading and Writing to/from a file (If you use saving)
Functions and Procedures (VERY useful for repetitive processes)
Processes (For music, or timers)
Arrays (For many types of 1 variable. i.e. items)
Loops (Very important in an RPG! Know conditional and counted loops)
Random Number

That should cover the basics. If you decide to make a more complex RPG, you may require other things, such as modules, etc. If you do not have sufficient knowledge of these concepts, it is not recommended that you make the RPG, until you have learned them, as this will make your life much harder.

A recommended idea is to play an RPG thoroughly, and explore the game, until you get the feel of how an RPG is made. The more you know about an RPG, the easier it will be to make your own.

About this Tutorial

This tutorial will cover many commands of Turing that you should know, but read them anyways, because their uses may help you when you want the RPG to do a specific task.


Hey mate this is great and very long guide thank you for that, but aren't top games nowadays made mainly in unity and unreal game engines? I think even companies give up on coding their own tools
Display posts from previous:   
   Index -> Programming, Turing -> Turing Tutorials
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 2 of 2  [ 24 Posts ]
Goto page Previous  1, 2
Jump to:   


Style:  
Search: