Author Topic: (no subject)  (Read 3642 times)

Dude Man

  • Member
  • *
  • Posts: 6393
    • View Profile
    • http://dmdgames.mysticsoftware.net//
(no subject)
« on: June 25, 2004, 05:34:20 PM »
What is this my 1000th RPGCode Question, we might as well make a new section on the fourm called, Dude Man's RPG Code Questions, Answer Dude Man's RPG Code Questions here! Laughing

Anyways, on with the question. I'm makeing a new game called, DMD Fist Fest! I'll tell you more about it later, ANYWAYS! For it I need to know how to, have the player punch an item if it's in front of him. Well basicly I need to know how you can decect if an item is to the left of the player or to the right, I don't need them to be one method. Well I hope you understand my question.


An I also have another question to. I need to know how to make a picture be on the board all the time, like the menu bar in Fallout and Command & Conquer.
« Last Edit: December 31, 1969, 06:00:00 PM by Dude Man »
~Welcome back mysticsoftware.net??
The Black Walkway

Spyder

  • Member
  • *
  • Posts: 1695
    • View Profile
    • http://www.mysticsoftware.net
(no subject)
« Reply #1 on: June 25, 2004, 08:22:57 PM »
I can't tell you the exact code, but I can give you an idea on what needs to be done. Basically your going to have to have a program to track the position of the NPC as well as the position of the player. Then you need a program that checks each position, and when the positions are close enough together, let you punch either side, depending on the positions of each character....hope that made sense =D.

As for the static menu. Unfortunately there is no easy way to do this, as in the TK, you can't currently walk around while an RPGCode program is running in the background (as far as I know anyways...). There are ways to get around it, but they're not pretty, and it would take an extreme amount of programming, and in the end, wouldn't be worth it. I wanted to do the same sort of thing in G:A using the GPS system, and have it overlayed on the screen while you walked around. That would've been cool as hell.
« Last Edit: December 31, 1969, 06:00:00 PM by Spyder »

Dude Man

  • Member
  • *
  • Posts: 6393
    • View Profile
    • http://dmdgames.mysticsoftware.net//
(no subject)
« Reply #2 on: June 25, 2004, 09:08:07 PM »
Quote from: "Spyder"
I can't tell you the exact code, but I can give you an idea on what needs to be done. Basically your going to have to have a program to track the position of the NPC as well as the position of the player. Then you need a program that checks each position, and when the positions are close enough together, let you punch either side, depending on the positions of each character....hope that made sense =D.

Yeah...I kinda knew that all ready....But thanks anyway, maybe Xorlak would know, he's smart!


Quote
As for the static menu. Unfortunately there is no easy way to do this, as in the TK, you can't currently walk around while an RPGCode program is running in the background (as far as I know anyways...). There are ways to get around it, but they're not pretty, and it would take an extreme amount of programming, and in the end, wouldn't be worth it. I wanted to do the same sort of thing in G:A using the GPS system, and have it overlayed on the screen while you walked around. That would've been cool as hell.


I think Khin or whatever his name is did that Heldary, I think I saw something like that in his Screen Shot. To bad it's so tough, but I think it's worth it, like that's the thing missing in all TK Games! But you can have a program running wile you walk around the board. Ever played, my game The Black Walkway 2, at the begining of the game, it's raining, very cool, play it to so it...
« Last Edit: December 31, 1969, 06:00:00 PM by Dude Man »
~Welcome back mysticsoftware.net??
The Black Walkway

Xorlak

  • Administrator
  • Member
  • *****
  • Posts: 2225
    • View Profile
    • http://darkagegames.net
(no subject)
« Reply #3 on: June 26, 2004, 11:49:54 AM »
Quote from: "Dude Man"
Anyways, on with the question. I'm makeing a new game called, DMD Fist Fest! I'll tell you more about it later, ANYWAYS! For it I need to know how to, have the player punch an item if it's in front of him. Well basicly I need to know how you can decect if an item is to the left of the player or to the right, I don't need them to be one method. Well I hope you understand my question.

Yes, you'll probably have to track the item and character movements in a program (basically a battle system), mainly because variable like playerX[0]! and playerY[0]! don't update in the middle of programs.  You'll probably have something like this:

Code: [Select]
* Item movement
#random(4, direction!)
#if(direction!=1)
{
#pushitem(0,"N")
#itemposY[0]!=itemposY[0]!-1
}

... etc.

#if(direction!=4)
{
#pushitem(0,"E")
#itemposX[0]!=itemposX[0]!+1
}

* Player movement
#get(a$)
#if(a$="UP")
{
#push("N",playerhandle[0]$)
#playerposY!=playerposY!-1
#facing!=1
}

... etc.

#if(a$="RIGHT")
{
#push("E",playerhandle[0]$)
#playerposX!=playerposX!+1
#facing!=4
}

*Punch

#if(a$=" ") *Space bar
{
*do punch animation based on value of 'facing!'
...

*check if item is next to player

#if(facing!=1)
{
  #hitposX!=playerposX!
  #hitposY!=playerposY-1!
  *You'll probably want to loop for all items
  #if(itemposX[0]!=hitposX!)
  {
    #if(itemposY[0]!=hitposY!)
    {
       *Hit the item!
    }
  }
}

... etc, for all values of 'facing!'

} * end if(a$=" ")

