Search Results

Search found 30234 results on 1210 pages for 'object oriented'.

Page 17/1210 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • Procedural world generation oriented on gameplay features

    - by Richard Fabian
    In large procedural landscape games, the land seems dull, but that's probably because the real world is largely dull, with only limited places where the scenery is dramatic or tactical. Looking at world generation from this point of view, a landscape generator for a game needs to not follow the rules of landscaping, but instead some rules married to the expectations of the gamer. For example, there could be a choke point / route generator that creates hills ravines, rivers and mountains between cities, rather than cities plotted on the land based on the resources or conditions generated by the mountains and rainfall patterns. Is there any existing work being done like this? Start with cities or population centres and then add in terrain afterwards?

    Read the article

  • Is there a process-oriented IDE ?

    - by Raveline
    My problem is simple : when I'm programming in an OO paradigm, I'm often having part of a main business process divided in many classes. Which means, if I want to examine the whole functional chain that leads to the output, for debugging or for optimization research, it can be a bit painful. So I was wondering : is there an IDE that let you put a "process tag" on functions coming from different objects, and give you a view of all those functions having the same tag ? edit : To give an example (that I'm making up completely, sorry if it doesn't sound very realistic). Let's say we have the following business process for a HR application : receive a holiday-request by an employee, check the validity of the request, then give an alert to his boss ("one of those lazy programmer wants another day off"); at the same time, let's say the boss will want to have a table of all employee's timetable during the time the employee wants his vacations; then handle the answer of the boss, send a nice little mail to the employee ("No way, lazy bones"). Even if we get rid of everything not purely business-related (mail sending process, db handling to get the useful info, GUI functionalities, and so on), we still have something that doesn't really fit in "one class". I'd like to have an IDE that would give me the opportunity to embrace quickly, at the very least : The function handling the validation of the request by the employee; The function preparing the "timetable" for the boss; The function handling the validation of the request by the boss; I wouldn't put all those functions in the same class (but perhaps that's my mistake ?). This is where my dreamed IDE could be helpful.

    Read the article

  • Relative encapsulation design

    - by taher1992
    Let's say I am doing a 2D application with the following design: There is the Level object that manages the world, and there are world objects which are entities inside the Level object. A world object has a location and velocity, as well as size and a texture. However, a world object only exposes get properties. The set properties are private (or protected) and are only available to inherited classes. But of course, Level is responsible for these world objects, and must somehow be able to manipulate at least some of its private setters. But as of now, Level has no access, meaning world objects must change its private setters to public (violating encapsulation). How to tackle this problem? Should I just make everything public? Currently what I'm doing is having a inner class inside game object that does the set work. So when Level needs to update an objects location it goes something like this: void ChangeObject(GameObject targetObject, int newX, int newY){ // targetObject.SetX and targetObject.SetY cannot be set directly var setter = new GameObject.Setter(targetObject); setter.SetX(newX); setter.SetY(newY); } This code feels like overkill, but it doesn't feel right to have everything public so that anything can change an objects location for example.

    Read the article

  • Procedural world generation oriented on gameplay features

    - by Richard Fabian
    In large procedural landscape games, the land seems dull, but that's probably because the real world is largely dull, with only limited places where the scenery is dramatic or tactical. Looking at world generation from this point of view, a landscape generator for a game (that is, not for the sake of scenery, but for the sake of gameplay) needs to not follow the rules of landscaping, but instead some rules married to the expectations of the gamer. For example, there could be a choke point / route generator that creates hills ravines, rivers and mountains between cities, rather than the natural way cities arise, scattered on the land based on resources or conditions generated by the mountains and rainfall patterns. Is there any existing work being done like this? Start with cities or population centres and then add in terrain afterwards? The reason I'm asking is that I'd previously pondered taking existing maps from fantasy fiction (my own and others), putting the information into the system as a base point, and then generating a good world to play in from it. This seems covered by existing technology, that is, where the designer puts in all the necessary information such as the city populations, resources, biomes, road networks and rivers, then allows the PCG fill in the gaps. But now I'm wondering if it may be possible to have a content generator generate also the overall design. Generate the cities and population centres, balancing them so that there is a natural seeming need of commerce, then generate the positions and connectivity, then from the type of city produce the list of necessary resources that must be nearby, and only then, maybe given some rules on how to make the journey between cities both believable and interesting, generate the final content including the roads, the choke points, the bridges and tunnels, ferries and the terrain including the biomes and coastline necessary. If this has been done before, I'd like to know, and would like to know what went wrong, and what went right.

    Read the article

  • Row Oriented Security Using Triggers

    Handling security in an application can be a bit cumbersome. New author R Glen Cooper brings us a database design technique from the real world that can help you. Free trial of SQL Backup™“SQL Backup was able to cut down my backup time significantly AND achieved a 90% compression at the same time!” Joe Cheng. Download a free trial now.

    Read the article

  • Are first-class functions a substitute for the Strategy pattern?

    - by Prog
    The Strategy design pattern is often regarded as a substitute for first-class functions in languages that lack them. So for example say you wanted to pass functionality into an object. In Java you'd have to pass in the object another object which encapsulates the desired behavior. In a language such as Ruby, you'd just pass the functionality itself in the form of an annonymous function. However I was thinking about it and decided that maybe Strategy offers more than a plain annonymous function does. This is because an object can hold state that exists independently of the period when it's method runs. However an annonymous function by itself can only hold state that ceases to exist the moment the function finishes execution. So my question is: when using a language that features first-class functions, would you ever use the Strategy pattern (i.e. encapsulate the functionality you want to pass around in an explicit object), or would you always use an annonymous function? When would you decide to use Strategy when you can use a first-class function?

    Read the article

  • Object-Oriented OpenGL

    - by Sullivan
    I have been using OpenGL for a while and have read a large number of tutorials. Aside from the fact that a lot of them still use the fixed pipeline, they usually throw all the initialisation, state changes and drawing in one source file. This is fine for the limited scope of a tutorial, but I’m having a hard time working out how to scale it up to a full game. How do you split your usage of OpenGL across files? Conceptually, I can see the benefits of having, say, a rendering class that purely renders stuff to screen, but how would stuff like shaders and lights work? Should I have separate classes for things like lights and shaders?

    Read the article

  • Consumer Oriented Search In Oracle Endeca Information Discovery - Part 2

    - by Bob Zurek
    As discussed in my last blog posting on this topic, Information Discovery, a core capability of the Oracle Endeca Information Discovery solution enables businesses to search, discover and navigate through a wide variety of big data including structured, unstructured and semi-structured data. With search as a core advanced capabilities of our product it is important to understand some of the key differences and capabilities in the underlying data store of Oracle Endeca Information Discovery and that is our Endeca Server. In the last post on this subject, we talked about Exploratory Search capabilities along with support for cascading relevance. Additional search capabilities in the Endeca Server, which differentiate from simple keyword based "search boxes" in other Information Discovery products also include: The Endeca Server Supports Set Search.  The Endeca Server is organized around set retrieval, which means that it looks at groups of results (all the documents that match a search), as well as the relationship of each individual result to the set. Other approaches only compute the relevance of a document by comparing the document to the search query – not by comparing the document to all the others. For example, a search for “U.S.” in another approach might match to the title of a document and get a high ranking. But what if it were a collection of government documents in which “U.S.” appeared in many titles, making that clue less meaningful? A set analysis would reveal this and be used to adjust relevance accordingly. The Endeca Server Supports Second-Order Relvance. Unlike simple search interfaces in traditional BI tools, which provide limited relevance ranking, such as a list of results based on key word matching, Endeca enables users to determine the most salient terms to divide up the result. Determining this second-order relevance is the key to providing effective guidance. Support for Queries and Filters. Search is the most common query type, but hardly complete, and users need to express a wide range of queries. Oracle Endeca Information Discovery also includes navigation, interactive visualizations, analytics, range filters, geospatial filters, and other query types that are more commonly associated with BI tools. Unlike other approaches, these queries operate across structured, semi-structured and unstructured content stored in the Endeca Server. Furthermore, this set is easily extensible because the core engine allows for pluggable features to be added. Like a search engine, queries are answered with a results list, ranked to put the most likely matches first. Unlike “black box” relevance solutions, which generalize one strategy for everyone, we believe that optimal relevance strategies vary across domains. Therefore, it provides line-of-business owners with a set of relevance modules that let them tune the best results based on their content. The Endeca Server query result sets are summarized, which gives users guidance on how to refine and explore further. Summaries include Guided Navigation® (a form of faceted search), maps, charts, graphs, tag clouds, concept clusters, and clarification dialogs. Users don’t explicitly ask for these summaries; Oracle Endeca Information Discovery analytic applications provide the right ones, based on configurable controls and rules. For example, the analytic application might guide a procurement agent filtering for in-stock parts by visualizing the results on a map and calculating their average fulfillment time. Furthermore, the user can interact with summaries and filters without resorting to writing complex SQL queries. The user can simply just click to add filters. Within Oracle Endeca Information Discovery, all parts of the summaries are clickable and searchable. We are living in a search driven society where business users really seem to enjoy entering information into a search box. We do this everyday as consumers and therefore, we have gotten used to looking for that box. However, the key to getting the right results is to guide that user in a way that provides additional Discovery, beyond what they may have anticipated. This is why these important and advanced features of search inside the Endeca Server have been so important. They have helped to guide our great customers to success. 

    Read the article

  • Are there jobs which are oriented towards optimisation programming or assembly

    - by jokoon
    3D engine programmers have to care a little about execution speed, but what about the programmers at ATI and nVidia ? How much do they need to optimize their driver applications ? Are there jobs out there who only purpose is execution speed and optimisation, or jobs for people to program only in assembly ? Please, no flame war about "premature optimisation is the root of all evil", I just want to know if such jobs exists, maybe in security ? In kernel programming ? Where ? Not at all ?

    Read the article

  • Looking for a better Factory pattern (Java)

    - by Sam Goldberg
    After doing a rough sketch of a high level object model, I am doing iterative TDD, and letting the other objects emerge as a refactoring of the code (as it increases in complexity). (That whole approach may be a discussion/argument for another day.) In any case, I am at the point where I am looking to refactor code blocks currently in an if-else blocks into separate objects. This is because there is another another value combination which creates new set of logical sub-branches. To be more specific, this is a trading system feature, where buy orders have different behavior than sell orders. Responses to the orders have a numeric indicator field which describes some event that occurred (e.g. fill, cancel). The combination of this numeric indicator field plus whether it is a buy or sell, require different processing buy the code. Creating a family of objects to separate the code for the unique handling each of the combinations of the 2 fields seems like a good choice at this point. The way I would normally do this, is to create some Factory object which when called with the 2 relevant parameters (indicator, buysell), would return the correct subclass of the object. Some times I do this pattern with a map, which allows to look up a live instance (or constructor to use via reflection), and sometimes I just hard code the cases in the Factory class. So - for some reason this feels like not good design (e.g. one object which knows all the subclasses of an interface or parent object), and a bit clumsy. Is there a better pattern for solving this kind of problem? And if this factory method approach makes sense, can anyone suggest a nicer design?

    Read the article

  • Question on methods in Object Oriented Programming

    - by mal
    I’m learning Java at the minute (first language), and as a project I’m looking at developing a simple puzzle game. My question relates to the methods within a class. I have my Block type class; it has its many attributes, set methods, get methods and just plain methods. There are quite a few. Then I have my main board class. At the moment it does most of the logic, positioning of sprites collision detection and then draws the sprites etc... As I am learning to program as much as I’m learning to program games I’m curious to know how much code is typically acceptable within a given method. Is there such thing as having too many methods? All my draw functionality happens in one method, should I break this into a few ‘sub’ methods? My thinking is if I find at a later stage that the for loop I’m using to cycle through the array of sprites searching for collisions in the spriteCollision() method is inefficient I code a new method and just replace the old method calls with the new one, leaving the old code intact. Is it bad practice to have a method that contains one if statement, and place the call for that method in the for loop? I’m very much in the early stages of coding/designing and I need all the help I can get! I find it a little intimidating when people are talking about throwing together a prototype in a day too! Can’t wait until I’m that good!

    Read the article

  • Learning how to design knowledge and data flow [closed]

    - by max
    In designing software, I spend a lot of time deciding how the knowledge (algorithms / business logic) and data should be allocated between different entities; that is, which object should know what. I am asking for advice about books, articles, presentations, classes, or other resources that would help me learn how to do it better. I code primarily in Python, but my question is not really language-specific; even if some of the insights I learn don't work in Python, that's fine. I'll give a couple examples to clarify what I mean. Example 1 I want to perform some computation. As a user, I will need to provide parameters to do the computation. I can have all those parameters sent to the "main" object, which then uses them to create other objects as needed. Or I can create one "main" object, as well as several additional objects; the additional objects would then be sent to the "main" object as parameters. What factors should I consider to make this choice? Example 2 Let's say I have a few objects of type A that can perform a certain computation. The main computation often involves using an object of type B that performs some interim computation. I can either "teach" A instances what exact parameters to pass to B instances (i.e., make B "dumb"); or I can "teach" B instances to figure out what needs to be done when looking at an A instance (i.e., make B "smart"). What should I think about when I'm making this choice?

    Read the article

  • what is the Best way to learn object oriented principles

    - by Mike
    I am interesed in OOP principles and i found lots of documentations and books about it, for instance in C++, Java, .NET, PHP and so on, but if i only want to learn OOP principle, differences and not in language, what can i do? i want a good documentation, not just like a whole book about something except OOP :) specific answers, how it works, main features, pictures, or videos, or forum, or even stack... in every time I began studying i read a whole history of programming, computer science, software development and bla bla... i need specific answers, if it is possible i really need to learn, i need examples and exercises thanks in advance

    Read the article

  • Career change: from programming into more human-oriented area [closed]

    - by Art
    I have been a software developer for approximately 9 years, starting with part-time work during my graduation year at uni. During these years I worked for number of companies, sometimes changing places twice or three times a year. They say it takes 10 years to reach 'expert' level, and while I don't think I am an expert by any measure and I have certainly met lots of people who are more knowledgeable, smarter and more focused than I am, I think I can safely say that I had my fair share of the whole programming trade and would like to move on to something else. Psychology and behaviour was always something I was interested in, especially the practical, applicable bits of it. Recently I've been to some communication skills training and I realised that I have been missing out on the great deal of fun stuff - how people work and communicate, especially in subconscious, non-verbal area. Currently I am thinking of making a career change - ideally to move somewhere my technical skill would still be beneficial in some shape or form, or at least could serve as a bridge while I am transitioning there, you know, the whole gradual, bit-by-bit approach versus swim-or-drown one. I would like to hear your thoughts on this matter and to learn from you what are the possible transitions I can take.

    Read the article

  • Print all values in a value object

    - by SKDev
    I have to debug an issue which requires me to print all the values of a Value Object that is returned by a web service call. The Value object is a complex object in the sense, it has another object as its member which in turn has another object. Printing all the values by using get methods is cumbersome. So was wondering if there is a way to break down the value object by any way to get to a primitive level like String or int or Date and print them all using one API? I had a look at the below question but my prob is that i don't have access to the source code of the value object. The sources are in obfuscated jar. http://stackoverflow.com/questions/2413001/how-to-print-values-of-an-object-in-java

    Read the article

  • Purpose oriented user accounts on a single desktop?

    - by dd_dent
    Starting point: I currently do development for Dynamics Ax, Android and an occasional dabble with Wordpress and Python. Soon, I'll start a project involving setting up WP on Google Apps Engine. Everything is, and should continue to, run from the same PC (running Linux Mint). Issue: I'm afraid of botching/bogging down my setup due to tinkering/installing multiple runtimes/IDE's/SDK's/Services, so I was thinking of using multiple users, each purposed to handle the task at hand (web, Android etc) and making each user as inert as possible to one another. What I need to know is the following: Is this a good/feasible practice? The second closest thing to this using remote desktops connections, either to computers or to VM's, which I'd rather avoid. What about switching users? Can it be made seamless? Anything else I should know? Update and clarification regarding VM's and whatnot: The reason I wish to avoid resorting to VM's is that I dislike the performance impact and sluggishness associated with it. I also suspect it might add a layer of complexity I wish to avoid. This answer by Wyatt is interesting but I think it's only partly suited for requirements (web development for example). Also, in reference to the point made about system wide installs, there is a level compromise I should accept as experessed by this for example. This option suggested by 9000 is also enticing (more than VM's actually) and by no means do I intend to "Juggle" JVMs and whatnot, partly due to the reason mentioned before. Regarding complexity, I agree and would consider what was said, only from my experience I tend to pollute my work environment with SDKs and runtimes I tried and discarded, which would occasionally leave leftovers which cause issues throught the session. What I really want is a set of well defined, non virtualized sessions from which I can choose at my leisure and be mostly (to a reasonable extent) safe from affecting each session from the other. And what I'm really asking is if and how can this be done using user accounts.

    Read the article

  • Implement DDD and drawing the line between the an Entity and value object

    - by William
    I am implementing an EMR project. I would like to apply a DDD based approach to the problem. I have identified the "Patient" as being the core object of the system. I understand Patient would be an entity object as well as an aggregrate. I have also identified that every patient must have a "Doctor" and "Medical Records". The medical records would encompass Labs, XRays, Encounter.... I believe those would be entity objects as well. Let us take a Encounter for example. My implementation currently has a few fields as "String" properties, which are the complaint, assessment and plan. The other items necessary for an Encounter are vitals. I have implemented vitals as a value object. Given that it will be necessary to retrieve vitals without haveing to retrieve each Encounter then do vitals become part of the Encounter aggregate and patient aggregrate. I am assuming I could view the Encounter as an aggregrate, because other items are spwaned from the Encounter like prescriptions, lab orders, xrays. Is approach right that I am taking in identifying my entities and aggregates. In the case of vitals, they are specific to a patient, but outside of that there is not any other identity associated with them.

    Read the article

  • Getting an Error Trying to Create an Object in Python

    - by Nick Rogers
    I am trying to create an object from a class in python but I am getting an Error, "e_tank = EnemyTank() TypeError: 'Group' object is not callable" I am not sure what this means, I have tried Google but I couldn't get a clear answer on what is causing this error. Does anyone understand why I am unable to create an object from my EnemyTank Class? Here is my code: #Image Variables bg = 'bg.jpg' bunk = 'bunker.png' enemytank = 'enemy-tank.png' #Import Pygame Modules import pygame, sys from pygame.locals import * #Initializing the Screen pygame.init() screen = pygame.display.set_mode((640,360), 0, 32) background = pygame.image.load(bg).convert() bunker_x, bunker_y = (160,0) class EnemyTank(pygame.sprite.Sprite): e_tank = pygame.image.load(enemytank).convert_alpha() def __init__(self, startpos): pygame.sprite.Sprite.__init__(self, self.groups) self.pos = startpos self.image = EnemyTank.image self.rect = self.image.get_rect() def update(self): self.rect.center = self.pos class Bunker(pygame.sprite.Sprite): bunker = pygame.image.load(bunk).convert_alpha() def __init__(self, startpos): pygame.spriter.Sprite.__init__(self, self.groups) self.pos = startpos self.image = Bunker.image self.rect = self.image.get_rect() def getCollisionObjects(self, EnemyTank): if (EnemyTank not in self._allgroup, False): return False self._allgroup.remove(EnemyTank) result = pygame.sprite.spritecollide(EnemyTank, self._allgroup, False) self._allgroup.add(EnemyTank) def update(self): self.rect.center = self.pos #Setting Up The Animation x = 0 clock = pygame.time.Clock() speed = 250 allgroup = pygame.sprite.Group() EnemyTank = allgroup Bunker = allgroup e_tank = EnemyTank() bunker = Bunker()5 #Main Loop while True: for event in pygame.event.get(): if event.type == QUIT: pygame.quit() sys.exit() screen.blit(background, (0,0)) screen.blit(bunker, (bunker_x, bunker_y)) screen.blit(e_tank, (x, 0)) pygame.display.flip() #Animation milli = clock.tick() seconds = milli/1000. dm = seconds*speed x += dm if x>640: x=0 #Update the Screen pygame.display.update()

    Read the article

  • Object oriented design of game in Java: How to handle a party of NPCs?

    - by Arvanem
    Hi folks, I'm making a very simple 2D RPG in Java. My goal is to do this in as simple code as possible. Stripped down to basics, my class structure at the moment is like this: Physical objects have an x and y dimension. Roaming objects are physical objects that can move(). Humanoid objects are roaming objects that have inventories of GameItems. The Player is a singleton humanoid object that can hire up to 4 NPC Humanoids to join his or her party, and do other actions, such as fight non-humanoid objects. NPC Humanoids can be hired by the Player object to join his or her party, and once hired can fight for the Player. So far I have given the Player class a "party" ArrayList of NPC Humanoids, and the NPC Humanoids class a "hired" Boolean. However, my fight method is clunky, using an if to check the party size before implementing combat, e.g. public class Player extends Humanoids { private ArrayList<Humanoids> party; // GETTERS AND SETTERS for party here //... public void fightEnemy(Enemy eneObj) { if (this.getParty().size() == 0) // Do combat without party issues else if (this.getParty().size() == 1) // Do combat with party of 1 else if (this.getParty().size() == 2) // Do combat with party of 2 // etc. My question is, thinking in object oriented design, am I on the right track to do this in as simple code as possible? Is there a better way?

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >