Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - GasolineWaltz

1
General Discussion / inspiration?
September 22, 2011, 10:12:02 pm
So, I guess I've hit a roadblock with programming.

I used to dabble with coding back in high school, I've always been interested in writing programs etc... But I really started to learn with Ruby, first as a means to write RMXP scripts and then just to learn the language. Then, I switched over to C++ (which I was familiar with) and started to re-learn the fundamentals. Everybody says that it's difficult to go from a dynamic language to C++, but I'm not having a hard time with it. So, I'm in this class right now (Object Oriented Design in C++, has nothing to do with my major) that I tested into and it's interesting. It's it's fun to code stacks and make linked lists and delve into the technical details, but I need a practical project that I can work on.

Writing an emulator has been on my mind for a while, but I don't even know where to begin...

Kind of a broad topic I understand if nobody has anything for me. Any ideas?
2
RPG Maker Scripts / alias placement question
December 29, 2010, 12:26:37 pm
so, I thought that I had a good grasp on aliasing, but then I started thinking about it a little more and confused myself...

example: a basic HUD alias
class Scene_Map
  alias mainHUD_main main
  alias mainHUD_update update
 
  def main
    @window_HUD = Window_HUDMain.new
    mainHUD_main
    @window_HUD.dispose
  end
  def update
    @window_HUD.update
    mainHUD_update
  end
end


so, what is the deal with the aliased method placement? It usually works out for me in the long run, because I can just switch them around if anything is acting up... but what exactly is going on here? Is it that @window_HUD has to be defined before the main method is called so it can be disposed? But if thats the case, why is update above mainHUD_update?
3
RMXP Script Database / [XP] Particle Weather Engine
December 28, 2010, 10:21:54 pm
Particle Weather
Authors: GasolineWaltz
Version: 3
Type: Particle Engine for weather effects
Key Term: Environment Add-on



Introduction

As of right now, this script does two things: creates particle weather and wind effects. Both of these functions are independent, which I think makes for pretty good control over the environment in your game.  

Makes use of particles in the Graphics/Pictures/Particles folder

here's some particles http://www.mediafire.com/?f4dl7aj8zfmml7m


Features


  • Weather Particles

  • Wind





Demo

http://www.youtube.com/watch?v=FsA9ycYqGyM

this is just to give you an idea... the screen cap software I used only records at 30fps, and makes the game seem a little choppy.. It looks soooo much better in game. Especially the rain, you can't really see the wind effects in the video cos of the low fps.

http://www.mediafire.com/?6kfyh4l68f944fj


here's a very simple demonstration of the particles at w3rk



Script

https://docs.google.com/leaf?id=0B5AnMItZ28l8N2Y3Y2Y0ZTktZTBmYS00MTY0LTg5OGYtMzczYjEyZWU5NDI3&hl=en



Instructions
Two things:

$game_map.p_weather(type, power, duration)
       type:     enter as a string. ex: 'rain'
       power:    number of particles to appear on screen,
       duration: amount of time in frames weather takes to reach its max (buggy)

$game_map.p_wind(strength, duration, direction)
      strength:   enter as an array: [x power, ypower] (as of right now this number has to be a multiple of four)        
      duration:   amount of frames between gusts
      direction:  enter as array w/ numbers:
                   [4= left; 6 = right, 2 = down; 6 = up]
                          note: x may be reversed... just mess around with it

#particle_struct at line 214 is h youow build new particles, I tried my best to lay them out in a readable fashion... it's pretty self explanatory, just make a new 'type' and then give that type a bunch of features.


Additional notes:

 If you like this script, help out! It's still in its initial phase, I'm sure there are some bugs to work out... but that aside, more particles/new more realistic particles, effects etc... it could be a pretty cool thing :^_^':


Compatibility
 Seeing as this script just aliases #game_screen and #spriteset_map, it should work with most scripts...


Credits and Thanks


  • GasolineWaltz

  • check out Avelpopo's particle engine




Author's Notes

None
4
RMXP Script Database / [XP] Run / Dash / Jump
November 19, 2010, 02:36:05 pm
Run / Dash / Jump
Authors: GasolineWaltz
Version: 1.0
Type: Run and Jump System
Key Term: Custom Movement System



Introduction

This script started as part of a bigger project from a game that I'm working on, but it was getting too big and I decided to break it up for the moment. Basically, this provides the ability to run while pressing the A key, and jump when pressing the S key. For the first few seconds while running, the character is 'dashing' and can bump into things. Also, you can jump one more tile while dashing. The jump feature can be disabled with terrain tag #2.

I'm still kind of new to scripting so I wanted to get some opinions, I'd like to make it better... such as disabling jump when a message box is present but I'm not exactly sure how to do it. any feedback would be appreciated.


Features


  • use the "A" and "S" keys to run and jump
  • use terrain tags to make walls
  • script calls for many useful functions
  • <AND SO ON>



Screenshots

<REQUIRED IF IT MAKES SENSE, IF NO PLEASE MENTION IT SO PEOPLE DON'T ASK>


Demo

http://www.mediafire.com/?fifxhfx5jk8fzci



Script

Spoiler: ShowHide

#Run/Dash/Jump by GasolineWaltz
#=================================================
#This script allows you to dash, run and jump by pressing
#  the 'A' and 'S' keys. You can also have events interect
#  while dashing by calling $game_player.hit_wall.
#
#Jump can be disabled with the terrain tag 2.
#Run or Jump can be disabled / enabled by calling
#  $game_player.toggle_act('disable/enable', 'jump/run').
#
#$game_player.run_count accesses the players run counter
#  for status bars / event interactions
#
#$game_player.disable_jump/disable_run returns
#  the status of running of jumping.
#=================================================

