Hi, I'm new to C++ and DirectX, I come from XNA.
I have developed a game like Fly The Copter.
What i've done is created a class named Wall.
While the game is running I draw all the walls.
In XNA I stored the walls in a ArrayList and in C++ I've used vector.
In XNA the game just runs fast and in C++ really slow.
Here's the C++ code:
void...
Hi,
I have a flash that has a background symbol that responds to CLICK event.
On top of that symbol I have a sprite that contains a Bitmap with transparent pixels.
Both of them are added to the stage, so they are not related directly.
I want clicks on the transparent pixels on the sprite to go straight through to the background.
I hav...
I'm making a sprite and its reaching about 4000px in height. Is there a general size for maximum sprite height that is used within the graphics design community?
...
VBO is effective complex geometric 3D object.
But I think plain DrawArray with transformed vertices/texcoords are better for 2D animation sequence sprites.
Because there are a only 4 vertices for a box. With VBO, those vertices duplicated for each texcoords, and draw function should be called many times.
But with DrawArray, just pushes...
I draw textures using the D3DXSprite.
I want to transform them(rotate, scale etc..) so I use the SetTransfrom method.
Should I, store the old transformation -> set a new one -> draw -> set the old one?
I have a sprite class whice take care of the Draw and the Update methods.
I mean something like this:
D3DXMatrix oldMatrix;
sprite->GetT...
Im having a hard time putting in my head on how would i go at making flash read a xml file (this part I have it going smooth) and then fromt hat elements put on the stage a sprite or a movieclip that is interactive.
To make it clear I want to load and display an image that when you press it it just creates another square beneath it with...
Hey im running into some trouble with as3, Im still learning the ropes but I need to get this done with so lets see what can be made about that.
What Im trying to accomplish is to parse a xml file and with the info from it put an image on teh stage that can be clicked to reveal a text under it.
Im using flash builder and this is what ...
How do I use the counter to trigger sprites? Need an example or idea to work from.
I want the number values to load sprites. The value of the counter goes to a text field. I want each number value to have an "if" condition to play a sprite of a corresponding number.
Dumb example
//counter plays pictures rather than plays numbers in t...
in flex,I have a textarea control
i like to select some text in textarea.
when mouse releases then selected text will be hilighted to GREEN RECTANGLE as sprite.
can anybody help ??
...
I'am trying to make the following code work but I only see white rectangles when rendering them :S;
CCSprite *tempSprite = [[CCSprite spriteWithTexture:[[CCTextureCache sharedTextureCache] addImage:@"Icon.png"]] retain];
TapCircle *tapObject = [[TapCircle alloc] initWithSprite:tempSprite];
The TapCircle class is a subclass of TapEle...
Hi. How can i scale sprites in SDL?
...
What i want the program to do is draw the graphic ground at each point in which a one appears in the .txt file, but everytime i run it, it doesnt draw the sprite?
here is the code.....
using (StreamReader sr = new StreamReader("trainingLevel.txt"))
{
while (!sr.EndOfStream)
{
stri...
I am developing a flash application required me to have a rotational sprite object cycling around the 3D space. I saw a MovieClip has a z-index that can be used as z coordinates in 3d space but couldn't find it in sprite object.
How to I get around with that.
...
hey,
i have a div and and a looping move function that translates an image by 1px within the div. The width of the div is 400px; the image starts moving from right to left, but I can't figure out how to make it start appearing from behind the div border. Currently if I set a starting x-position at 405px and finishing x-position at -5 th...
I'm creating a graphical roguelike game using Java. In the game, I'm painting a 2d array of Tile objects onto a JPanel. These Tile objects represent the ground. I have a .bmp sprite sheet that contains all of the textures I want to use to paint with. Every time the player moves, the tiles that are visible to the player need to be redrawn...
I'm trying to use a ClientBundle in my GWT application to make multiple images get sent as a single file. I declare the bundle like so:
public interface MyResources extends ClientBundle {
public static final MyResources INSTANCE = GWT.create(MyResources.class);
@Source("icon1.png") ImageResource icon1();
@Source("icon2.png") Imag...
i have 2 sprites on stage. bottomSprite is added to the display list first, followed by topSprite. topSprite partially covers bottomSprite.
i've added an event listener to bottomSprite for MouseEvent.MOUSE_MOVED notifications to simply trace the mouseX and mouseY coordinates. however, the notification doesn't work for the parts of bo...
Hi,
I'm using TweenMax to make all tweens, fade in a projet. Now my question is : is it possible to tween only linestyle from a Sprite ?
For example, something like that :
TweenMax.to ( my_sprite.graphics.lineStyle, 0.5, { tint : 0xFF0000 } );
Thank you.
...
I'm quite new to the world of 2D-Engines. I figured out how to load images and display those as sprites and stuff, but theres one question that bugs me.
For instance, when a "rocket" hits an object it will deal damage to it and leave a crater behind. I'd like to have the crater shown on that object. That would require "skipping" some of...
I am looking to build a 2d game using WebGL. I want the hardware acceleration that WebGL provides and I cannot get this from the 2D canvas context in the canvas tag.
With that said, is there a tutorial on creating 2D sprites using webGL? Or, better yet, is there a 2D sprite library for WebGL? Ideally, I'm looking for something like c...