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 - stripe103

1
Every now and then when I play games or use other fullscreen applications and Alt-Tab out of it to do something else, games I play crash in some wierd way that makes me unable to go back into the game and continue.
Problem is that there is a black overlay on screen so that I can't do anything else on the computer other than accessing the Win 8 start menu and taskbar.
Trying to force quit the game process with Alt-F4 doesn't work and the task manager and any other program is behind the black overlay, uninteractable.

I'm thinking of making some program that is capable of force closing the game, but I'm not sure how to detect the correct process to close yet.

Does anyone have any solution to this problem, which I assume is somewhat common, or do I have to keep restarting the computer every time this happens?
I would ask on like the steam forums, but I think I'll get better answers here :P
2
Hello there. It has been a while since I last posted on here, although I've always been lurking around =)

Anyway, I would just like to ask if anyone knows if an upgrade to Visual Studio 2012 from 2010 is worth the price?
Personally I don't quite like the looks of it, icons look a lot the same, and it isn't that appealing to look at overall. From what I've understood it doesn't work with XNA either.
Are there any other special reasons to upgrading, or can I stay at 2010 without any problems?

Another thing, is that from what I've understood, XNA isn't being developed anymore, and like said doesn't seem to work with Visual Studio 2012 too good.
Is it worthless to continue using XNA and go to another game engine instead, or will it still be supported to run in systems in the future?

I've recently been looking into Haaf's Game Engine(HGE) as I got it as a tip from a former Ubisoft employee as a good place to start making games.
It's using C++ which I haven't quite understood the logic of. Would it be better to continue with that instead of XNA maybe? Which one would be the best if you're looking to getting a career in game programming?
3
Hello there.

Recently, I have been searching around for a new keyboard, because I think I need a new one because my current one is not quite suitable for
gaming and because it's old. The problem is that I'm a bit precise on what I want, so it have been hard to find a keyboard that
I think is good and that I can use for both gaming, as well as programming and writing.

A little backstory of what I've been doing searching around.
I have looked at some different ones and the ones that appealed to me the most was the Razor BlackWidow Ultimate, so I bought it.
Turns out that the clicky MX Blue switches are heard in the whole house, which is bad, so I returned it a week later.
Another one that I think looked pretty nice was the Microsoft Sidewinder x4. After looking on reviews for it, it turns out
that the spacebar is much longer on it, resulting in a much larger space between the right Alt key and the '{', '}', '[' and ']' keys,
meaning that it isn't too good for using when programming, because that is probably some of my most used key combinations,
so I scrapped that too.

So, this far, the only solution I've found is to have one keyboard for gaming, and keep my old one for when programming, but I don't
really think that should be necessary, so I ask here for help in choosing one.

Another thing that I would like, but is not necessary to have, is backlight, since I play when it's dark sometimes and when me and my
friends have Lan parties. I would be the only one with backlighting :P

So yeah, if anyone have heard of a good keyboard that is pretty much an all-around keyboard that I can use for both gaming,
and programming.

Regards from the swedish Stripe :)
4
Okay, so I've been trying this all afternoon, but can't make it work properly.
I'm making a basic kinda of event-system for our Unity3D project, and I'm having trouble.

Basically, I want to have two(for now) strings in every class that derives from the class EventCommand.
Those variables are then going to be read by the Unity editor script by using something like

foreach (EventCommand cmd in eventCommands) {
  if (cmd.CommandName != null) {
    eventBase.tabs[selectedTab].commands.Add(cmd);
  }
}


that will then add the command to a list of commands.

Problem is that I can't get it to read anything more than an empty string, or whatever is set in the EventCommand class.
So I want to be able to change those two variables (or functions, if that's better) into returning custom strings for each class that inherits from it.

I've tried using functions (both normal like the ones below, as well as using virtual or abstract and overriding them)

Code: EventCommand.cs

public class EventCommand {
  // Preview of command configuration
  public string CommandString() {
    return "";
  }

  // Name shown in list of commands
  public string CommandName() {
    return "";
  }
}


Code: EventMessage.cs

public class EventMessage : EventCommand {
  public new string CommandString() {
    return "Show Message: Text here";
  }

  public new string CommandName() {
    return "Show Message";
  }
}


And I've tried using normal variables (as below, as well as using const, basically, I've tried everything I can think of.)

Code: EventCommand.cs

public class EventCommand {
  // Preview of command configuration
  public string CommandString = "";

  // Name shown in list of commands
  public string CommandName = "";
}


Code: EventMessage.cs

public class EventMessage : EventCommand {
  public new string CommandString = "Show Message: Text here";
  public new string CommandName = "Show Message";
}


Am I just stupid, missing something, or is there a better way to do this?
If someone experienced could help me with this, as it's a school project that's pretty important, I'd be very grateful.
5
Hai Chaos!

