It's really got to have been included by the publisher. Japanese releases rarely have other languages included on them, whereas North American and especially European releases often include multiple languages. If the game was not officially translated, the only other option is to find a fan translation patch online. You might get lucky, depending on the games you're interested in.
You'll have to look up information about that yourself, though. Lightwarrior11 - 2 years ago - report 1 0. On the Nintendo DS, we can have up to sprites. Only 32 of those sprites can be affine transformed rotated, scaled, skewed, etc. We are also only allowed to address different tiles to comprise all of our sprites, per engine. Sprites can be made of tiles that use 16 colors or of ones that use colors.
Tiles that use colors are twice as large as tiles that use only 16 colors. Another advantage of using color sprites is the ability to use 16 different palettes. When using color sprites, each sprite and tile must use the same palette. When using color sprites, we can have one sprite use one color palette and another sprite use a different color palette, even though both use the same tile data. Games often use this trick to make different colored enemies that look the same. The sprites still use the same tile data, but they use different palettes.
Sprites are broken into 8x8 pixel pieces. This is called tiling. When drawn to screen, the hardware pieces these tiles together, like a puzzle where the pieces have no distinguishing edges. There are two ways to tile sprites, 1D and 2D.
In a 2D layout, the sprite memory is treated like a giant image from which sprite tiles are obtained by making a box the size of the sprite and placing it over the giant image. In a 1D layout, the sprites are layed out in a linear fashion, as discussed in Figure 6. The lower text shows the same data, tiled, for use in tiled graphic modes.
The conversion process is very similar to that for backgrounds. We simple make grit rule files that tell grit how we want our images converted, and it generates a. Figure 6. The upper text shows information as it would be on a non-tiled background.
Sprites have three attribute variables associated with them. With them, sprites can spin and flip and mosaic and perform all sorts of fun hardware effects. Each attribute is multi-purpose and requires some amount of bit twiddling and masking to achieve the affects we want. That is, it would if it weren't for this nice SpriteEntry union which libnds provides for us. In most cases, we will use this union to do what we'd like to with our sprites, but there are special cases where this is not possible.
We will cover how to update, initialize, and rotate using bit twiddling methods, as libnds doesn't yet provide ways of doing this otherwise. We'll use the libnds API wherever possible.
Let's write some functions to do each of those, in that order. We'll be working on the definitions for each of these functions together in a new file called sprites.
Our first step will be to create a that new source code file. Put a new file called sprites. The reason we do this is because writes to OAM are locked during all times but during vblank. Updating the OAM is very straightforward.
Our copy of the OAM might still be stuck in the cache and may not have made it into main memory yet, so we first flush local memory a must whenever performing a DMA operation to ensure that DMA sees the correct data. The data we want to copy might be stuck in cache still and may not have made it into main memory yet.
After that, we'll make a call to our afore written updateOAM function. Let's get to spinning. This is a bit more difficult than what we've done before, but still fun. It's nice to not have to make a separate sprite for each rotation position the sprite will be presented in.
However, doing so may be necessary for some applications as the Nintendo DS rotation won't always look as pretty as if the rotations had been done elsewhere.
The libnds's sin and cos lookup tables employ a degree system. Humans usually use a degree system or radians. The angle we'll work with in this function will be one that is part of the degree system. You'll have to convert your radians or weird degree value Seriously, why ? Silly Babylonians. We have to use a transformation derived from our time spent playing with an affine transformation matrix.
The sprite's affine transformation matrix is used slightly differently from the background affine transformation matrix. Up until now, we haven't used the fancy SpriteEntry union included in libnds. It allows us to avoid thinking about bit twiddling and masking in most cases. In the case of showing and hiding sprites, we still need to be thinking about these bits due to an oddity in the Nintendo DS hardware: the hiding bit of a sprite bit 9 of sprite attribute 0 is also the double bound bit of a sprite if the sprite is an affine sprite bit 8 of sprite attribute 0.
Follow along with the comments and code as we formulate a solution to writing a function which shows and hides all kinds of sprites. Now for some real fun. Moving sprites in hardware, and not having to worry about clipping, buffers, or anything, is such a wonderful feeling. To move a sprite, we simply change the SpriteEntry properties x and y. This is a case where we don't have to think much about the underlying arrangement of this information. The libnds union SpriteEntry describes the organization of data to the compiler for us and the compiler then figures out the best way to operate on that data; the compiler does the bit twiddling and masking for us.
Since this is so simple, we don't even need to write a function to do it for us. So just take note of what we do here and remember it for later; you don't have to write a function for it, but if you want to I'd recommend making it an inline function.
The ability to set a sprites priorty is essential when dealing with multiple sprites, as we will be doing. As such, we'll now discuss sprite priorities and how to set them. A sprite, like a background, has a priorty which determines how the sprite will appear with respect to other sprites and to backgrounds. A sprite with the same number priorty as a background will appear above it. A sprite with a lower priorty number than another sprite will appear above that other sprite. There are four priorities per graphics engine available for sprites, similar to background priorities.
The following code listing shows an example of what this looks like. Now that our sprites. So put away your sprites. We'll need to make a place for our sprite data to live in VRAM. However, this is more than enough to store unique color tiles. Then, we need to tell the main engine to enable sprites of the tiling style we want. We will use 1D tiled sprites.
The resulting initVideo function, post-modifications, is presented below. We'll be using the same memory alignment boundary as the GBA uses for our sprites. Tile VRAM addresses must be aligned to 32 bytes. To compute the address to copy tiles to, we basically need to know two things: the memory alignment we are using and the tile numbers we want to assign data to. We usually want to copy more than one tile into vram at a time, however. Luckily, when converting images to sprites with grit, it will tell us the length in bytes of our tile data for that sprite.
After we have the length in bytes, we can use dmaCopyHalfwords which uses byte lengths for copying to copy the tile data into VRAM.
We can also calculate how many tiles an image uses from its length in bytes by diving the length in bytes by how many bytes a tile takes up.
In our case, as we'll be using color tiles, a tile 8x8 pixels takes up 32 bytes. Now, to see a sprite in action. Let's load in the orangeShuttle graphic and the moon graphic. Make a new function called initSprites. Place it after the initBackgrounds function. Make sure to include orangeShuttle. They contain information about our sprites as generated by grit.
I've also create a new struct type called "SpriteInfo". This struct contains information about sprites that aren't explicitly contained in the SpriteEntry struct. We'll be using it to help us manage our information about sprites better.
We'll begin by filling in our SpriteInfo struct for the sprite. Each sprite will have its own SpriteInfo struct. This number will help us keep track of which OAM entry our sprite is associated with. We'll also use it to compute other offsets, although we don't have to use it for that purpose in many cases. We'll just follow these steps twice when writing the initSprites function for our sprites. You can follow along with the comments and the code below.
In the above code, you'll find some things that look like function calls to a function called assert. These aren't actually function calls, but macro expansions. You'll have to include assert. The assert macro allows the programmer to make assumptions about what is going on in the code.
To use them, you just place some kind of "fact" in between the paranthesis. Whenever this assumption fails, the program will quit. Assertions are evaluated at runtime. Assertions help you avoid bugs developing obscure later on since they'll stop them right where something first goes wrong.
Assertions are a good thing and should be used often. When you release a production version of your software, the assertions can be removed from your code by the preprocessor.
Before you get to compiling, you may want to look at the top of your main. There are a lot of files to include now, so it is easy to lose track of which ones we need.
I probably even forgot to let you know about some of them. Object oriented programming OOP is essential to making good games on a modern system. Although it is very much possible without object oriented programming, OOP is an incredible tool that greatly improves code reusability, readability, modularization, and abstraction. It makes the programmer's job a lot easier.
Also, due to modularization, collaborating on projects with your friends or coworkers is easily ten fold easier. The first thing we'll make is a Ship class. This class will encapsulate all the properties and functionality of any ship in an easy to use and understand format. Think of things a ship can do, on a high level. What should come to mind is the ability to turn both ways, shoot weapons, accelerate, move at a given velocity coasting , and maybe some more things if you are creative enough.
What properties of a ship can you come up with? Perhaps turning speed, thrust, mass, maximum speed, velocity, position, shields? Well, after you are done brainstorming, the next step is to write out the functionality and properties we need to put into our Ship class. You could make a table, as in Table 7. Either way, you want to make sure your ideas all get onto some physical paper before you begin coding.
I have provided a skeleton framework file for you to write your class in. It is all set and ready for you to implement in the ship. The header file, ship. On your own, with your own classes in the future, you should always make a skeleton framework class to work from. It makes implementation straightforward and you do not have to worry about the semantics of setting up a class so much.
I have provided you with a simple constructor and private initialization method method. These are often mundane things to make. Feel free to modify the default values in the initializers to try out different effects of changing the ship properties.
Acceleration is probably one of the most important things your ships can do. To accelerate, we simply increase our velocity by a certain increment, that being the thrust capability of the ship, in the angle we are headed.
Here is where some simple trigonometry comes into play. Since our velocity is stored as a two dimensional vecotr x and y component , we have to shadow our thrust vector onto each direction. We do this we multiply the thrust by sin angle for our x component, and by -cos angle for the y direction.
This one is incredibly easy thanks to the Nintendo DS hardware. All we have to do is increment our position by our velocity. The hardware takes care of any wrapping or offscreen issues. This one took me a while to figure out, even though it's just one line, but it's very useful. We can turn the ship around, not a per se, but simply pointing into the opposite direction of our current velocity.
This will get the angle of our velocity with respect to 0 degrees, and then will do a from that angle. Rotating the ship is also quite simple.
This one is a bit more tricky and involved. I suppose I should start by explaining that a Nintendo DS circle has degrees. It doesn't actually have degrees, nor does a Nintendo DS even know what a circle is, but it is easy to understand the hardware a bit better when we think of it this way.
I will say, however, that the reason for the degrees is due to libnds's built-in look up tables for the sin and cos functions. Having only entries in your lookup table would be a waste of space when it takes just as many bits to index into a entry table as it does a entry one. More entries allow finer accuracy. In order for the Nintendo DS to know how to rotate our sprites, we have to convert the internally stored radian angle value to a value within the degree system.
This is an easy conversion. The first step is to convert to a degree system, as you must have learned in junior high school. The part is half the number of degrees in a circle. Lastly, just return that value as an integer. The hardware does not have any floating point, so when rotating our sprites, we use a fixed point value disguised as an ordinary integer.
Then, we make a function to return a converted angle value, for whenever we need it. We now need to create an instance of the ship in our main function. Creating an instance of a class, known as an object, is quite simple, as you can see below. We just have to create the Ship object and then assign a SpriteEntry to it.
We should also do something nifty with our new class so that we can verify that what we wrote is working. Let's make the ship move around on its own by telling the ship to trust ten times.
The previous code isn't very exciting, since we never update the OAM more than once. We need to begin the creation of what is referred to as the game loop. We won't be fully implementing it in this chapter, since a major component of it will be missing until we discover input on the Nintendo DS. The game loop has at least three major components. The first thing any game loop should do is to collect input from the outside world.
We won't be doing that in this chapter, however. The next component of the game loop is updating the game state. Based on inputs the game received in the previous frame to the one we'll render next and the passing of time, the game state will change if anything interesting is happening. The final component of the game loop is the rendering component.
In our case, we have to update the OAM to let it know of the changes that occured in the game state and that it needs to reflect those changes. Now that we know what a game loop is, it's time for us to start creating one to run our program. The first thing we want to happen in our game loop is for the game state to be updated. This is because we don't have any input to collect yet. We tell our ship to move at it's current velocity.
Then we update the sprite attributes with new information about our ship, as some properties of the ship have now changed i. Finally, we call a function that will make sure our program does not exceed 60fps speed of the graphics on the Nintendo DS by waiting for vblank, and then we update the OAM, telling it that we changed some attributes on the sprites and it needs to handle that.
The OAM really shines through here. The all powerful Nintendo DS hardware, an incredible masterpiece, will rotate and move our ship with very little effort on our part.
In hindsight, all we have done is flip a few bits in a few registers in a structured manner, and our ship comes to life. Verify that you are including all the files you need to include now, before compiling. Everything should compile for you fine at this point if you wish to play around with your new class. However, in the next chapter we will cover how to get Nintendo DS input to affect the Ship. Be ready for it, we're going to have some major fun.
The Nintendo DS has many different user input systems, including buttons, touch screen, and a microphone. Most video game systems only have buttons and an analog stick or two. While the Nintendo DS does not have an analog stick, it does have an amazing touch screen which has millions of different creative uses.
We will only cover the touch screen and buttons, though. Instead of having to AND registers with cryptic masks to discover which keys we are pressing, we simply call scanKeys , then check one of three input functions, keysDown , keysHeld , or keysUp. In order to see which keys have been recently pressed, use keysDown.
To see which keys are currently held, use keysHeld. Aside from its modern-day setting, highly stylized characters, and energetic soundtrack, the thing that really sets TWEWY apart from its peers is the utterly unique combat system it uses.
Wild World took everything that was great about the GameCube game and introduced online aspects to make visiting the villages of friends and family even easier. While the loss of classic NES games was a bitter pill to swallow, its solid online aspects and high level of customization meant you still had plenty to keep you busy. It also highlights just how suitable the franchise is for gaming on the move, as the ability to go for a quick fishing session or dig up some fossils ensures none of your spare time is ever wasted.
While Project Rub is another great selection of stylus-based mini-games, WarioWare pulls off the same concept with much greater style. Have we missed one of your favorite titles? Click 'next page' to continue our countdown of the best DS games. Current page: Page 1. Keep me logged in on this device Forgot your username or password? Don't have an account? Sign up for free! What do you need help on? Cancel X. Topic Archived Page 1 of 2 Last. Sign Up for free or Log In if you already have an account to be able to post messages, change how messages are displayed, and view media in posts.
Boards Nintendo DS Japanese games with english language option? UltimateKaiba 9 years ago 1. Id like to import some games that we dont get here in the US, so i was wondering what games have an english language option.
MereMare 9 years ago 2. Japan is the center of the gaming universe. DeepsPraw 9 years ago 3. The Phoenix Wright trilogy does, but they were released in NA.
0コメント