That's the rudiments of a realtime battle system, sort of like MrG's.

Quote
An I also have another question to. I need to know how to make a picture be on the board all the time, like the menu bar in Fallout and Command & Conquer.


Pretty much the only way you can do this with TK2 (it may be more possible with TK3) is to have non-scrolling boards.  Then you can draw the image to the screen with each #send command.  Another alternative would be a button the user presses to bring up the information, and presses it again to erase it and continue playing (like a menu).
« Last Edit: June 26, 2004, 11:51:02 AM by Xorlak »

Spyder

  • Member
  • *
  • Posts: 1695
    • View Profile
    • http://www.mysticsoftware.net
(no subject)
« Reply #4 on: June 26, 2004, 11:53:17 AM »
Quote from: "Xorlak"
Pretty much the only way you can do this with TK2 (it may be more possible with TK3) is to have non-scrolling boards.  Then you can draw the image to the screen with each #send command.  Another alternative would be a button the user presses to bring up the information, and presses it again to erase it and continue playing (like a menu)

And with the first method, the image would have a flickering effect. If Khin had a real-time menu/map in his game, he must have made a plugin specifically for it, or it had the flickering effect mentioned above.
« Last Edit: December 31, 1969, 06:00:00 PM by Spyder »

Xorlak

  • Administrator
  • Member
  • *****
  • Posts: 2225
    • View Profile
    • http://darkagegames.net
(no subject)
« Reply #5 on: June 26, 2004, 12:15:03 PM »
If you send the player to the board, draw the image, then end with a #done, it should stay put without a flicker (in TK2, at least).  Of course, it'd have to be out of the way of the player and NPC's.  I haven't seen Khin's though, as a few errors prevented me from getting too far in that game.
« Last Edit: December 31, 1969, 06:00:00 PM by Xorlak »

Spyder

  • Member
  • *
  • Posts: 1695
    • View Profile
    • http://www.mysticsoftware.net
(no subject)
« Reply #6 on: June 26, 2004, 12:41:29 PM »
I think he's looking into making a status bar though, which shows stats, which would need to be updated, and thus, cause flickering.
« Last Edit: December 31, 1969, 06:00:00 PM by Spyder »

suicidesven

  • Member
  • *
  • Posts: 17
    • View Profile
(no subject)
« Reply #7 on: June 26, 2004, 01:12:35 PM »
tk3 has threads & you can do it w/ them
« Last Edit: December 31, 1969, 06:00:00 PM by suicidesven »

Dude Man

  • Member
  • *
  • Posts: 6393
    • View Profile
    • http://dmdgames.mysticsoftware.net//
(no subject)
« Reply #8 on: June 26, 2004, 01:27:52 PM »
Cool.

Well thanks Xorlak, I hope this will work. It will be good for my new game DMD Fist Fest! It's kind of an RPG/Fighting game thing...well I guess it's an RPG to...

Anyways. Another question. How would I be able to make an item punch you if it is near enough?
« Last Edit: December 31, 1969, 06:00:00 PM by Dude Man »
~Welcome back mysticsoftware.net??
The Black Walkway

Xorlak

  • Administrator
  • Member
  • *****
  • Posts: 2225
    • View Profile
    • http://darkagegames.net
(no subject)
« Reply #9 on: June 27, 2004, 11:09:25 AM »
Heh, in the above code, you'd need to check the position of the player relative to the item (probably just after it moves), much like the part where the player punches the item.
« Last Edit: December 31, 1969, 06:00:00 PM by Xorlak »

Dude Man

  • Member
  • *
  • Posts: 6393
    • View Profile
    • http://dmdgames.mysticsoftware.net//
(no subject)
« Reply #10 on: July 23, 2004, 07:44:07 PM »
Okay boys. Another one!

I know there is a command or a variable to get a layer titles name...now how do I get it? I forgot...or something...


I think I'm still a newbie....
« Last Edit: December 31, 1969, 06:00:00 PM by Dude Man »
~Welcome back mysticsoftware.net??
The Black Walkway

Xorlak

  • Administrator
  • Member
  • *****
  • Posts: 2225
    • View Profile
    • http://darkagegames.net
(no subject)
« Reply #11 on: July 24, 2004, 11:23:23 AM »
BoardTitle[x!]$, where x! is the layer number you want.
« Last Edit: December 31, 1969, 06:00:00 PM by Xorlak »

Dude Man

  • Member
  • *
  • Posts: 6393
    • View Profile
    • http://dmdgames.mysticsoftware.net//
(no subject)
« Reply #12 on: July 24, 2004, 12:26:07 PM »
Yeee! It works! A now here is why I needed it....

Okay try <a href='http://java script: setImage('http://www.freewebs.com/dmdgames/Menu.bmp')' target='_blank'>this</a> or <a href='http://www.freewebs.com/dmdgames/Menu.bmp' target='_blank'>this</a> or this: javascript:setImage('http://www.freewebs.com/dmdgames/Menu.bmp'), or this: <a href='http://www.freewebs.com/dmdgames/Menu.bmp' target='_blank'>http://www.freewebs.com/dmdgames/Menu.bmp</a>

It's my edit of the menu done by that marco_lucifer dude, for my Mario & Luigi Game!
« Last Edit: December 31, 1969, 06:00:00 PM by Dude Man »
~Welcome back mysticsoftware.net??
The Black Walkway