I was just wondering if there is any good, free and somewhat simple game libraries out there. I would prefer C# since that's what I'm best with but post anything good you have anyway :)
I'm currently using the AGate Library, but I have had some problems with it and you can't really do too much with it. (Audio for example isn't easy to get to work)

Note for some: I search only game libraries that handle graphics, audio and input and lets me program everything else. No finished game engines such as Unity3D or UDK.
6
I have a problem with computers on a school where I'm doing internship right now.
Basically, we have reinstalled the computers, now being XP Home since they were that original.
The problem is that web browsers can access the Internet, but no other programs can. Not system programs,
not Minecraft, nothing. Including system applications, meaning we cannot activate Windows either.
We've installed proper drivers, we have searched on google for a couple of hours, without finding any solution.
We have also tried using another network card and cable, but it was just the same, browsers, but nothing else.

Do you know what it could be?
7
I'm trying to make a Super Mario World kind of copy myself in C# using the game library AGATELib. The thing is that it's FPS is changing between like 200 to 1000, but I want to have the animation speed to be constant(different between each block in this case) and the code I currently have updates the animation for example once every 10 frames, and if the fps change, the animation speed does too.

I'm not very experienced with making games like this and need help with it. Basically I need some kind of equation or something that makes me able to have the same animation speed.

This is the animation update method that all blocks use: ShowHide

Variables are:
private Sprite sprite;
private double animationSpeed;
private double frames = 0;
Code: Update method
public void MainUpdate()
        {
            if (frames > animationSpeed)
            {
                sprite.AdvanceFrame();
                frames = 0;
            }
            frames++;
        }


What can I do to make this work?

Regards
Stripe103
8
Okay, so me and a couple of friends are making a Hack and Slash game in Unity3D for a school project, but right now, I'm struggling with getting the water shader look right.
Here is a screen of the result I currently have.
3 MB: ShowHide

Shader(not mine): ShowHide


Shader "Custom/Water (awesome)" {
Properties {
_horizonColor ("Horizon color", COLOR)  = ( .172 , .463 , .435 , 0)
_WaveScale ("Wave scale", Range (0.02,0.30)) = .07
_ColorControl ("Reflective color (RGB) fresnel (A) ", 2D) = "" { }
_ColorControlCube ("Reflective color cube (RGB) fresnel (A) ", Cube) = "" { TexGen CubeReflect }
_BumpMap ("Waves Bumpmap (RGB) ", 2D) = "" { }
WaveSpeed ("Wave speed (map1 x,y; map2 x,y)", Vector) = (19,9,-16,-7)
_MainTex ("Fallback texture", 2D) = "" { }
_RippleMap ("RippleMap (RGB) ", 2D) = "ripple" {}
    RipplePosition ("Ripple (x,y offset; x,y scale)", Vector) = (0.5, 0.5, 0.05, 0.05)
}

CGINCLUDE
// Upgrade NOTE: excluded shader from Xbox360; has structs without semantics (struct v2f members rippleuv)
#pragma exclude_renderers xbox360
// -----------------------------------------------------------
// This section is included in all program sections below

#include "UnityCG.cginc"

uniform float4 _horizonColor;

uniform float4 WaveSpeed;
uniform float4 RipplePosition;
uniform float _WaveScale;

struct appdata {
float4 vertex : POSITION;
float3 normal : NORMAL;
};

struct v2f {
float4 pos : SV_POSITION;
float2 bumpuv[2] : TEXCOORD0;
float2 rippleuv[1];
float3 viewDir : TEXCOORD2;
};

v2f vert(appdata v)
{
v2f o;
float4 s;

o.pos = mul (UNITY_MATRIX_MVP, v.vertex);

// scroll bump waves
float4 temp;
temp.xyzw = (v.vertex.xzxz + _Time.x * WaveSpeed.xyzw) * _WaveScale;
o.bumpuv[0] = temp.xy * float2(.4, .45);
o.bumpuv[1] = temp.wz;
o.rippleuv[0] = v.vertex.xz * float2(RipplePosition.w, RipplePosition.z) + float2(RipplePosition.x, RipplePosition.y);

// object space view direction
o.viewDir.xzy = normalize( ObjSpaceViewDir(v.vertex) );

return o;
}

ENDCG

// -----------------------------------------------------------
// Fragment program

Subshader {
Tags { "Queue" = "Transparent" }
Blend SrcAlpha OneMinusSrcAlpha
ColorMask RGB

Lighting On
Pass {

CGPROGRAM
#pragma vertex vert
#pragma fragment frag
#pragma fragmentoption ARB_precision_hint_fastest
#pragma fragmentoption ARB_fog_exp2

sampler2D _BumpMap;
sampler2D _RippleMap;
sampler2D _ColorControl;



half4 frag( v2f i ) : COLOR
{
half3 bump1 = tex2D( _BumpMap, i.bumpuv[0] ).rgb;
half3 bump2 = tex2D( _BumpMap, i.bumpuv[1] ).rgb;
half3 bump3 = tex2D( _RippleMap, i.rippleuv[0] ).rgb;
    half3 bump = bump1 + bump2 + bump3 - 1.5;

half fresnel = dot( i.viewDir, bump );
half4 water = tex2D( _ColorControl, float2(fresnel,fresnel) );

half4 col;
col.rgb = lerp( water.rgb, _horizonColor.rgb, water.a );
col.a = _horizonColor.a;
col.a = water.a;
return col;
}


ENDCG
}
}

// -----------------------------------------------------------
// Radeon 9000

#warning Upgrade NOTE: SubShader commented out because of manual shader assembly
/*Subshader {
Tags { "Queue" = "Transparent" }
Blend SrcAlpha OneMinusSrcAlpha
ColorMask RGB

Pass {
CGPROGRAM
// Upgrade NOTE: excluded shader from OpenGL ES 2.0 because it does not contain a surface program or both vertex and fragment programs.
#pragma exclude_renderers gles
#pragma vertex vert
// just define 'vert' as a vertex shader, the code is included
// from the section on top
ENDCG

Program "" {
SubProgram {
Local 0, [_horizonColor]

"!!ATIfs1.0
StartConstants;
CONSTANT c0 = program.local[0];
EndConstants;

StartPrelimPass;
SampleMap r0, t0.str;
SampleMap r1, t1.str;
PassTexCoord r2, t2.str;

ADD r1, r0.bias, r1.bias; # bump = bump1 + bump2 - 1
DOT3 r2, r1, r2; # fresnel: dot (bump, viewer-pos)
EndPass;

StartOutputPass;
SampleMap r2, r2.str;

LERP r0.rgb, r2.a, c0, r2; # fade in reflection
col.a = water.a;
MOV r0.a, c0.a, r2.a;
EndPass;
"
}
}
SetTexture [_BumpMap] {}
SetTexture [_BumpMap] {}
SetTexture [_ColorControl] {}
}
}*/

// -----------------------------------------------------------
//  Old cards

// three texture, cubemaps
Subshader {
Tags { "Queue" = "Transparent" }
Blend SrcAlpha OneMinusSrcAlpha
ColorMask RGB
Pass {
Color (0.5,0.5,0.5,0.5)
SetTexture [_MainTex] {
Matrix [_WaveMatrix]
combine texture * primary
}
SetTexture [_MainTex] {
Matrix [_WaveMatrix2]
combine texture * primary + previous
}
SetTexture [_ColorControlCube] {
combine texture +- previous, primary
Matrix [_Reflection]
}
}
}

// dual texture, cubemaps
Subshader {
Tags { "Queue" = "Transparent" }
Blend SrcAlpha OneMinusSrcAlpha
ColorMask RGB
Pass {
Color (0.5,0.5,0.5,0.5)
SetTexture [_MainTex] {
Matrix [_WaveMatrix]
combine texture
}
SetTexture [_ColorControlCube] {
combine texture +- previous, primary
Matrix [_Reflection]
}
}
}

// single texture
Subshader {
Tags { "RenderType"="Opaque" }
Pass {
Color (0.5,0.5,0.5,0)
SetTexture [_MainTex] {
Matrix [_WaveMatrix]
combine texture, primary
}
}
}

}


Thing it that we don't have access to reflections or post processing, but reflections aren't really needed and the post processing(that is needed to make it look darker the deeper it goes) can be drawn to the terrain instead.

The thing I really need it proper bumpmaps or another shader that is better. If it's possible and simple, displacement of some sort would be welcome as well.

I hope you guys can help us with this.

Regards
Stripe103
9
Hello there Chaos.

I need help with some new part I'm going to buy for my PC. Well, I need help with knowing if the power connectors are enough.

I'm going to buy a ASUS Sabertooth 990FX motherboard for my PC since it is a bit hard to put a AMD processor in a Intel socket.
This motherboard need one 24-pin EATX and one 8-pin ATX 12V power connectors, but my current motherboard and power supply only have one
24-pin and one 4-pin, so I don't know if it will work or if I need a new power supply.
The current power supply is on 450W if that is needed.

Regards
Stripe103
10
Video Games / Epic problem with my DVD drive.
October 28, 2011, 10:21:33 am
I bought Battlefield 3 today, but when I came home, I remembered that my DVD player wasn't
connected, so I connected it and powered up the computer again. Once looged in, I put in the first disc
waited a bit. Nothing happened.

Opened up the explorer to check why and browsed to the disc.
There was no icons on the files in it except on a folder and double clicking the Autorun.exe didn't do anything at all.
The drive loaded some but then stopped.
Refreshed just to see if something was wrong, now the drive started loading, and the progressbar in the path field did so too
but when the drive stopped loading, the addressbar didn't. It just kept going and once done, nothing happened.
It didn't even show the normal text that there isn't anything in the current folder.

Restarted the computer again to see if the drive
maybe wasn't properly installed. This time, the explorer apparently couldn't find
anything. And I mean anything. The libraries, units and favorites, empty.

I have no idea of why but it only does so when the disc drive is connected. Without it,
the computer works wonderfully.

Does anyone know why it does this? The drivers are properly installed as well so it isn't that.

If you don't know why it do this, is there any way of installing the game without a drive. Directly via Origin(without having to buy a new copy)
because I haven't found any cd key or anything at all like there usually is in games.

Please, I've longed for this game, and when it's finally here, I can't play it.


PS. Sorry for the long text, it was just so you know what I've tried so you don't suggest something I've already done :D

Regards
Stripe103

EDIT: Wrote in the product code into Origin and it's downloading now, but I still want to know why the DVD drive don't work.
11
Members of the forum! I think it's time for the whole forum to know where the members are coming from, so I made this little guest map for us.
Feel free to add your own marker of where you are or live. Of course you don't need to say exactly where you need if you don't want to.

Chaos Project Guest Map
Just click where you want to add your marker.

EDIT:
Since we are limited to 500 markers only, I'd appreciate if only registered members are adding their markers.
I know that it's called Guest map, but if all guests of this site would have added their marker, I'm pretty sure it would have been flooded by now.
12
The problem(fixed - see EDIT 2): ShowHide
I(well, my father really) was going to increase the paging file size on my Windows 7 computer to see if it affected my game speed. I was told to restart the computer and so I did. Now when Windows is supposed to boot up, I get a screen which says
Code: Roughly translated text
A disc reading error occurred!
Press Ctrl+Alt+Del to restart.


I really need this fixed as soon as possible without having to reinstall since I have many files that I need to have.

If it matters(which it probably do) we did set the paging file size to a maximum of 3 Gb and a minimum of the same. I guess that was where we failed, but is there any way to find the file where it is saved and change it.

Please reply as fast as you can even if it only is an idea that you haven't tried.

EDIT:
If the only way to fix it is to reinstall Windows 7 that is probably no problems since I have a Ubuntu disc from where I can get my files but it would save a lot of trouble if there is a way to prevent this.


EDIT 2: Phew... My father caused it, and he fixed it. Really fast actually. We found out that by changing the file name of the file pagefile.sys so that Windows don't find it anymore, caused it to create a new and functioning one.

Mods or above.. Feel free to delete this topic if you want.
13
Portal 2 is out and I want to know if I can play it before I buy it, so I tried go to Can you run it, but it seems it is down or something. This is what it says

400 Bad Request : System Requirements Lab had trouble analyzing this computer. Please try the test again later. We apologize for any inconvenience.

Back to Intro page.

Privacy Policy Terms of Service

Powered by System Requirements Lab, a Patent Pending technology from Husdawg, LLC

Copyright© 2011 Husdawg, LLC, All rights reserved.


Is this just me or does this happen for anyone else?
14
Script Requests / Game_Character 3 edit?
February 01, 2011, 01:31:39 pm
I'm making a puzzle game, but I need both the player and events to be able to move a half tile at a time. I tried editing the Game_Character 3 script in the editor so that it only changed 0.5 tiles instead of a whole. It works but with a lot of bugs. For example you can't walk all the way to the left if there is an impassable tile in the way. If the impassable tile have the x of 0.0, the character stops at 1.5 instead of 1.0.

It is far from done, and I can't think of any more to do about that problem.
And as you can see, I haven't yet started with changing the move_up and move_right methods, but since everyone is mostly like eachother, it should be simple to just copy and change.

I maybe need another script instead of an edit and I'd be glad if someone could provide me with either one of them. I need this as soon as possible.

Here is the code so far.

#==============================================================================
# ** Game_Character (part 3)
#------------------------------------------------------------------------------
#  This class deals with characters. It's used as a superclass for the
#  Game_Player and Game_Event classes.
#==============================================================================

class Game_Character
 #--------------------------------------------------------------------------
 # * Move Down
 #     turn_enabled : a flag permits direction change on that spot
 #--------------------------------------------------------------------------
 def move_down(turn_enabled = true)
   # Turn down
   if turn_enabled
     turn_down
   end
   # If passable
   if @x % 1 != 0 && passable?(@x + 0.5, @y, 2) && passable?(@x - 0.5, @y, 2) || @x % 1 == 0 && passable?(@x, @y, 2)
     # Turn down
     turn_down
     # Update coordinates
     @y += 0.5
     # Increase steps
     increase_steps
   # If impassable
   else
     # Determine if touch event is triggered
     check_event_trigger_touch(@x, @y+0.5)
   end
 end
 #--------------------------------------------------------------------------
 # * Move Left
 #     turn_enabled : a flag permits direction change on that spot
 #--------------------------------------------------------------------------
 def move_left(turn_enabled = true)
   # Turn left
   if turn_enabled
     turn_left
   end
   # If passable
   if @y % 1 != 0 && passable?(@x, @y - 0.5, 4) && passable?(@x, @y + 0.5, 4) || @y % 1 == 0 && passable?(@x, @y, 4)
     # Turn left
     turn_left
     # Update coordinates
     @x -= 0.5
     # Increase steps
     increase_steps
   # If impassable
   else
     # Determine if touch event is triggered
     check_event_trigger_touch(@x-0.5, @y)
   end
 end
 #--------------------------------------------------------------------------
 # * Move Right
 #     turn_enabled : a flag permits direction change on that spot
 #--------------------------------------------------------------------------
 def move_right(turn_enabled = true)
   # Turn right
   if turn_enabled
     turn_right
   end
   # If passable
   if passable?(@x, @y, 6)
     # Turn right
     turn_right
     # Update coordinates
     @x += 1
     # Increase steps
     increase_steps
   # If impassable
   else
     # Determine if touch event is triggered
     check_event_trigger_touch(@x, @y)
   end
 end
 #--------------------------------------------------------------------------
 # * Move up
 #     turn_enabled : a flag permits direction change on that spot
 #--------------------------------------------------------------------------
 def move_up(turn_enabled = true)
   # Turn up
   if turn_enabled
     turn_up
   end
   # If passable
   if passable?(@x, @y, 8)
     # Turn up
     turn_up
     # Update coordinates
     @y -= 1
     # Increase steps
     increase_steps
   # If impassable
   else
     # Determine if touch event is triggered
     check_event_trigger_touch(@x, @y)
   end
 end
 #--------------------------------------------------------------------------
 # * Move Lower Left
 #--------------------------------------------------------------------------
 def move_lower_left
   # If no direction fix
   unless @direction_fix
     # Face down is facing right or up
     @direction = (@direction == 6 ? 4 : @direction == 8 ? 2 : @direction)
   end
   # When a down to left or a left to down course is passable
   if (passable?(@x, @y, 2) and passable?(@x, @y + 0.5, 4)) or
      (passable?(@x, @y, 4) and passable?(@x - 0.5, @y, 2))
     # Update coordinates
     @x -= 0.5
     @y += 0.5
     # Increase steps
     increase_steps
   end
 end
 #--------------------------------------------------------------------------
 # * Move Lower Right
 #--------------------------------------------------------------------------
 def move_lower_right
   # If no direction fix
   unless @direction_fix
     # Face right if facing left, and face down if facing up
     @direction = (@direction == 4 ? 6 : @direction == 8 ? 2 : @direction)
   end
   # When a down to right or a right to down course is passable
   if (passable?(@x, @y, 2) and passable?(@x, @y + 0.5, 6)) or
      (passable?(@x, @y, 6) and passable?(@x + 0.5, @y, 2))
     # Update coordinates
     @x += 0.5
     @y += 0.5
     # Increase steps
     increase_steps
   end
 end
 #--------------------------------------------------------------------------
 # * Move Upper Left
 #--------------------------------------------------------------------------
 def move_upper_left
   # If no direction fix
   unless @direction_fix
     # Face left if facing right, and face up if facing down
     @direction = (@direction == 6 ? 4 : @direction == 2 ? 8 : @direction)
   end
   # When an up to left or a left to up course is passable
   if (passable?(@x, @y, 8) and passable?(@x, @y - 0.5, 4)) or
      (passable?(@x, @y, 4) and passable?(@x - 0.5, @y, 8))
     # Update coordinates
     @x -= 0.5
     @y -= 0.5
     # Increase steps
     increase_steps
   end
 end
 #--------------------------------------------------------------------------
 # * Move Upper Right
 #--------------------------------------------------------------------------
 def move_upper_right
   # If no direction fix
   unless @direction_fix
     # Face right if facing left, and face up if facing down
     @direction = (@direction == 4 ? 6 : @direction == 2 ? 8 : @direction)
   end
   # When an up to right or a right to up course is passable
   if (passable?(@x, @y, 8) and passable?(@x, @y - 0.5, 6)) or
      (passable?(@x, @y, 6) and passable?(@x + 0.5, @y, 8))
     # Update coordinates
     @x += 0.5
     @y -= 0.5
     # Increase steps
     increase_steps
   end
 end
 #--------------------------------------------------------------------------
 # * Move at Random
 #--------------------------------------------------------------------------
 def move_random
   case rand(4)
   when 0  # Move down
     move_down(false)
   when 1  # Move left
     move_left(false)
   when 2  # Move right
     move_right(false)
   when 3  # Move up
     move_up(false)
   end
 end
 #--------------------------------------------------------------------------
 # * Move toward Player
 #--------------------------------------------------------------------------
 def move_toward_player
   # Get difference in player coordinates
   sx = @x - $game_player.x
   sy = @y - $game_player.y
   # If coordinates are equal
   if sx == 0 and sy == 0
     return
   end
   # Get absolute value of difference
   abs_sx = sx.abs
   abs_sy = sy.abs
   # If horizontal and vertical distances are equal
   if abs_sx == abs_sy
     # Increase one of them randomly by 1
     rand(2) == 0 ? abs_sx += 1 : abs_sy += 1
   end
   # If horizontal distance is longer
   if abs_sx > abs_sy
     # Move towards player, prioritize left and right directions
     sx > 0 ? move_left : move_right
     if not moving? and sy != 0
       sy > 0 ? move_up : move_down
     end
   # If vertical distance is longer
   else
     # Move towards player, prioritize up and down directions
     sy > 0 ? move_up : move_down
     if not moving? and sx != 0
       sx > 0 ? move_left : move_right
     end
   end
 end
 #--------------------------------------------------------------------------
 # * Move away from Player
 #--------------------------------------------------------------------------
 def move_away_from_player
   # Get difference in player coordinates
   sx = @x - $game_player.x
   sy = @y - $game_player.y
   # If coordinates are equal
   if sx == 0 and sy == 0
     return
   end
   # Get absolute value of difference
   abs_sx = sx.abs
   abs_sy = sy.abs
   # If horizontal and vertical distances are equal
   if abs_sx == abs_sy
     # Increase one of them randomly by 1
     rand(2) == 0 ? abs_sx += 1 : abs_sy += 1
   end
   # If horizontal distance is longer
   if abs_sx > abs_sy
     # Move away from player, prioritize left and right directions
     sx > 0 ? move_right : move_left
     if not moving? and sy != 0
       sy > 0 ? move_down : move_up
     end
   # If vertical distance is longer
   else
     # Move away from player, prioritize up and down directions
     sy > 0 ? move_down : move_up
     if not moving? and sx != 0
       sx > 0 ? move_right : move_left
     end
   end
 end
 #--------------------------------------------------------------------------
 # * 1 Step Forward
 #--------------------------------------------------------------------------
 def move_forward
   case @direction
   when 2
     move_down(false)
   when 4
     move_left(false)
   when 6
     move_right(false)
   when 8
     move_up(false)
   end
 end
 #--------------------------------------------------------------------------
 # * 1 Step Backward
 #--------------------------------------------------------------------------
 def move_backward
   # Remember direction fix situation
   last_direction_fix = @direction_fix
   # Force directino fix
   @direction_fix = true
   # Branch by direction
   case @direction
   when 2  # Down
     move_up(false)
   when 4  # Left
     move_right(false)
   when 6  # Right
     move_left(false)
   when 8  # Up
     move_down(false)
   end
   # Return direction fix situation back to normal
   @direction_fix = last_direction_fix
 end
 #--------------------------------------------------------------------------
 # * Jump
 #     x_plus : x-coordinate plus value
 #     y_plus : y-coordinate plus value
 #--------------------------------------------------------------------------
 def jump(x_plus, y_plus)
   # If plus value is not (0,0)
   if x_plus != 0 or y_plus != 0
     # If horizontal distnace is longer
     if x_plus.abs > y_plus.abs
       # Change direction to left or right
       x_plus < 0 ? turn_left : turn_right
     # If vertical distance is longer, or equal
     else
       # Change direction to up or down
       y_plus < 0 ? turn_up : turn_down
     end
   end
   # Calculate new coordinates
   new_x = @x + x_plus
   new_y = @y + y_plus
   # If plus value is (0,0) or jump destination is passable
   if (x_plus == 0 and y_plus == 0) or passable?(new_x, new_y, 0)
     # Straighten position
     straighten
     # Update coordinates
     @x = new_x
     @y = new_y
     # Calculate distance
     distance = Math.sqrt(x_plus * x_plus + y_plus * y_plus).round
     # Set jump count
     @jump_peak = 10 + distance - @move_speed
     @jump_count = @jump_peak * 2
     # Clear stop count
     @stop_count = 0
   end
 end
 #--------------------------------------------------------------------------
 # * Turn Down
 #--------------------------------------------------------------------------
 def turn_down
   unless @direction_fix
     @direction = 2
     @stop_count = 0
   end
 end
 #--------------------------------------------------------------------------
 # * Turn Left
 #--------------------------------------------------------------------------
 def turn_left
   unless @direction_fix
     @direction = 4
     @stop_count = 0
   end
 end
 #--------------------------------------------------------------------------
 # * Turn Right
 #--------------------------------------------------------------------------
 def turn_right
   unless @direction_fix
     @direction = 6
     @stop_count = 0
   end
 end
 #--------------------------------------------------------------------------
 # * Turn Up
 #--------------------------------------------------------------------------
 def turn_up
   unless @direction_fix
     @direction = 8
     @stop_count = 0
   end
 end
 #--------------------------------------------------------------------------
 # * Turn 90° Right
 #--------------------------------------------------------------------------
 def turn_right_90
   case @direction
   when 2
     turn_left
   when 4
     turn_up
   when 6
     turn_down
   when 8
     turn_right
   end
 end
 #--------------------------------------------------------------------------
 # * Turn 90° Left
 #--------------------------------------------------------------------------
 def turn_left_90
   case @direction
   when 2
     turn_right
   when 4
     turn_down
   when 6
     turn_up
   when 8
     turn_left
   end
 end
 #--------------------------------------------------------------------------
 # * Turn 180°
 #--------------------------------------------------------------------------
 def turn_180
   case @direction
   when 2
     turn_up
   when 4
     turn_right
   when 6
     turn_left
   when 8
     turn_down
   end
 end
 #--------------------------------------------------------------------------
 # * Turn 90° Right or Left
 #--------------------------------------------------------------------------
 def turn_right_or_left_90
   if rand(2) == 0
     turn_right_90
   else
     turn_left_90
   end
 end
 #--------------------------------------------------------------------------
 # * Turn at Random
 #--------------------------------------------------------------------------
 def turn_random
   case rand(4)
   when 0
     turn_up
   when 1
     turn_right
   when 2
     turn_left
   when 3
     turn_down
   end
 end
 #--------------------------------------------------------------------------
 # * Turn Towards Player
 #--------------------------------------------------------------------------
 def turn_toward_player
   # Get difference in player coordinates
   sx = @x - $game_player.x
   sy = @y - $game_player.y
   # If coordinates are equal
   if sx == 0 and sy == 0
     return
   end
   # If horizontal distance is longer
   if sx.abs > sy.abs
     # Turn to the right or left towards player
     sx > 0 ? turn_left : turn_right
   # If vertical distance is longer
   else
     # Turn up or down towards player
     sy > 0 ? turn_up : turn_down
   end
 end
 #--------------------------------------------------------------------------
 # * Turn Away from Player
 #--------------------------------------------------------------------------
 def turn_away_from_player
   # Get difference in player coordinates
   sx = @x - $game_player.x
   sy = @y - $game_player.y
   # If coordinates are equal
   if sx == 0 and sy == 0
     return
   end
   # If horizontal distance is longer
   if sx.abs > sy.abs
     # Turn to the right or left away from player
     sx > 0 ? turn_right : turn_left
   # If vertical distance is longer
   else
     # Turn up or down away from player
     sy > 0 ? turn_down : turn_up
   end
 end
end


Regards
Stripe103
15
Achievements Book
Authors: Stripe103, Zeriab
Version: 1.3.2
Type: Achievement System
Key Term: Misc System



Introduction

Version History: ShowHide

  • Version 1.0 (Sep 23, 2009)
    Yea, there was actually a version 1, but I took it down short after
    as many said that it was too hard to understand and that there wasn't any instructions included(which there wasn't)


  • Version 1.1.0 (Jan 10, 2010)
    Instructions added.
    "XBOX Button" added


  • Version 1.1.2 (Jan 21, 2010)
    Script only two script instead of 12.
    "XBOX Button" integrated in script.


  • Version 1.2.0 (Jan 28, 2010)
    Windowskin added(no, I'm not very good at making windowskins, but it works)
    More options added


  • Version 1.2.1 (Jan 28, 2010)
    Just a little update to make it more compatible with some scripts.


  • Version 1.3.0 (Mar 30, 2010)
    I have added a Notification script that Night_Runner made for me for my game, but I thought that it would be great here.


  • Version 1.3.2 (Jun 30, 2010)
    Ability to have the map as a background and to make the game continue even if in the menu.
    You can now change which key you want to use as the XBOX Button.


This achievements script is a modification from another script: Zeriabs QuestBook 1.2. The reason I chose to edit this is because I think it allready looked a bit like the XBOX Achievements menu. So I edited it to work like it too.
The main goal I'm aiming at is to make it look and work exactly like the XBOX achievements screen with windowskins and images.


Features


  • Popup window. Evented feature

  • "XBOX Button". When you are in the map, you can get to the achievements screen just by hitting "E".
    Instead of going into it through the menu.
    You can change this yourself to whatever key on the keyboard you want.

  • A GamerScore variable

  • Choose the name of your GamerScore

  • Customizable background image and ability to use map as background

  • Customizable windowskins at top and bottom

  • Customizable Notification(by Night_Runner)




Screenshots

Achievements Screen: ShowHide

Notification(by Night_Runner): ShowHide



Demo

[DOWNLOAD]
Filetype: .exe
Filesize: 293 Kb
Host: Mediafire


Script

Please download the demo as there is both image files, instructions, a sound file and a common event in it.


Instructions

There is a instructions file inside the demo folder.


Compatibility

None known.


Credits and Thanks




Author's Notes

I have no idea how much I'll be working on this since I've forgot much about the Ruby language, we'll see..
16
All of a sudden, when I try to play my game, I can't control walking.
When I start the game, the character is walking by itself to the left, without me doing anything. When I push and release the Down key, the character start moving upwards. If I hit the Down key while he is walking up, he walks to the left until I release the button.
The same with the Right key, but when I hold it, the character is moving up and when releasing it, he moves left.

It does this for any old and new projects. I haven't tested with other peoples work, but I'm going to do that as soon as possible.
Does anyone have a solution to this or know what causes it?

Regards
Stripe103
17
I'm making a new game which is a puzzle game, but I need two scripts for it. I think I already have the rest.

Pixel Movement Script
I need a movement script which makes the player able to move forward a half tile at a time.

Projectile Script
I'll event it instead so this isn't needed anymore..

If you need more information, just say so  :)

