The expressions language is a C style syntax, so you may need to escape certain characters, for example: "C:\FolderPath\" + @VariableName Should be "C:\\FolderPath\\" + @VariableName Another use of the escape sequence allows you to specify character codes, like this \xNNNN, where NNNN is the Unicode character code that you want. For…
I rotate my game character to watch at the target using the following code:
transform.rotation = Quaternion.Slerp(startQuaternion, lookQuaternion, turningNormalizer*turningSpeed/10f)
startQuaternion is the character's current rotation when a new target is given.
lookQuaternion is the direction the character should look at and…
I would like to create a 2D game, where a character should move on a stage/level. My stage would be static, constructed some little cubes, similar to the well-known Mario game: some of the elements should represent an element of the way where the character can step, but if the element is missing, the character should fall.
My problem…
I'm quite new to game development, so would like to get a consensus on methods of doing this.
My game features a 2D character that is able to pick up and drop objects, for example, a stick. My question is: is it advisable / possible to manipulate the image of the character and image of the stick to make it look like the character…
I have one character idle animation running inside a game in a loop, over and over again.
A a certain time I trigger another animation to be played, for the same character.
The second animation won't play immediately, as will be a discontinuity in my character animation. First I wait for the idle animation to finish and then I play…
Yes yes, I am aware that '\n' writes a newline in UNIX while for Windows there is the two character sequence: '\r\n'. All this is very nice in theory, but my question is why? Why the carriage return character is extra in Windows? If UNIX can do it in \n why does it take Windows two characters to do this?
I am reading David…
I am checking to see if the last character in a directory path is a '/'. How do you get ruby to treat the specific index of a string as a character rather than the associated ASCII code?
For example the following always returns false:
dir[dir.length - 1] == '/'
This is because dir[dir.length - 1] returns the ASCII code…
Hi all!
I was writing a CLI-Tool for Mac OS X (10.5+) that has to deal with command-line arguments which are very likely to contain non-ASCII characters.
For further processing, I convert these arguments using +[NSString stringWithCString:encoding:].
My problem is, that I couldn't find good information on how to determine…
I am attempting to set a character set of IBM850 on slackware linux for a particular application (epic5).
Im using rxvt-unicode and have setup LANG/LC_*=en_US. Now if I set the encoding to IBM850 in kde's konsole program im able to display certain characters correctly. I'd rather not use IBM850 for everything; is there a…
I have tried numerous times how to make a do-while loop using the float constructor for my code but it seems it does not work properly as I wanted. For summary, I am making a TBRPG in C++ and I encountered few problems. But before that, let me post my code.
#include <iostream>
#include <string>
#include…
How do I get empty spaces from the end of a varchar(513) field while exporting data from SQL table to a flat file. I have a console application. Here is what I am using to export a SQL table having only one column of varchar(513) to a flat file. But I need to get all the 513 characters including spaces at the end. …
Java 8 brings a few changes to Java’s regular expression syntax to make it more consistent with Perl 5.14 and later in matching horizontal and vertical whitespace.
\h is a new feature. It is a shorthand character class that matches any horizontal whitespace character as defined in the Unicode standard.
In Java 4…
I have vertically moving elevators (3 solid tiles wide) and static solid tiles. Each are separate entities and therefore have their own respective collision routines (to check for, and resolve, collisions with the main character)
I check my vertical collisions after characters vertical movements and then…
Edit: Problem solved!
Big thanks to Jonathan who pointed me in the right direction. Sean describes the method I used in a different thread. Also big thanks to him! :)
Here is how I solved my problem:
If a collision is registered by my SAT-method, only fire the collision-event on my character if there…
I'm working on a zombie game in AS3 where I want a character to be able to move away from a zombie depending upon how close the zombie is. The character also has a destination that it's trying to get too on the screen.
Ok so I have 2 vectors, one pointing to my destination, and one pointing to the…
I'm trying to understand how to use the XNA XML content importer to instantiate non-trivial objects that are more than a collection of basic properties (e.g., a class that inherits from DrawableGameObject or GameObject and requires other things to be passed into its constructor).
Is it possible to…
For my game, there's two types of items - stackable, and nonstackable.
Nonstackable items get assigned a unique ID that stays with it forever. A character ID is assosicated with the item, as is a state (CHANGED, UNCHANGED, NEW, REMOVED). The character ID and state is used for item saving purposes.…
i am developing my first game with C++. My game uses a grid of rectangles. I have a class Board which manages the grid as a whole, initializes the terrain, places/removes characters, etc. It has a 2D vector of a class Field, which handles the Structure of the field, contained Objects, Characters,…