class Game_Character
 attr_reader :run_count
 attr_reader :hit_wall
 attr_reader :disable_jump
 attr_reader :disable_run
 

alias move_initialize initialize
def initialize
move_initialize

@disable_jump = false
@disable_jump_check = false
@disable_run = false

@hit_wall = false
@hit_wall_effect = false
@running = false
@run_count = 300

@route = RPG::MoveRoute.new
end
end
#=======================

#=======================
class Game_Player < Game_Character

alias movement_update update
def update
movement_update

terrain_check
input_check
end
#-------------------------------------------------------------------------
def input_check

unless @disable_jump
jump_shoes if Input.trigger?(Input::Y)
end


unless @disable_run
if Input.press?(Input::X)
 if !@hit_wall
@running = true
running_shoes
run_counter(@run_count)
 else
@move_speed = 4
 end
else
 if @run_count < 300
restore_run(@run_count)
 end
 if @running
@move_speed = 4
@running = false
@hit_wall = false
@hit_wall_effect = false
 end
end
end

end
#-------------------------------------------------------------------------
def direction_get
x_dir = (@direction == 6 ? 1 : @direction == 4 ? -1 : 0)
y_dir = (@direction == 2 ? 1 : @direction == 8 ? -1 : 0)
return [x_dir, y_dir]
end
#-------------------------------------------------------------------------
def terrain_tag_get(x = @x,y = @y)
return $game_map.terrain_tag(x,y)
end
#-------------------------------------------------------------------------
def terrain_check
t_tag = terrain_tag_get
dir   = direction_get
case t_tag
when 2           #tiles that cannot be jumped on
if !@disable_jump           #checks to see if jump is already disabled.
@disable_jump = true
@disable_jump_check = true
end
end

if t_tag != 2 && @disable_jump_check == true
@disable_jump = false
@disable_jump_check = false
end

end
#-------------------------------------------------------------------------
def toggle_act(function = '', act = '')
case function
when 'disable'
 a = true
when 'enable'
 a = false
end
case act
when 'jump'
 @disable_jump = a
when 'run'
 @disable_run = a
end
 end


#=============================================
#Jump Shoes
#=============================================

def jump_shoes

x_dir = direction_get[0]
y_dir = direction_get[1]


jump_skill = $game_variables[30]
jump_distance = 0
passable_jump = $game_map.passable?(@x + (x_dir * 2), @y + (y_dir * 2), @direction)
passable_run_jump = $game_map.passable?(@x+(x_dir * 3), @y+(y_dir*3),@direction)
game_events = $game_map.events[$game_map.check_event(@x + (x_dir * 2), @y + (y_dir * 2))]
run_jump_events = $game_map.events[$game_map.check_event(@x+(x_dir*3),@y+(y_dir*3))]
clear_a = true
clear_b = true

if game_events
clear_a = game_events.through
elsif run_jump_events
clear_b = run_jump_events.through
end

if clear_b && passable_run_jump && Input.dir4 > 0 && @move_speed == 6
jump_distance = 3
else
if clear_a && passable_jump && Input.dir4 > 0
jump_distance = 2
else
jump_distance = 0
end
end

jump_move(x_dir, y_dir, jump_distance)
Audio.se_play("Audio/SE/016-jump02")
end
#-------------------------------------------------------------------------
def jump_move(x, y, d)
@route.list.clear
@route.list.push(RPG::MoveCommand.new(37))
@route.list.push(RPG::MoveCommand.new(14, [x * d, y * d]))
@route.list.push(RPG::MoveCommand.new(38))
@route.list.push(RPG::MoveCommand.new(0))
@route.repeat = false


$game_player.force_move_route(@route)
end

#===========================
#Running Shoes
#===========================

def running_shoes

x_dir = direction_get[0]
y_dir = direction_get[1]
hit_wall = $game_map.passable?(@x + x_dir, @y + y_dir, @direction)
hit_event = $game_map.events[$game_map.check_event(@x + x_dir, @y + y_dir)]
event_through = true
if hit_event
event_through = hit_event.through
end

case @run_count
when 260..300
 @move_speed = 6
if !hit_wall && moving?
@hit_wall_effect = true
elsif @hit_wall_effect && !moving?
wall_hit
end

if hit_event && event_through == false && moving?
@hit_wall_effect = true
elsif @hit_wall_effect && !moving?
wall_hit
end
when 2..259
 @move_speed = 5
when 0..1
 @move_speed = 3
end
end
def run_counter(run_time)
if run_time > 0 && moving?
 run_time -= 2
 @run_count = run_time
 return run_time
end
end
def restore_run(run_restore)
 run_restore += 1
 @run_count = run_restore
end
#-------------------------------------------------------------------------
def wall_hit
Audio.se_play("Audio/SE/052-cannon01",80,130)
$game_screen.start_flash(Color.new(200,0,100,35), 2)
$game_screen.start_shake(4, 6, 10)
@hit_wall_effect = false
@hit_wall = true
end
end




Instructions

In the script



Compatibility

No issues known.



Credits and Thanks


  • GasolineWaltz



Author's Notes

[EDIT]
sorry about not using the template :^_^':

"I would Like to thank Ryex for properly applying the template" or at least that is what I would say ~ Ryex
5
Welcome! / Whatupp
November 17, 2010, 02:15:55 pm
Whats up all? I'm coming over from RPG Revolution forums, I think I like it better here. I'm mainly down with scripting right now, still learning etc...

So, anywayz, how is everyone doing?