Search Results

Search found 118 results on 5 pages for 'omega'.

Page 3/5 | < Previous Page | 1 2 3 4 5  | Next Page >

  • How do I define and standardize units in my 3D app?

    - by Omega
    I'm starting to design my object graph for an OpenGL ES 1.1 on Android. What's advisable when it comes to actually drawing my triangles when it comes to controlling their size? Should I store all the vertices in units relative to each other and then multiply them by a value I pass during a draw(GL10 gl)? Would this approach have any impact when it comes time to do frustum culling?

    Read the article

  • Loading textures in an Android OpenGL ES App.

    - by Omega
    I was wondering if anyone could advise on a good pattern for loading textures in an Android Java & OpenGL ES app. My first concern is determining how many texture names to allocate and how I can efficiently go about doing this prior to rendering my vertices. My second concern is in loading the textures, I have to infer the texture to be loaded based on my game data. This means I'll be playing around with strings, which I understand is something I really shouldn't be doing in my GL thread. Overall I understand what's happening when loading textures, I just want to get the best lifecycle out of it. Are there any other things I should be considering?

    Read the article

  • What's the best way to add scripting to an Android app?

    - by Omega
    I have an XML based file format that I'm using to store and load instances of objects. I'm interested in adding some scripting support to those objects so that they can respond to events. That said, I also don't want to cripple performance. Are there any well known scripting options for Android - maybe even ones where while loading, I can pre-compile and cache the scripts?

    Read the article

  • Optimizing tiled maps in cocos2d-iphone

    - by Omega
    My cocos2d-iphone game has tiled maps. The tilesets textures are rather big. I got around 5 tilesets and each one is 2048x2048 (retina). My maps are around 80x80. They have around 8 layers and each one is obviously using one tileset. The frame rate falls (it goes around 30 sometimes. I know 30 is rather aceptable, but still, I want 50+). So given that textures are huge I can't afford to make many layers (since each one loads a texture of these). So how about I divide my tileset textures into much smaller tilesets (like 1024x1024 each)? That will allow me to use many more layers for my maps, right? Are there any other tips for huge retina display tile maps?

    Read the article

  • Combining two .png images into one image using .NET

    - by Omega
    I have two (actually many) .png images in my application. Both have transparent areas here and there. I want, in my application, to take both images, combine them, and display the result in a picture box. Later I want to save the result through a button. So far I managed to find the two images and combine them, but it seems the transparency thing won't work. I mean, if you put one image over another, only the top image is visible as the result because, apparently, the image's background is a plain white box. Which is not. Here is a bit of my code: Dim Result As New Bitmap(96, 128) Dim g As Graphics = Graphics.FromImage(Result) Dim Name As String For Each Name In BasesCheckList.CheckedItems Dim Layer As New Bitmap(resourcesPath & "Bases\" & Name) For x = 0 To Layer.Width - 1 For y = 0 To Layer.Height - 1 Result.SetPixel(x, y, Layer.GetPixel(x, y)) Next Next Layer = Nothing Next resourcesPath is the path to my resources folder. Bases is a folder in it. And Name is the image's name. Thank you.

    Read the article

  • Creating Ruby applications for Windows.

    - by Omega
    I want to develop a Windows application. Honestly I care little about cross-platforms for now (but still would be good) I want to use Ruby, since it has quite a simple syntax and is so.. well, simple and easy to learn. My application is like a "game level creator", where you can design your own level and then run it with another application which is a "game level player" by reading the project file created by the creator app. You get the idea. Now, I got a new PC and is completely clean. Absolutely no trace of my old Ruby experiments and fails. First of all, I will need to choose a GUI platform for my Ruby application! Can you recommend me one? I have heard of Shoes and Tk, but want to know what you think.

    Read the article

  • What techniques are available for filtering collections of objects when using zodb?

    - by Omega
    As the title says: What techniques are available for filtering objects when using zodb? The equivalent in SQL terms would be something like filtering results by a date range. Or only returning rows with a particular value set in a column. If I had a series of blog posts and only wanted ones done in the past month, what would I have to do? Is there any way to optimize these kinds of "queries"? My gut tells me iterating over all the objects in a relationship simply to perform a test is less than optimal.

    Read the article

  • Are all <canvas> tag dimensions in pixels?

    - by Simon Omega
    Are all tag dimensions in pixels? I am asking because I understood them to be. But my math is broken or I am just not grasping something here. I have been doing python mostly and just jumped back into Java Scripting. If I am just doing something stupid let me know. For a game I am writing, I wanted to have a blocky gradient. I have the following: HTML <canvas id="heir"></canvas> CSS @media screen { body { font-size: 12pt } /* Game Rendering Space */ canvas { width: 640px; height: 480px; border-style: solid; border-width: 1px; } } JavaScript (Shortened) function testDraw ( thecontext ) { var myblue = 255; thecontext.save(); // Save All Settings (Before this Function was called) for (var i = 0; i < 480; i = i + 10 ) { if (myblue.toString(16).length == 1) { thecontext.fillStyle = "#00000" + myblue.toString(16); } else { thecontext.fillStyle = "#0000" + myblue.toString(16); } thecontext.fillRect(0, i, 640, 10); myblue = myblue - 2; }; thecontext.restore(); // Restore Settings to Save Point (Removing Styles, etc...) } function main () { var targetcontext = document.getElementById(“main”).getContext("2d"); testDraw(targetcontext); } To me this should produce a series of 640w by 10h pixel bars. In Google Chrome and Fire Fox I get 15 bars. To me that means ( 480 / 15 ) is 32 pixel high bars. So I change the code to: function testDraw ( thecontext ) { var myblue = 255; thecontext.save(); // Save All Settings (Before this Function was called) for (var i = 0; i < 16; i++ ) { if (myblue.toString(16).length == 1) { thecontext.fillStyle = "#00000" + myblue.toString(16); } else { thecontext.fillStyle = "#0000" + myblue.toString(16); } thecontext.fillRect(0, (i * 10), 640, 10); myblue = myblue - 10; }; thecontext.restore(); // Restore Settings to Save Point (Removing Styles, etc...) } And get a true 32 pixel height result for comparison. Other than the fact that the first code snippet has shades of blue rendering in non-visible portions of the they are measuring 32 pixels. Now back to the Original Java Code... If I inspect the tag in Chrome it reports 640 x 480. If I inspect it in Fire Fox it reports 640 x 480. BUT! Fire Fox exports the original code to png at 300 x 150 (which is 15 rows of 10). Is it some how being resized to 640 x 480 by the CSS instead of being set to a true 640 x 480? Why, how, what? O_o I confused...

    Read the article

  • UI Design Tips and Tutorials for Android

    - by Omega
    Does anyone have any good pointers on designing the UI for an android application and some good practises? Obviously I'm aware of the basic principles involved with designing the layout in XML. Also, that you have a stack of activities. But I'm interested in some approaches to creating the interfaces and also how to design an application around those intentions.

    Read the article

  • How should I think about perspectives and rotation in OpenGL ES?

    - by Omega
    As I start to write rendering code, how do I want to consider my drawing operations? Will they always be relative to a fixed coordinate system on the screen, or does this change based on the camera perspective? The best example I can try to come up with is say I'm at (0,0,0) and I draw a line to (3,3,3). If I change the perspective +1 on the X axis and conduct the same operation, does it happen at (4,3,3), or am I just getting a new view of the line still being made at (3,3,3)? When doing rotation, am I moving the point from which a frustum emanates, or am I moving the rendering underneath?

    Read the article

  • Textures loaded with NSOperation are blank

    - by Omega
    So I call this method: -(void)beginExecution { NSOperationQueue *queue = [NSOperationQueue new]; NSInvocationOperation *operation = [[NSInvocationOperation alloc] initWithTarget:self selector:@selector(execute) object:nil]; [queue addOperation:operation]; [operation release]; } Which triggers this: -(void)execute { [[CCSpriteFrameCache sharedSpriteFrameCache]addSpriteFramesWithFile:@"MyTexture.plist"]; loaded = YES; // This tells me whenever loading is done. } However, when I create a sprite and try to use the texture MyTexture.png, the sprite is a blank canvas. Why is that?

    Read the article

  • Animate screen while loading textures

    - by Omega
    My RPG-like game has random battles. When the player enters a random battle, it is necessary for my game to load the textures used within that battle (animated monsters, animations, etc). The textures are quite a lot, and rather big (the battles are very graphical intensive). Such process consumes significant time. And while it is loading, the whole screen freezes. The game's map freezes, and the wait time is significant - I personally find it annoying. I can't afford to preload the textures because, after doing some math, I realized: If I preload all the textures at the beginning of the game, the application will definitely crash. If I preload the textures that are used in a specific map when the player enters the map, the application is very likely to crash as well. I can only afford to load the textures when I need them, and dispose of them as soon as the battle ends. I'd prefer to not use a "loading screen" image because it affects my game's design and concept. I want to avoid this approach. If I could do some kind of animation while loading the textures, it would be great, which leads to my question: is that possible? What kind of animation, you ask? Well, how about... you remember when Final Fantasy used to distort the screen while apparently loading the textures? Something like that. But well, distorting is quite a time-consuming process as well, so maybe just a cool frame-by-frame animation or something. While writing this, I realized that I could make small pauses between textures (there are multiple textures), and during such pauses, I update the screen to represent the animation's state. However, this is very unlikely to happen, because each texture is 2048x2048, so the animation would be refreshed at a rather laggy (and annoying) rate. I'd prefer to avoid this as well.

    Read the article

  • Pop up window dialogs

    - by Omega
    In Cocoa, my application's main window has a button. How can I make it so when you click it, a new window will be generated and set focus to such window so that the main window can not be clicked or interacted with at all? This new window will have a textfield and a submit button. You click it and the window is supposed to close and send the textfield's data back to the main window (and it will recover focus as well). I found this: How to open a new window on button click in Cocoa Mac Application? But the answer doesn't seem to be working for me. The function showWindow doesn't seem to be recognized...

    Read the article

  • What is the best 3-D technology for the "Online Room Planner" site?

    - by Omega
    The main user-case is: Create the 2D floor plan See the 3D view of the room in colors and in dynamic lighting (switching on and off the lamps) Select the furniture from the large library of predefined samples. Change the color and texture of the furniture samples. Create the photos of the 3D room view from different points. Also user can move and turn the camera in the room and discover the view.

    Read the article

  • Visual Basic: Newbie questions.

    - by Omega
    Hello there. I am starting to learn visual basic. So far, it is quite simple and easy to use. I am liking it! Anyway, I want to make applications a little bit more complex. So far I have done very silly things. I would appreciate if you could help me with these: How do I open a new window (form)? Maybe I click a button on my main form and another form pops up. How do I "deactivate" the main form while the new form is running? (if I try to click the main form, an error sound plays) So my second form has a text field and a "OK" button. If I click it, the second form closes activating the main form again. I want to "pass" the text in the text field from the second form to the first one. How do I do that? Thank you, I am enjoying this new programming environment (didn't use Visual Studio much before)

    Read the article

  • "Find all tiles connected to this one" project

    - by Omega
    Remember MS Paint? The bucket tool? If you used it and clicked on a pixel, all pixels connected to this pixel that are the same are affected. The theory is, I suppose, to check if there is any pixel adjacent to the selected one. If such pixel is the same type as the selected one, check for more adjacent pixels in this one, and so on. I want to implement something similar in VB.NET. Basically I have a 2D array map which represents the map. Let's assume there are only two types of tile: 0 and 1. Now, I got pretty much everything ready: I got my 2d map and I can tell which tile is clicked and tell what array indexes are the ones that represent such tile. Now for the "painting" process. Whenever I think about it, I can't figure a convenient way to execute such iteration. Can someone help me choosing a correct design/way/tip to achieve this?

    Read the article

  • Looking for a Python IDE with good support for libraries (Twisted).

    - by Omega
    I'm looking for a Python IDE that can help me easily locate and manage and use the libraries on my system (Ubuntu). Specifically Twisted. Code completion is important including the symbols I import. (I've so far had a look at PyDev as well as OpenKomodo, but while both offer code completion for default Python concepts, I wasn't able to get either to import Twisted into my project and was thus getting reference errors.) Usual disclaimer: I don't like EMACS or vi, please, nothing regarding those.

    Read the article

  • About calling an subclass' overriding method when casted to its superclass

    - by Omega
    #include <iostream> class Vehicle { public: void greet() { std::cout << "Hello, I'm a vehicle"; } }; class Car : public Vehicle { public: void greet() { std::cout << "Hello, I'm a car"; } }; class Bike : public Vehicle { public: void greet() { std::cout << "Hello, I'm a bike"; } }; void receiveVehicle(Vehicle vehicle) { vehicle.greet(); } int main() { receiveVehicle(Car()); return 0; } As you can see, I'm trying to send a parameter of type Vehicle to a function, which calls greet(). Car and Bike are subclasses of Vehicle. They overwrite greet(). However, I'm getting "Hello, I'm a vehicle". I suppose that this is because receiveVehicle receives a parameter of type Vehicle instead of a specific subclass like Car or Bike. But that's what I want: I want this function to work with any subclass of Vehicle. Why am I not getting the expected output?

    Read the article

  • Is there a way to arbitrarily load Resources at runtime in Android?

    - by Omega
    I've got some XML resources in my Android app. Each one has a different name like "bicycle.xml" and "car.xml". I'd like to know if there's a way to load resources based on conditions during run time. As an example... Say I had a text input in my app. When the user enters "bicycle", my app can look up an XML resource by that name, parse and load it. Whereas if they enter "car", they would end up with the data from the other XML file. I've noticed so far that to load resources, you have to use the autogenerated "R" class, which restricts you to hard-coding resources at compile time.

    Read the article

  • asp.net - updatepannel can't read innerHTML?

    - by omega
    In my asp.net page, I have a jquery sortable accordian (in an update panel) I use so that clients can re-arrange items. Then to save it, users would click a button (thats created from jquery) and it would traverse through the accoridion in the DOM, and write the info to a asp control textbox. Then invoke the click function of a asp button control, which then reads that information and saves the data. But now I decided to simplify this step, and use html agility pack in c#, so users click the asp button control (inside an update panel), and then it would get the innerHTML of the accordian. But the problem is, the html it's getting is not the reflecting the changes a user can make to the accordion (i.e. re arranging it), it the same as when the DOM was ready on page load... But note that, using javascript to write the innerHTML to a textbox, then from the c# function, I can read the up to date html from the accordian. Does anyone know why this is happening and how to get the up to data html from the accordian in c#?

    Read the article

  • How to, set-justification-full per line in emacs without messing up on return?

    - by inaki
    Hi, I have two problems in emacs. First. How do I set-justification-full for the whole document? I can do M-X set-justification-full for a region successfully, but I would like to make it work in the whole document. Second. How do I manage not to get lines jumping from one place to another when I have done set-justification-full, and press enter? That is, say I have the following paragraph: %%if normalized beforehand then the rule would be, %%\begin{gather} %%(\hat{y}_{i}^{'} \times \hat{y}_{i+1}^{'}) \cdot \hat{z}_{mst} = 1, \quad then \ \Omega 1\\ %%(\hat{y}_{i}^{'} \times \hat{y}_{i+1}^{'}) \cdot \hat{z}_{mst} = %%-1,\quad then \ \Omega When I do set-justification-full, it will convert six lines into three lines, that is, what I want to do is a per line justification. Is this possible in emacs? Thank you all very much for your help. Inhaki2006

    Read the article

  • Is it acceptable to design my GLSurfaceView as a main control class?

    - by Omega
    I'm trying to structure a game I'm making in Android so that I have a sound, flexible design. Right now I'm looking at where I can tie my games rules engine and graphics engine together and what should be in between them. At a glance, I've been eying my implementation of GLSurfaceView, where various screen events are captured. My rationale would be to create an instance of my game engine and graphics engine here and receive events and state changes to trigger updates of either where applicable. Further to this, in the future, the GLSurfaceView implementation could also store stubs for players during a network game and implementations of computer opponents and dispatch them appropriately. Does this seem like a sensible design? Are there any kinds of improvements I can make? Thanks for any input!

    Read the article

< Previous Page | 1 2 3 4 5  | Next Page >