JPH07633A - Method for expressing character consisting of connected objects - Google Patents

Method for expressing character consisting of connected objects

Info

Publication number
JPH07633A
JPH07633A JP4207097A JP20709792A JPH07633A JP H07633 A JPH07633 A JP H07633A JP 4207097 A JP4207097 A JP 4207097A JP 20709792 A JP20709792 A JP 20709792A JP H07633 A JPH07633 A JP H07633A
Authority
JP
Japan
Prior art keywords
objects
coordinates
character consisting
connected objects
work area
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP4207097A
Other languages
Japanese (ja)
Other versions
JP3154823B2 (en
Inventor
Koji Kaneda
孝司 金田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hudson Soft Co Ltd
Original Assignee
Hudson Soft Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hudson Soft Co Ltd filed Critical Hudson Soft Co Ltd
Priority to JP20709792A priority Critical patent/JP3154823B2/en
Publication of JPH07633A publication Critical patent/JPH07633A/en
Application granted granted Critical
Publication of JP3154823B2 publication Critical patent/JP3154823B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Processing Or Creating Images (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

PURPOSE:To express the motion of a character consisting of a plurality of connected objects in a computer game device with less work area. CONSTITUTION:In a method for controlling the motion of a character consisting of a plurality of connected objects in a computer game device, the x, y- coordinates of the i-th object of the objects are determined by the following expressions: xi=xi+(xi-1-xi)/a, yi=yi+(yi-1-yi)/a, wherein xi, yi are the x, y-coordinates of the i-th object, and (a) is a constant.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明はコンピュータゲーム装置
において、蛇のように長く連結したオブジェクトを動か
す方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for moving a long connected object such as a snake in a computer game device.

【0002】[0002]

【従来の技術】従来、コンピュータゲーム装置において
は、蛇のような長い表示物は多数のオブジェクトの複合
体として表現しているために、これをひとつの連続体と
して動かすには、各動作ごとの個々のオブジェクトの座
標を記憶させておく必要があった。図1がその例であ
る。
2. Description of the Related Art Conventionally, in a computer game device, a long display object such as a snake is represented as a complex of a large number of objects. It was necessary to memorize the coordinates of each object. FIG. 1 shows an example.

【0003】[0003]

【発明が解決しようとする課題】しかしこのような方法
を用いると、ワークエリアが多数必要となり、メモリを
圧迫する原因となっていた。このため、ワークエリアを
減らすためにオブジェクト数を減らしたり、動きのパタ
ーンを減らしたりしてきた。その結果、貧弱な表示物と
なったり、不自然な動きを余儀なくされてきた。
However, when such a method is used, a large number of work areas are required, which causes pressure on the memory. Therefore, in order to reduce the work area, the number of objects has been reduced and the movement patterns have been reduced. As a result, they have been poorly displayed and have been forced to move unnaturally.

【0004】本発明は、使用するワークエリアを減少さ
せる多数オブジェクトからなる表示物の動きをコントロ
ールする方法を目的とする。
The present invention is directed to a method of controlling the movement of a display object consisting of multiple objects that reduces the work area used.

【0005】[0005]

【課題を解決するための手段】蛇の首を押さえれば、蛇
は動けなくなることはよく知られている。これと同じ
で、蛇のように長いキャラクタを表示する場合も、重要
なのは頭の部分である。頭の位置がどこにあるかという
ことが、ゲームではとくに重要である。もちろんその後
ろの存在もなくてはならないが、頭(先頭)ほどには重
要でないことが多い。
[Means for Solving the Problems] It is well known that if the neck of a snake is pressed, the snake cannot move. Similarly to this, when displaying a long character such as a snake, it is the head part that is important. Where your head is is especially important in games. Of course there must be something behind it, but it is often less important than the head.

【0006】とりわけ動きは頭の部分が決まれば、その
後ろの動きもそれに沿った<らしさ>を表現できるもの
になっていれば、ゲーム全体が引き締まったものとして
表現できる。
In particular, if the head part of the movement is determined and the movement behind it is also able to express the "likeness" along it, the entire game can be expressed as a tightness.

【0007】したがって、従来のように動き全体をあら
かじめテーブルで用意しておかなくてもいいような表現
ができればよいわけである。
Therefore, it suffices if an expression that does not require the whole movement to be prepared in advance in a table as in the conventional case can be made.

【0008】そこで本発明では、長いキャラクタの動き
を表す次のような計算式を用いるものである。 xi = xi+(xi-1−xi)/a yi = yi+(yi-i−yi)/a
Therefore, in the present invention, the following calculation formula representing the movement of a long character is used. x i = x i + (x i-1 −x i ) / a y i = y i + (y ii −y i ) / a

【0009】ここでxi、yiはiオブジェクトのx、y
座標である。aは適当な定数で、aの値によって胴の長
さがある程度決ってくる。
Here, x i and y i are x and y of the i object.
Coordinates. a is an appropriate constant, and the length of the body is determined to some extent by the value of a.

【0010】頭にあたるx0、y0は動く位置をプログラ
ムで決めていく部分であるから、あらかじめテーブルに
記憶しておく。しかし1以上のiに対するオブジェクト
については、現時点の座標値だけでよいから、すべての
動作に関する内容は保存しておく必要はない。
[0010] Since the x 0, y 0, which corresponds to the head is the part that will determined by the position of the program running, stored in a table in advance. However, it is not necessary to save the contents of all the operations for the objects for i of 1 or more because only the current coordinate values are required.

【0011】すなわち、図2のようなテーブル管理で、
キャラクタの動きを表せる。図1では(n+1)×s×
(座標に使う長さ)のワークエリアが必要であるのに対
して、図2では{(n+s)×(座標に使う長さ)}の
ワークエリアですむ。
That is, with the table management as shown in FIG.
Can represent the movement of the character. In FIG. 1, (n + 1) × s ×
While a work area of (length used for coordinates) is required, a work area of {(n + s) × (length used for coordinates)} is required in FIG.

【0012】たとえば、n=20、s=100、(座標
に使う長さ)=4バイトとすれば、前者は8400バイ
トのワークエリアが必要なのに対して、後者は480バ
イトのワークエリアで賄える。約4Kバイトのメモリ節
約が行える。
For example, if n = 20, s = 100, and (length used for coordinates) = 4 bytes, the former requires a work area of 8400 bytes, whereas the latter can be covered by a work area of 480 bytes. You can save about 4K bytes of memory.

【0013】[0013]

【実施例】本発明の一実施例として、ランダムウォーク
くする蛇を例に挙げよう。
EXAMPLE As an example of the present invention, a random walk comb snake will be taken as an example.

【0014】ランバムウォークすることから、頭の部分
(X0,Y0)はテーブルの形でこの座標をもつのでな
く、乱数で決定する。すなわち、
Because of the random walk, the head portion (X 0 , Y 0 ) does not have these coordinates in the form of a table, but is determined by a random number. That is,

【0015】X0=X0+Rx×X00=Y0+Ry×Y0 X 0 = X 0 + R x × X 0 Y 0 = Y 0 + R y × Y 0

【0016】と求める。ここでRxとRyは乱数で決める
値で、毎回、乱数テーブルあるいは乱数発生ロジックで
決定する。なお右辺のX0、Y0は、ひとつ前の表示に使
った座標値である。
[0016] Here, R x and R y are values determined by random numbers, and are determined each time by a random number table or a random number generation logic. Note that X 0 and Y 0 on the right side are the coordinate values used for the previous display.

【0017】i番目のオブジェクトの座標は、本発明の
計算式を使って Xi=Xi+(Xi-1−Xi)/A Yi=Yi+(Yi-1−Yi)/A
The coordinates of the i-th object are calculated by using the formula of the present invention: X i = X i + (X i-1 −X i ) / A Y i = Y i + (Y i-1 −Y i ) / A

【0018】と求める。右辺のXi、Yiは前回表示に使
った座標値、Xi-1、Yi-1は新たに計算されたひとつ前
のオブジェクトの座標値である。Aは適当な定数である
が、ある程度試行錯誤で決める必要はあろう。
And ask. X i and Y i on the right side are the coordinate values used for the previous display, and X i-1 and Y i-1 are the newly calculated coordinate values of the previous object. A is an appropriate constant, but it may need to be decided to some extent by trial and error.

【0019】図3は、A=3、N=30で本プログラム
を実行したときの表示例である。ここでNはオブジェク
ト数、先頭は正方形、後続のオブジェクトは円で表示し
ている。
FIG. 3 shows a display example when this program is executed with A = 3 and N = 30. Here, N is the number of objects, the top is a square, and the subsequent objects are circles.

【0020】図4は、A=10に変えたときの実行例で
ある。オブジェクトとオブジェクトの間の間隔が長くな
っている。
FIG. 4 shows an execution example when A = 10 is changed. The distance between objects is increasing.

【0021】さらに図5は、A=2、N=100のとき
の実行例である。オブジェクトとオブジェクトとの間隔
は狭くなるが、オブジェクト数が100となっているた
めに、長蛇になっている。
Further, FIG. 5 shows an execution example when A = 2 and N = 100. The distance between the objects is narrowed, but it is long because the number of objects is 100.

【0022】オブジェクトの座標を記憶しておくテーブ
ルは0〜(N−1)のN個でよいから、オブジェクト数
が増えることによるワークエリアへの圧迫はほとんどな
い。新しく表示するオブジェクトの座標は計算で求まる
からである。
Since the number of tables for storing the coordinates of the objects is 0 to (N-1), there is almost no pressure on the work area due to the increase in the number of objects. This is because the coordinates of the newly displayed object can be calculated.

【0023】しかも、頭の部分も計算で求まるから、プ
ログラムであらかじめテーブルの形でもつ必要もない。
ただし、ランダムウォークでない場合には、動きに合わ
せて(Rx,Ry)をテーブル化しておけばよい。もちろ
ん、(X0、Y0)の座標値をテーブル化してもよい。
Moreover, since the head portion is also calculated, it is not necessary to have it in the form of a table in advance in the program.
However, if it is not a random walk, (R x , R y ) may be tabulated according to the movement. Of course, the coordinate values of (X 0 , Y 0 ) may be tabulated.

【0024】以上の処理を流れ図にしたのが図6であ
る。(Xi,Yi)の初期化では、Aの初期化も行ってお
く。(X0,Y0)の計算は上記の乱数計算で求まるが、
あらかじめ初期化テーブルの形でもっている場合には、
テーブルからの値設定、すなわち代入文となる。
FIG. 6 is a flow chart showing the above processing. In the initialization of (X i , Y i ), A is also initialized. The calculation of (X 0 , Y 0 ) can be obtained by the above random number calculation.
If it is in the form of an initialization table beforehand,
It becomes a value setting from the table, that is, an assignment statement.

【0025】[0025]

【発明の効果】本発明を用いれば、簡単な計算式で、蛇
のような長い物体を自然な動きとして表現できる。しか
も、今までこのような多数のオブジェクトからなるキャ
ラクタを、少ないワークエリアで管理できるようにな
る。
According to the present invention, a long object such as a snake can be expressed as a natural movement with a simple calculation formula. Moreover, it has become possible to manage a character composed of such a large number of objects in a small work area.

【0026】一般に、コンピュータゲーム機の場合には
メモリ上の制約が多く、このようなキャラクタはなかな
か実現できなかっったが、本発明を用いればオブジェク
ト数の寡多にかかわらず、手軽に利用できる効果があ
る。
In general, in the case of a computer game machine, there are many restrictions on memory, and such a character could not be realized easily. However, by using the present invention, it can be easily used regardless of the number of objects. effective.

【図面の簡単な説明】[Brief description of drawings]

【図1】従来のオブジェクト座標管理テーブルの例を示
す説明図である。
FIG. 1 is an explanatory diagram showing an example of a conventional object coordinate management table.

【図2】本発明を利用した場合の座標管理テーブルを示
す説明図である。
FIG. 2 is an explanatory diagram showing a coordinate management table when the present invention is used.

【図3】本発明の実施例で、A=3、N=30で描いた
キャラクタ(Nはオブジェクト数)を示す図である。
FIG. 3 is a diagram showing a character (N is the number of objects) drawn with A = 3 and N = 30 in the embodiment of the present invention.

【図4】本発明の実施例で、A=10、N=30で描い
たキャラクタ(Nはオブジェクト数)を示す図である。
FIG. 4 is a diagram showing characters (N is the number of objects) drawn with A = 10 and N = 30 in the embodiment of the present invention.

【図5】本発明の実施例で、A=2、N=100で描い
たキャラクタ(Nはオブジェクト数)を示す図である。
FIG. 5 is a diagram showing a character (N is the number of objects) drawn with A = 2 and N = 100 in the embodiment of the present invention.

【図6】多数のオブジェクトからなるキャラクタを表示
する処理ルーチンの流れ図である。
FIG. 6 is a flowchart of a processing routine for displaying a character composed of a large number of objects.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 コンピュータゲーム装置において連結し
た複数のオブジェクトからなるキャラクタの動きをコン
トロールする方法において、該オブジェクトのi番目の
オブジェクトのxy座標を xi=xi+(xi-1−xi)/a yi=yi+(yi-i−yi)/a ただし、xi、yiはiオブジェクトのx、y座標、aは
定数、とすることを特徴とする連結オブジェクトからな
るキャラクタの表現方法。
1. A method for controlling the movement of a character consisting of a plurality of connected objects in a computer game device, wherein the xy coordinates of the i-th object of the object are x i = x i + (x i-1 −x i). ) / A y i = y i + (y ii −y i ) / a where x i and y i are the x and y coordinates of the i object, and a is a constant character consisting of a connected object. Expression method.
JP20709792A 1992-07-10 1992-07-10 How to represent a character composed of connected objects Expired - Fee Related JP3154823B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP20709792A JP3154823B2 (en) 1992-07-10 1992-07-10 How to represent a character composed of connected objects

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP20709792A JP3154823B2 (en) 1992-07-10 1992-07-10 How to represent a character composed of connected objects

Publications (2)

Publication Number Publication Date
JPH07633A true JPH07633A (en) 1995-01-06
JP3154823B2 JP3154823B2 (en) 2001-04-09

Family

ID=16534154

Family Applications (1)

Application Number Title Priority Date Filing Date
JP20709792A Expired - Fee Related JP3154823B2 (en) 1992-07-10 1992-07-10 How to represent a character composed of connected objects

Country Status (1)

Country Link
JP (1) JP3154823B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001112957A (en) * 1999-10-18 2001-04-24 Sanyo Product Co Ltd Game machine
JP2009261921A (en) * 2008-03-31 2009-11-12 Copcom Co Ltd Game program, storage medium, and computer apparatus
JP2013200429A (en) * 2012-03-23 2013-10-03 Mitsubishi Electric Corp Controller and remote controller

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001112957A (en) * 1999-10-18 2001-04-24 Sanyo Product Co Ltd Game machine
JP2009261921A (en) * 2008-03-31 2009-11-12 Copcom Co Ltd Game program, storage medium, and computer apparatus
JP2013200429A (en) * 2012-03-23 2013-10-03 Mitsubishi Electric Corp Controller and remote controller

Also Published As

Publication number Publication date
JP3154823B2 (en) 2001-04-09

Similar Documents

Publication Publication Date Title
JP3028338B2 (en) Electronic graphic system
JPS63158091A (en) Method and apparatus for rapidly processing data record showing body on play field displayed on display device to determine body to be displayed at part of play field
JPH07633A (en) Method for expressing character consisting of connected objects
JPS6339947B2 (en)
JPS642953B2 (en)
JPH03235995A (en) Qualified solid character generation system
JPH02130689A (en) Graphic processor
JP2751211B2 (en) Document creation device
JP2616443B2 (en) Graphic drawing device
JPS6461883A (en) Clipping processor
JPH07117823B2 (en) Color display
JP2846165B2 (en) Character learning device
JP2610947B2 (en) Automatic tree image generator using random numbers
JPH01173267A (en) Image processor
JPH03245191A (en) Modified character generation system
JPH0457177A (en) Closed area painting out method in plotting process
JPH04188278A (en) Shape design device
JPH01282679A (en) Cad system
JPH0380294A (en) Formation of character pattern
JPH04180116A (en) Keyboard
JPS62154020A (en) Data input device designating virtual position employing pointing device
JPH04236680A (en) Plotting device
JPS61253583A (en) Production of approximating surface
JPH08272352A (en) Method for controlling movement of image object
JPH0320875A (en) Graphic processor

Legal Events

Date Code Title Description
R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees