Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Draycos Goldaryn: ~25 hours [Goal: 40 hours]

I'm actively working on a project that allows rmxp to use AD&D 3.5 Rules. Once this project is complete, then I will begin the actual game making itself. This project will be the basis of all my game projects, and as it is made using rmxp itself, I think it counts. Especially since some of the scripts I will be making for it will be needed for the game(s) also.

As it's still October, I will start this sometime after work tomorrow.

See ya then.

And as i said, I'm lucky if i can get in a hour a day with my schedule and kids, so I have set a personal goal of 40 hours. I think my wife would not be happy if I spent 2 hours each day making my game when I could be helping with the kids, no matter what excuse I gave...
 
Here's a progress Report. So far for this 25 minutes, I have added some code for a few elements for a scrollbar. Ive got the background, the handle, and the up and down arrow buttons. I have yet to tie them together, but my kid wants some attention, so I will have to pause for now...
 
another 30 minutes. used help in irc to figure out how to get my scrollbar to communicate with it's window both directions. tested it, and will develop it further tomorrow after work... maybe. I get off after dinnertime and get home near bedtime, might have to wait till thursday... oh well. total time logged: 55 minutes.
 
woohoo. a whole hour and a half today.

I almost finished my scrollbar, just have to finish the windows so I can test it and develop it's functionality.... I set up my window_base and started a test window. Found an interesting issue and had to figure out a workaround: Example:
[rgss]$data_test = load_data("Data/Test.rxdata")
 
class Test_Window
  def initialize
    @data = $data_test
    @data.push("new string")
    print @data == $data_test #=> true
  end
end
[/rgss]

That's right, If I try to say @data = $data_test and make any changes to @data, it changes $data_test as well. I found a workaround where I instead do this:
[rgss] 
    @data = []
    $data_test.each do |a|
      @data.push(a)
    end
 
[/rgss]

Apparently, when it is time to save, I have to do the same thing in the other direction otherwise they are both changed again. Anyone know why this is?
 
another hour and a half.... got all four buttons to do as needed in the scene in regards to which tab is open, however I am still stuck in a problem. How do I copy an object and edit the copy without changing the original? for example:

[rgss]$actor = RPG::Actor.new
$actor_copy = $actor
$actor_copy.id = 1
p $actor.id, $actor_copy.id #=> returns [1, 1]. I want it to be [0, 1]
[/rgss]

Does anyone know how to accomplish this?

I'm going to post in RGSS Support...
 
ok. updated how my program will save. Also add the list window and got it to display the names of each "object." Also got it to display the scroll bar. Next i will work on getting the cursor_rect to display and update. then maybe get the scrollbar to actually function. That should be good for the next time i work on this.
 
Record time today, for me.

from 1:22 pm to 5:42 pm 4 hours and 20 minutes.

Got cursor_rect in the list window to be drawn and updated properly. Started work on the scrollbar, got it to draw the handle the right size and in the right position depending on the number of items and which one is at the top. next time I'm going to work on scrolling the list window, and having it affect as well as be affected by the scrollbar.
 
3 hours and 30 minutes...

Got the scrollbar to scroll the window as well as the window affect the scrollbar. the only problem I'm having is scrolling the window by dragging the scrollbar handle. It'll do for now. I need to move on to other parts of this. Perhaps i'll come back to the scrollbar later, or just leave it as it is. Next time i will start on a text input system....
 
After I closed out of the maker and started towards the kitchen, an idea suddenly struck me and I ran back to the computer to put it in. It sort of works. The scrollbar handle will now scroll the window, though not as smoothly as I would like. the bar moves a little faster than the mouse, but any tweaks I try to do only make it worse. It is "acceptable" and will work for now. I know I was going to try to make a text input system next, but i think I'm going to make the "Change Maximum" button work properly... which means creating my Popup window class first.

anyway, 10 minutes added to my total.
 
ladeedadeeda.. 4 more hours. I cn't believe how long this took me. most of my "research" was a waste, as one of the scripts I am using already has what I was looking for, so anyway. I can build a string from a player's keypresses. I currently am using the following character '|' as the text cursor. it is part of the string, but I found out how to remove it before saving it. I also have the following keys working as expected: Home, End, Left, Right, Backspace, Delete. My next step will be trying to figure out how to place an actual cursor (from a png) between characters in the string without affecting the string itself. Here is what I have so far (note, it needs Glitchfinders Keys Input Module to function properly.)