Regards
Stripe103
18
Hi! New problem.
I am going to make some kind of search box so that when you are on the desktop, you can just click Ctrl + Shift + Alt to bring up a search box. Now the thing is that I've got it to show and hide, but here is the problem. If you hide it, and work on something else, the window gets unfocused which makes you unable to get it back. Can someone help me with this?
19
I'm just wondering if it is possible to change the multiplier keys in the debug system.
I'm using Blizz-ABS so currently when I want to change a variable, I hit the D key to add one to the variable, but since the debug use the D key to multiply with 1000 it is instantly set to 1000, instead of 1.

When I want to lower the variable, I hit the A key, but that it multiplied with 10, so it goes down by 10 in one step. I don't like that. Is there any way to change those keys?

The S key don't do anything since I don't hit any of the right and left directional keys(which of couse in Blizz-ABS is set to A and D), so I want to change that as well.

I have some small editing skills but I can't find it anywhere in the script so if someone can just point me to the right direction, I'd be grateful.

Regards
Stripe103
20
So, on my school we have started with Visual Basic and I found it quite fun so I'd thought I'll continue on it. Right now I have a project that I hope is going to be a better version of the Windows Command Prompt(will probably never get finished, but you never know).

Anyway, when I put in a command in the input box and hit enter it separates the parts of the command. For example when I write "test command with parameters" it split them up to "test", "command", "with", "parameters". So if I have it so it checks if there is written "command" after "test" it works, but if I just writes "test" I get an error that it is checking for a variable that doesn't exist.

