Daily Archives

Articles indexed Friday October 26 2012

Page 14/16 | < Previous Page | 10 11 12 13 14 15 16  | Next Page >

  • Observing MVC, can/should the Model be instantiated in the ViewController? Or where?

    - by user19410
    I'm writing an experimental iPhone app to learn about the MVC paradigm. I instantiate my Model class in the ViewController class. Is this stupid? I'm asking because storing the id of the Model class, and using it works where it's initialized, but referring to it later (in response to an interface action) crashes. Seemingly, the pointer address of my Model class instance changes, but how can that be? The code in question: @interface Soundcheck_Tone_GeneratorViewController : UIViewController { IBOutlet UIPickerView * frequencyWheel; @public Sinewave_Generation * sineGenerator; } @property(nonatomic,retain) Sinewave_Generation * sineGenerator; @end @implementation Soundcheck_Tone_GeneratorViewController @synthesize sineGenerator; - (void)viewDidLoad { [super viewDidLoad]; [self setSineGenerator:[[Sinewave_Generation alloc] initWithFrequency:20.0]]; // using reference -> fine } // pickerView handling is omitted here... - (void)pickerView:(UIPickerView *)thePickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component { [[self sineGenerator] setFrequency:20.0]; // using reference -> crash } @end // the Sinewave_Generation class... only to be thorough. Works fine so far. @interface Sinewave_Generation : NSObject { AudioComponentInstance toneUnit; @public double frequency,theta; } @property double frequency; - (Sinewave_Generation *) initWithFrequency: (int) f; @end @implementation Sinewave_Generation @synthesize frequency; - (Sinewave_Generation *) initWithFrequency: (int) f { self = [super init]; if ( self ) { [self setFrequency: f]; } return self; } @end

    Read the article

  • How to teach Exception Handling for New Programmers?

    - by Kanini
    How do you go about teaching Exception Handling to Programmers. All other things are taught easily - Data Structures, ASP.NET, WinForms, WPF, WCF - you name it, everything can be taught easily. With Exception Handling, teaching them try-catch-finally is just the syntactic nature of Exception Handling. What should be taught however is - What part of your code do you put in the try block? What do you do in the catch block? Let me illustrate it with an example. You are working on a Windows Forms Project (a small utility) and you have designed it as below with 3 different projects. UILayer BusinessLayer DataLayer If an Exception (let us say of loading an XDocument throws an exception) is raised at DataLayer (the UILayer calls BusinessLayer which in turns calls the DataLayer), do you just do the following //In DataLayer try { XDocument xd_XmlDocument = XDocument.Load("systems.xml"); } catch(Exception ex) { throw ex; } which gets thrown again in the BusinessLayer and which is caught in UILayer where I write it to the log file? Is this how you go about Exception Handling?

    Read the article

  • Update Manager won't open (error related to pythonverbose)

    - by Mateus Machado Luna
    I'm having an issue with update-manager. Last night, my computer restart suddenly during the update process. Now it won't open and it keep appearing on the notifier with a message warning that an error occurred. The error is the same that is displayed when I try to open it on the terminal: Error in sitecustomize; set PYTHONVERBOSE for traceback: EOFError: EOF read where not expected Traceback (most recent call last): File "/usr/bin/update-manager", line 26, in <module> from __future__ import print_function EOFError: EOF read where not expected I've already seen some questions here, but most of them are related to problems with ppas and the source.list file. This seems to be a bug on update-manager itself. I've already tried to remove it and install again, but the problem persists. I also noted another bug: my source-center doesn't open too. The message for it is similar to the other one: Error in sitecustomize; set PYTHONVERBOSE for traceback: EOFError: EOF read where not expected Traceback (most recent call last): File "/usr/lib/command-not-found", line 5, in <module> from __future__ import absolute_import, print_function EOFError: EOF read where not expected For now I'm using apt-get update && upgrade for updating and the Synaptic for the source management. But I really would like to fix this stuff. Anyone can help? I'm with Ubuntu 12.10, Gnome-remix, 64-bits.

    Read the article

  • Can't start system due to mdadm failing

    - by user101212
    I used to have a 5-disk RAID5 partition, all working very well. I have then decided to add 3 more disks on it, totaling 8 equal disks. I've opened Webmin and just asked to add the disks. Then I've realized the three disks had NTFS partitions, wich mdadm didn't complain, so I tried to stop the growing to remove the Windows partitions. I've tried to remove a disk using the same Webmin, but (as you might guess and call me fool...), the system became unstable. By restarting the system, I've started receiving these messages: "udev[126]: timeout: killing '/sbin/mdadm --incremental /dev/sdh1' [311]" "udev[124]: timeout: killing '/sbin/mdadm --detail --export /dev/md0' [316]" I've formated the system disk, hoping to get a system up and running. I did that with all RAID disks disconected, so everything was fine. I then reconnected the disks, wich was also ok. And finally installed mdadm using apt-get. By reboot, the system has found the mdadm intention of growing the system, so the same messages appear again. I other words: I can't even reach a command prompt to do something. Any ideas of what to do? I believe I could turn off the system, disconnect the disks and look for the mdadm.conf file. Would that be a good idead? I'm no Linux expert, so I'm really lost here.

    Read the article

  • Is it possible to power down my external via the eject button?

    - by beanaroo
    I'm trying to convert from Windows 7 to Ubuntu 12.10 with Gnome 3.6. Using the notification area's eject icon, I notice the partition is unmounted but the drive is still powered and spinning... I understand the latter can be taken care of by means of udisks --detach /dev/sdb I really don't want to have to run a command everytime I eject. Windows does the whole process when ejecting a medium via the systray. Is there a way I could add in the command to the eject button? Is there an appropriate place I could file a feature request? Little things like this are making it hard for me to swap back over to Linux. Thanks for the support!

    Read the article

  • how do I upload photos from shotwell?

    - by Mags
    I only started using Ubuntu a couple months ago. I've been able to get pictures from my camera onto the machine. The system is very different for me and I'm trying to work it out on my own, but I have a homework assignment that requires me to upload JPG files of photos I take and I'm having a problem. When I click the button on the page to choose a file, I go into the different photo files and nothing shows up, but the screen where files would be turns a very faint orange, just a tint. I've tried putting the named photos on my desktop, but the upload screen doesn't recognize it at all. How can I use this software to upload my pictures? Thanks.

    Read the article

  • Can I become an Ubuntu Member by contributing on askubuntu?

    - by Kyle Macey
    The Ubuntu Membership Wiki states: Contributions are valued and recognized whether you contribute to artwork, any of the LoCoTeams, documentation, providing support on the forums, the answers tracker, IRC support, bug triage, translation, development and packaging, marketing and advocacy, contributing to the wiki, or anything else. This defines what contributions "count" toward what will be considered valuable when applying for Ubuntu membership. What I want to know is, does my involvement on askubuntu fall under the stipulation "...or anything else"? I'd imagine they don't literally mean anything else, just things they consider to fit the scope of contributing to Ubuntu. So is my help here valuable in contributing? Has anyone ever obtained membership by using their askubuntu contributions as their argument toward membership?

    Read the article

  • How to intergrate Pidgin and Evolution into the message indicator?

    - by Steven Robert Chetwynd
    I upgraded to 12.10, I was using Unity 2d, but as it no longer exists I moved to gnome classic, something in the upgrade seems to have change the message indicator in the "Indicator Applet Complete". How do I integrate Pidgin and Evolution into the message indicator, there is only a button to launch Pidgin, but a new message does not change the colour of the icon or show up in the dropdown part. Also when minimizing Pidgin it minimizes like a normal window instead of minimizing to the applet. There is nothing in the menu for Evolution at all. Thanks in advanced.

    Read the article

  • My local ubuntu server is not updated

    - by Rakesh Manandhar
    I am from Nepal and it's faster to download apps from server for nepal using through ubuntu software center. But when i use np.archive.ubuntu.com server. There is no updated softwares and few softwares and nvidia driver are outdated. for e.g. i cannot even install openshot when i user server for nepal. It provides error which cannot be solved. I want to know how can the server for nepal be updated frequently with us.archive.ubuntu.com. i use ubuntu 12.10. and i want to use server for nepal since the download speed faster than 2x than from us server.

    Read the article

  • How to change the icon of an aplicatication at the LxPanel on Lubuntu?

    - by Zignd
    After installing Lubuntu 12.10, I decided to install IDLE 3 (from the official Ubuntu repository), but something unexpected happened, its icon gets bigger then the LxPanel and all the another aplications icos, the same happens at the menu when I select it from Menu Programming IDLE 3 Check the image: Note: Wasn't possible to take a printscreen from IDLE at the Menu because the printscreen action ignore the menu when it is opened. Knowing that I'd like to know how to change the icon of an application? Or better, if possible, how to resize this specific icon to normal size?

    Read the article

  • Atheros AR9285 wireless extremely slow

    - by ignacio
    I recently upgraded to Ubuntu 12.10, and things were going great.. But suddenly, the wifi connection went extremely slow. I have a 20 M connection and normally download files al 1 MB/s or so.. but today i dont get any faster than 120 KB/s. Also, if i use wired connection, the speed goes normal. Following some advice on the net i changed network-manager with wicd, but the issue hasn't gone away Any clues? PD. my wireless card is Atheros AR9285

    Read the article

  • ipv6 just wont go away 12.10 server

    - by VladoPortos
    After very long time using Ubuntu old LTS version I have re-installed to new LTS 12.10, but I can't get rid of ipv6 ! I have did: in /etc/modprobe.d/blacklist.conf: blacklist ipv6 blacklist ip6table_filter blacklist ip6_tables in /etc/sysctl.conf net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1 But ufw happily use v6 protocol, and in dmesg: ip6_tables: (C) 2000-2006 Netfilter Core Team . . IPv6: ADDRCONF(NETDEV_CHANGE): em1: link becomes ready What is going to take to get rid of IPv6 ? I swear Terminator didn't put so much fight.

    Read the article

  • Kubuntu permanent install won't attach sound card

    - by rob
    I installed Kubuntu Live version and sound card visible in the volume/mixer panel. After installing the permanent version I have a dummy output where my sound card should be, therefore no sound. I re-installed the live version three times and then to permanent but the same problem each time. There is a very brief error on boot up to the permanent version that says: error. cannot attach card default. no such file or directory. I'm running Kubuntu 12.04 on a Mac G4 PPC with no other OS. I'm very new to Linux. I am able to follow instructions to help resolve this, but I'm not familiar with the OS.

    Read the article

  • Dim (NEARLY blank) laptop screen, secondary screen works - why?

    - by LIttle Ancient Forest Kami
    My laptop screen is (almost) black while my secondary screen is fine. I believe it to be backlight / brightness related. Problem description it starts when I start the laptop system loads and works fine, just screen has problems I can see the screen though very faintly / dimly - it's hard to see anything which ain't very white e.g. starting screen has big Thinkpad logo in white, large font - I can see it, though very dimly second screen works very well Official backligtht debugging: using acpi setting as prescribed there for Thinkpads didn't help I can see an entry in /sys/class/backlight/ and it changes when I press hotkeys for brightness (current backlight power for instance goes up or down) acpi-off didn't helpm neither did acpi_backlight=vendor Hardware data Laptop is Thinkpad Edge with glossy screen. 4 processors, 2 cores, exemplary CPU data from cat /proc/cpuinfo reports Genuine Intel i5 (M 480 @ 2.67GHz). OS is Ubuntu Lucid, 10.04 LTS, 64-bit, with Linux generic kernel (2.6.32-44) and GNOME 2.32.2 (though I doubt there lies the problem). $ lspci | grep VGA 01:00.0 VGA compatible controller: ATI Technologies Inc M92 [Mobility Radeon HD 4500 Series] $ lshw -C display *-display description: VGA compatible controller product: M92 [Mobility Radeon HD 4500 Series] vendor: ATI Technologies Inc physical id: 0 bus info: pci@0000:01:00.0 version: 00 width: 32 bits clock: 33MHz capabilities: pm pciexpress msi bus_master cap_list rom configuration: driver=radeon latency=0 resources: irq:33 memory:c0000000-dfffffff(prefetchable) ioport:2000(size=256) memory:f0300000-f030ffff memory:f0320000-f033ffff(prefetchable) Driver I was NOT running any proprietary drivers, just checked with "Hardware drivers". There is one for ATI that is suggested there, though I didn't need it so far. UPDATE: changing the driver to proprietary one (ATI/AMD FGLRX) didn't help. Tried and failed Resetting / running on power or battery / charging / getting rid of static electricity / warming up *doesn't help* This is NOT a blank-screen problem, at least it isn't following official Ubuntu black-screen diagnostics - I can see my screen, though barely. What I will try next: - check last updates I've made - IIRC I am running on nomodeset already, but will verify this Any ideas how to proceed best? What is most probable cause?

    Read the article

  • Ubuntu 12.10 is reading mouse battery as a laptop battery

    - by Ross Fleming
    I have a bluetooth mouse connected to my laptop. Much to my delight (I posted the suggestion!) the mouses battery is now displayed along side the laptop's battery. Unfortunately is is named simply "battery" in the drop down and "Laptop battery" once the power statistics windows is opened. The details of this battery correctly say that the model is a Lenovo Bluetooth Mouse, but it is still displayed as a "battery" and "laptop battery". Is there anyway to change this? Edit: Plus the "Show time in menu bar" shows the mouse's remaining battery percentage as opposed to the laptop battery's remaining time.

    Read the article

  • How to increase the amount of steps of brightness adjustment-key

    - by Koen
    The screen of my laptop (Dell Vostro 3460) supports 16 levels of brightness: Not only according to the manufacturer, but also as is clear from two OSs: Both Windows 7 and Ubuntu (dual-booted) support all levels. On Windows 7, the hotkeys for brightness adjustment support all levels. In ubuntu it is apparent when going on the brightness slidebar (see picture below) from left to right; I can count 16 different levels of brightness when doing so. When using the hotkeys (Fn+F4 and Fn+F4), however, only 5 levels are supported. How can I adjust these levels and make them in line with what my screen supports?

    Read the article

  • How to set a text theme for plymouth?

    - by ProGNOMmers
    I have Ubuntu 12.04 (beta) and I want to set a text theme for Plymouth, because I need to read what commands the PC is running on shutdown (because it freezes when I shutdown it), but the method I found googling ( How do I change the plymouth bootscreen? ) is not working: this is the ouput of update-alternatives --list default.plymouth: user@host:~$ update-alternatives --list default.plymouth /lib/plymouth/themes/solar/solar.plymouth /lib/plymouth/themes/ubuntu-logo/ubuntu-logo.plymouth user@host:~$ And the text themes are not displayed. How can I set a text theme for Plymouth?

    Read the article

  • Add rules (filters) to ftp programs to avoid uploading certain files/folders

    - by guisasso
    i use Filezilla as my ftp client, but this question goes to any other client that could be useful. Can i (in any client) add rules (filters) to an ftp program to avoid upload of certain files or folders? For example: Expression web creates those annoying _vti_cnf folders, or, certain folders in which i have the original version of a picture without a watermark that i don't want to upload. Example, i have a folder A, that has sub folders "original" and "current", i would like to add a filter, so every time i select A to be uploaded, "original" wouldn't go, but "current would".

    Read the article

  • Should I, and how do I incorporate microdata into my asp.net website with 47 pages?

    - by Jason Weber
    I have an asp.net (vb) with 47 pages. The problem is that it's in 10 different languages, although 98% just use English. I have 5 master pages. I've read Google Webmaster Tools, but I'm still confounded. I'm reading about how microdata is the way to go. Does this mean I should put itemtype and itemprop span and div tags in my master pages, or should I do all of my 47 pages (.resx resource files) separately? The main key phrase I want throughout search results is "machine vision". For instance, the first couple sentences on my "about.aspx" page are: <span itemprop="name">USS Vision Inc.</span> (USS) is a privately-owned company with headquarters in <span itemprop="locality">Detroit, Michigan, USA</span>. We design, engineer, produce, and integrate special machine vision error-proofing products and <a href="http://www.ussvision.com/services/" target="_self" itemprop="url">services</a> that create lean factories by improving the quality of manufactured products, and by significantly reducing manufacturing costs through advanced automation. Am I doing this right, or how would I do this if I'm not? Should I use the itemprop="url" or other rich snippets for every link in my website? I mean, do I need to add an itemprop to just about everything, or can I just alter my master pages? Any guidance in this regard to help improve my SEO and SERPS would be greatly appreciated!

    Read the article

  • Share buttons vs sharer urls

    - by TeeOh
    As some people might know, adding share buttons from Facebook and Twitter can cause a page to slow down. I've seen many sites pass on the common iframe implementations that these sites offer and simply create icons that link to a sharer url for better control of page performance. http://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fwww.cnn.com%2F&t=CNN%26s+website%27 However, I've also read that Facebook is dropping support for these links. For example, this link now redirects to the Like Button. http://www.facebook.com/facebook-widgets/share.php Here is an article noting that Facebook is deprecating/has deprecated it's share functionality and is sticking with the Like button. http://www.barbariangroup.com/posts/7544-the_facebook_share_button_has_been_deprecated_called_it I'm assuming this is the same for the sharing url. If the sharer url is no longer a reliable option, what other methods are there besides using 3rd party widgets (like Addthis)?

    Read the article

  • Can CSS be copyrighted?

    - by Emily
    I know CSS on a website is protected under the website's copyright since it is considered part of the overall design. I also know that images used inCSS are copyrightable. How about when CSS is used to create images? There is a CSS3 icon set that has a $25 license fee. Another developer claims those images to be copyrighted and that it is illegal to use any of the icons unless you pay the fee. I say you cannot copyright a chunk of code and if I recreate an arrow or disc icon in my CSS (whether I copy his code or write my own) he has no recourse. Can CSS, by itself, be copyrighted?

    Read the article

  • Level of detail algorithm not functioning correctly

    - by Darestium
    I have been working on this problem for months; I have been creating Planet Generator of sorts, after more than 6 months of work I am no closer to finishing it then I was 4 months ago. My problem; The terrain does not subdivide in the correct locations properly, it almost seems as if there is a ghost camera next to me, and the quads subdivide based on the position of this "ghost camera". Here is a video of the broken program: http://www.youtube.com/watch?v=NF_pHeMOju8 The best example of the problem occurs around 0:36. For detail limiting, I am going for a chunked LOD approach, which subdivides the terrain based on how far you are away from it. I use a "depth table" to determine how many subdivisions should take place. void PQuad::construct_depth_table(float distance) { tree[0] = -1; for (int i = 1; i < MAX_DEPTH; i++) { tree[i] = distance; distance /= 2.0f; } } The chuncked LOD relies on the child/parent structure of quads, the depth is determined by a constant e.g: if the constant is 6, there are six levels of detail. The quads which should be drawn go through a distance test from the player to the centre of the quad. void PQuad::get_recursive(glm::vec3 player_pos, std::vector<PQuad*>& out_children) { for (size_t i = 0; i < children.size(); i++) { children[i].get_recursive(player_pos, out_children); } if (this->should_draw(player_pos) || this->depth == 0) { out_children.emplace_back(this); } } bool PQuad::should_draw(glm::vec3 player_position) { float distance = distance3(player_position, centre); if (distance < tree[depth]) { return true; } return false; } The root quad has four children which could be visualized like the following: [] [] [] [] Where each [] is a child. Each child has the same amount of children up until the detail limit, the quads which have are 6 iterations deep are leaf nodes, these nodes have no children. Each node has a corresponding Mesh, each Mesh structure has 16x16 Quad-shapes, each Mesh's Quad-shapes halves in size each detail level deeper - creating more detail. void PQuad::construct_children() { // Calculate the position of the Quad based on the parent's location calculate_position(); if (depth < (int)MAX_DEPTH) { children.reserve((int)NUM_OF_CHILDREN); for (int i = 0; i < (int)NUM_OF_CHILDREN; i++) { children.emplace_back(PQuad(this->face_direction, this->radius)); PQuad *child = &children.back(); child->set_depth(depth + 1); child->set_child_index(i); child->set_parent(this); child->construct_children(); } } else { leaf = true; } } The following function creates the vertices for each quad, I feel that it may play a role in the problem - I just can't determine what is causing the problem. void PQuad::construct_vertices(std::vector<glm::vec3> *vertices, std::vector<Color3> *colors) { vertices->reserve(quad_width * quad_height); for (int y = 0; y < quad_height; y++) { for (int x = 0; x < quad_width; x++) { switch (face_direction) { case YIncreasing: vertices->emplace_back(glm::vec3(position.x + x * element_width, quad_height - 1.0f, -(position.y + y * element_width))); break; case YDecreasing: vertices->emplace_back(glm::vec3(position.x + x * element_width, 0.0f, -(position.y + y * element_width))); break; case XIncreasing: vertices->emplace_back(glm::vec3(quad_width - 1.0f, position.y + y * element_width, -(position.x + x * element_width))); break; case XDecreasing: vertices->emplace_back(glm::vec3(0.0f, position.y + y * element_width, -(position.x + x * element_width))); break; case ZIncreasing: vertices->emplace_back(glm::vec3(position.x + x * element_width, position.y + y * element_width, 0.0f)); break; case ZDecreasing: vertices->emplace_back(glm::vec3(position.x + x * element_width, position.y + y * element_width, -(quad_width - 1.0f))); break; } // Position the bottom, right, front vertex of the cube from being (0,0,0) to (-16, -16, 16) (*vertices)[vertices->size() - 1] -= glm::vec3(quad_width / 2.0f, quad_width / 2.0f, -(quad_width / 2.0f)); colors->emplace_back(Color3(255.0f, 255.0f, 255.0f, false)); } } switch (face_direction) { case YIncreasing: this->centre = glm::vec3(position.x + quad_width / 2.0f, quad_height - 1.0f, -(position.y + quad_height / 2.0f)); break; case YDecreasing: this->centre = glm::vec3(position.x + quad_width / 2.0f, 0.0f, -(position.y + quad_height / 2.0f)); break; case XIncreasing: this->centre = glm::vec3(quad_width - 1.0f, position.y + quad_height / 2.0f, -(position.x + quad_width / 2.0f)); break; case XDecreasing: this->centre = glm::vec3(0.0f, position.y + quad_height / 2.0f, -(position.x + quad_width / 2.0f)); break; case ZIncreasing: this->centre = glm::vec3(position.x + quad_width / 2.0f, position.y + quad_height / 2.0f, 0.0f); break; case ZDecreasing: this->centre = glm::vec3(position.x + quad_width / 2.0f, position.y + quad_height / 2.0f, -(quad_height - 1.0f)); break; } this->centre -= glm::vec3(quad_width / 2.0f, quad_width / 2.0f, -(quad_width / 2.0f)); } Any help in discovering what is causing this "subdivding in the wrong place" would be greatly appreciated.

    Read the article

  • GPU based procedual terrain borders?

    - by OnePie
    I'm working on a game that preferibly should feature a combination of designed and procedually generated terrain where the designer specifies in somewhat detailed terms what type of terrain a given area will have (grasslands, forest etc...) and then a precedual algorithm takes care of the rest. I'm not talking about minecraft style biomoes, but rather the game map for a strategy game. Each 'area' will not take up that much of the screen, and thus be more akin to a tile whose texture is procedually generated. While procedually generating terrain textures on the GPU are not that difficult, the hard part is making the borders between them look good. Currently, the 'tiles' are large enough to be visible (due to memory constraints mainly, we are talking planetary sized textures for a game taking place in space and on a continental ground view with seamless transitions between them) and creating good borders between them with an algorithm that is fast enough to be useful has proven difficult. Sampling the n-surrounding pixels and using the combiened result did not yield very good borders and was fairly slow on the GPU to boot (ca 12ms for me, that is without any lighning or shading and with very simple terrain texture shaders). So are there any practical known methods to solve this problem?

    Read the article

  • How to get a good picture of the health of a level-based game from analytics?

    - by ADB
    I am designing a level-based game where the user completes the level 1, then 2, 3 and so on. There are 200 levels and each is rather short: 60-ish seconds. I am tracking Each played, completed (cleared for the first time), failed and cleared level Milestones: number of players to reach level 1, 5, 10, etc. Also for number of failed and played levels. Separate new players from returning ones. However, I still find it difficult to get a clear picture of what is going on from the stats. So what are the best practices for determining where I am losing players?

    Read the article

  • How to update entity states and animations in a component-based game

    - by mivic
    I'm trying to design a component-based entity system for learning purposes (and later use on some games) and I'm having some troubles when it comes to updating entity states. I don't want to have an update() method inside the Component to prevent dependencies between Components. What I currently have in mind is that components hold data and systems update components. So, if I have a simple 2D game with some entities (e.g. player, enemy1, enemy 2) that have Transform, Movement, State, Animation and Rendering components I think I should have: A MovementSystem that moves all the Movement components and updates the State components And a RenderSystem that updates the Animation components (the animation component should have one animation (i.e. a set of frames/textures) for each state and updating it means selecting the animation corresponding to the current state (e.g. jumping, moving_left, etc), and updating the frame index). Then, the RenderSystem updates the Render components with the texture corresponding to the current frame of each entity's Animation and renders everything on screen. I've seen some implementations like Artemis framework, but I don't know how to solve this situation: Let's say that my game has the following entities. Each entity have a set of states and one animation for each state: player: "idle", "moving_right", "jumping" enemy1: "moving_up", "moving_down" enemy2: "moving_left", "moving_right" What are the most accepted approaches in order to update the current state of each entity? The only thing that I can think of is having separate systems for each group of entities and separate State and Animation components so I would have PlayerState, PlayerAnimation, Enemy1State, Enemy1Animation... PlayerMovementSystem, PlayerRenderingSystem... but I think this is a bad solution and breaks the purpose of having a component-based system. As you can see, I'm quite lost here, so I'd very much appreciate any help.

    Read the article

< Previous Page | 10 11 12 13 14 15 16  | Next Page >