[rgss]begin
  $sprite = Sprite.new
  $sprite.bitmap=Bitmap.new(640,480)
  $sprite.bitmap.font.color = Color.new(255,255,255)
  $str = '|'
  $cur_pos = 0
  loop do
    Input.update
    Graphics.update
    unless !Keys.character_repeat
      $str[$cur_pos,1] = Keys.character_repeat
      $cur_pos +=1
      $str.insert($cur_pos,'|')
    end
    if Keys.repeat?(Keys::BACKSPACE) and $str != '' and $cur_pos > 0
      $str[$cur_pos-1,1] = ''
      $cur_pos -=1
    end
    if Keys.repeat?(Keys::DELETE) and $str != '' and $cur_pos < $str.length-1
      $str[$cur_pos+1,1] = ''
    end
    if Keys.repeat?(Keys::LEFT) and $cur_pos > 0
      $str[$cur_pos,1] = ''
      $cur_pos -=1
      $str.insert($cur_pos,'|')
    end
    if Keys.repeat?(Keys::RIGHT) and $cur_pos < $str.length-1
      $str[$cur_pos,1] = ''
      $cur_pos +=1
      $str.insert($cur_pos,'|')
    end
    if Keys.trigger?(Keys::HOME) and $cur_pos > 0
      $str[$cur_pos,1] = ''
      $cur_pos =0
      $str.insert($cur_pos,'|')
    end
    if Keys.repeat?(Keys::ENDS) and $cur_pos < $str.length-1
      $str[$cur_pos,1] = ''
      $cur_pos = $str.length
      $str.insert($cur_pos,'|')
    end
    $str = '' if $str.nil?
    $sprite.bitmap.clear
    $sprite.bitmap.draw_text(0,0,640,480,$str)
    if Input.trigger?(Input::F9)
      exit
    end
    if Input.trigger?(Input::F5)
      prt = $str.dup
      prt[$cur_pos,1] = ''
      print prt
    end
  end
end
 
[/rgss]
 
Worked a bit off and on all day, so probably approximately 4 more hours...

Finally fixed my scrollbar. I found a website to help me with my calculations: http://www.mathway.com/

It took a while to find the correct it even then, because one of my other calculations were wrong, but I found it and fixed it and now my scrollbar accurately scrolls my window while staying with the mouse.

I also played around a little with my text input system, tested a little feature in the MACL may use some of them, we'll see. still trying to find the width of each letter so I can accurately place a cursor bitmap between the characters instead of inserting a "|" in the string.
 
now I wonder if my scrollbar will work properly when I include it in other windows. I tried to leave variables so that it will, but we'll see. Now, to continue working on my text field.
 
worked for about 2 hours today. Spent most of the time trying to find out how to create my own operator in ruby so I could do something like 2d10 to roll a ten sided die twice. finally had an idea and tried it. it works. Here is my new scriptlet:

[rgss]class Integer
  #----------------------------------------------------------------------------
  # d(sides) - Rolling a multi-sided die a certain number of times
  #----------------------------------------------------------------------------
  def d(sides)
    result = 0
    for i in 1..self
      result += rand(sides)+1
    end
    return result
  end
  #----------------------------------------------------------------------------
  # d2 - The equivalent of flipping a coin a certain number of times
  #----------------------------------------------------------------------------
  def d2
    d(2)
  end
  #----------------------------------------------------------------------------
  # d4 - Rolling a four sided die a certain number of times
  #----------------------------------------------------------------------------
  def d4
    d(4)
  end
  #----------------------------------------------------------------------------
  # d6 - Rolling a six sided die a certain number of times
  #----------------------------------------------------------------------------
  def d6
    d(6)
  end
  #----------------------------------------------------------------------------
  # d8 - Rolling a eight sided die a certain number of times
  #----------------------------------------------------------------------------
  def d8
    d(8)
  end
  #----------------------------------------------------------------------------
  # d10 - Rolling a ten sided die a certain number of times
  #----------------------------------------------------------------------------
  def d10
    d(10)
  end
  #----------------------------------------------------------------------------
  # d12 - Rolling a twelve sided die a certain number of times
  #----------------------------------------------------------------------------
  def d12
    d(12)
  end
  #----------------------------------------------------------------------------
  # d20 - Rolling a twenty sided die a certain number of times
  #----------------------------------------------------------------------------
  def d20
    d(20)
  end
  #----------------------------------------------------------------------------
  # d30 - Rolling a thirty sided die a certain number of times
  #----------------------------------------------------------------------------
  def d30
    d(30)
  end
  #----------------------------------------------------------------------------
  # d100 - Rolling a percentile die (2d10) a certain number of times
  #----------------------------------------------------------------------------
  def d100
    d(100)
  end
end
 
[/rgss]

If, for example, you wanted to roll a 6 sided die three times, you would call 3.d6 or 3.d(6)

This will allow me to set player and enemy hit die by entering a string in their hp field and evaluating it later. for example:

A Beholder (according to the 3.5 edition monster Manual) has a Hit die of 11d8+44 (93 hp).
In my program, I would set the hp to "11.d8 + 44" and when the battle starts in game and it assigns the HP to the Beholder I will have it eval this string which should then randomly assign it hp within the appropriate range.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top