It is probably easier to just post the code so here it is
    ' Initsialize local variables and arrays
        Dim input As String
        Dim SeperateInput() As String
        ' Set "input" variable to input value
        input = Me.input.Text
        ' If Input is empty
        If Me.input.Text = "" Then
        Else
            ' Split up input to parts, seperated by a space character
            SeperateInput = Split(CStr(input), " ")
            ' Set input box to empty
            Me.input.Text = vbNullString
            ' Add a new command line to the output box
            Me.output.Text = output.Text & vbNewLine & ">" & input

            ' This is all available commands

            If SeperateInput(0) = "cls" Then
                Me.output.Text = vbNullString
            End If
            If SeperateInput(0) = "exit" Then
                If SeperateInput(1) = "/b" Then         #This is just an example but it is here the error is. But only when don't write anything more than exit.
                    Me.output.Text = "TEST"
                End If
                Close()
            End If
            If SeperateInput(0) = "about" Then
                Me.output.Text = vbNullString
                Me.output.Text = "Terminal Command Prompt" & vbNewLine & "Made by Markus Rosensköld"
            End If


    End If


I guess it is the array(or what you call it in VB) that is the problem. That it checks for text in an array-part that isn't there, but is there any way to fix it?

I have only been working with Visual Basic for like 4 days so please bear with me.
21
Tutorials / Another Glide System
July 22, 2010, 12:45:35 pm
This is a little tutorial on how to make an easy gliding system. This is a system that you probably recognize from the Pokémon games.
The reason I've made the system was that, I've seen it on different places, but I never got it to work, so after some practice in eventing and scripting, I made this.

Uses 1 switch, 1 variable and 1 common event.

1. Make a new Common event and name it for example "Gliding system", set the "Trigger" to "Parrallel" and choose a switch to start it with.

2. In the common event, make a "Control Variable" command that changes a variable called "Hero Terrain Tag" or something like that and have it set to the current Player Terrain Tag.

3. Make a "Conditional Branch" that checks if the "Hero Terrain Tag" is equal to 1(or whatever you want it to be).
Have the checkbox "Set handling when conditions do not apply" checked.

4. Make another "Conditional Branch", go to the 4th tab and choose "Script".
Write "$game_player.moving?" in the text box.
This stops the player from continue running when he reaches an impassible tile but is still standing on a "glide" tile.
You do not need to have the "Set handling when conditions do not apply" checked.

5. Now you need four more Conditional Branches that checks if the player is facing down, left, right and up. (the 3rd tab)
You do not need to have the "Set handling when conditions do not apply" checked.

6. Inside each branch, have a "Set Move Route" event command and have it make these commands:
Move Animation OFF (prevents the player from walking when he is gliding, have it on and you'll see what I mean)
Move Down/Left/Right/Up (depending on which branch you are in)

Have the "Ignore if can't move" checked.
Do NOT have the "Repeat Action" checked

7. In the "Else" part of the first conditional branch, have a "Set Move Route" command and have it say:
Move Animation ON

Do not have any checkbox checked.

This is what the common event should look like.


DEMO
For the lazy ones
[Download]
Filetype: .exe
Filesize: 258 Kb
Host: Mediafire

Then, where you want the player to glide is quite simple to do. In the Tilesets in the Database, choose the "Terrain Tag" button and change the tiles you want to glide over to 1(or what you set it to in the 3rd step) and of course set the switch you chose in the first step to ON.

Credits would be appreciated but not required.

If you have questions, PM me or post in this thread.


Regards
Stripe103