TOPIC_TITLE
stringlengths 4
128
| CATEGORIES
stringlengths 13
48
| POST
stringlengths 0
85.6k
| ANSWERS
stringlengths 0
146k
|
---|---|---|---|
Loading resources in a separate thread problems on some card | Graphics and GPU Programming;Programming | Hi,I'm trying to achieve asynchronous resource loading, i.e. textures, etc. are loaded in a separate thread (Loader) and all the rendering is done in the main thread (Renderer). The target platform is Windows XP or higher.I've seen many threads about this on this forum and I've successfully implemented it on my development station (GF 8500GT), however some problems arose when I tried to run it on other configurations.To start with, here is the basic flow of the application:1. Create context for Renderer.2. Create context for Loader.3. Call wglShareLists for these contexts.4. Start the Loader thread.4.a. In Loader thread: call wglMakeCurrent for the Loader context4.b. In Renderer thread: wait for 4.a to finish [1] then call wglMakeCurrent for the Renderer context.5.a. Loader waits for requests - if one shows up e.g. to load a texture - it loads it from the file, sends to GPU and flushes [2].5.b. Renderer renders - frame by frame :).Although it looks like working on my GF 8500GT, after running it on an oldie Riva TNT2, it appears not to flush (?) the last texture. I mean, if I request to load two textures - only the first one gets loaded, however when I load a third texture - the third one then appears to be not loaded, but the second one looks ok.Do you have any thoughts, how to solve this problem on Riva?Is the flow OK?What is your opinion on the [1] and [2] issues, is this normal?[1] - It turned out to be necessary to start the thread AND set its context BEFORE the main thread sets its own context. Never really read about this anywhere, but it's the only way I found to make it work on Radeon X1250. Otherwise (only if Loader sets its context after main thread) the back buffer gets messed up totally.[2] - It turned out to be necessary to call glFlush after glTexImage2D, setting filtering, etc., otherwise the texture would appear not fully loaded on my dev station (i.e. 60-90% filled with the proper data and the rest random garbage).If you're still not fed up reading, here is one semi-related, but solved story.When I started developing this system I've ran into big (as it seemed to me) problem on my GF 8500 - looked like nothing never got loaded. I spent two days looking for the reason and then my friend told me - try to drag this window to the other screen (as I'm running two monitor configuration, and the other screen would be the primary one). "D'oh", I thought, it started to work. Later I updated the GPU drivers and now it works on both screen ;). | > Is the flow OK?Depending on what your loader worker thread does (e.g. whether it also decompressed the texture from some storage format like JPG) it may be a loading time improvement if you had 3rd thread - "file loader" with its queue of files to load.So, the process would go like this (all asynchronous):(1) the main thread requests texture from loading thread(2) loading thread requests disc file to be loaded from "file loader"(3) "file loader" loads the file(4) loader decompresses texture from memory and creates textureThe reason why this can be better is that loading from disc is the real bottleneck when loading resources from HDD. So, instead of:Thread 1: load A, decompress A, load B, decompress Byou can:Thread 1: load A, load BThread 2: decompress A, decomppress B ;Quote:Original post by MickeyMouseit may be a loading time improvement if you had 3rd threadTBH, I don't care that much about performance yet. My biggest concern now is the fact it is not working on some configurations :(. ; Are you using the same pixelformat on both contexts? ; > Are you using the same pixelformat on both contexts?AFAIK pixel format is set for device context. I create two rendering contexts out of the same (one and only one) device context. So probably the answer is: yes. :) ;I'm not sure how OpenGL handles this, but accessing graphics resources from another thread is quite tricky to get right in DirectX, which I assume is similar to OpenGL in this regard. You could set DirectX up to allow cross thread access, but in general it's safer, more straightforward and sometimes even faster to stick with a single thread accessing any graphics resources.You may still benefit from a seperate loader thread to do disk access and uncompression of image data though. Just have it prepare a byte chunk of ready-to-go texture data which the render/graphics thread can upload on the go. I realize this reply is probably not quite what you're looking for, but I thought I'd share my less fortunate experience [smile]; I wouldn't recommend using wglMakeCurrent at all. It seems agreed all across that its best to load resources in another thread, then, once they are ready, upload them to GL in the render thread. ; The way I implement this is I have a Render thread, that has a list of objects to render. If an object (model/texture/etc) isn't loaded, but is in the list then a worker process goes about doing what it needs to do and an appropriate proxy is used for rendering in the mean time.All the worker process does is load the resource from the HDD, decompress it (if required), and allocate the required resources etc. It then sets a flag against the resource to say it's loaded, but not uploaded to GL.The render thread then gets to this object, knows it's loaded in memory and ready, and goes about uploading to GL.This way only 1 thread actually ever 'talks' to GL. Avoiding a large array of problems.Hope this helps. |
Efficient 2D Drawing sorted system | Graphics and GPU Programming;Programming | Hello, the problem I have here is a bit difficult for me to describe so I'll try to be as detailed as I can be. I bolded the important part for those that understand the problem without a back-story.Back-story:Right now I've created an entity management system, every entity can be drawn through its own render() function. Problem is: since it's a 2D game engine the drawing order actually matters quite a lot, so I decided to write a layer system where you could divide the drawing of the world into generic parts, eg: first the far background is rendered, then a closer background then the action layer and finally the foreground. it all worked quite well, but I noticed that sometimes entities on the same layer need to be drawn in a specific order, otherwise things don't look quite right. So I decided to add a few functions to my layers in order to allow them to change the order of the entities drawn inside each layer.The problem with my earlier system: This system works perfectly in levels where the entire world is in view, however for bigger levels it'll render a lot object that are outside the view, thus wasting a lot of time.What I need: So, what I need is: a system that allows me to draw objects separated by layers, draw those objects in a specific order on that layer that I can pre-determine in the editor, and finally skipping the objects that are outside the view.What I've come up with so far: Normally for similar problems I would use a binary tree to decide which objects are inside the view, however in this case a tree would only scramble the object drawing order in the end. A way to combat that scrambling would be to use the tree to decide which objects are drawn, and then having them in specific order. Unfortunately that would mean I have to sort them in the end according to their drawing order and knowing the order in a tree environment would be a pain in the ass. one last thing I came up with was simple checking every single object if it's inside the view or not but it also occupies a lot of processing power.Final Questions to you Have any of you battled a similar problem before? If so then what did you come up with? Do you have any other solutions apart from the ones I presented or do you know of ways to optimize the ones I have right now?I'm sorry for the monolithic wall of text, I hope some of you can help me with this.Thank to everyone who spends his/her time on this in advance.~SpliterPS: depth testing would not work since I heavily use blending for smoother edges and better looking artwork. | Using some spatial-partitioning scheme to quickly get a set of visible objects and then sorting the resulting set seems perfectly reasonable to me. I don't see the "pain in the ass" anywhere. Did you try it? ; I recently just did something like this for my engine. Using the spatial system, I quickly grab every drawable object in view. Then I just sort them each draw by looping over them once to separate the layers, then sorting each layer as it is returned. Its a lot of extra work that "can" be avoided, but the cost is still very little, and there just isn't any reason to make it faster.If you need this to be better performing, then I suggest you implement a spatial for each layer, allowing you to quickly grab every object in view without having to do the initial pass over the whole collection to separate them by layers.If you really must have even better performance, then it really depends on how you determine what the depth is for each object, how much each object moves, etc. But no need to worry about that until it actually causes performance issues. For layers that don't move (which are probably the most busy layers, like the abundance of background tiles), you can just cache the sort result for the layer, and only update it if the camera moves a certain number of pixels in any direction.Edit: Oh, and if you don't have many possible depths, you could also just push each item into a sub-collection as you put it into the collection for the layer. So for instance, if you have 5 layers, and you can have up to 10 depths per layer, you just need 50 collections. An item in layer 3 with a depth of 7 would go into collection #37, for instance. ; How are you storing the entities in the layers? The typical fashion is an array. For instance, layer 0, array element 0 would be the first entity to be drawn, followed by element 1 and so on. To change the order, simply swap two array elements.Maybe I'm misunderstanding your question? ; It seems like you're trying to perform two different query/sorting processes "which entities are visible" and "draw entities in order" in a single step.. this is what's making it so complicated.One trivial solution -- if you're using graphics hardware -- is to just assign each object a unique z value (there are 2^24 unique values in a 24bit z-buffer, which should be more than enough) and use z-buffering. Then you can render objects in whatever order you'd like, and the z-buffer will ensure that the objects in front obscure those in the back.BUT: as others have pointed out, is it really that big a problem to perform each operation in a separate pass? Two simple options for this are:1a) Determine visible objects, set a "visible" flag in each; then iterate over all objects in depth order, drawing those whose flag is set.1b) Iterate over all objects in depth order, testing each if they're onscreen; if so, draw them.2a) Determine visible objects, adding each to a sorted list (priority queue) using depth as priority; iterate over queue drawing in priority order.2b) Determine visible objects, adding each to an unsorted list; sort list (using e.g radix sort) based on depth, then iterated over sorted results drawing in order.Hopefully this gives you some ideas.. good luck!raigan |
Boost spirit & line/column numbers | General and Gameplay Programming;Programming | I know that boost.spirit has a wrapper-iterator that stores information about the current line and column, but is there a way to store that information during parsing? I need this information to verify some of the arguments (for example if a given font-type exists) in an additional step which I can't do with my spirit rules (or I don't know how that would be possible) and report errors with references to the line and column, where the error originated.Given a simple rule like this, which produces a std::string,quoted_string %= lexeme['"' >> +(char_ - '"') >> '"'];can it be modified to synthesize a structure, consisting of a std::string and a file_position that is taken from the iterator of the rule? | It's fairly easy:struct FileLocationInfo{std::string FileName;unsigned Line;unsigned Column;};typedef boost::spirit::classic::position_iterator<const char*> ParsePosIter;class ParserState{public:void SetParsePosition(const ParsePosIter& pos){FileLocationInfo fileinfo;fileinfo.FileName = ParsePosition.get_position().file;fileinfo.Line = ParsePosition.get_position().line;fileinfo.Column = ParsePosition.get_position().column;}};struct SomeFunctor{SomeFunctor(ParserState& state): StateRef(state){ }template <typename IteratorType>void operator () (IteratorType begin, IteratorType end) const{StateRef.SetParsePosition(begin);// Do additional processing of the rule here}private:ParserState& StateRef;};// In your grammarFooRule = (Frobnicate)[SomeFunctor(self.State)];// In the grammar wrapper structprotected:ParserState& State;This is all stripped down from an actual implementation, used in the Epoch language project. You can check out the sources here if you'd like to see more detail on using Spirit. (The relevant files can be found under FugueDLL/Parser.) |
Vairous php and mySQL game questions | Networking and Multiplayer;Programming | My other post about php/mySQL seemed to morph into a Q & A session about everything I could think of, so I figured I should start a proper post more suited to that purpose.First of all, I am following this tutorial series pretty closely. This is my first 'online' game attempt and I am not very familiar with php or mySQL, but I am making steady progress.Ok so the first question off the top of my head. What is the best way to manage player and monster stats?According to the tutorial I am reading, I create a 'stats' table, which just houses the display_name and the short_name of the stat. Also each stat is assigned the int id.Then as I create a new 'monster', I add the monster to the 'monsters' table. This table just stores the monster name and the int id.Finally there is a third table, the 'monster_stats'. For each monster in the monsters table, I add a stat from the stats table and then a value.So as a quick example:stats:id | display_name | short_name1 | Physical Defense | pdef2 | Magic Defense | mdefmonsters:id | name1 | Zombiemonster_stats:id | monster_id | value1 | 1 | 52 | 1 | 5So from this setup, you can see that the Zombie has 5 pdef and 5 mdef.So is this sort of system ok? Is it more complex than I need for my first time around? Is it pretty standard? | Why not store your monster data in one table? Normalizing your data like this means you have to perform two JOINs across three tables. It's fine if you want to use PHP and MySQL for this, but I don't think MySQL lends itself particularly well to this problem. ; I think your question falls into the category of design rather than implementation. You can do it any way you want even store everything in 1 table or every table in a separate database( not practical), but really it is just a matter of how you see it.; Hey thanks for the response guys! Ok so there is no real 'best practice' that everyone knows about (but of course I don't because I'm a noob)?Thanks for the feedback guys. I'll stick with whatever the tutorial says for now, until I get my own feel for the grand scheme of the system.For the user information, I split it across a few tables:account:idusernamepasswordis_adminemaildate_createdactiveget_newssession_tokenlast_loginuser_data:idlast_login(for this character)namelvlacnt_id(belongs to account->id)ntr_zone(zone id to enter when character logs in)avatar(mesh to load for this character)cPosX(x position)cPosY(y position)cPosZ(z position)cRotY(y rotation)user_items// not fleshed out yetuser_stats// not fleshed out yetDoes this look about right? I appreciate all your help and feedback! Is this the wrong forum for this topic?BUnzaga ;Quote:Original post by BUnzagaOk so there is no real 'best practice' that everyone knows about (but of course I don't because I'm a noob)?Best practice would be to go with your original idea, of breaking everything out into separate tables (normalizing your data) and JOINing them when necessary; this will allow for faster updates of your data, and help prevent problems with faulty updates (you only have to update in one place rather than in many places because you have duplicated data everywhere). Don't denormalize (put things back together in one wider table) unless it is for performance reasons, after you have everything working.However, I don't use MySQL so drr may have a point. I will refrain from getting religious about your choice of RDBMS. ; Either one works, as both have their advantages. Normalized like you have it, it is very easy to add and remove stats completely since your query to read it won't ever really have to change (it'd just end up with more rows). Denormalized, it requires a slight alteration to the query to read the new rows. Though I almost always go with the denormalized version myself (in this scenario) because:1. Stats don't change very often in comparison to most everything else. If you design the game before programming it, you may only need to change it once or twice, if at all.2. The denormalized version has a very poor key-to-property size ratio with a very high rows-per-foreign-key count. That is, each character has a lot of stats, and each stat is only 2 or 4 bytes but still requires 2 keys that together are probably 6 bytes.3. If you are updating a character, you want to update everything at once. That is, everything in the row. You may even update values that haven't changed just to avoid the overhead and time required to make a decent value change detection system. Then again, this does vary a bit depending on how you update persistent data.4. No need to JOIN.5. You get to assign a different value type for each stat if you want. This is a huge bonus for me. I don't want my level, which will never pass, say, 60, to have to take up 2 bytes. Or have every stat take up 4 bytes just because I thought it'd be nice to make sure people could have over 65535 HP.But you are correct, there is no real "best practice". The Guild Wars guys decided to just put the whole character into a single column as a giant BLOB if I remember correctly. There are also plenty of people out there who kick and scream when they even smell data being denormalized like this.Keep in mind that if you are making a game editor or something of that sort where you want people to be able to easily modify the stats, it is a LOT easier for your self to use normalized stats. Otherwise, adding/removing stats requires an editor that is a bit more intelligent and can handle performing queries with dynamic schemas. But it is very possible, and you really can query MySQL for just about any data on a table. You can even prefix your columns with something like "stat_" so to grab a query of all the stat columns, you do something like:mysql> SELECT `column_name` FROM information_schema.COLUMNS WHERE `table_name` = 'npc_character' AND `column_name` LIKE 'stat\_%' ORDER BY `column_name`;+--------------+| column_name |+--------------+| stat_agi|| stat_defence || stat_int|| stat_maxhit || stat_maxhp || stat_maxmp || stat_minhit || stat_str|+--------------+8 rows in setStraight out of my engine. :) ; Are you going to change the available stats all that often? If not, just put them all in columns.create table monster( id int not null autoincrement primary key, name varchar not null unique, str int not null, dex int not null, mind int not null, pow int not null, hp int not null, loot_id int, constraint foreign key(loot_id)references loot(id));Note that, this way, there's no way of forgetting to assign a stat to a monster. With the super-normalized triple table, you'd have to write special queries to find the ids of monster classes that don't have all the necessary stats assigned...If you really need a super-normalized table for some reason, you can still keep the id/name mapping in a map/array in your software, and hard-code the id used in the tables. That way, you can add stats without creating any "alter table" statements (although altering your tables isn't a big deal in tables with less than 10,000 rows or so).If you really need to put the stats themselves in a table and use foreign keys, you could just as well use the short name as a foreign key: it's unique, and it's short. As a bonus, it's human-readable! Which table dump would be easier to debug?Table 1:1 1 101 2 131 3 52 1 172 3 10Table 2:orc dex 10orc hp 13orc int 5rat dex 17rat int 10Note that you probably won't be able to measure any performance difference between those two schemas (int keys vs short string keys), even with tens of thousands of rows, because databases are generally bounded by disk seek, not the difference between integer compare and string compare.In my opinion, the extra indirection of "entity, property, value" that allows you to define new kinds of properties comes from the "super flexible" content management systems of the world, and only make sense when you don't know up front what the schema will be, because different users will have different schemas. However, you lose a lot of the power of a relational database if you do that, because you can't easily do things like enforcing presence for specific properties. Plus it runs slower, although for any normal RPG it wouldn't really mater.For your game, however, there is one user: your game. You know the schema. There's no reason to over-normalize, and many good reasons not to! ; Thanks guys, this is the exact information I was trying to get. I think the creator of the tutorials I was following was trying to make an 'all inclusive' type tutorial which someone could follow and use, no matter what game they were making.Some of you ask 'why are you doing it like this', etc and the answer is, it is because I don't know better or any other way, so I am so glad you are taking the time to explain it to me and give me working examples like you are.I really like the idea of using the short_name for the foreign key. Would I still use the int auto inc for the indexing, or could I just drop that and use the short_name if I make sure it is unique?Also, I have been using $_SESSION for storing user data, is there an easier way to write something like: '".$_SESSION['whatever']."'??? Is that why people use %s and mysql_real_escape_string ?Here is an example of when the user chooses a character and logs into the game:// above here I require_once config.php and loginCheck.php// for the database connection and session token / account id check// and I have a switch for... $_POST['cmd']case "ntr": // short for enter (game)if(isset($_POST['chrname'])){ $query = "SELECT name, lvl, ntr_zid, avatar, cPosX, cPosY, cPosZ, cRotY FROM user_data WHERE acnt_id = '".$_SESSION['acnt_id']."' AND name = '".$_POST['chrname']."' LIMIT 1;"; $result = mysql_query($query); if($result){ $_SESSION['user'] = mysql_fetch_assoc($result); echo "<user_data name='".$_SESSION['user']['name']."' lvl='".$_SESSION['user']['lvl']."' zone='".$_SESSION['user']['ntr_zid']."' avatar='".$_SESSION['user']['avatar']."' cPosX='".$_SESSION['user']['cPosX']."' cPosY='".$_SESSION['user']['cPosY']."' cPosZ='".$_SESSION['user']['cPosZ']."' cRotY='".$_SESSION['user']['cRotY']."' />"; }}break;Does it look ok? Does anything look alarmingly wrong? In the engine I am using, I am parsing the response string into an XML file and loading the correct mesh/pos/rot from here.One more question. I noticed that if a user create a character with the same name on the same account, and then try to delete one, there is no guarantee which one will remain and which will delete. I realize that a lot of games will force users to create unique character names. Is this something I should do to resolve this problem, or should I assign a unique token to each character and pass this back and forth when the user creates / deletes a character?Again, I appreciate the responses, opinions and feedback. As this is my first online game, I am just learning as I go and can use any advice you are willing to offer.BUnzaga[Edited by - hplus0603 on January 14, 2010 11:23:59 AM];Quote:I think the creator of the tutorials I was following was trying to make an 'all inclusive' type tutorialOr the reason might be that the author of the tutorial hasn't learned better ways? I find that most tutorials are written as a way for the author to learn things for him/herself, which generally does not tend to expose best practices. I have no idea about the specific tutorial you're following, though.Quote:mysql_real_escape_stringThe reason to use mysql_real_escape_string or similar is to avoid SQL injection attacks. If you have a registration form:<form method='post'><input type='hidden' name='action' value='register'/>Name: <input type='text' name='name' /><br/>Password: <input type='password' name='password1' /><br/>Confirm: <input type='password' name='password2' /><br/></form>If you now handled that like:<?php require_once("common.php"); if ($_POST['action'] == 'register') { if ($_POST['password1'] != $_POST['password2']) { error("The two passwords entered were not the same."); } // WARNING! BADNESS ON THE FOLLOWING LINE! $r = mysql_query("INSERT INTO users(name,password) VALUES('$_POST[name]', '$_POST[password1]')"); }I would probably try to register a name like ','x');DROP TABLE users;--I'll leave it to you to figure out what would happen if I did :-)You have to quote the input data that a user may provide. Always. Doing browser-side input format checking is not good enough, because users can (and will) construct form posts on their own (or just turn off javascript).<br><br>And if your tutorial didn't tell you about this as soon as it introduced the concept of mysql_query(), then I'd suggest finding another tutorial :-)<br> ;Quote:Original post by hplus0603','x');DROP TABLE users;--I'll leave it to you to figure out what would happen if I did :-)You have to quote the input data that a user may provide. Always. Doing browser-side input format checking is not good enough, because users can (and will) construct form posts on their own (or just turn off javascript).And if your tutorial didn't tell you about this as soon as it introduced the concept of mysql_query(), then I'd suggest finding another tutorial :-)Actually this particular attack won't work because PHP doesn't accept multiple queries in one mysql_query call. But hplus's point is still valid, an attacker may use other attacks with unsanitized input. In your code snippet where you select the user info based on the POST of the character name, the user could supply a crafted name that returns a different user. |
Should I Register The Trademark For My Software? | Games Business and Law;Business | Hi,I have only registered the .com domain name for it right now, should I register the trademark too? What might happen if I don't register the trademark? Will I have to change my software's name and/or domain if someone else register the same name as trademark after the launch of my product?Thanks | The most important thing to do is ensure someone isn't already using that name for a software project (game?) and that there isn't already a trademark registered in the territories you want to sell in. You don't need to register a trademark in order to gain protection - you just need to use it (as in, sell the product). However it is easier to defend a registered trademark than an unregistered one. If you have invested a lot into the project and/or it is generating a lot of income then it is probably worth registering. If you are a small indie just starting out then it may be too soon to worry about trademark registration. |
[web] Forum post submit button. | General and Gameplay Programming;Programming | I'm having a problem figuring out how to get my submit button to work right, basically the submit button calls a java script function which is suppose to write the post into a database but the only way I know to do this is with php. I tried this though I knew it would not work:<script type="text/javascript">function submit(){<?phpmysql_query("INSERT INTO posts ( id, parent_id, category_id, user_id, subject, message, sticky, allow_post )VALUES('3','3','1','1','Hi','Hi again','1','1')" );?>window.location="view_category.php?cat=<?php echo($cat_id); ?>";}</script>How can I do this since php is server side and java is client side? | Use an XMLRequest in javascript to call a 'post.php' file.Personally I would use jquery;Quote:Original post by SteveDeFacto...I'm having a problem figuring out how to get my submit button to work right, basically the submit button calls a java script function which is suppose to write the post into a database but the only way I know to do this is with php...Your submit button has to call a php script on the server to do something in PHP. You have two options, first is using plain HTML formular elements, second is using an AJAX POST (with javascript). You're a beginner, so stick with the basics first:Learn some HTML formular syntax, which does POST requests. For example you could output the following:<form action="post.php" method="POST"> <input type="text" name="mytopic" /> <input type="text" name="mymessage" /> <input type="submit" value="submit" /></form>Than learn how to access POST environment variables a php script can access when called with this method. For example the php file could do something like this:<?php// if the script file gets called by hitting the submit button than// the $_POST array got set by the php interpreterif (isset($_POST['mymessage'])) { echo($_POST['mymessage']);}?>; I used the form method it works perfect. thanks man. |
Getting My Feet Wet | For Beginners | Well I was wondering if this site was a good place to get started in game design? Basically I just want to help with making a game in my free time. All I can do is some decent 3d modeling. I know nothing about coding. I am just a high school cad student that wants to take things further. I was just kind of hoping to start picking up on things as I help work on projects. Am I in the right place? | Quote:Original post by UnmentionedWell I was wondering if this site was a good place to get started in game design? Yes. It is very good place. If you stick around, I think you'll find that this place is an excellent resource for game development.Quote:Original post by UnmentionedBasically I just want to help with making a game in my free time. All I can do is some decent 3d modeling. It is good that you can do 3D modeling. You may want to cobble together a small portfolio and show that off in the Help Wanted sub forum. You may be able to find a small team where you can contribute to the effort by providing models. Quote:Original post by UnmentionedI know nothing about coding. I am just a high school cad student that wants to take things further. Do you want to learn coding? Is this an interest of yours? If it is, you owe it to yourself to try to learn more. Even if you want to concentrate on graphical art, some coding knowledge may be useful to enrich yr overall game development knowledge.And even if you do not want to learn programming you can still know that game artists are still very much in demand. Furthermore, there are some who program and also create art assets for games. All I am saying is that you should learn, explore and possibly define yr exact goals. People will be in a better position to give advice if you're more specific.There is also a Breaking In forum here that provides help and advice in regards to breaking into the game development industry. If this is an eventual goal of yrs you may find help there.So basically keep learning and creating. Things will fall into place. Ask more specific questions as they arise. Good luck. ; Ah thank you. I am looking at game development as a hobby to try. I am intersted in coding. I figure I would learn code as I helped. I know a little bit of html, but that ain't going to help lol. For me, the best way to learn is to jump right in. I forgot to add this to my first post but finding a small team to join was a main reason for finding this site. |
Gamer's Guilt -- Forgetting your Code? | For Beginners | I am suffering from Gamer's guilt.I spent a month writing a bunch of cool classes and now that they are working and I am moving on to a new phase of my project I find that there are 50 things I wish I had done differently with my code. :(This is new to me since I am working on my 1st "Big" project where I actually have to have abstraction for my classes to keep my code readable. But I find myself desperately wanting to go rewrite the code that I have. The code I have is functional, but there comes a point where you have to stop screwing with your code and move on and use your code. Sort of like when an author of a novel has to stop revising and has to publish the work or move on to other chapters.How do you guys know when to quit screwing with your code? Ie. You have finished your map class and now you are moving on to putting things on the map. What do you use to determine if its time to stop messing with the map? | My strategy is to only rewrite something when it is necessary to support new functionality that I want or to fix a bug. ;Quote:Original post by StoryyellerMy strategy is to only rewrite something when it is necessary to support new functionality that I want or to fix a bug.I am being forced to take a similar approach. Must fight the OCD to rewrite my code... must fight it! One rewrite I did was for performance but I had to quit after that.; In all honesty this is where I find that a Test Driven Development pattern really excels and is why I use one. It helps to keep you from constantly modifying that code you want to use and keeps you from breaking it when you get it to work.Here is the pattern I follow your issue is around point 4.Ok so lets say I want to implement a date class that handles dates. This is what I would do.1. Requirements:What does my date class need to do. (Relay back a properly formatted and valid date.2. The Unit Tests: Write my unit tests to that requirement.3. Implementation:My unit tests fail so now implement the date class till these pass. Once they all pass I am done it needs no more functionality at this point. My tests pass so it does what it has to do no more no less.4. Refactor:Ok how can I make this code more usable and user friendly. Or even how can I implement this more efficiently. Remove all redundant pieces etc...5. Run Tests:Make sure our tests pass after making our changes. If our tests fail don't modify the tests you messed something up during refactoring now fix it.By going through these steps for as much code as possible; I find I end up with more user friendly code that is much more efficient and bug free.This is not for everybody but I think in this situation it could help you out quite a bit with your current issue. ; That doesn't really work for me, because I have no real design decided on ahead of time.Instead I had functionality as needed and periodically refactor when I notice that I'm duplicating a certain piece of code a lot and can think of a way to avoid this. ;Quote:Original post by rattyboyHow do you guys know when to quit screwing with your code? Ie. You have finished your map class and now you are moving on to putting things on the map. What do you use to determine if its time to stop messing with the map?When you can actually put stuff on the map (and generally use it) without grief.; I never (or atleast try very hard not to) write code until I need it. I really do like TDD's way of forcing you to write the API first, then write the code. That, IMHO, is the best way to write code. ; Behavior Driven Development helps fight code creep.I use a tool called 'cucumber' in Ruby that allows me to write my test cases as User Stories. So basically, I write how I want the code to be used, then I implement it until the test stops failing.This way, I only implement the things that I know will be used. ; I've had this feeling before. I made a whole class structure that it turned out didn't make sense and I couldn't implement the spec without copy & paste because it didn't agree with the way multiple inheritence is done in Java.It was ugly and I felt pretty dumb, but I just used copy & paste and finished it so I could move on and do it better next time. ; Before actually rewriting that code, try using it first (that is, build some code that uses it). If that quickly becomes hard and messy, then restructuring (not just blindly rewriting) it to a more usable design is beneficial. But if it's only the internal code that's messy, then don't bother tweaking the implementation until you have to (for performance or bug-fix purposes). After all, there are more important things that you can spend your time on, right?Then again, for quick 'n dirty scripts, clean code isn't all that important - get the job done, quickly, and be done with it - and write better code next time. Cleaning up such code often isn't worth the time investment because you're not going to have to maintain that code in the long run. |
AS3 Developers needed for small game | Old Archive;Archive | Hi,We are currently looking for some feelance developers who are fluent in AS3 and potentially know how to use Box 2D to develop some of our games.We are an experienced flash game development company based in Staffordshire but our studio is getting very full so we are looking for people who can demonstarte great AS3 skills who have pretty quick turnarounds.If you are able to work from our studio then that is great but this is not necessarily essential.If you are interested then please get in touch info@kokodigital.co.ukAll the bestStu @ Koko | |
[pygame] Getting a sprite drawn | Engines and Middleware;Programming | My code is as followsimport os, sysimport tracebackimport pygame as pgdef main(): succes = pg.init() if not succes == (6,0): print success screen = pg.display.set_mode((640, 480)) player = Player() group = pg.sprite.Group(player) running = True while running: group.draw(screen) pg.display.flip() for ev in pg.event.get(): if ev.type == pg.QUIT: running = Falseclass Player(pg.sprite.Sprite): def __init__(self): pg.sprite.Sprite.__init__(self) self.image = pg.Surface((200, 200)) self.image.fill((128, 128, 128)) self.rect = self.image.get_rect()if __name__ == '__main__': try: main() except Exception, e: tb = sys.exc_info()[2] traceback.print_exception(e.__class__, e, tb) pg.quit();It is supposed to create a player, put the player in a group and draw the group including the player. The player.image consist of a gray surface.However, when I run this nothing is shown.[Edited by - Somelauw on January 20, 2010 6:05:08 PM] | You need to define where you want the sprite to be drawn:class Player(pg.sprite.Sprite): def __init__(self): pg.sprite.Sprite.__init__(self) self.image = pg.Surface((200, 200)) self.image.fill((128, 128, 128)) self.rect = self.image.get_rect() self.x = 100 # set the x attribute self.y = 100 # set the y attribute self.rect.center = (self.x, self.y) # sets the rect (and thus the sprite) at position self.x, self.y; I tried it and it worked.Then I commented out the lines and it still worked.The problem might be that I put the class Player in a seperate file and used an import. For some reasons imported modules don't get compiled automatically when you draw one and you haven't restarted the idle.I'm using pyscripter. ; Right, once an imported module is compiled, the script will use the compiled version. ;Quote:Original post by EsysRight, once an imported module is compiled, the script will use the compiled version.Is there a simple way to force reloading or a code editor which forces it?I think that for anything big, being able to split your code over multiple files without having to restart your editor is a must. ; you could try py_compile.compile;py_compile.compile(file[, cfile[, dfile[, doraise]]]) Compile a source file to byte-code and write out the byte-code cache file. The source code is loaded from the file name file. The byte-code is written to cfile, which defaults to file + 'c' ('o' if optimization is enabled in the current interpreter). If dfile is specified, it is used as the name of the source file in error messages instead of file. If doraise is true, a PyCompileError is raised when an error is encountered while compiling file. If doraise is false (the default), an error string is written to sys.stderr, but no exception is raised.;Quote:Original post by Esysyou could try py_compile.compile;py_compile.compile(file[, cfile[, dfile[, doraise]]]) Compile a source file to byte-code and write out the byte-code cache file. The source code is loaded from the file name file. The byte-code is written to cfile, which defaults to file + 'c' ('o' if optimization is enabled in the current interpreter). If dfile is specified, it is used as the name of the source file in error messages instead of file. If doraise is true, a PyCompileError is raised when an error is encountered while compiling file. If doraise is false (the default), an error string is written to sys.stderr, but no exception is raised.Is this the most convienent way to do it? Is this also the way professionals handle this problem?Do you put py_compile.compile inside your source code or do you call this function manually from the console each time before running? ; No - professionals probably aren't running Python from within the IDE, or they're using a more advanced IDE that doesn't cache the interpreter state between execution runs. ;Quote:Original post by KylotanNo - professionals probably aren't running Python from within the IDE, or they're using a more advanced IDE that doesn't cache the interpreter state between execution runs.So what do they use instead?Does netbeans work? ; I just use a plain text editor. Other names I've heard people use are Wing, Komodo, and Eclipse. |
Books on Circle/Sphere Geometry? | Math and Physics;Programming | Just out of interest, anyone know of good reference books, focusing on circle and sphere geometry calculations? Bit like a formula cookbook! Suggestions appreciated. :) | If a book on spheres does exist, it would likely just be a pamphlet. The only query I've ever had to worry about is to see if a point was on or in an ellipsoid.I'm sure books on analytic geometry as a subject are all over the place. (Google it, I got many results.) I have my doubts on books just covering spheres, though. ; I disagree with zyrolasting. A book on spheres could be almost arbitrarily thick. It could talk about conic sections and quadrics, about the implications of curvature (the angles of a triangle add up to more than 180 degrees), about the complex projective line (a.k.a. Riemann sphere), about map projections (cartography), about spheres in higher dimension and their topological invariants (e.g., Poincare's conjecture)...A quick search in Amazon shows this book about planes and spheres and a couple of books involving higher Math.; What you need is "Spherical trigonometry", a common subject taught in Europe but not in America.It is also a specialty for maritime navigating officers . You will learn that it is possible, and common to have a triangle with 3 angles of 90 degrees.A Google search will dump you tons of infos, and formulasEnjoyEpilot10merchant marine officer. ;Quote:Original post by epilot10What you need is "Spherical trigonometry", a common subject taught in Europe but not in America.I think it's more an old-fashioned branch of Math. I have a degree in Geometry from a European university and I didn't take spherical trigonometry at all. I probably did learn enough general geometry to be able to figure things out if I need to, though. ; European education isn't uniform. In Italy I never had courses on that subject, but in Berlin it's taught. Look for example at the basic BMS course in Geometry (Geometry I). I also suggest this book on Möbius differential geometry if you are interested in a more differential geometric point of view.@alvaro: where are you from? ;Quote:Original post by apatriarca@alvaro: where are you from?Spain. ;3D Math Primer for Graphics and Game DevelopmentNow, I find that their writing style is a little unclear at times, but it's a decent "recipes" book all around.Fortunately they have the source code online for free:http://gamemath.com/downloads.htmThis book might also help as a secondary reference, though I've never read it:Mathematics for 3D Game Programming & Computer GraphicsI find that the more books I have at hand on one subject, the better I'll be at being able to clear up any ambiguities as to what's actually going on. More points of view, the better.Finally, I always recommend this book;Mathematics: From the Birth of NumbersThis last book is also a "recipes" type book, giving concrete examples. The sections on geometry and linear algebra are very enlightening. It's also a great history book as well. If there was ever a book that I truly love reading, it's this one. ; You should just invest in a CRC ... I'm sure that it'll contain all of the formulas you need regarding spherical geometry and spherical trig ... and it's pretty easy to pick up an older one used for not much money -- just ask around at used bookstores in a college town. ; Excellent, thanks for your suggestions. Should be a good starting point.Quote:zyrolasting:If a book on spheres does exist, it would likely just be a pamphlet. The only query I've ever had to worry about is to see if a point was on or in an ellipsoid.I'm sure books on analytic geometry as a subject are all over the place. (Google it, I got many results.) I have my doubts on books just covering spheres, though.Considering Menelaus of Alexandria wrote an entire book spherical trigonometry about 2000 years ago, I'd say it is a fairly rich topic. And yes, of course I use Google; and the reason why I want a book, so I don't have to. Internet searches can be a real hit-and-miss affair at times. I was after something fairly comprehensive. |
Deferred rendering and antialiasing | Graphics and GPU Programming;Programming | I'm thinking of switching to deferred rendering for my game, and this gave me an idea...Say we lay out the G-buffer and we use deferred rendering to calculate only the lighting, and saving it into an HDR buffer. We can perform bloom in that buffer if we want. After that, we do only one additional pass, rendering the geometry with the materials, and in the end we additive blend those 2(lighting+materials). Am I correct to think that we will have proper anti-aliasing in that case(seeing as the final material pass *will* have antialiasing)? If so, I think it would be a good idea at least for my case, since it's only 1 additional pass. What do you think? | That's almost how light-pre-pass works, which is becoming popular on consoles now-a-days for deferred+MSAA =DYou create a GBuffer with depth, normals (and spec-power if you can fit it in), then use that to generate a Lighting Buffer (RGB = Diffuse light, A = specular). To keep the buffers small, you don't get properly coloured specular, but guessing from the diffuse color is close enough.Instead of blending the LBuffer and the material-pass, you sample the LBuffer in the material pass.vec4 lighting = tex2d( LBuffer, screenPos )vec3 diffuse = lighting.rgb * diffuseMap.rgb;vec3 specular = lighting.aaa * light.rgb * specularMap.rgb;return vec4( diffuseLight + specularLight, diffuseMap.a ); Thanks for the link! I had no idea people were already doing this, that's reassuring. I'll go ahead and implement it then :)About sampling the light buffer, at first I thought of doing exactly that, but if I want to implement a bloom filter of the light buffer, this would obviously not work, since bloom is visible beyond the boundaries of the polygon. Apparently I can't apply the bloom after the material pass, since I would run into the same situation again as I have in the beginning- poor MSAA support for render-to-texture. Now, if I were to store the specular value in the alpha channel of the LBuffer, simple blending wouldn't work, but I think a short 2-pass filter where I first multiply with diffuse and then add specular should do it I think. ; You can still do bloom as a post effect, after the second geometry pass. At this point, all of your geometry has been rendered with MSAA, and your post-effects (bloom) work on the resolved AA buffer. AFAIK, MSAA supporte for render-to-texture is pretty good -- the reason it's not used in deferred rendering is because AA is designed for colors, not positions/normals/etc that you put in the GBuffer.However, you could perform your blur filter just on the LBuffer (before the second geometry pass), but this will produce slightly different results.e.g. imagine a red sphere, lit by a green spotlight, with a grey background.With post-bloom: In the final buffer, the sphere's color is red*green==black, which won't be bloomed.With pre-bloom: In the LBuffer the sphere's color is green, which will be bloomed onto the grey background.I guess it's a matter of taste which effect is "correct"? ;Quote:Original post by HodgmanYou can still do bloom as a post effect, after the second geometry pass. At this point, all of your geometry has been rendered with MSAA, and your post-effects (bloom) work on the resolved AA buffer. Yeah, you're right. Thanks :)Quote:AFAIK, MSAA supporte for render-to-texture is pretty good -- the reason it's not used in deferred rendering is because AA is designed for colors, not positions/normals/etc that you put in the GBuffer.Well, I guess it's in the GL3.2 core, but I don't know what range of hardware supports it...I'll look into it.;Thank you for the idea and the prepass details. It finally makes sense to me now to do such a thing [smile] |
Game Making Tool | For Beginners | HI forum , I am new to game programming.I want to prepare an Game making tool software, like Game Maker , Multimedia fusion 2 etc. for this i made search on google i found many game engines . some are with source code. but i am not able to execute those to check whether the code useful to me or not .the game softwares uses some editors to achieve the task . like creating objects rendering those etc. even i search for editors all i found either .exe format . i want to do this using c++ . i am looking for the code related to c++ only.can any one suggest me how can i start , what are main resource that i need to start . is there any open sources available which help to my application.i dont want to start from scratch i want to build my application using the existing sources . so please share Your ideas related. thanking you in advance | I don't undestand.You want to make a kit?Or you want a kit to make a game?Don't go making an engine or a kit if you have never even made a game. ; Do you want to know HOW to develop games? what tools to use? there are many, but theese are free and fully functional.Here is a software do develop c++ applications/ games:http://www.microsoft.com/express/Windows/And you'll also need a library that can render graphics and sound, take inpust and so on. I use Dark GDK:http://gdk.thegamecreators.com/ ; lol you need to actually know the in's and out's of making games before you can make an engine like game maker. Several years knowledge and experience at the minimum. lolOnly reason I say this is because you would know where to start if you have the required knowledge. :p ; How about Construct. It is open source and free... It is made mostly by a group of former add-on developers for Multimedia Fusion. ; Thanks for sharing . firstly i am looking open source code for 2D level game editor software like Multimedia fusion2 . to prepare software like we need different editors like frame editor, object editor ,map editor etc . so i am looking to build those editors first so for this i would like to know what are the resources available . i there any open source with respect to c++ for this editors which help to my project . so please share Your ideas with respect to this. thanking you ; As with some of the other posters, I'm not sure if you want to code an editor or find a free one.If your looking for an editor I would suggest Torque2D (I think they do a 30 day trial).If you are wishing to build one yourself then I suggest you learn the structure of an engine. A good book that I have found for this are "Advanced 2D Game Development by Jonathon S. Harbour". Its a step by step approach to building a 2d engine but by the end you should understand enough to do an editor.If you haven't had much experience with C++ or DirectX before then you might find it tricky to follow. I hope that helps... ; mrobbins Thanks for Your post , Yes i am looking to build an editor , i had experience in c++ so i am search for source code of an existing editors . i feel more better to build this tool using that existing open source code rather than to start from the scratch .i found some source code for editors like map , egameeditor etc but those are not in c++.Any ideas? ; I did a search and found an open source editor: http://dannylum.com/D2DProject/Its C# / .NET based so you can use it as a reference but not really as an implementation. I would recommend you find an engine as you will still need one to build an editor on top of.Also, you should probably contact the guy who made it and give him some praise for it. ; Its not a complete tool , it is map editing tool i observe that we have to do some programming for creating game using this.the code is completely c# where difficult to me to understand can any one suggest more. |
Sending large data through TCP winsock | Networking and Multiplayer;Programming | I've been busy with Winsock for a while now, creating a program that sends snapshots of the desktop through a socket to the client.Everything works when I'm trying to send small packets of data through the socket, stitching the packets back together works! This means I can send small packets of data (the rectangle of which to capture data, small messages etc.) I can even send small images through the socket. The problem is that when I send a relatively large piece of data (+/- 15000 bytes) through the socket, it will only receive 8192 (or 2^13 bytes). After this, the Receive event will not get raised anymore.How do I fix this?this is the code that I use to receive data://'Socket *pSocket', is a pointer to a class that wraps around //the socket part of Winsock//'WSAEVENT hRecvEvent' is the event that indicates if there is any data//to receive//'std::vector<Buffer> *pBufferVector' is a vector of buffers, used to //receive multiple packets of data if there are large packets//'bool &bTotal' is a boolean flag that will be set if the first element//in the vector contains a complete bufferbool ReceiveData(Socket *pSocket, WSAEVENT hRecvEvent, std::vector<Buffer> *pBufferVector, bool &bTotal){Buffer tempBuffer;DWORD dwResult = WSAWaitForMultipleEvents(1, &hRecvEvent, FALSE, 0, FALSE);if (dwResult == 0) {//data is waitingwhile (dwResult == 0) {//loop until all pending data is receivedWSAResetEvent(hRecvEvent);const unsigned int nCurSize = tempBuffer.GetSize();Buffer partialBuffer;SocketReturn socketRes = pSocket->Receive(&partialBuffer, INTERPCMESSAGE_BATCHSIZE, &hRecvEvent);if (socketRes != SOCKETRETURN_FAILURE && partialBuffer.GetSize() != 0) {tempBuffer.Resize(nCurSize + partialBuffer.GetSize());tempBuffer.SetData(partialBuffer.GetBuffer(), nCurSize, partialBuffer.GetSize());}//retrieve result for Receive Event for next while loopdwResult = WSAWaitForMultipleEvents(1, &hRecvEvent, FALSE, 0, FALSE);}//now analyze buffer vectorif (pBufferVector->size() != 0) {//push back current buffer (now >= 2 buffers in vector)pBufferVector->push_back(tempBuffer);std::vector<Buffer>::iterator firstIt = pBufferVector->begin();//get first 4 bytes --> size of messageunsigned int nSize;firstIt->GetData(&nSize, 0, 4);unsigned int nTotalSize = 0;for (std::vector<Buffer>::iterator it = pBufferVector->begin(); it != pBufferVector->end(); it++) {nTotalSize += it->GetSize();if (nSize == nTotalSize) {break;}}if (nSize == nTotalSize) {//somewhere the sizes matched, this means that when we're going to add//all the buffers in the vector, we have a complete messageunsigned int nCounter = 0;for (std::vector<Buffer>::iterator it = pBufferVector->begin() + 1; it != pBufferVector->end(); it++) {const unsigned int nCurFullSize = firstIt->GetSize();const unsigned int nCurSize = it->GetSize();firstIt->Resize(nCurFullSize + nCurSize);firstIt->SetData(it->GetBuffer(), nCurFullSize, nCurSize);nCounter++;if (nCurFullSize + nCurSize == nSize) {break;}}//erase all used bufferspBufferVector->erase(pBufferVector->begin(), pBufferVector->begin() + nCounter);bTotal = true;return true;}bTotal = false;return true;} else {//check if current size matches total size, if so, do nothing//at all, otherwise push on vector stackunsigned int nSize;tempBuffer.GetData(&nSize, 0, 4);pBufferVector->push_back(tempBuffer);if (nSize != tempBuffer.GetSize()) {bTotal = false;return true;}bTotal = true;return true;}}bTotal = false;return true;}And this is the Receive function on my Socket:SocketReturn Socket::Receive(Buffer *pBuffer, unsigned int nBatchSize, WSAEVENT *pRecvEvent){//initialize variablesint nTotalReceived = 0;char *pCurBuf = new char[nBatchSize];int nReceived = 0;do {//receive datanReceived = recv(m_hSocket, pCurBuf, nBatchSize, NULL);if (nReceived > 0) {//connection wasn't closed (or nReceived should be 0)//resize buffer to store datapBuffer->Resize(nTotalReceived + nReceived);//store dataif (!pBuffer->SetData(pCurBuf, nTotalReceived, nReceived)) {delete [] pCurBuf;return SOCKETRETURN_FAILURE;}if (nReceived < int(nBatchSize)) {//got all datadelete [] pCurBuf;return SOCKETRETURN_SUCCESS;}//update total received variablenTotalReceived += nReceived;} else if (nReceived == SOCKET_ERROR) {//check if error was because socket would blockdelete [] pCurBuf;if (WSAGetLastError() == WSAEWOULDBLOCK) {return SOCKETRETURN_WOULDBLOCK;}return SOCKETRETURN_FAILURE;}} while (nReceived > 0);delete [] pCurBuf;return SOCKETRETURN_SUCCESS;}Buffer is a wrapper class for a data buffer that makes it easier for me to move data around.I really hope that somebody can help me out, because I'm stuck for a couple of days now. | Do not use "asynchronous" or "event" sockets in WinSock. Both models are inefficient and full of problems. Instead, use either good-old select(), or tie socket operations to an I/O completion port.; I just wished I heard that a bit earlier. I guess I'll be recoding the entire thing over the next couple of days, thanks for the info anyways! |
What books did developer read for game development in the 1990s? | For Beginners | I want to make a game But I wonder how game developers worked in the 1990s, how they made games, how they learning before the Internet became as widespread as it is today. etc.how do they know how to build game mechanics as character ability power up system?how they know to reverse engineering game competitor company.what book I should read? | As far as I know (not being a programmer myself), books on the subject started appearing in the early 2000s. Up to that point, it was “learn by doing” and tips from one another. ;The first book that came to mind was Tricks of the Game-Programming Gurus: Lamothe, Andre, Ratcliff, John, Tyler, Denise: 9780672305078: Amazon.com: Books, which was geared toward beginners/students/amateurs. There were others, but that's the best selling pre-2000. After that point in time, game development became a hot topic in the book publishing world. Even GameDev.net has a series - Beginning Game Programming: A GameDev.net Collection (Course Technology Cengage Learning): 9781598638059: Computer Science Books @ Amazon.com.Otherwise, in the professional realm a lot was “learn by doing” as Tom said, or through word of mouth on early Usenet/IRC/websites (pre-GameDev.net in 1999 - see About GameDev.net). ;Computers in that era didn't have an OS like we have today. The machine booted, and you were dropped in a command shell or in an interactive BASIC interpreter. You basically programmed directly at the metal. Video memory was directly accessible, by writing in a known address range you could make pixels appear at the screen in various colors. The “OS” had a corner in the memory too for its data, but nothing prevented you from poking around there. Lua, Python, C#, C++ didn't exist, ANSI-C was just invented (K&R book about that was in 1989 iirc). Assembly language of course did exist (with books) and was used.Monthly computer magazines were published for all types of home computers. Tips and tricks were exchanged in that way, also program listings were printed in those magazines that you could then enter at your own computer. Studying those listings, and trying things for yourself is how you learned. There was also technical documentation about the computer.If you want to enjoy that stuff, today there is a retro-computing movement, that lives in that era, except with slight more modern hardware but still no OS, etc.;Alberth said:Computers in that era didn't have an OS like we have today.In the 1990s there was MSDOS, Several versions of Windows, and of MacOS. And that's not all the operating systems of the nineties, most likely.Like Linux, for instance.;Tom Sloper said:Alberth said:Computers in that era didn't have an OS like we have today.In the 1990s there was MSDOS, Several versions of Windows, and of MacOS. And that's not all the operating systems of the nineties, most likely.Like Linux, for instance.Yep. There were things like Windows 95, Win 98, and at the time I was still using a Commodore Amiga (AmigaOS) .To deal with the original question “what game dev books was I reading in the 90s?” Back in that era, one of my favorites was : The Black Art of 3D Game Programming by André LaMothe. ;Abrash was the guy who did the Windows NT graphics subsystem and worked on Quake.https://www.drdobbs.com/parallel/graphics-programming-black-book/184404919 ;There are a couple of" history of video games" books, that track the rise of the medium and genre.Just google for them. ;GeneralJist said:There are a couple of" history of video games" booksThat's not what the OP is looking for.;Thanks all |
Choosing a career in AI programmer? | Games Career Development;Business | Hello everyone, my name is Ramon Diaz; I am currently studying Game development and programming at SNHU. I have taken the initiative to learn about a professional career in AI programming. I have a lot of gaps in my development in the short term. I have blueprint experience with AI but not enough to choose a career in this profession. I would like to know how I can be competitive leaving the university in 5 months after finishing my studies. I am looking for knowledge from all of you who have been in the industry for years. | Entry level? Know your algorithms, it will help you at interviews. If you have made demos it can help you get jobs, but the market is wide open right now and should be relatively easy to find work for the foreseeable future. Overall, it reads like you are on the right path. When you graduate and start looking for work, be open to any positions rather than just an AI specialty. Once you have a job it is easier to transition into whatever specialty you prefer.;Thank you. ;I would like to know how I can be competitive leaving the university in 5 months after finishing my studies.Talk about last minute. Create AI projects? Or A game with character behaviors? Pathfinding examples. Crowd movements. Anything really. Learn how navigation meshes work.;@dpadam450 Character Behavior is what I doing in the project at this moment. Everything related to AI programming.;@dpadam450 Is it the same when learning C++ in AI as visual scripting Blueprint? If I were to make a demo, what kind of programming should I focus on my attention? ;@frob It is important to have a portfolio? ;Not for programming. You will need to show you know how to do the work, but it is usually some interview questions and writing some code of their choice. If you have something you want to share with them, you can do it if you want. Having done fancy demos can sometimes help get interviews, and can help show your interest and abilities, but it is generally not needed. It does not hurt, unless you do it badly and therefore becomes a cautionary warning. Build it if you want. I have interviewed and hired bunches of programmers without portfolios. ;I'm studying AI at the moment, in terms of statistical learning. I've learned so much about AI over the past few weeks. Check out: https://hastie.su.domains/ISLR2/ISLRv2_website.pdfandMachine Learning with R: Expert techniques for predictive modeling, 3rd Edition |
Newbie desperate for advice! | Games Business and Law;Business | Hi allI'm new to the game development community and need some advice.I've created 2 educational games with a simple idea but are sufficiently challenging for all ages. These could be played on pcs or phones.Is it worth patenting any parts of the games?What would be the best way to monetize?How should I market the games? | hendrix7 said:I'm new to the game development communityReally? Your profile shows that you've been a member here since 2004, and your last activity was in 2007, asking about raycasting.hendrix7 said:Is it worth patenting any parts of the games?Probably not. Expensive and there will be hurdles, and possible lawsuits after the patent is granted (if it is).hendrix7 said:What would be the best way to monetize? How should I market the games?There are several threads here in the Business and Law forum about that. While you wait for more replies from the community, you can read up on those previous answers to those questions. Mainly, “you should have thought about that before you finished your games.” (You wouldn't be “desperate” now.) Good luck with your sales!;@hendrix7 Filing for a patent can be expensive, and you need to document the solution and how it separates from anything else. I have developed software that solved problems in a way that no other software does, but there is only a very small portion of that that can actually be patented. Even though you can file an application yourself, I would recommend hiring an experienced IP attorney. This too is very expensive, though, so you are best off doing this if this idea can provide millions in income. If it can't, then it's actually not that harmful if anybody copies it.You could look at registering trademarks, design and other parts of the games. This is cheaper, but it will protect you brand more than your idea or solution.Again, if this is something that could turn a real profit, it might be worth looking into. If not, it's a very costly waste of time.As for marketing - my day job is actually creating videos and commercials etc., so naturally that's the first thing that comes to mind.Make videos for social media or other platforms where your target audience is likely to see it. Oh, and you need to define a target audience. Know where they are, what they respond to, what their struggles are and how your product will solve their problems, enhance their life experience or in other ways contribute positively to their life.There are several other ways to do this, but the list exceeds my level of expertise in the area.;patenting is costly, and time intensive. As said above, it depends on a lot if it's worth it. ;@hendrix7 Nothing is worth patenting unless you're willing and able to defend your patent. There is no patent police; you're responsible for finding and prosecuting infrigement.What you're patenting has to be novel and non-obvious to a person skilled in the art. You called your idea ‘simple’ which makes me wonder if it's obvious or already in use.;@Tom Sloper Thanks TomI have been programming for a while but not games until now.Thanks for getting back and your advice, particularly patents.;@scott8 Thanks for your reply.I see. The play of the game utilises basic maths skills so I'm guessing it'll be difficult to identify anything that's unique. I suppose, in a similar way, it would be difficult to patent something like ‘Wordle’. Am I right? |
Hi I'm new. Unreal best option ? | For Beginners | Hallo everyone. My name is BBCblkn and I'm new on this forum. Nice to virtually meet you 🙂. One of my biggest dreams is to make my own videogame. I love writing design as in text on how my dream game would be. Now I got no skills to create it. But who knows what life will bring. Is Unreal the best program to have fun with an experience ? Obviously I prefer a simple but capable program. Not pre designed auto drop. Why not install Unreal and roam into it and see if anything happens.My favorite games are in the genre of Fantasy, usually stone age with magic. Dota, Homm, Diablo and the odd one out is the genius Starcraft 1. But I played plenty of different games, especially when I way younger. I don't game currently at all but designing gets my creative juices flowing and is so inspiring and fun. Thanks for having me guys | BBCblkn said:My name is BBCblknI am truly sorry for you. Even Elons daughter has a better name than that.BBCblkn said:Is Unreal the best program to have fun with an experience ?Give it a try, but it's not meant for total beginners.Starting small always is a good idea. 2D is easier than 3D. You could try GameMaker, learn some programming language, learn some math, move on to more advanced engines like UE or Unity… ;There's honestly no perfect program for beginners. If I had to compare Unreal though at my skill level, I would probably pick Unity. However, It really comes down to your needs, and how much programming you want to learn. Furthermore, I would also keep in mind other engines.;@BBCblkn I'd recommend Gamemaker studio 2 as a first engine. It's easy to learn and I haven't had a problem making my game ideas in it yet.There are some good tutorials on YouTube to follow to learn it. Do note you'll be limited to 2D games with GMS2.Bit late to the post, but I hope it helps;gamechfo said:Bit late to the postTwo months late. Always consider whether you honestly believe that a question asked long in the past is still awaiting an answer. Thread locked. |
How to publish a book? | GDNet Lounge;Community | Hello, So, over the holidays I finished my 1st book. Do any of yall writer types know where I can find:an editorpublisherIt's like 99% done, just need to know what to do next. Also, it's cross genre, so it doesn't necessarily fit the standard model. | You've given nowhere near enough information to get a final answer, but I can suggest next steps for you. (For background, I've worked as an author, co-author, editor, and ghostwriter on 9 books so far.)Publishing is a business deal. You need to figure out what business services you need.Do you even need a publisher? Do you need a distributor? You already mention needing an editor. Do you need marketing? Do you need retail agreements? Digital or physical? If physical, POD or offset, how many each of hard or soft, what size of print run can you afford? What business services do you need? Publishers have an awful lot of potential features of what they can provide and what those services cost.Once you know the list of services you actually need, your favorite bookstore will have books that have listings of all the major publishers and hundreds of minor publishers, along with the services they provide and the specialties they work with. Work through the listings methodically, and talk to them all until you've got a deal. You'll also want to start shopping around for a lawyer at that point, both because they have connections and because they'll be working with the contracts you'll be signing.Once you know what you need and have talked with your lawyer the first few times, you will be ready to start shopping around. It's far better if you have more money and are using the publisher as a paid service. That is, you pay them for the services they provide up front. It will cost you many thousand dollars but you'll require far fewer sales to reach profitability. It can be better to do an online plus POD service starting out if you're self funded. If they need to front any of the money there will be two phases to the deal, one phase before it's profitable and another after a threshold is reached and it's profitable. The exact terms will depend on your needs and the services they'll be providing. Before you sign with anyone, you'll need to work back and forth more than once with your lawyer to help you negotiate what's fair in the agreement. Good lawyers understand the costs of the various services and can help you get fair rates.Just like publishing games, the more you need from them the harder your pitch becomes. If you need a lot of services the more it will cost you. If you're looking for them to invest in you, front you money, and pay for the books, don't expect a lot of money from the deal, and in addition your pitch needs to be amazing and you'll be rejected many times. If you've got the money to self-publish and are only looking for retail agreements that's rather easy. ;hmmmWell Self publish might work too. I'm looking for:an editor publishing distribution for ebookNo hard cover or physical book planned at this timemaking cover art. Future Audio book production. I think that's it. I'd be willing to do physical print if needed, but I don't really want to pay for that at this time. frob said:You've given nowhere near enough information to get a final answer The issue is I don't know what questions or criteria I should be asking or looking for. ;Have you considered publishing with Packt?https://www.packtpub.com/;GeneralJist said:2. publishing distribution for ebook 3. No hard cover or physical book planned at this timeFor distribution of an ebook there are plenty of options. Amazon is the biggest with kindle direct publishing requiring little more than an html file and an image for the title. If you are comfortable with software tools you can use that same document to build/compile every other format out there. You're on the hook for everything else with the business if you go that route, but it can work well if you are marketing through your own channels.There are many ebook publishers out there targeting specific platforms and specific readers or specific genres. I mentioned publisher lists, they also include electronic-only publishers. Understand the tools they use against piracy are also helpful since otherwise anybody with access to the file can make unlimited copies.Be careful of contracts, you almost certainly want something that has a non-exclusive agreement since you've done all the work yourself already. If a publisher wants an exclusive deal they need to be putting quite a lot on the negotiating table.GeneralJist said:4. making cover art.Find an artist with the style you like and contact them. Often it's in the range of a couple hundred bucks, especially for ‘unknown’ artists when they're starting with something that wouldn't have seen the light of day otherwise. Artist friends are best, and asking around at local art schools is inexpensive.GeneralJist said:5. Future Audio book production.If you don't need it now, it's something easily done later.GeneralJist said:1. an editorThis one is the most difficult. Skilled editors are amazing. If you go with a publishing house they'll provide professional editors, at professional rates. ;taby said:Have you considered publishing with Packt?https://www.packtpub.com/hmmm 1st time hearing of them.Looks like they are more of an educational option?My book is a mix of mental health journey auto bio, and Sci Fi elements. It's not really a standard “how to” for game dev. ;so I just heard back from my 1st publisher submission.https://triggerhub.org/And they essentially say they be willing to look at it deeper, and have extensive edits to focus on the mental health angle. but they would want me to cut a lot. From what they are hinting at, It sounds like they want to cut a lot of the Game dev and gaming journey, as they are a publisher focused on mental health.So, now I need to decide what to do.I sent them back an email saying I'm open to continued dialogue.Without knowing exactly what they want to cut, and edit, I don't know how to proceed.Also, would it be better to hold out, and find a publisher that is willing to accept most of the game dev journey, as I'm looking for a continued publisher to work with, aka accept most of the book as is. Any advice would be helpful.Thanks yall. ;GeneralJist said:Any advice would be helpful.Look into your own mind and heart.;hmmmok,So I've submitted to a few other places.We shall see.I submitted to this place called author House, and they got back to me really quick, but it looks like they want me to pay a couple thousand for a package:https://www.authorhouse.com/en/catalog/black-and-white-packagesI personally find that a bit frustrating.I mean, really, I wrote the book, I thought traditional publishers get paid from a % of sales?@frobWhat do you think?Is the above package a good deal?I was also a little put off, as it seems the person who called me didn't even read anything about my book, and asked me “so what's your book about?"beyond the above, how does this usually work? Edit: so, after a bit of basic research, it seems the above organization is a bit scamy. The hunt continues. ;You're unlikely to get a publisher deal, where the publisher pays you an advance and distributes your book to retail outlets.You'll have to self-publish, meaning you have to bear all the costs for printing, and nobody will distribute it for you. https://en.wikipedia.org/wiki/Vanity_press |
First-person terrain navigation frustum clipping problem | General and Gameplay Programming;Programming | I am trying to develop first-person terrain navigation. I am able to read a terrain and render it as well as to move around the terrain by interpolating the location of the camera every time I move around. The main problem I have is that depending on the terrain, i.e. moving on a sloping terrain, the near plane clips my view (see below). What is the best way to avoid this? Presumably, I can interpolate the heights for the bottom corners of the near plane … any help would be appreciated. | I believe this can aways be an issue. I mean if you are clipping to a near plane and that plane passes through geometry, it has to do something. That being said you technically don't have to clip to a near plane at all, however many graphics APIs require it. Another other thing to consider is once you have collision working, you can put your camera, including your near clipping plane inside a collidable object, for instance a sphere, such that this problem will never occur. If you are eventually going to make this a real first-person game, that should take care of the problem since your camera will be inside the players head. Even in a 3rd person game you can put them inside a floating sphere. ;Gnollrunner said:That being said you technically don't have to clip to a near plane at all, however many graphics APIs require it.The near clip plane is always needed, even if you use a software rasterizer. If you don't do the clipping, vertices would flip behind the camera, causing glitches way worse than what we get from clipping.mllobera said:What is the best way to avoid this? Presumably, I can interpolate the heights for the bottom corners of the near plane … any help would be appreciated.Yes, basically you want to ensure that the camera is in empty space (above the hightmap), not in solid space (below the heightmap).But in general you can not treat the camera as a simple point, because the front clip plane requires a distance larger than zero. So ideally you build a sphere around the camera which bounds the front clip rectangle of the frustum, and then you make sure the sphere is entirely in empty space, for example. In the specific case of your terrain not having too steep slopes however, it should work well enough to sample height below camera, add some ‘character height’, and place the camera there. That's pretty simple and usually good enough for terrain.It's quite a difficult problem mainly for 3rd person games in levels made from architecture. It's difficult to project the camera out of solid space in ways so the motion still feels smooth and predictable.Some games additionally fade out geometry which is too close, attempting to minimize the issue.Imo, the ‘true’ solution to the problem would be to let the clipping happen, but rendering the interior volume of the geometry as sliced by the clipping plane.That's pretty hard with modern rendering, which usually lacks a definition of solid or empty space. But it was easy to do in the days of Doom / Quake software rendering. When i did such engine, it was possible to render clipped solid walls in simple black color. This felt really robust and not glitchy, so while it does not solve all related problems, i wonder why no game ever did this. ;@undefinedJoeJ said:The near clip plane is always needed, even if you use a software rasterizer. If you don't do the clipping, vertices would flip behind the camera, causing glitches way worse than what we get from clipping.You can clip to a pyramid instead of a frustum. I used to do this many years ago on old hardware. So there is no near clipping plane. In fact you don't need a far clipping plane either.Edit: Just wanted to add as far as I know the near and far clipping planes mostly have to do with optimizing your Z resolution. If you are dealing with that in other ways, I think they aren't strictly necessary. I currently don't even deal with the far plane and let LOD solve Z-fighting issues.;Gnollrunner said:You can clip to a pyramid instead of a frustum.I see. You still have front clip. It is a point, formed indirectly as the intersection of the other other frustum planes.I've misunderstood your claim to be ‘you don't need a front clip’. But you didn't say say that. Sorry. But now i'm curious about the experience with z precision you have had. I guess it just worked? Which then would probably mean: All those painful compromises of ‘make front plane distant so you get acceptable depth precision for large scenes’, are a result of a bad convention being used by APIs?Or did you use no z-Buffer? ;@undefined My whole engine is based on aggressive LOD and culling. I don't do projection in the matrix. It's a post step. My Z coordinates are world distances. My current project does have a near clipping plane mainly because DirectX wants one, but it's not that relevant for my application.;Ah, so you use the pyramid for culling only. But for rasterization, the usual front clip plane at some distance i guess.Still an interesting question if ‘some distance’ is really needed, but i guess yes.I did some experiment about point splatting. It uses spherical projection, which is simple than planar projection:auto WorldToScreen = [&](Vec4 w){Vec4 local = camera.inverseWorld * w;if (local[2] < .1f) return (Vec3(-1)); // <- front clip at some distance of 0.1Vec3 screen = (Vec3&)local;screen[2] = length(screen); // if it was zero, i'd get NaN herescreen[0] = (1 + screen[0] / (screen[2] * camera.fov)) / 2;screen[1] = (1 + screen[1] / (screen[2] * camera.fov)) / 2;return screen;}; Planar projection would cause division by zero too, i guess.;Thanks for all your comments! I will need to investigate how to do what Gnollrunner proposed (about putting the camera inside of a sphere). ;This may be obvious, but in case it helps:Let me note that, as a first-person camera may be more likely than a third-person camera to draw very close to geometry, it likely makes some sense to have a smaller near-plane distance for the former than the latter.Now, this only ameliorates the problem, it doesn't remove it entirely: it means that the problem will still appear, but only if the player gets very close indeed to a surface. It's intended to be used in conjunction with one or another means of preventing the camera from approaching quite so near to a surface (such as the sphere-approach mentioned by others above).;Thaumaturge said:This may be obvious, but in case it helps:Let me note that, as a first-person camera may be more likely than a third-person camera to draw very close to geometry, I'm not sure that's so true. I mean in both cases you have to take care of the problem somehow. The case of a first-person camera is a bit easier because it should always be in the collision boundary of the player (sphere(s), ellipsoid, capsule etc.). As along as the near plane is also within that boundary, the problem should never occur. So if you have a 10cm radius sphere and put the camera in the back of it, that gives you maybe a 10 to 15 cm camera to near clipping plane distance to play with depending on the field of view you are going for. With a 3rd person camera, you can also get very close to terrain, in fact your camera can end up within terrain or some object if you don't do anything to solve that problem, and this will happen very often without separate camera collision. One typical way to handle this is just implement your following camera, ignoring terrain considerations. Then to figure out your camera's actual position, project a line back from the head of the avatar to the camera's ostensible position, and see if it intersects anything to get the camera's true position. In reality you should project a cylinder and not a line since your camera will need its own bounding sphere to contain the near clipping plane. In any case this means that as you move around your camera can jump forward to clear terrain and objects. I've seen this in a few MMOs. However, when you leave blocking terrain you have the option of implementing smooth movement back to the cameras desired location. If you want to get really fancy, I guess you could try to predict when your camera will need to jump forward ahead of time and try to do smooth moment forward too. Maybe you can have a second camera bounding sphere which is somewhat larger, that would trigger smooth movement, but I think you would still need a fallback camera jump routine to be safe. |
strange speed problem | For Beginners | I was tinkering with code for an SFML C++ project and suddenly everything except my avatar started moving extremely slowly. I looked at the performance tab and I had plenty of memory and cpu. I tried for hours removing everything and starting and stopping the program but nothing would speed it up. I didn't notice anything else strange happening. I got home and started it up again and it was back at full speed. What could have caused this? | Could you tell us what was running slow?if it was your computer, just try a restart your computerif it was your IDE, first try to restart the IDE, else: restart your computerassainator |
[.net] vb.net logger question | General and Gameplay Programming;Programming | heey all,At the moment i have a logger* in my program. (* I don't know what it name is, it writes all actions to a file.)The only problem is: The data is only written to the file when it is closed properly. (streamWriter.close() (replace streamWriter with var name)) This is done when the application is end's as it should. But when the app crashes, the data is not written to the file and I can't find out what happend.my codePublic Class Logger Private _LogMessages As ULong = 0 Private stream As IO.StreamWriter Public Sub OpenLog(ByVal file As String) stream = New IO.StreamWriter(file) End Sub Public Sub CloseLog() stream.Close() End Sub Public Sub Write(ByVal msg As String) If _LogMessages < 1000000 Then stream.Write(msg) _LogMessages += 1 End If End Sub Public Sub WriteLine(ByVal msg As String) If _LogMessages < 1000000 Then stream.WriteLine(msg) _LogMessages += 1 End If End SubEnd Classin the app it would be used as:1. when the app start's the first thing it does is opening the log.2. the app is in the main loop and does what it should do, logs everything3. the app quit's and closes the logger.But if the app crashes the 'stream' is not closed properly so the data is not written to the file.the question get's down to:What can i do to make sure the filestream is closed properly even if the app crashes?thanks in advance,assainator | First quick answer:Use the Flush method after each Write. That will solve your problem.Second answer:Have a look at the Tracing classes in .NET. There is a class that will do all of this for you by simply configuring it. ; Another solution is to use exception handling, by using the Try/Finally statements:logger = New Logger()Try ' Main application code here - try to enclose as much of it as possible ' by wrapping it as close to the entry point as possibleFinally logger.CloseLog()End Try.. or implement IDisposable and use the Using statement:Using logger As New Logger() ' Main application code here, as aboveEnd Using; Thanks for all input, I have it working now.assainator |
[Solved]My model is rendered one half from the front and the other half from the back | For Beginners | Hi i made a human face and when i render it i saw one half of the face from the front and the other half from the back, here is a capture changing from z to -z the eye vector:http://img696.imageshack.us/g/57765909.png/[Edited by - jor1980 on December 28, 2009 5:09:32 PM] | Are the normals on half the head reversed? Possibly during mirroring? ;Quote:Original post by DerangedAre the normals on half the head reversed? Possibly during mirroring?In my FVF i didn´t use normals, here i leave you the code to you to see if there are something wrong.Imports Microsoft.DirectX.Direct3DImports Microsoft.DirectXPublic Class Form1 Private device As Device Dim verticest As CustomVertex.PositionTextured() = New CustomVertex.PositionTextured(1398) {} Dim indices As Short() = New Short(7991) {} Public Sub Initialize() Dim Present As PresentParameters = New PresentParameters Present.Windowed = True Present.SwapEffect = SwapEffect.Discard device = New Device(0, DeviceType.Hardware, Me.Handle, CreateFlags.SoftwareVertexProcessing, Present) device.RenderState.Lighting = FalseEnd Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.Text = "DirectX Tutorial using Visual Basic" Me.Setstyle(Controlstyles.AllPaintingInWmPaint Or Controlstyles.Opaque, True) Initialize() Dim nºarchivo As Integer = FreeFile() FileOpen(nºarchivo, My.Computer.FileSystem.SpecialDirectories.Desktop & "\cara.3d", OpenMode.Input) For i = 0 To 1398 Dim dato As String dato = LineInput(nºarchivo) Dim Datoparts As String() Datoparts = Split(dato, " ") verticest(i).SetPosition(New Vector3(NumerosDecimales(Datoparts(0)), NumerosDecimales(Datoparts(1)), NumerosDecimales(Datoparts(2)))) verticest(i).Tu = (NumerosDecimales(Datoparts(3))) verticest(i).Tv = 1 - (NumerosDecimales(Datoparts(4))) Next For i = 0 To 2663 Dim dato As String dato = LineInput(nºarchivo) Dim Datoparts As String() Datoparts = Split(dato, " ") indices(3 * i) = Datoparts(0) indices((3 * i) + 1) = Datoparts(1) indices((3 * i) + 2) = Datoparts(2) Next End Sub Private Sub Form1_OnPaint(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Me.Paint device.RenderState.CullMode = Cull.None device.RenderState.FillMode = FillMode.Solid device.Clear(ClearFlags.Target, Color.Black, 1, 0) Dim imagen As New Bitmap("C:\Users\Jorge\Desktop\fernando.png") Dim textura As New Texture(device, imagen, Usage.Dynamic, Pool.Default) device.MultiplyTransform(TransformType.Projection, Matrix.PerspectiveFovLH(Math.PI / 4, _Me.Width / Me.Height, 1, 100))device.MultiplyTransform(TransformType.World, Matrix.LookAtLH(New Vector3(0, 0, -8), New Vector3(0, 2, 0), New Vector3(0, 1, 0)))device.BeginScene() device.SetTexture(0, textura) device.VertexFormat = CustomVertex.PositionTextured.Format device.DrawIndexedUserPrimitives(PrimitiveType.TriangleList, 0, 1399, 2664, indices, True, verticest) device.EndScene() device.Present() End Sub ; I don't know if it is enabled by default, but is depth test enabled? ;Quote:Original post by fcoelhoI don't know if it is enabled by default, but is depth test enabled?All i did is in the previous code, i don´t know how to solve this ; Even if you don't use per-vertex normals (as in lighting), the hardware still calculates face normals for your triangles for the purpose of backface culling. When you have mirrored your geometry, the winding order (counterwise or counterclockwise vertices) of the triangles has mirrored accordingly and thus their geometric normal points in the opposite direction from what you'd expect. As a quick fix, try disabling backface culling. The long-term fix is to fix your model so that the winding order of your triangles is consistent.Most modeling programs automatically correct the winding order for you when you use a "mirror modifier" (exact name varies). Either your program doesn't, or you used some kind of negative scaling modeling technique that didn't capture the intent of the modification (for example, mirroring only vertex positions). ; As a separate note, it is a very bad practice to hard-code stuff like the number of indices and vertices. Instead, determine such values from the model file. This way, when the file changes, your code will not break. There are other problems with your code structure as well, but I don't iterate them here unless you want me to.Also, Managed DX is effectively dead. I recommend using SlimDX to replace it, seeing as you use VB. ;Quote:Original post by Nik02As a separate note, it is a very bad practice to hard-code stuff like the number of indices and vertices. Instead, determine such values from the model file. This way, when the file changes, your code will not break. There are other problems with your code structure as well, but I don't iterate them here unless you want me to.Also, Managed DX is effectively dead. I recommend using SlimDX to replace it, seeing as you use VB.Of course you can tell me all my faults, i want to learn and thats the way.The reason i use managed directx is because slimdx seems to be a little bit diferent froma managed directx, and i tried to make the same program on slimdx and i can´t see anything in the screen ; I'll get back to you about the code tomorrow, as I need to sleep for a while now [smile]In the meanwhile, apply my quick fix by setting the cull render state to "none".Also, fcoelho was correct in that you don't use depth buffering. For anything but the most simple of meshes you do want to use it. It can be enabled by setting the AutoDepthStencil and DepthStencilFormat fields of your present parameters structure to appropriate values. If you do enable it, be sure to clear the depth buffer in addition to the ordinary color buffer when you call Clear.You shouldn't give up on SlimDX so easily. While the syntax is a bit different than MDX (as SlimDX is closely modeled after native DX), the underlying concepts of drawing stuff to the screen are exactly same. And if you do your coding with the DX debug systems running, you can get very accurate info as to why something doesn't work.Also, there's no guarantee that MDX still works on newer versions of Windows. I haven't tested it on "7" but I wouldn't be surprised if it ceased to initialize out of the box. ; Okay, here's my analysis of your code in general, and recommendations on how to fix the flaws. I don't drill very deep on the issues; for that, I recommend reading relevant articles from MSDN. If I sound harsh here, it is unintentional. My goal in this post is to help you.VB usage/coding style:-You have defined all the functionality in one module, Form1. To reap the benefits of the object-oriented paradigm, you should divide your functionality into classes - for example, a Mesh class which has member functions Load(fileName as String, parentDevice as Direct3D.Device), Render() etc. (for example). This way, you don't have to search thru a lot of irrelevant code everytime you change something. This approach has a lot of other benefits too, but listing them would require a whole book.-FreeFile and FileOpen are deprecated functions, they are only provided for backwards compatibility with older versions of Visual Basic. Consider using the stream classes to do your file handling - in addition to reading actual disk files, you can use network or memory streams instead for no additional work. Also, the stream classes have additional functionality such as asynchronous processing.-You don't do any error checking whatsoever. You should check that a file open operation succeeded before reading data off it, and that a D3D device was successfully initialized before you send requests to it. If something goes wrong, your code will crash as it is. With proper error handling, you can gracefully handle the exception conditions. A D3D device can be especially crash-prone and cause blue screens upon exceptions, since it is only a relatively thin layer between your program and the hardware.D3D usage:-Usually, rendering is done on the idle time of the application instead of the OnPaint handler - that is, everytime the app's Windows message queue is empty, render. Google for "d3d message pump vb" for a proper implementation. Of course, if it is enough to paint the screen less often (such as in a chess game, for example), OnPaint can be fast enough.-You don't seem to call Device.SetTransform anywhere in the code. MultiplyTransform multiplies the previous transform of the device with the new transform you provide, so the effect will be cumulative. This is usually not what you want. In your case, I could imagine that the side effects of MultiplyTransform cause your model to zoom away from the screen everytime you render, since you multiply the view and projection matrices by their previous values.-Consider using vertex and index buffers to feed your geometry to the hardware. User primitives are not optimal since the device cannot allocate them statically for best performance, and you will upload the geometry every time you call the drawing function.-You should release all device resources upon exiting your app. Otherwise, your app can cause memory leaks as the system cannot determine which objects it can unload from memory and/or release physical device resources from.-Use the D3D debug runtime when developing apps. Seriously. If you don't know how, read up on MSDN. It is time well spent.General best practices:-You are re-loading and re-creating your texture every single frame. This destroys your performance, and it can't be good for your hard drive either in the long run.-As I said previously, it is a bad practice to hard-code any values to your files. In your case, the number of vertices and indices should be read from the model file itself. Also, you should store material settings (and other related stuff) or at least references to them in the model file. From your code, I can deduce that the file format is too simple for this kind of robust handling, so consider defining a file format that can store all the data, or use a well-known file format. Obj format is pretty close to your current format.-Don't hardcode file paths. Even though SpecialDirectories.Desktop is technically not a hard-coded path, wouldn't it make more sense to store your resources relative to the executable path?-In general, in my opinion VB isn't the greatest language for game development. However, the priority should be in getting stuff done. If you know the language well, do keep using it but consider learning C-style languages as well. Native D3D development is done in C++, and it is the thinnest possible interface between your app and D3D.Consider this list as a summary, not a comprehensive list of all possible issues.I hope this helps! |
Visual Studio Macros for the Game Programmer | Old Archive;Archive | Comments for the article Visual Studio Macros for the Game Programmer | Excellent article, very useful and inspiring. Thank you! ; Nice introduction to Visual Studio Macros. I've never done anything with them before but I'm really planning to after reading this article.I just tried your example:Sub Signature() Dim sel As TextSelection = DTE.ActiveDocument.Selection sel.Insert("MikeCline ") sel.Insert(Format(Date.Today, "MMM dd yyyy")) sel.Insert(".")End SubI noticed that when you want to undo this, VS will undo every Insert call and not undo it at once. So my tip is that you probably want to insert that text at once so it's easy to undo.Sub Signature() Dim sel As TextSelection = DTE.ActiveDocument.Selection Dim str As String str = "MikeCline " + Format(Date.Today, "MMM dd yyyy") + "." sel.Insert(str)End SubNice article. ;Quote:Original post by WalterTamboerNice introduction to Visual Studio Macros. I've never done anything with them before but I'm really planning to after reading this article.I just tried your example:*** Source Snippet Removed ***I noticed that when you want to undo this, VS will undo every Insert call and not undo it at once. So my tip is that you probably want to insert that text at once so it's easy to undo.*** Source Snippet Removed ***Nice article.Thats a good tip. I found the same problem with macros that someone else has written. ; Amazing... I never thought of doing any of this, great article. ;Quote:Original post by DaveQuote:Original post by WalterTamboerNice introduction to Visual Studio Macros. I've never done anything with them before but I'm really planning to after reading this article.I just tried your example:*** Source Snippet Removed ***I noticed that when you want to undo this, VS will undo every Insert call and not undo it at once. So my tip is that you probably want to insert that text at once so it's easy to undo.*** Source Snippet Removed ***Nice article.Thats a good tip. I found the same problem with macros that someone else has written.If you want to have the undo feature remove the changes your macro made all at once, you can open an UndoContext around your macro changes, then close the UndoContext afterwards. Then, when you perform an undo, it will remove everything at once. Like so: Public Sub InsertLineComment() Dim name As String = "KJF" Dim selection As TextSelection selection = CType(DTE.ActiveDocument.Selection, TextSelection) If (Not DTE.UndoContext.IsOpen()) Then DTE.UndoContext.Open("KJF Insert Line Comment") End If selection.EndOfLine() ' Go to the end of the line to insert the comment Dim comment As String comment = "//" + name + " " + Date.Now.ToString("dd-MM-yyyy") + " - " selection.Insert(comment) If (DTE.UndoContext.IsOpen()) Then DTE.UndoContext.Close() End If End Sub;Quote:Original post by DorvoThen, when you perform an undo, it will remove everything at once.Ah :) That's even better! Thnx. ; Another thumbs up for this informative article :-) Definitely I can find some use for them.I also have a snippet here to share, for trimming of trailing whitespaces, which is missing from VS. It is basically just a replace all using regexp.Dim textDocObj As TextDocument = DTE.ActiveDocument.ObjecttextDocObj.ReplacePattern( "[ \t]+\n", ControlChars.NewLine, vsFindOptions.vsFindOptionsRegularExpression)I've the full macro implementation on my page if anyone's interested. ; Great article! opened a door I hadn't even considered. Thank you. ; Nice job. But your first example, switching between header and source file, is sort of built in. Visual C++ 2005 express, no add-ins that I remember, and if I right click on a source file there is a Go To Header File option. There doesn't seem to be an equivalent for going from header to source though. |
sfml mouse coordinate problem | For Beginners | heey all,lately i was trying to use the mouse more in my app. I use sfml to handle input, graphics and display.i'm using the following code, the X code display's properly, tough the Y code stays at 512. even stranger is that the windows is only 500 pixels high.....int main(){//create a SFML windowsf::Window App(sf::VideoMode(500, 500, 32), "gameUI test");//set opengl coordsystemglOrtho(-250.0f, 250.0f, -250.0f, 250.0f, 2.0f, -2.0f);//prepare openGL depthglClearDepth(1.f);glClearColor(0.f, 0.f, 0.f, 0.f);//enable depthbuffer use (wich we don't use)glEnable(GL_DEPTH_TEST);glDepthMask(GL_TRUE);//prepare for 3d usage(but we only use 2d)glMatrixMode(GL_PROJECTION);glLoadIdentity();gluPerspective(90.f, 1.f, 1.f, 500.f);//while the app is runningwhile(App.IsOpened()){//get eventssf::Event Event;while(App.GetEvent(Event)){//if escape is pressed, exitif(Event.Type == sf::Event::KeyPressed && Event.Key.Code == sf::Key::Escape){App.Close();}else if(Event.Type == sf::Event::Closed){App.Close();}//if the mouse moves, output coordselse if(Event.Type == sf::Event::MouseMoved){printf("X: %i, Y: %i\n", Event.MouseButton.X, Event.MouseButton.Y);}}//make the window the current render window (for use in multiple windows (wich we don't use))App.SetActive();//clear buffersglClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);glLoadIdentity();//display all changesApp.Display();}return 1;}does anyone know what i'm doing wrong?thanks in advance,assainator | Looks like you're using the Mouse Button field of the Event, when you should be using the MouseMove field. ; Thanks, that solved the problem.assainator |
Render to texture Reply Quote Edit | Graphics and GPU Programming;Programming | Hi guys,I'm new to DirectX, and now i have to render some scene to a texture, and then i will have to work with these texture.I have try to write a function to render a simple Box to a texture. Then i will use this texture to render the box again, using the texture above to this new BoxThis is my code<CODE>void RenderTheBlocker(IDirect3DDevice9* pd3dDevice,float fElapsedTime,ID3DXMesh* mBox) {HRESULT hr; hr = D3DXCreateTexture( pd3dDevice,RENDERTOSURFACE_WIDTH,RENDERTOSURFACE_HEIGHT,1,D3DUSAGE_RENDERTARGET,D3DFMT_A8R8G8B8,D3DPOOL_DEFAULT,&g_pDynamicBlockerTexture ); // //g_pDynamicTexture D3DSURFACE_DESC desc;g_pDynamicBlockerTexture->GetSurfaceLevel( 0, &m_pTextureSurface );m_pTextureSurface->GetDesc( &desc ); hr = D3DXCreateRenderToSurface( pd3dDevice, desc.Width, desc.Height, desc.Format, TRUE, D3DFMT_D16, &m_pRenderToSurface ); m_pRenderToSurface->BeginScene( m_pTextureSurface, NULL );pd3dDevice->Clear( 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, D3DCOLOR_COLORVALUE(0.0f,1.0f,0.0f,1.0f), 1.0f, 0);pd3dDevice->SetTransform( D3DTS_PROJECTION, g_LCamera.GetProjMatrix()); //g_matProjection_offscreenSurfacepd3dDevice->SetTransform( D3DTS_WORLD, g_LCamera.GetWorldMatrix()); pd3dDevice->SetTransform(D3DTS_VIEW,g_LCamera.GetViewMatrix());mBox->DrawSubset(0);m_pRenderToSurface->EndScene( 0 ); //Testpd3dDevice->Clear( 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, D3DCOLOR_COLORVALUE(0.0f,0.0f,1.0f,1.0f), 1.0f, 0 ); pd3dDevice->BeginScene(); pd3dDevice->SetTransform( D3DTS_PROJECTION, g_LCamera.GetProjMatrix()); pd3dDevice->SetTransform( D3DTS_WORLD, g_LCamera.GetWorldMatrix() ); pd3dDevice->SetTransform( D3DTS_VIEW,g_LCamera.GetViewMatrix()); pd3dDevice->SetTexture( 0, g_pDynamicBlockerTexture); mBox->DrawSubset(0);pd3dDevice->EndScene();pd3dDevice->Present( NULL, NULL, NULL, NULL ); } </CODE>When i run this, it only appear a blue scene. No box at allCan anyone help me with this? | 1. If you render the box mesh to the screen, rather than to a texture, does it render correctly?2. Do you set the viewport somewhere other than the posted code?3. Do you create the normal render buffer using D3DFMT_A8R8G8B8 also? ; I figured out my mistake when i created D3DXCreateRenderToSurface inside this function. Thanks anyway :) |
2D diagram | Graphics and GPU Programming;Programming | I'm not developing a game, but I haven't been able to get a satisfactory answer elsewhere and I figure this is where the graphics experts are.I need to display a large number (thousands or tens of thousands) of points in 2D space with lines connecting pairs of points. The user needs to be able to zoom (preferably "infinitely"), with the points behaving dimensionlessly and the lines behaving one-dimensionally (i.e. zooming in, the ellipses representing points get farther apart but don't get bigger, and the lines get longer but not thicker). The user also needs to be able to scroll.I tried doing this in GDI+ (iterating through a linked list of ellipses, drawing one at a time) but it was way too slow. You'd have to wait for several seconds for all the points to reload after clicking a scroll button. Drawing to bitmaps first, then displaying a bitmap solves the laggy scrolling problem but makes zooming tedious and only allows a fixed number of zoom levels. I'm guessing OpenGL or DirectX is needed.Can someone point me towards the right API and techniques?How are these problems solved in CAD or GIS applications?Are there any relevant books?The next thing I'm planning to try is OpenGL with Qt, if anyone can comment on that.Thanks a lot for your help. | (thousands or tens of thousands) is n't a big number for 3D rendering, but OpenGL doesnot support 2D rendering originally. If you are sticked to OGL, you can try to extend any of the open src 3D engines. It would take several thousands of lines.With Win Vista/7, maybe You can try the Direct2D. I just read a little of that. It's easy to use and should be of high performance. ; You need to re-think things just a bit. You need two things to do this efficiently; a spatial partitioning system, and a view-oriented rendering system instead of a world-oriented one.First look up "quadtree". You want to put your points and lines into the quadtree, and when you render an area from the tree you want to query the tree for all points and lines that intersect with the view rectangle. This is very fast because of how a quadtree works; you only draw those lines and points that are going to be visible (more or less).Second, once you have that information, you know the exact screen-space dimensions you want your points and lines to have, so just render them that way. Don't think of them being of a certain size in world-space; this is in fact probably exactly what you're doing right now, you just haven't noticed that zooming to any scale except 1:1 will produce separate view, screen, and world spaces, where you currently seem to be thinking in only world space.Edit: Oh, and also; linked lists are generally for data sets that need frequent add/remove operations at arbitrary locations, but get fully iterated or searched only infrequently. Try using vectors or other dynamic-sizing array replacements. |
Adding a road to terrain | Graphics and GPU Programming;Programming | How would you go about adding a road to a terrain generated with a heightmap? i tried just creating some triangles and adding a road texture to it, but because my road coordinates are singles(or floats in c#) it can be places anywhere so the terrain pokes through it in some places... I also tried drawing to a texture and adding roads to that texture, then drawing the terrain texture from that texture, but it ends up gettin shinked and mirrored :S and help would be great! | |
C++ Book | For Beginners | I was wondering what book I should read next after C Plus Plus for Dummies? I am currently reading it and it is a rather confusing book, even with Basic experience. Any advice would be appreciated. | From personal experience, I wouldn't recommend the Dummies books. My Dad was a director (retired recently) at the company that publishes them. He agreed with me over Christmas dinner that they weren't very good (although I guess it depends on the author).I am in a similar position to you on the experience front. I am currently reading 'The C Programming Language' by K&R. According to reviewers on Amazon the equivalent C++ book, written by Bjarne Stroustrup (creator of C++), isn't the easiest thing to read and isn't a great start for beginners. Now, I know you shouldn't blindly go on the opinion of others, but the reviews on Amazon have yet to let me down.My 2 pence. ; I would highly recommend switching to Thinking in C++ or C++ Primer Plus 5th edition. You can get Thinking in C++ free online at the authors website.Thinking In C++ 2nd edition; Bjarne's book is working for me. The only complaint I have is it drags in some areas (since I already have some experience but can't skip ahead due to chapters building on each other) I'm sure the extra detail will be useful sometime in the future. In other words, some parts will be repetitive but things are explained in depth and simple to understand. ; I'm learning from Sams Teach Yourself c++ in 21 Days. So far I've found it to be really good. I think The c++ workshops for beginners here on gamedev are based on it.The only thing I don't like about it (so far) is that the book teaches object-oriented programming before even getting into basic loops. I guess I just think classes should be left until more basic things have been covered.It's a pretty sizeable book, so get ready for some heavy reading lol. It's roughly 900 pages. ; I'm learning from Sams Teach Yourself c++ in 21 Days. So far I've found it to be really good. I think The c++ workshops for beginners here on gamedev are based on it.The only thing I don't like about it (so far) is that the book teaches object-oriented programming before even getting into basic loops. I guess I just think classes should be left until more basic things have been covered.It's a pretty sizeable book, so get ready for some heavy reading lol. It's roughly 900 pages. ; I wouldn't recommend Bjarne's book for a starting point to learn C++, but I would recommend that you read it eventually. It's one of the best ways to "make sure" you have a solid grasp of the language. ; c++ Primer PLus 5th edition prata |
Color Theory Final | GDNet Lounge;Community | Hi, I need your guys help for a color theory final. I have a survey about Game art covers and what kind of emotion they invoke in you, and how the difference might correlate with Rated everybody and rated mature games.It would really help me out :)Part 1:http://www.surveymonkey.com/s/6ZY8HHYPart 2:http://www.surveymonkey.com/s/6ZMBNGDThanks! | Any takers are much appreciated! ; So as a survey taker should I be basing my emotional response only on the colors or on the subject matter and content as well? I tried to just stick to colors during the first survey but I know I have a tendency to look at subject and content just out of habit which may easily bias my opinion. As well, some of these games I have played while others I have not. This may in fact dictate my emotional resaponse far more than anything else. For example, I tend to mark 'other' for games I have never played as a picture on a box isn't enough information for my jaded and cynical personality to make a decision ;)I also think the choices seem rather limited. There is no 'excited', or 'uninterested' choice. ; Well, honestly, you can vote based on whatever context you feel appropriate. It probably should be based on color, but I dont' care to much! out of all of my classes, this one has the most difficult final.But thank you for taking the time to fill it out ; There's a picture of around 30 box art covers for video games and everyone is blue and gold. It's becoming a very common color. Normally blue on the top and gold on the bottom. I'd have to search for the image again though.[Edited by - Sirisian on December 14, 2009 9:49:43 PM]; Bump. I finally found that image randomly. I guess it has movies in there too.; Maybe it's due to the opponent-process theory where yellow and blue are opposites, thus creating more contrast as a bluish-yellow does not seemingly exist? ;Quote:Original post by SirisianImage SnippedDonkey Punch...the movie! WTF???;Quote:Original post by cyansoftQuote:Original post by SirisianImage SnippedDonkey Punch...the movie! WTF???the best part is that it is what you think it is. |
How to design a pseudo 3d game? | For Beginners | Currently, I'm making a 2d platform game in C++ with Box2d for physics.I have an EntityManager class, which is basically an entire instance of the game encapsulated. In addition to updating and drawing entities, it transforms input into commands for the player, plays music, saves the game, etc. When the player enters a new room, the EntityManager deletes all existing entities except the player, loads the entities of the new room, and then adds the player back.However, one of my level concepts requires major changes to this design. I'm trying to figure out the best way to redesign my game.I want the game to occur in multiple planes in a sort of 3d effect. Entities can be swapped between the planes but otherwise, the physics on each one happens independently.I guess what I want is pretty similar to the game Time Fcuk.So how can I redesign my game to make this effect possible? I'll probably need a different b2World instance for every plane of every level, as well as a separate list of entities, but I have no idea how to accomplish the swapping.I was also thinking of trying to decouple the entity groups from the game instance, so that I could preload the group of entities associated with a room to speed up room transitions. But the problem is that the entities need access to the game instance so that they can use callbacks to save the game, play sounds, unlock secret items, etc. | |
Draw on texture in HLSL | For Beginners | Im new to xna and dont understand some of it so bare with me :P i have a project where i need to draw a road on some terrain. i tried just creating some triangles with a road texture but it didnt work very well because the terrain would poke through in some places, so i decided the best approach would be to draw the road right onto the terrain. i tried setting the render target to a texture and drawing the terrain and road to that, and then setting the terrain texture to that texture... but it didnt work. I want to know if its possible to draw the road to the texture in the HLSL code, and if it is i would like to know how. Any help would be awesome! | |
Retrieving Window UI graphical components | General and Gameplay Programming;Programming | I'm doing a gpu accelerated ui interface and I want some of the controls to have the same feel as the current Windows theme. I'm wondering how I can do this, or how I can get the images that Windows uses to draw its user interface. | This article should shed some light on the question [smile] |
Hex Numbers... O_o | For Beginners | Hex numbers go 0 1 2 3 4 5 6 7 8 9 A B C D E F 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F But after 9, what numerical values do the letters have? Is it going 10, 11, 12, 13, 14, 15, 10, 11, etc? | Yes, 0x0A (base 16) equals 10 (base 10); Hex -> Decimal system conversion table:A -> 10B -> 11C -> 12D -> 13E -> 14F -> 15But 10 in hexadecimal means (1 * 16 + 0)=16 in decimal system thus SIXTEEN.The same for 11 in hexadecimal that is (1 * 16 + 1)=16 in decimal system thus SEVENTEEN.In hexadecimal (and also in binary or octal systems) you should read each digt/letter by itself starting from left.To convert hexadecimal values to decimal numbers you just have to sum all digits/letter multiplied each for a 16 factor (2 in binary, 8 in octal) power by position (0 is power of most right digit/letter, 1 is power of the second most right digit/letter and so on). ; Thx alot. :D |
Cloth in MMORPG game | For Beginners | Sorry for my bad English.Hello I made my character for my MMORPG game. It doesn't has any cloth so I want to make cloth, shorts, hat, etc. I don't want to bind these in modeling tool. I know I must separate it and bind it when program but if I set cloth position same character when my character playing animation e.g. attack monster you'll see cloth isn't following body. Is anyway to solve this. Thank you.PS. I don't want to use cloth in Physic Engine. | I assume you want cloth on your characters, but you are separating it out into another file for the sake of being able to turn random clothing items on and off. The best you can do, if you don't want to simulate it, is to have matching animations for cloth. So, you'd animate the cloth along side every animation for your character, and in game play the matching anims on both at the same time.; If your game is 2D, then you will be having to draw and redraw your clothing in each position, and render the clothing ontop of the character.If your game is a keyframe-based 3D, you will be effectively doing the same thing. If your game is a skeleton-based 3D, then just map the clothing to the skeleton, and you get all the animation for free.Chances are though that even if your game is a keyframe-based 3D, the animation authoring side of things is a skeleton-based 3D, so you would just use your authoring tool to spit out the keyframes.If you're looking for realistic cloth simulation, then that is another story entirely. It is also a huge topic in it's own right, and has very little to do with actual rendering. |
Game Dev Think Tank | Old Archive;Archive | Team name:Game Dev Think TankProject name: none yetBrief description:Hello, my name is Nick Rodriguez. I am looking to put together a think tank of passionate game developers of all different skill-sets. As a group, we will design, develop, and sell video games and video game technology using C++ with DirectX/OpenGL. My goal is to bring a group of self-motivated developers together to produce great products that we as well as gamers would love to play. I do have some ideas for beginning projects, but I would like to make any initial concept decisions as a team. Target aim:retail/PC-downloadCompensation:Percentage of potential revenueTechnology:C++DirectX/OpenGLPhotoshop/PainterMaya/3DS Max/Lightwave3DZbrush/MudboxVisual Studio/Dev-C++/Code::BlocksTalent needed:Concept Artist - experience with Photoshop/Painter, strong foundation in the traditional arts (figure drawing, landscape painting, and illustration)Programmer - knowledge of C++, experience with DirectX/OpenGL, understanding of game programming logic, knowledge of 3D engine architecture and systemsMusic Composer - experience with a musical instrument, ability to write original compositions and to create music for various moods or genresSound Engineer - ability to create realistic sound effectsGame Designer - experience with designing games, strong creativity, understanding of the game design process, basic understanding of programming and art fundamentals 3D Artist - fluent in 3DS Max, Maya, Lightwave3D or other top-rate 3D modeling application, knowledge of photoshop, ability to model, texture, or animate next-gen models, ability to translate concepts or reference materials into 3D game content, knowledge of Zbrush or Mudbox is a plus2D Artist - knowledge of Photoshop or other powerful raster-based application, ability to create realistic pixel art, ability to create sprites, tiles, backgrounds, or textures for 2D and 3D gamesWeb Developer - proficiency in XHTML, CSS, and maybe javascript, knowledge of web design fundamentals, ability to produce mock-ups and write HTML/javascript/CSS from scratchTeam structure:Me (Nick Rodriguez) - Project Lead, Programmer, 3d artistWebsite:Currently in developmentContacts:nrodballer13@hotmail.comPrevious Work by Team:noneAdditional Info:If you're interested in joining the team or have questions, please leave comments or email me at nrodballer13@hotmail.com.Feedback:ANY | |
Programming Language - 3d games | For Beginners | I was wondering what programming language I should learn first if I want to get into programming 3d games.I am pretty new to programming although i do now a little bit of visual basic.net but other then that there is nothing else | If you are on windows C# and XNA Game Studio will work. Very easy setup to use.I would recommend focusing on learning C# first tho. The download for XNAGS and Visual C# express 2008 are both on this link below.XNA GS; C++ is the language that is widely used for 3D game programming. If you go for Java, there's a great software called Unity which uses Java, and can also use C#, and a dialect of Python called Boo. DarkBASIC is another language that is geared specifically for game programming, and is based off of BASIC, but it is somewhat limited in some areas. Just remember this, whatever language you do choose, stick with it! Don't drop before even using it. Try it out, and then you can switch later if you really don't like it. Also, what are you looking for in the programming language? Ease of use, power, etc, etc? |
Need some advice | Engines and Middleware;Programming | I have started working on my own MMO Engine. I have a working Authentication Server, World Server, Client, AI Client. They all work together and you can have multiple people on the serevr, see each other, and talk to each other. I got discouraged on it when I ran into some problems with getting combat working and so I switched to Multiverse where I could just focus on game logic and not have to deal with making the engine as well. However now comparing screenshots and discovering I am going to have to redo a bunch of code just to get the database working better I am having 2nd thoughts that maybe making my own engine in the long run is the best choice. Multiverse hardly ever gets updated where as with my own engine we could add the features as we needed them and wouldn't have to wait for them to be added. What do you guys think? Which way would be the best stick with multiverse or continue our own engine? | One vote for continue.Best to know exactly how your engine works and fix problems, than trying to find work-arounds for other engines.Looks like if you go down the premade engine route more problems will arise.But hey, might work for you, just thought i'd give my 2 pence.PureBlackSin ; Thanks. I really am thinking that our own engine would be the best choice. I have to talk it over with our other programmer though. He is a professional Java Programmer but the servers and client for the engine i was making uses Raknet for networking so it is all done in C++. I need to see if he would be willing to work with C++ instead of Java. I would not be able to continue the engine if it ended up just being me working on it. Way to much to do for 1 person. ; I have to say if you got as far as you did with your own engine you are in great shape. That is a lot of work and a huge accomplishment. Sure you hit a road block but that is the life of game development. We all hit our own road blocks. Just push through it research if you must. But if I got as far as you did with my own engine I would feel really bad about abandoning it. I say stick with your own engine. |
[HLSL] [XNA] Diffuse light direction doesn't work correctly. | Graphics and GPU Programming;Programming | Hi folks,I am currently trying to implement some simple diffuse lighting into my game and have come across a odd problem.The direction of the light produces incorrect results.Currently I have the following inputs, along with my vertex and pixel shader:struct VertexShaderInput{ float4 Position : POSITION0; float2 TexCoord: TEXCOORD0; float3 N: NORMAL0; float4 Color: COLOR0; };struct VertexShaderOutput{ float4 Position : POSITION0; float2 TexCoord: TEXCOORD0; float3 L: TEXCOORD1; float3 N: TEXCOORD2; float4 Color: COLOR0; };struct PixelShaderOutput{float4 Color: COLOR0;};//=============================================//------------ Technique: Default -------------//=============================================VertexShaderOutput VertexShader(VertexShaderInput input){ VertexShaderOutput output; output.Position = mul(input.Position, xWorldViewProjection); output.TexCoord = input.TexCoord; output.Color = input.Color; // Will be moved into PixelShader for deferred rendering float3 lightDirection = float3(0.0f, 1.0f, 0.0f); output.L = normalize(lightDirection);// Light Direction (normalised)output.N = normalize(mul(input.N, xWorld));// Surface Normal (normalised) [World Coordinates] return output;}PixelShaderOutput PixelShader(VertexShaderOutput input){PixelShaderOutput output;// [Ambient Light] I = Ai * Acfloat Ambient_Intensity = 0.1f;float4 Ambient_Colour = float4(1.0f, 1.0f, 1.0f, 1.0f);float4 Ambient_Light = Ambient_Intensity * Ambient_Colour;// [Diffuse Light] I = Di * Dc * N.Lfloat Diffuse_Intensity = 1.0f;float4 Diffuse_Colour = float4(0.0f, 0.0f, 1.0f, 1.0f);float NdotL = dot(input.N, input.L);float4 Diffuse_Light = Diffuse_Intensity * Diffuse_Colour * saturate(NdotL);output.Color = (Ambient_Light + Diffuse_Light) * tex2D(TextureSampler0, input.TexCoord); return output;}A light direction of (1, 0, 0) produces the following incorrect result:however, the opposite direction (-1, 0, 0) produces no result:The same occurs for (0, 1, 0) with a negative y direction (0, -1, 0) producing no result:In all cases the original texture is chequered white/grey and the diffuse light is blue.Can anyone please tell me what I have done wrong?Thank you. | Well the "L" vector in your typical diffuse lighting calculations actually refers to a vector that points from your surface towards the light...this is because your normal also points away from the surface. So for a directional light you should actually use the opposite direction you want the light to face. Also on a side note...if you pass along direction vectors from your vertex shader to your pixel shader, you'll want to re-normalize them in the pixel shader. This is because linear interpolation between two normalized vectors will not result in a normalized vector...draw it on a piece of paper if you want to see why.As for why your light isn't forking for negative directions...I'm not sure. I'm not seeing anything in your shader code that would explain it. I would double-check that your vertex normals are correct for your mesh. ; hi,I cannot really help with the problem you have asked for although i notice your program solves a problem that i have been having. I notice you have used TexCoord to texture you sphere but where or how have u defined what TexCoords are for each point. i am currently using a mesh and D3DXCreateSphere.Thanks in advanceHellkite ; Normalize your normal in the pixel shaderUnsure why your negative directions don't work... Start debugging. Try outputting compress( NdotL ) to the screen to see what's happening;Quote:Original post by MJPAs for why your light isn't working for negative directions...I'm not sure. I'm not seeing anything in your shader code that would explain it. I would double-check that your vertex normals are correct for your mesh.Now that I have normalised the directions in the pixel shader, like you suggested, the negative directions work with no problems. I have left the vectors non normalised in the vertex shader though as they are not used, is this ok?Quote:Original post by MJP Well the "L" vector in your typical diffuse lighting calculations actually refers to a vector that points from your surface towards the light...this is because your normal also points away from the surface. So for a directional light you should actually use the opposite direction you want the light to face.Should the diffuse light equation then become:float NdotL = dot(input.N, -input.L);or should I negate the input light direction instead?The vertex/pixel shaders now look like the following:VertexShaderOutput VertexShader(VertexShaderInput input){ VertexShaderOutput output; output.Position = mul(input.Position, xWorldViewProjection); output.TexCoord = input.TexCoord; output.Color = input.Color; // Will be moved into PixelShader for deferred rendering float3 lightDirection = float3(1.0f, 0.0f, 0.0f); output.L = -lightDirection;// Light Direction output.N = mul(input.N, xWorld);// Surface Normal [World Coordinates] return output;}PixelShaderOutput PixelShader(VertexShaderOutput input){// If you pass along direction vectors from your vertex shader to your pixel shader, you'll want to re-normalize them in the pixel shader. // This is because linear interpolation between two normalized vectors will not result in a normalized vector...PixelShaderOutput output;// [Ambient Light] I = Ai * Acfloat Ambient_Intensity = 0.1f;float4 Ambient_Colour = float4(1.0f, 1.0f, 1.0f, 1.0f);float4 Ambient_Light = Ambient_Intensity * Ambient_Colour;// [Diffuse Light] I = Di * Dc * N.Lfloat Diffuse_Intensity = 1.0f;float4 Diffuse_Colour = float4(0.0f, 0.0f, 1.0f, 1.0f);float NdotL = dot(normalize(input.N), normalize(input.L));float4 Diffuse_Light = Diffuse_Intensity * Diffuse_Colour * saturate(NdotL);output.Color = (Ambient_Light + Diffuse_Light) * tex2D(TextureSampler0, input.TexCoord); return output;}Thanks for your help Matt. ; I would negate the light direction up in the application code somewhere so the right thing is set to the shaderAs well as setting it as a pixel shader parameter so you don't waste an interpolator sending a constant |
Parse a texture type from a text file | Graphics and GPU Programming;Programming | So for the past week I have been doing my best to create a way to load my game from a map file. So far, so good actually, except I have run into one little snag. I am trying to use my text file to tell my game which LPDIRECT3DTEXTURE9 to use, and it will not work. On a related note, I decided to use a third party parser called Daabli, and it works great except for the fact that it will not parse the texture name. So far I have gotten it to use a string that converts to a LPCSTR to get the texture location, but I have no idea of how to get the LPDIRECT3DTEXTURE9 to load... I tried a reinterpret_cast<LPDIRECT3DTEXTURE9>(with an lpcstr) and it returns an error. I have a second text file that loads the sets of textures, but since I can't parse the LPDIRECT3DTEXTURE9 from the file I can't load the set of textures I want... I have the feeling that I'm going about this the wrong way... So any guidance would be incredibly helpful!File looks as such: {{x=0.0;y=0.0;z=0.0;texdword=0;startvert=0;endvert=2;Texture = "g_pTexture";},{x=0.0;y=0.0;z=0.0;texdword=0;startvert=4;endvert=2;Texture = "g_pTexture";},etc...}the "g_pTexture" does do nothing, so I hard code the texture name for now...texture file:{ {Location = "textures/ground/ground01.bmp"; Texture = g_pTexture;}}The second param is supposed to create a texture with the Location... and does not due to the fact that it will not parse the second param.I do know this because I made a simple parser in the console with Daabli, and it just says that the pointer is unrecognized...My two ideas are: Either make it parse the file straight with LPDIRECT3DTEXTURE9, or parse file and convert the types. Ideas? | Quote:Original post by gothiclySo far I have gotten it to use a string that converts to a LPCSTR to get the texture location, but I have no idea of how to get the LPDIRECT3DTEXTURE9 to load... I tried a reinterpret_cast<LPDIRECT3DTEXTURE9>(with an lpcstr) and it returns an error. That's not how you load textures :) Right now you only have the filename of the texture you want. You then need to explicitly load the texture data using something like D3DX's D3DXCreateTextureFromFile function. See the 'Loading A Texture' section of this tutorial.It sounds like that's the missing link in your set up, so hopefully it all falls into place from there. ; What I mean, is that I have a string for the loading of the location, and I was parsing the other variable, and it wouldn't work, so I tried using a lpcstr and it did not work... So, I guess my main question would be, how do you parse the LPDIRECT3DTEXTURE9 for a text file?I can load textures hard coded fine, it's just specifying multiple ones in external files that is the problem. ; If you have the filename of the texture in a string, and have the ability to load textures from hard-coded locations, it should just be a matter of using the same texture loading code you are currently using, but supplying it with the previously mentioned filename string. There should otherwise be no difference in operation.Not sure what you mean by "parse the LPDIRECT3DTEXTURE9 for a text file".. generally you only store image filenames and some other associated information for textures in game data files, like you are already doing.The only thing I can see otherwise is that you might be missing "s in your second file, the texture one:Quote:texture file:{{Location = "textures/ground/ground01.bmp"; Texture = "g_pTexture";}}FAKE EDIT: Oh, I think I see what you're getting at now. You are asking how to associate the textures mentioned in the objects (?) in your first file to the filenames in the second file?If so, specifying something like "g_pTexture" or whatever variable name in your config file alone won't do what you need - you need to handle this storage/association part yourself.What you could do is have a texture file like this (never used Daabli before, so bear with any silly mistakes):{ {Location = "textures/ground/ground01.bmp"; ID = "ground1"; }, {Location = "textures/ground/ground02.bmp"; ID = "ground2"; }, {Location = "textures/something/whatever.bmp"; ID = "whatever"; }, ... etc ...}.. and have a object file like this:{ {x=0.0;y=0.0;z=0.0;texdword=0;startvert=0;endvert=2;Texture = "ground1";}, {x=0.0;y=0.0;z=0.0;texdword=0;startvert=4;endvert=2;Texture = "whatever";}, ... etc ...}So you have a list of texture information (a filename and ID for each), and game objects can refer to what texture they need by using one of those IDs.At runtime, you load/parse the texture info file. You then go through each of the entries, loading the image from the specified filename using whatever texture loading mechanism (i.e., using D3DX as mentioned before), and store the LPDIRECT3DTEXTURE9 in a std::map, with the keys being the texture IDs.When you are loading the game objects, you can look up the texture IDs of each in that std::map and retrieve a LPDIRECT3DTEXTURE9 for each. Each texture will only be loaded once, and objects that need the same texture can share the same LPDIRECT3DTEXTURE9. ;Quote:Original post by mattdSo you have a list of texture information (a filename and ID for each), and game objects can refer to what texture they need by using one of those IDs.At runtime, you load/parse the texture info file. You then go through each of the entries, loading the image from the specified filename using whatever texture loading mechanism (i.e., using D3DX as mentioned before), and store the LPDIRECT3DTEXTURE9 in a std::map, with the keys being the texture IDs.When you are loading the game objects, you can look up the texture IDs of each in that std::map and retrieve a LPDIRECT3DTEXTURE9 for each. Each texture will only be loaded once, and objects that need the same texture can share the same LPDIRECT3DTEXTURE9.I obviously agree with your post, but I'd like to add another option which looks easier and faster.If OP used numbers instead of strings...{ {Location = "textures/ground/ground01.bmp"; ID = 0; }, {Location = "textures/ground/ground02.bmp"; ID = 1; }, {Location = "textures/something/whatever.bmp"; ID = 2; }, ... etc ...}... there would be no need to store a string in the object file:{ {x=0.0;y=0.0;z=0.0;texdword=0;startvert=0;endvert=2;Texture = 0;}, {x=0.0;y=0.0;z=0.0;texdword=0;startvert=4;endvert=2;Texture = 2;}, ... etc ...}This way OP could use a simple std::vector instead of a std::map.Furthermore, the ID could be made implicit if the loading order is fixed.So, it would be even simpler:1- load all textures without IDs, just adding them to a texture vector2- get the texture ID from the object file and use it to load the correct texture from the texture vector; The only problem with using a std::vector is maintainability.Adding new textures would be OK, just add them with the next highest ID available (or at the end of the list if using the implicit numbering idea). When you want to remove textures however, you end up with a gap in the ID numbering, and wasted space in the std::vector. One gap might not be a problem, but it could easily add up, leading to a fragmented ID space as development of the game content progresses. You could of course fill in the gaps by renumbering the IDs to be contiguous again, but then you have the problem of having to renumber the texture IDs in the objects file too.Implicit numbering has the last problem when removing textures too - all the textures past the removed one shift up one location, meaning you need to renumber the object texture IDs. ; Daabli will not create your DirectX texture for you and pass back a pointer; you'll have to do that yourself, as mattd has mentioned above.Some pseudocode:If you have your object defined like this:// Object information structurestruct Object{ float _x, _y, _z; int _texdword; int _startvert, _endvert; std::string _textureName; LPDIRECT3DTEXTURE9 _pTexture; const bool Read(Daabli::Reader &r) { _pTexture = 0; return r.Read( "x", _x ) && r.Read( "y", _y ) && r.Read( "z", _z ) && r.Read( "texdword", _texdword ) && r.Read( "startvert", _startvert ) && r.Read( "endvert",_endvert) && r.Read( "textureName", _textureName ); }};And your texture defined like this:// Texture information structurestruct TextureInfo{ std::string _location; std::string _textureName; const bool Read(Daabli::Reader &r) { return r.Read( "location", _location ) && r.Read( "textureName", _textureName ); }};Then you could read your textures and objects and associate them like this:int main(int /*argc*/, char * /*argv*/[]){ // Read the textures std::map<std::string, LPDIRECT3DTEXTURE9> texturesMap; { Daabli::Reader r; if( !r.FromFile( "textures.txt" ) ) return -1; std::list<TextureInfo> textures; if( !r.Read( "textures", textures ) ) return -1; // Create the LPDIRECT3DTEXTURE9 textures from the file names for(std::list<TextureInfo>::const_iterator itr = textures.begin(); itr != textures.end(); ++itr) { LPDIRECT3DTEXTURE9 pTexture = 0; // Create the texture from the filename //D3DXCreateTextureFromFile( // pDevice, // d3d device // (*itr)._location.c_str(), // filename // &pTexture ); // returned LPDIRECT3DTEXTURE9 texturesMap.insert( std::pair<std::string, LPDIRECT3DTEXTURE9>( (*itr)._textureName, pTexture ) ); } } // Read the objects std::list<Object> objects; { Daabli::Reader r; if( !r.FromFile( "objects.txt" ) ) return -1; if( !r.Read( "objects", objects ) ) return -1; // Assign the LPDIRECT3DTEXTURE9 textures to the objects for(std::list<Object>::iterator itr = objects.begin(); itr != objects.end(); ++itr) { (*itr)._pTexture = texturesMap[ (*itr)._textureName ]; } } // Use 'objects' here... return 0;}Where textures.txt could look like this:textures ={ { location = "ground.jpg"; textureName = "groundTex"; }, { location = "wall.jpg"; textureName = "wallTex"; }};And objects.txt could look like this:objects ={ { x=0.0; y=0.0; z=0.0; texdword=0; startvert=0; endvert=2; textureName = "groundTex"; }, { x=0.0; y=0.0; z=0.0; texdword=0; startvert=4; endvert=2; textureName = "wallTex"; }};;Quote:Original post by mattdThe only problem with using a std::vector is maintainability.Adding new textures would be OK, just add them with the next highest ID available (or at the end of the list if using the implicit numbering idea). When you want to remove textures however, you end up with a gap in the ID numbering, and wasted space in the std::vector. One gap might not be a problem, but it could easily add up, leading to a fragmented ID space as development of the game content progresses. You could of course fill in the gaps by renumbering the IDs to be contiguous again, but then you have the problem of having to renumber the texture IDs in the objects file too.Implicit numbering has the last problem when removing textures too - all the textures past the removed one shift up one location, meaning you need to renumber the object texture IDs.You're right, no doubt about that!IMHO those mainainability issues depend on how OP is going to load a level and the level of abstraction his "game level" has.From my POV one thing is to have a texture cacher/manager, another thing is to provide a list of textures for fast rendering of a game level.To my experience (but I might be wrong) the best thing to do is to always ask the cacher/manager to load textures (and store them in a map), using the full file path as a key (in case of a texture cacher with a vector, you can use a filename class member). The operations on textures are done via the manager (loading/unloading), while rendering is performed on a texture vector associated with that level.In theory, before loading each "level", the texture vector should be cleared.When a texture has to be loaded, we should ask the cacher to load it (if it's already loaded a valid * is already available to the cacher).If a texture can't be loaded (missing file or something else) the manager will return 0, and we can skip those invalid "object/tiles" with a simple test.Of course this thing is going to fail when you remove a texture from the manager, as the texture pointer stored in texture vector will still point at an invalid address.I can't see why somebody would want to unload a game level texture while the game is running, neither I expect this "feature" to produce something good onscreen... but nobody forbids OP to do something like that:mytexture *pTex = texturevector;pTextureManager->Remove(pTex);texturevector = 0;In that case all tiles/objects whose ID is 'i' will just disappear and the game will not crash.What's good is OP can do something like that easily:texturevector = pTextureManager->GetTexture(".//FooBar.jpg");ortexturevector = pTextureManager->GetTexturebyID(j);To sum up, my POV is a game level can safely access textures using relative (or implicit) IDs, since it is likely OP will need an higher level object (a cacher/manager) to do the dirty work of resource loading/releasing.In general I prefer vectors because the memory footprint of a map is more "obscure"... ; The higher-level texture cacher is a good idea.For clarification, my previous post was in the context of removing textures during development, not during runtime. For example, you might decide a texture was no longer needed in your game (maps/objects had been redesigned by an artist) and so you remove the entry from your texture config file.If this texture entry removal was done within an editor of some sort, numeric IDs pose no problem since the application can then quickly renumber any affected object texture IDs and write out the new map file. But if you're doing it by hand, it's not so nice. ; I agree, removing textures by hand when using a vector is going to be a nightmare![wink] |
a* on 3d enviroment | Artificial Intelligence;Programming | Hello,I'm trying to implement A-Star Pahtfinding on 3D enviroment (triangles).I have a set of triangles (a triangle represents a NODE) with connections between them (neighbours) all setup and ok.Now, to make it more faster i've created a NxN matrice in wich i have precalculated distances between center's of the triangles (distances between nodes, i.e cost) and stored these distance in this "matrice" i've mentioned. (it is the 3d distance between two 3D points).Here is this function wich precalculates all the distances between nodes: (all working ok until now...)void CAStarSearch::PrecalculateMatrix(){// get number of nodes from listint counter = Oct.m_NavNodeList.size();// allocate "NxN" grid of floats.this->matrix = (float **)malloc(sizeof(float) * counter );for(WORD x = 0; x<counter; x++){matrix[x] = (float *)malloc(sizeof(float) * counter );Oct.m_NavNodeList[x].m_ID = x;}// loop thru this grid of float's. // for every columnfor(WORD b=0; b<counter; b++){ // for every rowfor(WORD a=0; a<counter; a++){// if a==b this means that distance between nodes is zero (i.e same node).// else the "matrix" will be filled with distances between nodes.if(a == b) matrix[a] = 0;else // compute distance between nodes matrix[a] = Oct.m_NavNodeList[a].m_Center.GetDistance( Oct.m_NavNodeList.m_Center );}}// DisplayMatrix(); }OK, now after that i'm trying to do 3d Pathfinding like so:(i've commented the lines to be more readable)1) getting the G value (cost from ENTRY to current NODE):float CAStarSearch::GetG(CNavNode* last_closednode, CNavNode *node){// return distance from last_closednode to node ( and cumulate this in "ClosedListG" variabile. )return ClosedListG += this->GetMatrixValue( last_closednode, node);}NOTE: i keep track and store in a global "ClosedListG" variable the SUM of distances starting grom ENTRY to current NODE. (ClosedListG = the distance from ENTRY to current node )2) getting the H value (cost from current NODE to EXIT node):float CAStarSearch::GetH(CNavNode* current_opennode, CNavNode *target){// return distance between current_opennode and target node.return this->GetMatrixValue( current_opennode, target);}NOTE: this also just returns distance from "current_opennode" to "target" node looking up in "matrix" table .3) given a (open) list of nodes , select the one with lowest cost "F" ,assuming that all nodes in this list have F, G and H values calculated already:CNavNode* CAStarSearch::GetLowestF(CNavNode *target){list<CNavNode*>::iterator next = m_OpenList.begin();// select first node on open.CNavNode* SelectedNode = *next;// loop thru all nodes in OPEN list.for(list<CNavNode*>::iterator it = m_OpenList.begin(); it!=m_OpenList.end(); ++it){// chosen = current item in open.CNavNode* chosen = *it;// get lowest value here.if( chosen->m_F < SelectedNode->m_F){// select this one because it has a LOW value than previous one.SelectedNode = chosen;}}return SelectedNode;}4) the A-Star seach function now:void CAStarSearch::void CAStarSearch::FindPath(CVector3 *Start, CVector3 *Target){// get current NODE for entry, result is stored in "entry" variable (entry = start position in nodes list)CNavNode entry;bool foundEntry = false;Oct.FindNode(*Start, Oct.m_pRoot , entry , foundEntry );// get current NODE for exit, result is stored in "exit" variable (exit = goal in nodes list)CNavNode exit;bool foundExit = false;Oct.FindNode(*Target, Oct.m_pRoot , exit , foundExit );// GetMatrixValue returns distance between 2 nodes. (all values have been precalculaded before // entering this function - and stored in a "N x N" grid (of floats).if(this->GetMatrixValue(&entry,&exit)==0) return;// clear CLOSED list and OPEN list.m_ClosedList.clear();m_OpenList.clear();// ClosedListG = path from ENTRY point to CURRENT node. // (it is the G value from A-star, and represents distance from ENTRY point node to CURRENT node.// For now ClosedListG is 0 ( it's value is computed and kept track in GetG() function )this->ClosedListG = 0;// add ENTRY yo CLOSED list.m_ClosedList.push_back(&entry);// add ENTRY's CONNECTIONS to OPEN list.for(BYTE c=0; c<entry.m_NoConnections; c++){entry.pConnection[c]->m_G = GetG(&entry, entry.pConnection[c]);entry.pConnection[c]->m_H = GetH(entry.pConnection[c], &exit);entry.pConnection[c]->m_F = entry.pConnection[c]->m_G + entry.pConnection[c]->m_H;m_OpenList.push_back(entry.pConnection[c]);}// as long as OPEN list is NOT empty (0).while(!m_OpenList.empty()){// select a NODE with lowest F value from OPEN list.CNavNode *current = this->GetLowestF(&exit);// have we reached exit (goal node) ??if(this->GetMatrixValue(current ,&exit)==0) break;else{// add current NODE to CLOSED list.m_ClosedList.push_back(current);// remove current NODE from OPEN list.m_OpenList.remove(current);// for every CONNECTION in current NODE.for(BYTE c=0; c<current->m_NoConnections; c++){// does it exist in OPEN list ? if YES -> skip if(Exist(current->pConnection[c], m_OpenList)) continue;// does it exist in CLOSED list ? if YES -> skip if(Exist(current->pConnection[c], m_ClosedList)) continue;// compute current's CONNECTION's -> F,G,H values.current->pConnection[c]->m_G = GetG(current, current->pConnection[c]);current->pConnection[c]->m_H = GetH(current->pConnection[c], &exit);current->pConnection[c]->m_F = current->pConnection[c]->m_G + current->pConnection[c]->m_H;// add above selected (low score) node to CLOSED list.m_OpenList.push_back( current->pConnection[c] );}}}// used "nodez" variable here - just to display how many nodes were found when reached goal node.extern int nodez;nodez = m_ClosedList.size();// draw all nodes in CLOSED list.DrawClosedList();}NOTE: i call "FindPath" function every frame !5) and last function that checks if a node exists in list:bool CAStarSearch::Exist( CNavNode *test_node, list<CNavNode *>lst ){// test if empty list if(lst.size()==0) return false;list<CNavNode*>::iterator it = lst.begin();// loop thru all nodes in "lst" while(it!=lst.end()){// check if equal here , if YES return true.CNavNode *chosen = *it;if(chosen == test_node) return true;it++;}return false;}PROBLEMS: 1) Search time (from ENTRY to EXIT) is slow (if m_ClosedList has more than 3 to max 50 nodes - the FPS drops from 1400fps to 60fps). Is it because of the STL list functions wich are somekind slowing things down ?? What i'm doing wrong ? 2) Don't know if i'm using the correct algorithm/function for calculating H value (i.e. GetH()) . I just used DISTANCES from a node to another node for calculating this value (and stored them in "matrix" , i.e float distances between nodes). 3) I think i'm doing something wrong in A-Star Search Function because it seems that "m_ClosedList" ends with some nodes that DONT belong to path (this i think is due to the H value i've mentioned above).I know i've posted a lot of code and i appoligise for that !!(i could upload a screenshot but i dont know how...) Thank you , any sugestions will be apreciated. :)[Edited by - redbaseone on December 26, 2009 2:25:19 PM] | Hi, you may want to place your code between the source tags (http://www.gamedev.net/community/forums/faq.asp#tags). ;Quote:Original post by leet bixHi, you may want to place your code between the source tags (http://www.gamedev.net/community/forums/faq.asp#tags).all done. thank you. please escuse me , im new to this forum. :) ; OK, seems that i've found the solution for PROBLEMS 2) and 3). The heuristic function works just fine!I've missed that i have to recalculate the F,G,H for all the EXISTING nodes in OPEN list (for a certain step in FindPath - in the while loop).Here is the function again corrected: void CAStarSearch::FindPath(CVector3 *Start, CVector3 *Target){// get current NODE for entry, result is stored in "entry" variable (entry = start position in nodes list)CNavNode entry;bool foundEntry = false;Oct.FindNode(*Start, Oct.m_pRoot , entry , foundEntry );// get current NODE for exit, result is stored in "exit" variable (exit = goal in nodes list)CNavNode exit;bool foundExit = false;Oct.FindNode(*Target, Oct.m_pRoot , exit , foundExit );// GetMatrixValue returns distance between 2 nodes. (all values have been precalculaded before // entering this function - and stored in a "N x N" grid (of floats).if(this->GetMatrixValue(&entry,&exit)==0) return;// clear CLOSED list and OPEN list.m_ClosedList.clear();m_OpenList.clear();// ClosedListG = path from ENTRY point to CURRENT node. // (it is the G value from A-star, and represents distance from ENTRY point node to CURRENT node.// For now ClosedListG is 0 ( it's value is computed and kept track in GetG() function )this->ClosedListG = 0;// add ENTRY yo CLOSED list.m_ClosedList.push_back(&entry);// add ENTRY's CONNECTIONS to OPEN list.for(BYTE c=0; c<entry.m_NoConnections; c++){entry.pConnection[c]->m_G = GetG(&entry, entry.pConnection[c], 0);entry.pConnection[c]->m_H = GetH(entry.pConnection[c], &exit);entry.pConnection[c]->m_F = entry.pConnection[c]->m_G + entry.pConnection[c]->m_H;m_OpenList.push_back(entry.pConnection[c]);}int i=0;// as long as OPEN list is NOT empty (0).while(!m_OpenList.empty()){// select a NODE with lowest F value from OPEN list.CNavNode *current = this->GetLowestF(&exit);// have we reached exit (goal node) ??if(this->GetMatrixValue(current ,&exit)==0) break;else{// add current NODE to CLOSED list.m_ClosedList.push_back(current);// remove current NODE from OPEN list.m_OpenList.remove(current);// ******* FIX *************************************// recalculate costs for EXISTING nodes in OPEN list.for(list<CNavNode*>::iterator it = m_OpenList.begin(); it!=m_OpenList.end(); ++it){// chosen = current item in open.CNavNode* chosen = *it;chosen->m_G = GetG(current, chosen, current->m_G );chosen->m_H = GetH(chosen, &exit);chosen->m_F = chosen->m_G + chosen->m_H;}// *************************************************// for every CONNECTION in current NODE.for(BYTE c=0; c<current->m_NoConnections; c++){// does it exist in OPEN list ? if YES -> skip if(Exist(current->pConnection[c], m_OpenList)) continue;// does it exist in CLOSED list ? if YES -> skip if(Exist(current->pConnection[c], m_ClosedList)) continue;// compute current's CONNECTION's -> F,G,H values.current->pConnection[c]->m_G = GetG(current, current->pConnection[c], current->m_G );current->pConnection[c]->m_H = GetH(current->pConnection[c], &exit);current->pConnection[c]->m_F = current->pConnection[c]->m_G + current->pConnection[c]->m_H;// add above selected (low score) node to CLOSED list.m_OpenList.push_back( current->pConnection[c] );}}}// used "nodez" variable here - just to display how many nodes were found when reached goal node.extern int nodez;nodez = m_ClosedList.size();// draw all nodes in CLOSED list.DrawClosedList();}also, GetG() function modifies (not so much) : float CAStarSearch::GetG(CNavNode* last_closednode, CNavNode *node, int LastNode_GValue){// return distance from last_closednode to node ( and cumulate this in "ClosedListG" variabile. )return this->GetMatrixValue( last_closednode, node)+LastNode_GValue;}GetG() = takes one more parameter into account "LastNode_GValue" wich represents "last node"'s G Value (last NODE's G-value from CLOSED list).The path is correctly generated now with the function above corected !!(If you have any questions i'll gladly answer for how i've done that until now).correct way:other pics (some of them with not working algo'):http://img707.imageshack.us/g/pathfinding2.jpg/It remains just one problem : How do i make it faster ? STL::list is somekind slowing things down ? What should i do ? Please help ... ; Hi, I don't have the time to read all the code right now, but good job getting it to work! Persistence is important. You my want to consider replacing the std::list open list with a std::priority_queue or by using the heap functions.Also, why are you running this every frame? Do you really need to? If you have enough memory to store a lookup table between each node do you have twice that much space (you'd be able to store a complete path lookup table if so)?If you don't already know about it, you may want to take a look at AMD's free performance analyzing tool Code Analyst. It works with Intel CPUs too, but only certain features. ;Quote:How do i make it faster ? STL::list is somekind slowing things down ? What should i do ? Please help ...What compiler/IDE are you using? Are you measuring the performance of a debug build, or a release build?Also, if you're using Visual Studio and are using a release build, have you added the necessary preprocessor definitions to disable iterator debugging?I didn't look at the code, but in many cases std::vector can be a faster/better solution than std::list for reasons having to do with cache coherency and how the memory is managed internally. There are quite a few ways A* can be made to run faster, but a good first step is simply to choose appropriate container types.For what it's worth, I use std::vector along with the standard library's 'heap' functions (make_heap(), etc.) and have gotten good results (although the demands placed on the pathfinding code have been fairly light so far).In summary:1. Make sure you're testing with a release build.2. If you're using Visual Studio, make sure iterator debugging is turned off.3. Switch from list to vector if possible.4. Profile to see where the time is being spent (maybe this should be step 3 :) ;Quote:Original post by Ken SHi, I don't have the time to read all the code right now, but good job getting it to work! Persistence is important. You my want to consider replacing the std::list open list with a std::priority_queue or by using the heap functions.Also, why are you running this every frame? Do you really need to? If you have enough memory to store a lookup table between each node do you have twice that much space (you'd be able to store a complete path lookup table if so)?If you don't already know about it, you may want to take a look at AMD's free performance analyzing tool Code Analyst. It works with Intel CPUs too, but only certain features.First of all, please escuse me because my english is not very good. :)Thank you for replying. Up until now i didn't used std::list so much, but they are useful at least in debug phase and not only for me here in this application. I will take a look to priority_queue and i'll be back with more info.Regarding function callback - the function must be called at least 5 times per frame (this could speed things up a little). This is used because the "monster" constantly is searching for his "enemy" on the map.As for memory requirements, i think u are very right. If let's say i have a NavMesh with 5000 nodes this means i have a matrice wich holds distances between neighbours , and wich occupies: 5000x5000 x sizeof(float) = 5000 x 5000 x 4 = ~ 100MB if i'm not mistaken , wich is A LOT of memory waste !! :) But, for now i dont have as much nodes in my application, and thank you for observing that and must find a way also for fixing that. For now im concernig at speed and getting A-Star work right.Thank you again ! ;Quote:Original post by Ken SHi, I don't have the time to read all the code right now, but good job getting it to work! Persistence is important. You my want to consider replacing the std::list open list with a std::priority_queue or by using the heap functions.Also, why are you running this every frame? Do you really need to? If you have enough memory to store a lookup table between each node do you have twice that much space (you'd be able to store a complete path lookup table if so)?If you don't already know about it, you may want to take a look at AMD's free performance analyzing tool Code Analyst. It works with Intel CPUs too, but only certain features.First of all, please escuse me because my english is not very good. :)Thank you for replying. Up until now i didn't used std::list so much, but they are useful at least in debug phase and not only for me here in this application. I will take a look to priority_queue and i'll be back with more info.Regarding function callback - the function must be called at least 5 times per frame (this could speed things up a little). This is used because the "monster" constantly is searching for his "enemy" on the map.As for memory requirements, i think u are very right. If let's say i have a NavMesh with 5000 nodes this means i have a matrice wich holds distances between neighbours , and wich occupies: 5000x5000 x sizeof(float) = 5000 x 5000 x 4 = ~ 100MB if i'm not mistaken , wich is A LOT of memory waste !! :) But, for now i dont have as much nodes in my application, and thank you for observing that and must find a way also for fixing that. For now im concernig at speed and getting A-Star work right.Thank you again ! ;Quote:Original post by jykIn summary:1. Make sure you're testing with a release build.2. If you're using Visual Studio, make sure iterator debugging is turned off.3. Switch from list to vector if possible.4. Profile to see where the time is being spent (maybe this should be step 3 :)Thank you for reply ! :)I will run a benchmark now to see where the bottlenecks are ... :)Im using MSVC , debug build, preprocessor definitions to disable iterator debugging are ENABLED . will turn this off and see what results will came up. ;Quote:I will run a benchmark now to see where the bottlenecks are ... :)Im using MSVC , debug build, preprocessor definitions to disable iterator debugging are ENABLED . will turn this off and see what results will came up.Just to be clear, you should try benchmarking using *release* build, and with iterator debugging *disabled*. To disable iterator debugging, you need to add two preprocessor definitions at the project level; if I'm not mistaken, the definitions you need to add are _SCL_SECURE=0 and _HAS_ITERATOR_DEBUGGING=0.Maybe that's what you intend, or are already doing - I guess 'preprocessor definitions to disable iterator debugger are ENABLED' is the same as iterator debugging being disabled :)Anyway, before jumping to any conclusions about performance, make sure you're in release mode and that iterator debugging is off; then, if the performance is still not satisfactory, profile to determine where the bottlenecks are. |
AP Computer Science? | Games Career Development;Business | Hey there everyone. Merry Christmas. I just thought I'd ask for some information on AP Computer Science seeing as my school does not offer it but one is allowed to take the exam without taking the class and I may self-teach ( I wouldn't take the exam until Spring of 2011 as I'd have to learn everything in a very small amount of time). Basically, what does the exam cover? What does a class used to prepare for the exam focus on? How is the exam split up? What are all the concepts that I'd need to know for the exam? Lastly, do you think it is practical to try and self-teach in preparation for such an exam? PS: My school barely has any computer science at all. We lost computer science 2 due to lack of interest and barely have enough people a year for computer science 1 which could be taken Sophomore and up. | Have you checked the official description? Here it is for Computer science A: http://www.collegeboard.com/student/testing/ap/sub_compscia.htmlThe exam isn't too hard. I didn't take it, but I had planned on it. It turns out my school didn't do the necessary paperwork on time to order the exams and didn't tell me until it was too late. It covers what pretty much what I would expect someone would learn after one semester of an introductory Java course. If you have enough experience with Java, I don't think you'd need to spend a lot of time studying.If you have programming background and can take it, I'd really recommend doing it. The worst that can happen is that you pay for the test but don't score high enough to get college credit. The best is that you get an edge in college and start a class or two ahead, and that's a bigger deal (in my opinion) than it seems: it means more time for upper-level coursework, which is both more interesting and more important. ; Oh, it's in Java? I didn't know that. It seems then that it's not in my interest to take it as I'm not familiar in Java. I'm not sure if understanding c++ at all will help but I really don't understand Java too well and have most experience with c++. ;Quote:Original post by FujiOh, it's in Java? I didn't know that. It seems then that it's not in my interest to take it as I'm not familiar in Java. I'm not sure if understanding c++ at all will help but I really don't understand Java too well and have most experience with c++.If you are fairly competent with C++, you can be up to speed in Java in a couple of weeks - less if dedicated. I won a small web development contract some years back, realised at the last minute that the requirements document specified Java, and taught myself as I went along [smile]Almost every university computer science program teaches the first couple of introductory courses in Java these days, so whether or not you score well on the exam, you will be ahead of the curve if you learn Java. ;Quote:Original post by FujiOh, it's in Java? ... I'm not sure if understanding c++ at all will help but I really don't understand Java too well and have most experience with c++.If you can learn one language you can learn another. Truth be told, you're going to have to learn several computer languages anyway. Get used to it. ; In that case, I DO have a $45 gift card for Barnes and Nobel. Any books you can recommend that cover Java? I do have JCreator set up on my computer and I have dealt with C# and Java a little in the past. Either way, anything that strengthens my programming ability is something I am willing to consider. ; I'd say go for it. You'll need to know the material sooner or later.I don't know if this will interest you, but I personally learned Java by participating each year of high school in a competition at a nearby university using Robocode. I had a lot of fun developing AI for the robots, and I just picked up Java naturally as I went on using online materials. Robocode's just a very nice learning environment; you can get a lot of interesting results without too much effort, but to get the best results could take a month or more of work. ; I think the AP board made a new policy this year that students aren't allowed to take an AP exam if one hasn't taken the course. This is because in previous years, students who didn't take the course usually performed worse as a whole and thus raised the curve on the tests. ; The guy above is wrong, according to the College Board website... supportI took Comp Sci A in high school, with no knowledge of Java besides what I learned while prepping. Java is really quite similar syntactically to C++, and syntax is what's most important on A, or at least that's my opinion of the test (which is low, I finished in like 20 minutes and had to sit for 3 hours).I will also mention, however, that even though I got a 5, it didn't get me out of any college courses. My college, and from what I understand a lot of colleges, want the AB test, which focuses more on data structures. I didn't take that one, but a friend of mine without a Java background did and he did quite well. Course, he's brilliant, so it has to do with how good you think you are.I did most of my prep from this website: http://javabat.com/ . I found it really quite helpful, and it was pretty representative of the sorts of things I saw on the test (just not ALL of it, for instance there's no OOP). ; Related, I'm taking APCS this year.Is it true that the AB exam was dropped? The A exam is completely useless. Am I screwed? |
C++ Struct constructor problem | General and Gameplay Programming;Programming | Hello all,I have a little problem that's been nagging me, and I'm hoping somebody could shed some light on it. I have a simple struct declared/defined as so:struct XFileInfo{XFileInfo(): is32BitFloat( false ),isText( false ){}bool is32BitFloat;bool isText;};And then I create an instance of this struct on the stack within a function like this:void XFileLoader::LoadTemplatesFromFile( const char* filename ){std::ifstream xFile( filename );XFileInfo info();if (!ValidateXFile( xFile, info )){// invalid X filereturn;}}But the problem is, I get the following error from the VS compiler:1>.\XFileLoader.cpp(28) : error C2664: 'ValidateXFile' : cannot convert parameter 2 from 'XFileInfo (__cdecl *)(void)' to 'XFileInfo'1> No constructor could take the source type, or constructor overload resolution was ambiguousI'm not sure what the issues are with constructor overload resolution here. I defined a single default constructor, what is the ambiguity? Or is this a symptom of something completely different?Thanks much for any advice! | XFileInfo info(); <-- Function declaration (note: declaration, not definition).XFileInfo info; <-- variable declaration and construction. ; This line:XFileInfo info();This is a function declaration. C++ allows functions to be declared inside other functions. You can rewrite it as:XFileInfo info;Which is does call the constructor. ; I see, so if I had arguments to pass in it would be treated as a constructor call, but if I have no arguments and just parentheses it assumes that this is an inline function declaration. Is this correct? ; Yep, because then it couldn't be a function declaration. One of the rules in C++ parsing is along the lines of "if it can be a function declaration, parse it as such" |
Mobile Gaming ISV Kickoff Event at CES | Your Announcements;Community | On behalf of Connectsoft and event co-hosts Dell and Broadcom, we would like to invite game and mobile application developers to our ISV Kickoff Event at the Consumer Electronics Show in January to introduce a new wireless application platform. Please contact me at the following if you are interested in attending and/or learning more. David G. BrennerVP Marketing and Business DevelopmentConnectSoft, Inc.Direct / Mobile (214) 738-1099dbrenner@connectsoft.net | |
[win32/c++] Displaying Bitmap causes crash | General and Gameplay Programming;Programming | HelloI have made a simple win32 application that converts temperatures.Problem:I am displaying a bitmap image in a static control that is scaled usingStretchBlt(). But when the application runs it goes into an infinite loop,doesn't display the bitmap & crashes.I believe the problem is either to do with the static window where the bitmapis loaded to OR in the painting area.To make it easy to find where the problem occurs, I think its in the Windows Proceedure function in either:- WM_CREATE- WM_PAINT#include <windows.h>#include <cstdlib>#include <string>#include <stdio.h>#include "converter.h"using namespace std;const char g_szClassName[] = "myWindowClass";static HINSTANCE gInstance;HBITMAP header = NULL;bool convert = false;// Functions List //LRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);bool isEqual(double cel, double fahr);double findFahren(double cel);double findCel(double fahr);int WINAPI WinMain(HINSTANCE gInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow){ WNDCLASSEX wc; HWND hwnd; MSG Msg; //Step 1: Registering the Window Class wc.cbSize = sizeof(WNDCLASSEX); wc.style = 0; wc.lpfnWndProc = WndProc; wc.cbClsExtra = 0; wc.cbWndExtra = 0; wc.hInstance= gInstance; wc.hIcon = LoadIcon(NULL, IDI_APPLICATION); wc.hCursor = LoadCursor(NULL, IDC_ARROW); wc.hbrBackground = (HBRUSH)(LTGRAY_BRUSH); wc.lpszMenuName = NULL; wc.lpszClassName = g_szClassName; wc.hIconSm = LoadIcon(NULL, IDI_APPLICATION); // if registration of main class fails if(!RegisterClassEx(&wc)) { MessageBox(NULL, "Window Registration Failed!", "Error!", MB_ICONEXCLAMATION | MB_OK); return 0; } // Step 2: Creating the Window hwnd = CreateWindowEx( 0, g_szClassName, "Temperature Converter", WS_OVERLAPPEDWINDOW | WS_VISIBLE | SS_GRAYFRAME, CW_USEDEFAULT, CW_USEDEFAULT, 410, 200, NULL, NULL, gInstance, NULL); if(hwnd == NULL) { MessageBox(NULL, "Window Creation Failed!", "Error!", MB_ICONEXCLAMATION | MB_OK); return 0; } ShowWindow(hwnd, nCmdShow); UpdateWindow(hwnd); // Step 3: The Message Loop while(GetMessage(&Msg, NULL, 0, 0) > 0) { TranslateMessage(&Msg); DispatchMessage(&Msg); } return Msg.wParam;}// Step 4: the Window ProcedureLRESULT CALLBACK WndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam){ HWND btnConvert, fldCelcius, fldFaren, cbFtc, cbCtf; // Labels HWND stBgd, stBox, lbCelcius, lbFaren; switch(msg) { case WM_CREATE: { //load bitmap header = LoadBitmap(GetModuleHandle(NULL),MAKEINTRESOURCE(IDB_HEADER)); //if fails if (header == NULL) { MessageBox(hwnd,"Failed to load bitmap","Error",MB_OK); }// Create labels, buttons, edits etc. stBgd = CreateWindowEx( 0, "Static", "", WS_BORDER | WS_VISIBLE | WS_CHILD, 2,2, 390,160, hwnd,NULL, gInstance, NULL); // Window to load & display bitmap header stBox = CreateWindowEx( 0, "Static", "", WS_BORDER | WS_CHILD | WS_VISIBLE | SS_BITMAP, 10,10, 350,147, hwnd, (HMENU)IDT_TEXT, gInstance, NULL); fldCelcius = CreateWindowEx( 0, "EDIT", "0", WS_BORDER | WS_VISIBLE | WS_CHILD | ES_NUMBER, 20,80, 100,20, hwnd,(HMENU)ID_CELCIUS, gInstance, NULL); // Label lbCelcius = CreateWindowEx(0,"STATIC","Celcius",WS_VISIBLE | WS_CHILD,122,80,60,20,hwnd, NULL,gInstance,NULL); btnConvert = CreateWindowEx( 0, "BUTTON", "Convert", WS_BORDER | WS_VISIBLE | WS_CHILD | BS_PUSHBUTTON, 200,120, 100,20, hwnd,(HMENU)ID_CONVERT, gInstance, NULL); cbFtc = CreateWindowEx( 0, "BUTTON", "F-C", WS_BORDER | WS_VISIBLE | WS_CHILD | BS_AUTOCHECKBOX | BST_UNCHECKED, 80,120, 50,20, hwnd,(HMENU)ID_CEL, gInstance, NULL); cbCtf = CreateWindowEx( 0, "BUTTON", "C-F", WS_BORDER | WS_VISIBLE | WS_CHILD | BS_AUTOCHECKBOX | BST_CHECKED, 20,120, 50,20, hwnd,(HMENU)ID_FAHR, gInstance, NULL); fldFaren = CreateWindowEx( 0, "EDIT", "0", WS_BORDER | WS_CHILD | WS_VISIBLE | ES_NUMBER, // only take numbers 200,80, 100,20, hwnd,(HMENU)ID_FAHREN, gInstance, NULL); // Label lbFaren = CreateWindowEx( 0, "STATIC", "Fahrenheit", WS_VISIBLE | WS_CHILD, 302,80, 80, 20, hwnd, NULL, gInstance, NULL); }break; case WM_COMMAND: switch(LOWORD(wParam)) { case ID_CONVERT:{BOOL cSuccess;BOOL fSuccess;double celcius = GetDlgItemInt(hwnd,ID_CELCIUS,&cSuccess,true);double fahrenheit = GetDlgItemInt(hwnd,ID_FAHREN,&fSuccess,true);// if either GetDlgItemInt failsif (!cSuccess | !fSuccess) { MessageBox(hwnd,"Get numbers from text fields failed", "Error!",MB_OK);}if (!isEqual(celcius,fahrenheit)) { if (convert) { celcius = findCel(fahrenheit); SetDlgItemInt(hwnd,ID_CELCIUS,(int)celcius,true); } else { fahrenheit = findFahren(celcius); SetDlgItemInt(hwnd,ID_FAHREN,(int)fahrenheit,true); }} } break; default:break; } switch (HIWORD(wParam)) { case BN_CLICKED:{if (LOWORD(wParam) == ID_CEL) { if (SendDlgItemMessage(hwnd,ID_CEL,BM_GETCHECK,0,0) == BST_CHECKED) { convert = true; SendDlgItemMessage(hwnd,ID_FAHR,BM_SETCHECK,BST_UNCHECKED,0);} }if (LOWORD(wParam) == ID_FAHR) { if (SendDlgItemMessage(hwnd,ID_FAHR,BM_GETCHECK,0,0) == BST_CHECKED) { convert = false; SendDlgItemMessage(hwnd,ID_CEL,BM_SETCHECK,BST_UNCHECKED,0); }}}break;default:break; } break; case WM_PAINT: { BITMAP bm;PAINTSTRUCT ps; // To paint outside the update rectangle while processing // WM_PAINT messages, you can make this call: //InvalidateRect(hwnd,NULL,TRUE); HDC hdc = BeginPaint(GetDlgItem(hwnd,IDT_TEXT), &ps);HDC hdcMem = CreateCompatibleDC(hdc);HBITMAP hbmOld = (HBITMAP)SelectObject(hdcMem,header);GetObject(header, sizeof(bm), &bm);//BitBlt(hdc, 0, 0,346, 148, hdcMem, 0, 0, SRCCOPY); //SCALE BitmapStretchBlt(hdc,0,0,(int)(bm.bmWidth/7),(int)(bm.bmHeight/7),hdcMem,0,0,bm.bmWidth,bm.bmHeight,SRCCOPY); SelectObject(hdcMem, hbmOld);DeleteDC(hdcMem);EndPaint(hwnd, &ps); } break; case WM_CLOSE: DestroyWindow(hwnd); break; case WM_DESTROY: DeleteObject(header); PostQuitMessage(0); break; default: return DefWindowProc(hwnd, msg, wParam, lParam); } return 0;}bool isEqual(double cel, double fahr) {double result = (5.0 / 9.0) * (fahr - 32);// return if celcius equals fahr converted to celciusreturn (cel == result); }double findFahren(double cel) { return ((9.0 / 5.0) * cel) + 32;}double findCel(double fahr) { return (5.0 / 9.0) * (fahr - 32);}[Edited by - gretty on December 28, 2009 1:07:28 AM] | Give us some hints :)What information does the crash give you? Accessing an invalid memory location? If so, what location? What line does the crash point to?Also, try putting your code in [source] .. [/source] tags. ; That is not the correct way to use SS_BITMAP. Currently, you are trying to render the bitmap in the static control from within the parent window's WM_PAINT, for which you should not do. That BeginPaint call you have there is probably why it is crashing, since you pass it a window handle that is not the one receiving the current WM_PAINT message.In general, the static control renders the bitmap for you and you shouldn't have to paint it yourself. See below for proper use of SS_BITMAP.winmain.cpp#include<windows.h>static HINSTANCE basead = 0;LRESULT CALLBACK StdWndProc(HWND window, UINT message, WPARAM wparam, LPARAM lparam);int WINAPI WinMain(HINSTANCE instance, HINSTANCE, LPSTR, int){ basead = instance; WNDCLASS wc; ZeroMemory(&wc, sizeof(wc)); wc.style = 0; wc.lpfnWndProc = StdWndProc; wc.cbClsExtra = 0; wc.cbWndExtra = 0; wc.hInstance = instance; wc.hIcon = LoadIcon(0, IDI_APPLICATION); wc.hCursor = LoadCursor(0, IDC_ARROW); wc.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH); wc.lpszMenuName = 0; wc.lpszClassName = TEXT("MAINWINDOW"); if(!RegisterClass(&wc)) return -1; HWND window = CreateWindowEx(0, TEXT("MAINWINDOW"), 0, WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, 0, 0, instance, 0); if(!window) return -1; ShowWindow(window, SW_SHOW); UpdateWindow(window); MSG msg; while(GetMessage(&msg, 0, 0, 0)) { TranslateMessage(&msg); DispatchMessage(&msg); } return 0;}LRESULT CALLBACK StdWndProc(HWND window, UINT message, WPARAM wparam, LPARAM lparam){ switch(message) { case(WM_CREATE) : { HWND stbox = CreateWindowEx(0, TEXT("STATIC"), TEXT("IDRES_STBOX"), WS_BORDER | WS_CHILD | WS_VISIBLE | SS_BITMAP, 10, 10, 350, 147, window, 0, basead, 0); if(!stbox) return -1; break; } case(WM_DESTROY) : { PostQuitMessage(0); break; } default : return DefWindowProc(window, message, wparam, lparam); } return 0;}stdres.rc#include<windows.h>IDRES_STBOX BITMAP "stbox.bmp";Quote:Original post by mattdGive us some hints :)What information does the crash give you? Accessing an invalid memory location? If so, what location? What line does the crash point to?Also, try putting your code in [source] .. [/source] tags.I am very new to win32 so I dont know whats wrong or where But I believe the problems would be occuring in lines:- 89 to 118 (line 89 is "header = LoadBitmap....")OR- 257 to 279 (line 257 is "BITMAP bm;")To explain what I am trying to do:- I am trying to display a scaled bitmap in the window called stBox using StretchBlt(), although I have never done this so I dont know whats going wrong & why.; Also to add to my previous post, if you need to stretch the image, you can useSS_REALSIZECONTROL with MoveWindow to control how the image is stretched. You don't need to call StretchBlt since the static control is supposed to draw and stretch the bitmap for you. ;Quote:Original post by yadangoThat is not the correct way to use SS_BITMAP. Currently, you are trying to render the bitmap in the static control from within the parent window's WM_PAINT, for which you should not do. That BeginPaint call you have there is probably why it is crashing, since you pass it a window handle that is not the one receiving the current WM_PAINT message.In general, the static control renders the bitmap for you and you shouldn't have to paint it yourself. See below for proper use of SS_BITMAP.Thanks for ur reply :) I have compiled your code but it does not show the bitmap?I understand what you are saying tho. If I load a bitmap to the main client window using the conventional method, is there a way to control its depth? What I mean is I want the bitmap to appear infront of a static rectangular control.Presently if I load & display a bitmap on the main client window, it is displayed behind my controls(gray rectangle, edit boxes etc) so thats why I tried to load a bitmap to a window in order to control its depth & make it appear infront of other controls.So to sum up, is there a way to make a bitmap appear above/infront of a control? ;Quote:Original post by grettyQuote:Original post by mattdGive us some hints :)What information does the crash give you? Accessing an invalid memory location? If so, what location? What line does the crash point to?Also, try putting your code in [source] .. [/source] tags.I am very new to win32 so I dont know whats wrong or where But I believe the problems would be occuring in lines:- 89 to 118 (line 89 is "header = LoadBitmap....")OR- 257 to 279 (line 257 is "BITMAP bm;")To explain what I am trying to do:- I am trying to display a scaled bitmap in the window called stBox using StretchBlt(), although I have never done this so I dont know whats going wrong & why.With a little hacking (defining values for the resource identifiers), I got your program to compile and run fine on my machine. One thing I did change was to use a built-in system bitmap instead of one from a resource file with LoadBitmap. Are you sure your call to LoadBitmap is working OK?Do you know how to use a debugger? (Are you using Visual C++?) You should run your program in a debugger, and see the exact line that it crashes on.What happens if you comment out the WM_PAINT handler - does it still crash then? Take note of what yadango posted above about how you don't actually do the painting yourself, and the possible reason for your crash.EDIT: Looks like you got/are getting this bit sorted, so the above might not apply anymore.As an aside, your code for handling WM_COMMAND is a little strange; the two switches could be merged into one. Also, you should prefer to use radio buttons for the C->F / F->C selection, so you don't need to code that mutual-exclusion code there in the first place :) ; Thanks for all the help.I have made some sucess, I have drawn the bitmap but its being displayed behind other controls.Any adviced on how to make it appear infront of other controls?A side note, maybe its just me but using Yadango's code, I cant get the bitmap to appear? it just shows the border of the window. ; in my resource file, i defined a bitmap called stbox.bmp, create a dummy bitmap with that name in your solution/project directory and you will see the bitmap. |
Where do I get an artist from? | 2D and 3D Art;Visual Arts | Hi!I've made a nice flash game, and now looking for graphics.I intend to pay.It's more about user interface graphics since it's a card game, so, no sprites whatsoever.Note that this is probably going to be considered "version one" graphics, and more work might come afterwards.Is there a recommended website/company/artist to get this from? Maybe someone in here wants to make some bucks?Questions/Clarification/Answers/etc' in here or private.Thanks! | If you're looking to recruit an artist, you'll want to post in the Help Wanted forum while following the mandatory posting template. Good luck! ; You can also try the pixeljoint forums. They have a ton of people who specialize in pixel art.I don't know what type of game you've made however...http://pixeljoint.com/forum(Hey Dave! Long time no see!) ; Thanks for the link jrjellybean, seem to be a good place as well! |
Isometric engine | Graphics and GPU Programming;Programming | Hello,I have recently been working on a isometric engine in XNA. I have rendering working but on large maps (on my computer at about 500x500) is starts getting sluggish. The problem is the fact that all tiles are drawn regardless of whether they are on the screen.Right now I am looping through the entire array of tiles and checking whether the destination rectangle intersects with the graphics window rectangle. If so, then the tile gets drawn.I would however like to be able to determine beforehand which tiles are drawn and which are not so I don't have to loop through the entire array which is where I am losing the most performance right now.I haven't got a clue on how to start implementing this though. Any pointers would be greatly appreciated.Cheers! | You could implement some hierarchy like a quadtreeThis way, at the top level, you'll have 4 nodes to test for visibility, and rejecting one will reject 1/4 of all the tiles in your worldAlternatively, and probably a better approach is to calculate the tile at the top-left and bottom-right of the screen, and loop over those - that way you won't even need to test anything off-screen. Hopefully you can easily address tiles by X,Y so this is trivial |
Problems rendering to a surface | Graphics and GPU Programming;Programming | I'm porting my 2D game engine from SDL/OpenGl to DirectX 9.0c. I need to be able to create bitmaps and blit stuff on them, so I figure I need to render to a surface.I'm using the ID3DXRenderToSurface interface to handle the details about rendering. Problem is, this is VERY slow. I suppose it happens because my texture does not have D3DUSAGE_RENDERTARGET specified so the interface has to render to its internal texture, then copy to my texture. So I try putting the render target flag, but now it complains that it is not in the default pool, and that's not exactly better because that would mean that I have to re-render everything when my device is lost, and I might need to lock too. (But it fixes the speed problem if I put default.)There's also another problem with rendering to a surface: the parts where nothing was rendered on gets garbage like what was previously on the screen the last time I ran the engine.I doubt I'm the first one trying to do a simple 2D engine with DirectX 9.0c, so how is this usually done? | Anyone? I'm sorta blocked on that issue. ; Render on the D3DPOOL_DEFAULT surface, then copy it to a D3DPOOL_SYSTEMMEM surface yourself when you need it.And clear the surface after setting it before you do any rendering on it to avoid seeing video memory dumps. |
C/C++ programmer wanted for 2D SRPG project | Old Archive;Archive | Team NameCurrently untitledProject NameCurrently untitledBrief DescriptionA relatively small 2D fantasy SRPG project influenced by Exile, Fallout, Disgaea, Diablo, the Elder Scrolls.Target AimFree and possibly open source (will be discussed).CompensationExperience and an addition to your portfolio!TechnologyTarget platforms: Windows 98+, Mac OS X 10.0+, GNU/LinuxLanguages: C/C++ (engine), Lua (game logic)Graphics: OpenGL 1.1Audio: waveXxx/midiXxx (win), Core Audio (mac), OSS (lin)In addition, several open-source libraries will be used.Talent NeededC/C++ programmer for help with engine programming.Lua experience would help but is not required.Team StructureWe currently have a programmer (me), a story writer, an artist, a composer, a foley artist, a mapper, and everybody contributes to design via a wiki.Web SiteWe don't currently have a web site, as the team has just recently been formed. But I plan to make one in the near future. It will at least include a wiki and forums. With such a small team, SVN will not be necessary.ContactsMe: daggerbot@hotmail.comPrevious Work by TeamNone. This is a new team.Additional InfoWe already have most of the game mechanics figured out. The design is currently (sloppily) contained on a pocket wiki, which will be merged (in a more organized manner) into the online wiki. The story is pretty early in development, but the main focus as of now is writing the engine. The engine will be written in C/C++, and the game logic will be written in Lua. I was going to write the engine by my self at first, but it's proving to be a bit too much for me to handle on my own.For easy distribution, the game is contained in only two files: the engine executable, and an archive containing all Lua scripts and content. The game will first be released for Windows as .msi/.exe/.zip, then .app/.dmg for OS X, then finally .deb/.rpm/.tar.gz for Linux.FeedbackAny constructive feedback is welcomed. If you have any questions, or if you wish to help out, please email me, PM me, or reply to this thread. I will be checking all three frequently. Thanks for your time! | |
What books did developer read for game development in the 1990s? | For Beginners | I want to make a game But I wonder how game developers worked in the 1990s, how they made games, how they learning before the Internet became as widespread as it is today. etc.how do they know how to build game mechanics as character ability power up system?how they know to reverse engineering game competitor company.what book I should read? | As far as I know (not being a programmer myself), books on the subject started appearing in the early 2000s. Up to that point, it was “learn by doing” and tips from one another. ;The first book that came to mind was Tricks of the Game-Programming Gurus: Lamothe, Andre, Ratcliff, John, Tyler, Denise: 9780672305078: Amazon.com: Books, which was geared toward beginners/students/amateurs. There were others, but that's the best selling pre-2000. After that point in time, game development became a hot topic in the book publishing world. Even GameDev.net has a series - Beginning Game Programming: A GameDev.net Collection (Course Technology Cengage Learning): 9781598638059: Computer Science Books @ Amazon.com.Otherwise, in the professional realm a lot was “learn by doing” as Tom said, or through word of mouth on early Usenet/IRC/websites (pre-GameDev.net in 1999 - see About GameDev.net). ;Computers in that era didn't have an OS like we have today. The machine booted, and you were dropped in a command shell or in an interactive BASIC interpreter. You basically programmed directly at the metal. Video memory was directly accessible, by writing in a known address range you could make pixels appear at the screen in various colors. The “OS” had a corner in the memory too for its data, but nothing prevented you from poking around there. Lua, Python, C#, C++ didn't exist, ANSI-C was just invented (K&R book about that was in 1989 iirc). Assembly language of course did exist (with books) and was used.Monthly computer magazines were published for all types of home computers. Tips and tricks were exchanged in that way, also program listings were printed in those magazines that you could then enter at your own computer. Studying those listings, and trying things for yourself is how you learned. There was also technical documentation about the computer.If you want to enjoy that stuff, today there is a retro-computing movement, that lives in that era, except with slight more modern hardware but still no OS, etc.;Alberth said:Computers in that era didn't have an OS like we have today.In the 1990s there was MSDOS, Several versions of Windows, and of MacOS. And that's not all the operating systems of the nineties, most likely.Like Linux, for instance.;Tom Sloper said:Alberth said:Computers in that era didn't have an OS like we have today.In the 1990s there was MSDOS, Several versions of Windows, and of MacOS. And that's not all the operating systems of the nineties, most likely.Like Linux, for instance.Yep. There were things like Windows 95, Win 98, and at the time I was still using a Commodore Amiga (AmigaOS) .To deal with the original question “what game dev books was I reading in the 90s?” Back in that era, one of my favorites was : The Black Art of 3D Game Programming by André LaMothe. ;Abrash was the guy who did the Windows NT graphics subsystem and worked on Quake.https://www.drdobbs.com/parallel/graphics-programming-black-book/184404919 ;There are a couple of" history of video games" books, that track the rise of the medium and genre.Just google for them. ;GeneralJist said:There are a couple of" history of video games" booksThat's not what the OP is looking for.;Thanks all |
Choosing a career in AI programmer? | Games Career Development;Business | Hello everyone, my name is Ramon Diaz; I am currently studying Game development and programming at SNHU. I have taken the initiative to learn about a professional career in AI programming. I have a lot of gaps in my development in the short term. I have blueprint experience with AI but not enough to choose a career in this profession. I would like to know how I can be competitive leaving the university in 5 months after finishing my studies. I am looking for knowledge from all of you who have been in the industry for years. | Entry level? Know your algorithms, it will help you at interviews. If you have made demos it can help you get jobs, but the market is wide open right now and should be relatively easy to find work for the foreseeable future. Overall, it reads like you are on the right path. When you graduate and start looking for work, be open to any positions rather than just an AI specialty. Once you have a job it is easier to transition into whatever specialty you prefer.;Thank you. ;I would like to know how I can be competitive leaving the university in 5 months after finishing my studies.Talk about last minute. Create AI projects? Or A game with character behaviors? Pathfinding examples. Crowd movements. Anything really. Learn how navigation meshes work.;@dpadam450 Character Behavior is what I doing in the project at this moment. Everything related to AI programming.;@dpadam450 Is it the same when learning C++ in AI as visual scripting Blueprint? If I were to make a demo, what kind of programming should I focus on my attention? ;@frob It is important to have a portfolio? ;Not for programming. You will need to show you know how to do the work, but it is usually some interview questions and writing some code of their choice. If you have something you want to share with them, you can do it if you want. Having done fancy demos can sometimes help get interviews, and can help show your interest and abilities, but it is generally not needed. It does not hurt, unless you do it badly and therefore becomes a cautionary warning. Build it if you want. I have interviewed and hired bunches of programmers without portfolios. ;I'm studying AI at the moment, in terms of statistical learning. I've learned so much about AI over the past few weeks. Check out: https://hastie.su.domains/ISLR2/ISLRv2_website.pdfandMachine Learning with R: Expert techniques for predictive modeling, 3rd Edition |
Newbie desperate for advice! | Games Business and Law;Business | Hi allI'm new to the game development community and need some advice.I've created 2 educational games with a simple idea but are sufficiently challenging for all ages. These could be played on pcs or phones.Is it worth patenting any parts of the games?What would be the best way to monetize?How should I market the games? | hendrix7 said:I'm new to the game development communityReally? Your profile shows that you've been a member here since 2004, and your last activity was in 2007, asking about raycasting.hendrix7 said:Is it worth patenting any parts of the games?Probably not. Expensive and there will be hurdles, and possible lawsuits after the patent is granted (if it is).hendrix7 said:What would be the best way to monetize? How should I market the games?There are several threads here in the Business and Law forum about that. While you wait for more replies from the community, you can read up on those previous answers to those questions. Mainly, “you should have thought about that before you finished your games.” (You wouldn't be “desperate” now.) Good luck with your sales!;@hendrix7 Filing for a patent can be expensive, and you need to document the solution and how it separates from anything else. I have developed software that solved problems in a way that no other software does, but there is only a very small portion of that that can actually be patented. Even though you can file an application yourself, I would recommend hiring an experienced IP attorney. This too is very expensive, though, so you are best off doing this if this idea can provide millions in income. If it can't, then it's actually not that harmful if anybody copies it.You could look at registering trademarks, design and other parts of the games. This is cheaper, but it will protect you brand more than your idea or solution.Again, if this is something that could turn a real profit, it might be worth looking into. If not, it's a very costly waste of time.As for marketing - my day job is actually creating videos and commercials etc., so naturally that's the first thing that comes to mind.Make videos for social media or other platforms where your target audience is likely to see it. Oh, and you need to define a target audience. Know where they are, what they respond to, what their struggles are and how your product will solve their problems, enhance their life experience or in other ways contribute positively to their life.There are several other ways to do this, but the list exceeds my level of expertise in the area.;patenting is costly, and time intensive. As said above, it depends on a lot if it's worth it. ;@hendrix7 Nothing is worth patenting unless you're willing and able to defend your patent. There is no patent police; you're responsible for finding and prosecuting infrigement.What you're patenting has to be novel and non-obvious to a person skilled in the art. You called your idea ‘simple’ which makes me wonder if it's obvious or already in use.;@Tom Sloper Thanks TomI have been programming for a while but not games until now.Thanks for getting back and your advice, particularly patents.;@scott8 Thanks for your reply.I see. The play of the game utilises basic maths skills so I'm guessing it'll be difficult to identify anything that's unique. I suppose, in a similar way, it would be difficult to patent something like ‘Wordle’. Am I right? |
Hi I'm new. Unreal best option ? | For Beginners | Hallo everyone. My name is BBCblkn and I'm new on this forum. Nice to virtually meet you 🙂. One of my biggest dreams is to make my own videogame. I love writing design as in text on how my dream game would be. Now I got no skills to create it. But who knows what life will bring. Is Unreal the best program to have fun with an experience ? Obviously I prefer a simple but capable program. Not pre designed auto drop. Why not install Unreal and roam into it and see if anything happens.My favorite games are in the genre of Fantasy, usually stone age with magic. Dota, Homm, Diablo and the odd one out is the genius Starcraft 1. But I played plenty of different games, especially when I way younger. I don't game currently at all but designing gets my creative juices flowing and is so inspiring and fun. Thanks for having me guys | BBCblkn said:My name is BBCblknI am truly sorry for you. Even Elons daughter has a better name than that.BBCblkn said:Is Unreal the best program to have fun with an experience ?Give it a try, but it's not meant for total beginners.Starting small always is a good idea. 2D is easier than 3D. You could try GameMaker, learn some programming language, learn some math, move on to more advanced engines like UE or Unity… ;There's honestly no perfect program for beginners. If I had to compare Unreal though at my skill level, I would probably pick Unity. However, It really comes down to your needs, and how much programming you want to learn. Furthermore, I would also keep in mind other engines.;@BBCblkn I'd recommend Gamemaker studio 2 as a first engine. It's easy to learn and I haven't had a problem making my game ideas in it yet.There are some good tutorials on YouTube to follow to learn it. Do note you'll be limited to 2D games with GMS2.Bit late to the post, but I hope it helps;gamechfo said:Bit late to the postTwo months late. Always consider whether you honestly believe that a question asked long in the past is still awaiting an answer. Thread locked. |
How to publish a book? | GDNet Lounge;Community | Hello, So, over the holidays I finished my 1st book. Do any of yall writer types know where I can find:an editorpublisherIt's like 99% done, just need to know what to do next. Also, it's cross genre, so it doesn't necessarily fit the standard model. | You've given nowhere near enough information to get a final answer, but I can suggest next steps for you. (For background, I've worked as an author, co-author, editor, and ghostwriter on 9 books so far.)Publishing is a business deal. You need to figure out what business services you need.Do you even need a publisher? Do you need a distributor? You already mention needing an editor. Do you need marketing? Do you need retail agreements? Digital or physical? If physical, POD or offset, how many each of hard or soft, what size of print run can you afford? What business services do you need? Publishers have an awful lot of potential features of what they can provide and what those services cost.Once you know the list of services you actually need, your favorite bookstore will have books that have listings of all the major publishers and hundreds of minor publishers, along with the services they provide and the specialties they work with. Work through the listings methodically, and talk to them all until you've got a deal. You'll also want to start shopping around for a lawyer at that point, both because they have connections and because they'll be working with the contracts you'll be signing.Once you know what you need and have talked with your lawyer the first few times, you will be ready to start shopping around. It's far better if you have more money and are using the publisher as a paid service. That is, you pay them for the services they provide up front. It will cost you many thousand dollars but you'll require far fewer sales to reach profitability. It can be better to do an online plus POD service starting out if you're self funded. If they need to front any of the money there will be two phases to the deal, one phase before it's profitable and another after a threshold is reached and it's profitable. The exact terms will depend on your needs and the services they'll be providing. Before you sign with anyone, you'll need to work back and forth more than once with your lawyer to help you negotiate what's fair in the agreement. Good lawyers understand the costs of the various services and can help you get fair rates.Just like publishing games, the more you need from them the harder your pitch becomes. If you need a lot of services the more it will cost you. If you're looking for them to invest in you, front you money, and pay for the books, don't expect a lot of money from the deal, and in addition your pitch needs to be amazing and you'll be rejected many times. If you've got the money to self-publish and are only looking for retail agreements that's rather easy. ;hmmmWell Self publish might work too. I'm looking for:an editor publishing distribution for ebookNo hard cover or physical book planned at this timemaking cover art. Future Audio book production. I think that's it. I'd be willing to do physical print if needed, but I don't really want to pay for that at this time. frob said:You've given nowhere near enough information to get a final answer The issue is I don't know what questions or criteria I should be asking or looking for. ;Have you considered publishing with Packt?https://www.packtpub.com/;GeneralJist said:2. publishing distribution for ebook 3. No hard cover or physical book planned at this timeFor distribution of an ebook there are plenty of options. Amazon is the biggest with kindle direct publishing requiring little more than an html file and an image for the title. If you are comfortable with software tools you can use that same document to build/compile every other format out there. You're on the hook for everything else with the business if you go that route, but it can work well if you are marketing through your own channels.There are many ebook publishers out there targeting specific platforms and specific readers or specific genres. I mentioned publisher lists, they also include electronic-only publishers. Understand the tools they use against piracy are also helpful since otherwise anybody with access to the file can make unlimited copies.Be careful of contracts, you almost certainly want something that has a non-exclusive agreement since you've done all the work yourself already. If a publisher wants an exclusive deal they need to be putting quite a lot on the negotiating table.GeneralJist said:4. making cover art.Find an artist with the style you like and contact them. Often it's in the range of a couple hundred bucks, especially for ‘unknown’ artists when they're starting with something that wouldn't have seen the light of day otherwise. Artist friends are best, and asking around at local art schools is inexpensive.GeneralJist said:5. Future Audio book production.If you don't need it now, it's something easily done later.GeneralJist said:1. an editorThis one is the most difficult. Skilled editors are amazing. If you go with a publishing house they'll provide professional editors, at professional rates. ;taby said:Have you considered publishing with Packt?https://www.packtpub.com/hmmm 1st time hearing of them.Looks like they are more of an educational option?My book is a mix of mental health journey auto bio, and Sci Fi elements. It's not really a standard “how to” for game dev. ;so I just heard back from my 1st publisher submission.https://triggerhub.org/And they essentially say they be willing to look at it deeper, and have extensive edits to focus on the mental health angle. but they would want me to cut a lot. From what they are hinting at, It sounds like they want to cut a lot of the Game dev and gaming journey, as they are a publisher focused on mental health.So, now I need to decide what to do.I sent them back an email saying I'm open to continued dialogue.Without knowing exactly what they want to cut, and edit, I don't know how to proceed.Also, would it be better to hold out, and find a publisher that is willing to accept most of the game dev journey, as I'm looking for a continued publisher to work with, aka accept most of the book as is. Any advice would be helpful.Thanks yall. ;GeneralJist said:Any advice would be helpful.Look into your own mind and heart.;hmmmok,So I've submitted to a few other places.We shall see.I submitted to this place called author House, and they got back to me really quick, but it looks like they want me to pay a couple thousand for a package:https://www.authorhouse.com/en/catalog/black-and-white-packagesI personally find that a bit frustrating.I mean, really, I wrote the book, I thought traditional publishers get paid from a % of sales?@frobWhat do you think?Is the above package a good deal?I was also a little put off, as it seems the person who called me didn't even read anything about my book, and asked me “so what's your book about?"beyond the above, how does this usually work? Edit: so, after a bit of basic research, it seems the above organization is a bit scamy. The hunt continues. ;You're unlikely to get a publisher deal, where the publisher pays you an advance and distributes your book to retail outlets.You'll have to self-publish, meaning you have to bear all the costs for printing, and nobody will distribute it for you. https://en.wikipedia.org/wiki/Vanity_press |
First-person terrain navigation frustum clipping problem | General and Gameplay Programming;Programming | I am trying to develop first-person terrain navigation. I am able to read a terrain and render it as well as to move around the terrain by interpolating the location of the camera every time I move around. The main problem I have is that depending on the terrain, i.e. moving on a sloping terrain, the near plane clips my view (see below). What is the best way to avoid this? Presumably, I can interpolate the heights for the bottom corners of the near plane … any help would be appreciated. | I believe this can aways be an issue. I mean if you are clipping to a near plane and that plane passes through geometry, it has to do something. That being said you technically don't have to clip to a near plane at all, however many graphics APIs require it. Another other thing to consider is once you have collision working, you can put your camera, including your near clipping plane inside a collidable object, for instance a sphere, such that this problem will never occur. If you are eventually going to make this a real first-person game, that should take care of the problem since your camera will be inside the players head. Even in a 3rd person game you can put them inside a floating sphere. ;Gnollrunner said:That being said you technically don't have to clip to a near plane at all, however many graphics APIs require it.The near clip plane is always needed, even if you use a software rasterizer. If you don't do the clipping, vertices would flip behind the camera, causing glitches way worse than what we get from clipping.mllobera said:What is the best way to avoid this? Presumably, I can interpolate the heights for the bottom corners of the near plane … any help would be appreciated.Yes, basically you want to ensure that the camera is in empty space (above the hightmap), not in solid space (below the heightmap).But in general you can not treat the camera as a simple point, because the front clip plane requires a distance larger than zero. So ideally you build a sphere around the camera which bounds the front clip rectangle of the frustum, and then you make sure the sphere is entirely in empty space, for example. In the specific case of your terrain not having too steep slopes however, it should work well enough to sample height below camera, add some ‘character height’, and place the camera there. That's pretty simple and usually good enough for terrain.It's quite a difficult problem mainly for 3rd person games in levels made from architecture. It's difficult to project the camera out of solid space in ways so the motion still feels smooth and predictable.Some games additionally fade out geometry which is too close, attempting to minimize the issue.Imo, the ‘true’ solution to the problem would be to let the clipping happen, but rendering the interior volume of the geometry as sliced by the clipping plane.That's pretty hard with modern rendering, which usually lacks a definition of solid or empty space. But it was easy to do in the days of Doom / Quake software rendering. When i did such engine, it was possible to render clipped solid walls in simple black color. This felt really robust and not glitchy, so while it does not solve all related problems, i wonder why no game ever did this. ;@undefinedJoeJ said:The near clip plane is always needed, even if you use a software rasterizer. If you don't do the clipping, vertices would flip behind the camera, causing glitches way worse than what we get from clipping.You can clip to a pyramid instead of a frustum. I used to do this many years ago on old hardware. So there is no near clipping plane. In fact you don't need a far clipping plane either.Edit: Just wanted to add as far as I know the near and far clipping planes mostly have to do with optimizing your Z resolution. If you are dealing with that in other ways, I think they aren't strictly necessary. I currently don't even deal with the far plane and let LOD solve Z-fighting issues.;Gnollrunner said:You can clip to a pyramid instead of a frustum.I see. You still have front clip. It is a point, formed indirectly as the intersection of the other other frustum planes.I've misunderstood your claim to be ‘you don't need a front clip’. But you didn't say say that. Sorry. But now i'm curious about the experience with z precision you have had. I guess it just worked? Which then would probably mean: All those painful compromises of ‘make front plane distant so you get acceptable depth precision for large scenes’, are a result of a bad convention being used by APIs?Or did you use no z-Buffer? ;@undefined My whole engine is based on aggressive LOD and culling. I don't do projection in the matrix. It's a post step. My Z coordinates are world distances. My current project does have a near clipping plane mainly because DirectX wants one, but it's not that relevant for my application.;Ah, so you use the pyramid for culling only. But for rasterization, the usual front clip plane at some distance i guess.Still an interesting question if ‘some distance’ is really needed, but i guess yes.I did some experiment about point splatting. It uses spherical projection, which is simple than planar projection:auto WorldToScreen = [&](Vec4 w){Vec4 local = camera.inverseWorld * w;if (local[2] < .1f) return (Vec3(-1)); // <- front clip at some distance of 0.1Vec3 screen = (Vec3&)local;screen[2] = length(screen); // if it was zero, i'd get NaN herescreen[0] = (1 + screen[0] / (screen[2] * camera.fov)) / 2;screen[1] = (1 + screen[1] / (screen[2] * camera.fov)) / 2;return screen;}; Planar projection would cause division by zero too, i guess.;Thanks for all your comments! I will need to investigate how to do what Gnollrunner proposed (about putting the camera inside of a sphere). ;This may be obvious, but in case it helps:Let me note that, as a first-person camera may be more likely than a third-person camera to draw very close to geometry, it likely makes some sense to have a smaller near-plane distance for the former than the latter.Now, this only ameliorates the problem, it doesn't remove it entirely: it means that the problem will still appear, but only if the player gets very close indeed to a surface. It's intended to be used in conjunction with one or another means of preventing the camera from approaching quite so near to a surface (such as the sphere-approach mentioned by others above).;Thaumaturge said:This may be obvious, but in case it helps:Let me note that, as a first-person camera may be more likely than a third-person camera to draw very close to geometry, I'm not sure that's so true. I mean in both cases you have to take care of the problem somehow. The case of a first-person camera is a bit easier because it should always be in the collision boundary of the player (sphere(s), ellipsoid, capsule etc.). As along as the near plane is also within that boundary, the problem should never occur. So if you have a 10cm radius sphere and put the camera in the back of it, that gives you maybe a 10 to 15 cm camera to near clipping plane distance to play with depending on the field of view you are going for. With a 3rd person camera, you can also get very close to terrain, in fact your camera can end up within terrain or some object if you don't do anything to solve that problem, and this will happen very often without separate camera collision. One typical way to handle this is just implement your following camera, ignoring terrain considerations. Then to figure out your camera's actual position, project a line back from the head of the avatar to the camera's ostensible position, and see if it intersects anything to get the camera's true position. In reality you should project a cylinder and not a line since your camera will need its own bounding sphere to contain the near clipping plane. In any case this means that as you move around your camera can jump forward to clear terrain and objects. I've seen this in a few MMOs. However, when you leave blocking terrain you have the option of implementing smooth movement back to the cameras desired location. If you want to get really fancy, I guess you could try to predict when your camera will need to jump forward ahead of time and try to do smooth moment forward too. Maybe you can have a second camera bounding sphere which is somewhat larger, that would trigger smooth movement, but I think you would still need a fallback camera jump routine to be safe. |
Beginners Learning Team/Study group | Old Archive;Archive | **EDIT** We now have a Google Group @ http://groups.google.com/group/the-dev-academyGreetings everyone. First off, I would like to thank everyone who provides helpful information or insight on this forum. These tips have helped me begin my long and arduous journey into programming and game dev. On behalf of all newbs of the arts, thank you for your time and patience.To approach the point of this thread, I would like to attempt to gather some of the beginner members of the forum into a team of sorts. The goal of this team is to provide a friendly and helpful place where new artists, writers, programmers, and composers can work together to improve there skills through actual projects. This team would also act as a sort of study group, where its members can share anything which they have learned or picked up along the way in a friendly, criticism-free environment. Any veterans of these areas who would volunteer even a fraction of there time would be rewarded with the satisfaction of knowing they have helped to lead beginners through the thick haze of newbiedom and onto the path leading to a functionable role on a team.I would also like to point out what this team WILL NOT be about. This team will NOT be attempting to pull a profit in any form. If you are looking to make some money then perhaps an established team is the place for you. If you however are looking to work on something as a hobby, learning platform, or mentor then you are more than welcome here. This team will NOT be attempting to make the next ground breaking nex-gen game. As stated before, this is a place for those who are new and want to start from square 1(or some place close to there).Requirements:-Friendly and co-operative-Desire to learn-Love of gamesA little about me: My name is Mitch and I am a 22 year old male from Ontario, Canada. I have always loved games of almost all genres. I have spent the last 3 years traveling and cooking for a living. Over the past few months I have decided to persue my love of games and there beautiful quirks. I will be studying Video game design and dev for 2 years starting in January, and I have been teaching myself C++ for roughly a month and a half. As stated previously, I am new to this and by no means expect to hold any command over this team, other than trying to organize people together so that we may learn and grow as future game developers in our respective areas.In conclusion, I would like to thank everyone for there time and interest in reading this post. I wish good luck to you all in your future endeavors and look forward to hearing from some of you. Take care everyone.*Responses may be posted on this thread or sent to me at Frogman980@hotmail.com*~Mitch[Edited by - Smitch on November 16, 2009 9:58:38 PM] | Good idea! One thing you might want to do is see if you can get one or two experienced managers/developers/artists to act as mentors. This will help the project get moving and allow others to benefit from the mentors experience.EDIT: *cough* I should pay more attention *cough*Quote:Any veterans of these areas who would volunteer even a fraction of there time would be rewarded with the satisfaction of knowing they have helped to lead beginners through the thick haze of newbiedom and onto the path leading to a functionable role on a team.*blush*So anyway it's ahh still a good idea, good luck! ; Thanks for the input. I agree completely with your point of veterans giving a helping hand. I feel that this group could truely provide a useful place for many beginners in all aspect of game dev. I look forward and encourage anyone with any skills, ideas, criticisms, or feedback to get involved. Unfortunatly, the only payment which we can provide for veterans is gratitude and a sense that youve helped fellow peers of the industry in progressing easier through a very intimidating field.~Mitch ; I feel like going solo would be a better idea as a beginner. ; I'm really interested in becoming a game developer, although at the moment i have exams ( will be finished in a week ) i'll have a few months off to learn c++ pretty much full time. ; @dhulli: I understand your point of view and agree with you in a way. I think it comes down to the individual. There really isnt any reason a person couldnt learn on there own and also contribute to, or learn from, the team/group. Thank you though for your input.@Silph: Thanks for the interest. Your situation works just fine, as I expect it to take a week or so before we get everything organized. Right now im sending out the feelers and informing people of what we have planned. Me email is in the original post and if you would like more information or have questions feel free to send me a mail.~Mitch ; (Bump) ; Hey Smitch -I am relatively new to game programming (second year CS major, however) and may be interested in such a group. I am currently developing a EV-Nova type game in C++. I have coded a breakout clone before as well. The primary interests of a group like this for me would be able to learn more graphics/game programming and be able to bounce ideas around with competent programmers. I can see the advantage for me for a group like this, but what would be the goals of this group for say a more experienced member? Will you be creating a game? Thanks ; Excellent idea mate, where would one go to be a part of this?Will you put up a forum somewhere on the internet?Could it be done via msn?Let me know, thanks :); Thank you for your interest o4b. Below are some details of the team goals which I have been sending to those who have mailed me. I hope this helps with any other question you or others may have. Your main interest in the group is exactly what will make this team successful. Most people who have shown interest have a desire to grow in various aspects of development and are willing to trade some tips and help here, for some tips and help there. Some members have expressed a willingness to act in a mentor role. The plan is to work on very small, entertaining, and quality games of differing genres which will be added to a mini-game pack. This doesn't mean that more experienced members wont be given the freedom to create more elaborate small games.**Before we begin in any sort of direction I would like to evaluate the needs, skills, and desires of those who show immediate interest in the project. Once we have a small group who can begin work we will discuss amongst ourselves the type of project we will work on. Much will depend on the initial interest and skill level. Because this is a beginner focused team, I would like our first project to be a very simple game. This game genre would be decided upon by the members of the team. If we experience large division between desired genres, then we could, if enough people show interest, work on 2 projects. I cannot stress enough how small and simple these games will be. Despite this, my ultimate goal is to use these small game projects which we work on together to combine into a sort of 'mini-game' pack which would hold small, entertaining games of various genres. This would give the whole team the opportunity to work on something they enjoy, while also learning a broader range of skills. As stated before, this final product would be freeware and used to gain experience, or as a portfolio item. I would like to add that these are the beginning guidelines and ideas. At no time will the creative ideas or ventures of the members go without consideration. This team is a place for people to learn, experiment, network, and create. I feel that there is a winning formula in this plan. It allows small goals to be set and achieved. This ensures that things don't bog down and gives people a sense of accomplishment. With the goal of the final project always in some minds, it gives motivation and somewhat removes the monotony of creating simple games. But for those who stop in for one project it gives them a taste of what they are interested in while still seeing a final product. Further enhancing the experience is the collaboration between peers who sit at (fairly) the same level. As stated in the original thread, the help of any veterans will inspire and greatly help all of us, and perhaps them. Once again, thank you for your interest. If you are still interested I would love to hear any feedback, comments, criticisms, or ideas. I know that with some patience and dedication we can all bring this idea together and move forward. Thanks again and take care. ** |
dynamic_cast & Limiting Function Calls? | For Beginners | Here is my class hierarchy:<br /><br />I'm using dynamic_cast like this:if(GetComponent("Model") == 0) {AddComponent(Factory.MakeComponent("Model"));mModel = dynamic_cast<Model*>(GetComponent("Model"));mModel->AddImage("Logo","RPG 17 Logo.png");This is just converting a Component to a Model. What if I wanted to convert a Movable to a Component(see class hierarchy)?AndIs there a better way of doing this? I obviously don't want to put AddImage into the component class. I hate casting so any neat design trick would be awesome. I was using function pointers to call the function but that required casting and custom functions for each return type.The Movement class has the basic query functions(setX, getX, etc).The Movable class has more query functions(setEndX, getEndX, etc).I want the UnMovable class to only be able to use the setX function once. How would I do that? I know a singleton method but that's not going to help me much.Thanks | Quote:Original post by rpg gamer 17I want the UnMovable class to only be able to use the setX function once. How would I do that? I know a singleton method but that's not going to help me much.I'm not an expert on casting through the inheritance tree, but I can see that the UnMovable's class' problem of only allowing setX has a very simple solution.Simply give UnMovable a member variable called m_bAlreadyMoved, initialize it to false in the constructor, and set it to true when setX is called for the first time.Just to make sure that something doesn't call setX and expect something to be moved after setX has already been called, just return false if its already been called and true if its the first time.Sorry if I can't help you with the casting, but I'm not confident enough to give you a solution that might screw you over lol ; Wow... That seems... simple...Thanks! It works!EDIT:(about dynamic_cast)I had a naming error in the tests I ran so when GetComponent tried to retrieve the component it was blank. I got the casting working correctly. ; What is the purpose of those classes? What exactly are you using them for? Judging by your previous thread, I'd say you are strongly overengineering things. How much of those classes really actually do something useful? And why do you have to use a dynamic cast there? Why do you work with string identifiers instead of actual type information? What's the benefit of that?I'd start by writing down the requirements. Once those are known, I'd design something that's to-the-point. A design is only beautiful if it achieves it's purpose, design for the sake of it is just wasted effort.EDIT: I mean, this little class here also has 'components' that take care of specific pieces of functionality, no need to write a fancy ComponentManagerFactorySystem for that:class Npc{public: Npc(); void update();private: Sprite sprite; CollisionBox box; Behaviour* behaviour;}The point here is that a Sprite object/component can be used by other code as well - for your menu background, for your buttons, and so on. That CollisionBox can be used for the player, too. And that Behaviour class could make it easier to swap different kinds of behaviour - at run-time even. Whatever your game needs. ; The Window class only has two components and that is Model and WindowBehavior. It is set up like you have there. I designed this class hierarchy so that I can keep track of what has what and delete/run all entities and components with EntityManager.My main function:#include "headers.h"#include "Factory.h"#include "Entity.h"EMain::Factory Factory; //can be embedded in Add function I refused not to. I might later but this makes since to me.EMain::EM_Data* Data = EMain::EM_Data::GetSingleton(); //updated by WindowBehaviorEMain::EntityManager* EM = EMain::EntityManager::GetSingleton();int main(int argc, char* argv[]){//Create the MainTree.EM->AddTree(Factory.MakeEntityTree("MainTree"));//Create the 'Component Communicator'.EM->AddEntity("MainTree",Factory.MakeEntity("Window"));do{EM->RunManager(); //Run All EntityTreesData->EM_FlipVideo(); //Flip the vidoe} while(Data->Run);delete EM;delete Data;return 0;};It's really just a handle based manager. Then only difference between what your doing and what I'm doing is that when I create my pointers to components I don't have to delete them. The ComponentManager does that for me.Here are more details:Components:Model holds all animations, images, and text as well as there x and y coordinates(which can be edited). This will obviously be used by several Entities.Movement will handle pathfinding and collision detection of all movable objects.Behavior will handle the AI of the entity's such as the one mentioned below.WindowBehavior class is used to create the window and handle window events.Entities:Window is basically the creator of all things. This is the class that will be used to add 'game objects' to the EntityManager that then handles the objects separately. This is to simplify game state changes. This Entity can basically create a completely different tree and delete the one it is in. ;Quote:Original post by rpg gamer 17Is there a better way of doing this?1) Are all those relationships inheritance relationships, as they appear to be? If so, you really, really should re-think that.2) Why does "Unmoveable" inherit from "Movement"? That seems contradictory.3) The natural way to make it only possible to "do something once" to an object is to use the constructor to do it.4) The way you talk so casually about setX, getX etc. suggests that you're in the habit of writing get/set pairs for every data member. This is exactly what you're not supposed to do. Writing code this way doesn't actually gain you any "encapsulation" or other nice happy OO benefits; it just makes more work for yourself while allowing you to lie to yourself about these things.As for avoiding the cast in your factory implementation, the curiously recurring template pattern might help you. ;Quote:Original post by rpg gamer 17The Window class only has two components and that is Model and WindowBehavior. It is set up like you have there. I designed this class hierarchy so that I can keep track of what has what and delete/run all entities and components with EntityManager.If each entity cleans up it's own content (components), as it should, then the entity manager only has to clean up the entities it contains - not the components that they themselves contain.Quote:It's really just a handle based manager. Then only difference between what your doing and what I'm doing is that when I create my pointers to components I don't have to delete them. The ComponentManager does that for me.Instead of using naked pointers, use smart pointers (which I didn't do to keep the example simple). Problem solved, no need for a component manager. As for handles, using strings as handles means you loose type information. If a npc needs a handle to an item, give it an Item pointer or reference. That's much more to the point than giving it a "sword" string and relying on the fact that the component manager always returns an Item instance for "sword". You're using C++ - so why not use the compile-time type checking? :)Quote:Model holds all animations, images, and text as well as there x and y coordinates(which can be edited). This will obviously be used by several Entities.If you're thinking MVC, then images and text are not the model - they're a view. The model would be the game object states and the controller would be the game logic. So I'd suggest using a better name here. As for the design itself, from what I've seen in your thread about it, it's somewhat odd. It seems there is no distinction between image data and sprites (that is, the actual bitmap, and an instance of it on-screen). It also seems that the only way that calling code can use an image or animation is by it's name - why not just return a reference or pointer to the Image (or whatever object it is that handles the sprite state)?Quote:Movement will handle pathfinding and collision detection of all movable objects.May I suggest splitting pathfinding and collision detection into separate classes - and to let the Movement object handle the movement based on the information it gets from the pathfinding and collision modules?Quote:Behavior will handle the AI of the entity's such as the one mentioned below.Makes sense - although you might as well put this logic into the actual entity class (that is, the Npc class contains the Npc AI - only using classes for that if certain behaviour and state needs to be reused for other entities).Quote:Window is basically the creator of all things. This is the class that will be used to add 'game objects' to the EntityManager that then handles the objects separately. This is to simplify game state changes. This Entity can basically create a completely different tree and delete the one it is in.I wouldn't make a single point the 'creator' of everything, but storing things in a tree-like structure makes sense. I'm not sure if I would make the window the entry point for adding entities - you could just keep that functionality in the entity manager itself.Either way, what kind of game are you planning to build? How complex will it be? Something's telling me you've greatly overengineered this. ; I am going to convert back to my original design.This was just this:EntityManagerEntityTreeEntityComponent(just holds virtual functions(Init, Update) and the state of the object(INIT,UPDATE,KILL))The ComponentManager part required casting in order to use the component and because of:@Captain P"If each entity cleans up it's own content (components), as it should, then the entity manager only has to clean up the entities it contains"You just destroyed my feature!I hate smart pointers(Boost). This is an unknown hate. I don't know why I hate them. I just do. I'll probably like them if I try them. I'll still hate them though.I'm not using MVC. Model is just used to collect the animations, and animate them. A single Image/Text doesn't need a handle to be used by Model. It can be loaded and shown with a few functionsAnimations:AddText/AddImage adds the text/image to the animation map using the handle given.Single:LoadText/LoadImage loads the text/image into a IM_Surface and then returns that surface."May I suggest splitting pathfinding and collision detection into separate classes"Theses subjects are relatively new to me. Path-finding is anyways. Any advice offer on this is acceptable. I am going to be using A* and a grid system. So collision is probably going to be easy."you might as well put this logic into the actual entity class"Yeah I'm moving WindowBehavior into Window."I'm not sure if I would make the window the entry point for adding entities"The Window creates the window that shows the game. I took this to mean that it should add the objects to the game using the window. I'm putting them through the window... I'll try and put the window class functionality into the EntityManager.@ZahlmanThe template would of worked but... El Captain deleted the need for them.SetX is virtual so I can make UnMovable do nothing when it's called. I think I could move the start values into the constructor and get rid of UnMovable while still letting the Movement class change the x and y value.EDIT: I see what you mean by templates.[Edited by - rpg gamer 17 on November 19, 2009 6:23:18 PM];Quote:Original post by rpg gamer 17I hate smart pointers(Boost). This is an unknown hate. I don't know why I hate them. I just do. I'll probably like them if I try them. I'll still hate them though.I agree they look strange at first, but just read up on what they're used for and give them a try.Quote:I'm not using MVC. Model is just used to collect the animations, and animate them. A single Image/Text doesn't need a handle to be used by Model. It can be loaded and shown with a few functionsAnimations:AddText/AddImage adds the text/image to the animation map using the handle given.Single:LoadText/LoadImage loads the text/image into a IM_Surface and then returns that surface.Wouldn't that give you too little control over your visualization? What if you need to change the text on a single label, or animate a specific sprite? In many systems it's common to provide access to these individual objects, even though they're often put in some kind of hierarchy (scene graph, parent objects, etc.).As for animating sprites, how about this (pseudo-code)?class Image{ // Contains the actual bitmap data SDL_Surface* surface;};class ImageCache{ std::map<std::string, Image*> cache; // Checks if the cache map contains the filename key. // If not, it loads the image and stores it in the cache map. // After that, it returns the image. Image* getImage(const std::string& filename);};class Animation{ // Let's say that each frame is stored in a different image file, // so a vector of Image pointers/references will suffice. // You can also decide to pick specific rectangles from an image, // if you're using sprite sheets. std::vector<Image*> frames; // There are various ways to store animation speed - this is just // an example. You may want to give each frame a time of it's own, // for added flexibility, and add support for playing animations // faster or slower. float frame_time; // You may want to store animation data in files - it's a form of // data after all, much like how images are a kind of data. bool loadFromFile(const std::string& filename);};class ScreenObject{ // Position - it makes sense to use or write a class for this too, // with some overloaded operators to make working with them a little easier. int x; int y; virtual void draw();};class Sprite : public ScreenObject{ // We're referencing existing animation objects, so animation and image data // can be shared by multiple sprites. // Thinking about it, it could be useful to write an animation cache as well. Animation* animation; int current_frame; float time_until_next_frame; // Type-specific implementation of ScreenObject::draw(), // also makes sure the animation moves on to the next frame. // (you may want to add an update function for that instead, // that takes a time delta or something). void draw();};class TextLabel : public ScreenObject{ std::string text; // Type-specific implementation of ScreenObject::draw() void draw();};// We might as well call this 'ScreenObjectContainer',// and make it derive from ScreenObject itself. That allows// us to create trees of screen objects. Could be useful for// parenting sprites. Designs like that are used in several 3D// engines and 2D GUI systems.class Screen{ std::vector<ScreenObject*> objects; // Add a screen object as a child void addChild(ScreenObject* child); // You may want to give these objects a pointer to their parent, // so they can automatically remove themselves when they are being // destroyed. Makes it a little easier and safer to use and all that. void removeChild(ScreenObject* child); // Draw all child objects void draw();};Usage:class GameScene{ Screen* screen; ImageCache* cache; TextLabel title; Sprite logo; GameScene(Screen* screen, ImageCache* cache) { // We may need this later on, to add or remove sprites to/from: this->screen = screen; this->cache = cache; title = TextLabel("Title"); logo = Sprite(cache.getImage("RPG 17 Logo.png")); // Or load an animation from a file, depending exactly on what // approach works best for your needs. screen.addChild(&title); screen.addChild(&logo); } ~GameScene() { // This could be automated, see the Screen class comments. screen.removeChild(&title); screen.removeChild(&logo); } void update() { sprite.move(1, 0); } void onKeyPressed(Key keycode) { sprite.move(-20, 0); title.setText("Key pressed!"); } // I'll assume that screen.draw() is called // somewhere up-high, every frame.};I hope the above code gives you some inspiration, or at least an idea of how this can be done. I'm using a similar approach and so far I'm quite happy with it (granted, I refactored and tweaked it several times over the course of two years, so yeah ;) ).Quote:Theses subjects are relatively new to me. Path-finding is anyways. Any advice offer on this is acceptable. I am going to be using A* and a grid system. So collision is probably going to be easy.For pathfinding, you'll need some kind of map data. If you store that in a class, and give the class some functions that allow other code to check for routes between point A and B, then all that's left is writing some pathfinding code inside that class and voila. Same goes for collision detection. Hide the data and provide an easy-to-use service. ; I do need a cache system. I'll look into it. Right now I'm loading the logo over and over again. I mean the previous image is deleted and released but then I load it again on the next menu.I have the Model class loading basic images and returning the IM_Surface. I then have to keep track of them outside the Model class. It's a little bit of a pain.I think all I'd have to change is Model and EM_Data(handles rendering). |
How do I move all points on a spline in the following situation? | Math and Physics;Programming | Currently I am updating all my points on a spline using a movement vector derived from the code below: // Destination node always remains the same Vector3 node = Vector3.Zero; Vector3 position_Start = spline_CatmullRom.point_List[node_Index]; // Set final position to current object position Vector3 position_Final = position_Start; // Find the direction to the next node based on the object's position Vector3 node_Direction_To = node - position_Start; // Distance must be calculated from NON normalised direction float node_Distance_To = node_Direction_To.LengthSquared(); // Now normalise the direction to the next node (for smooth movement) node_Direction_To.Normalize(); // Calculate the final position based on direction to the next node and object's speed position_Final += node_Direction_To * speed * dt;The interpolated points on the spline can then be updated as follows: public void MoveSpline(Vector3 vector_Movement) { for (int i = 0; i < point_List.Count; i++) { point_List += vector_Movement; } }Where "node_Direction_To * speed * dt" is the movement vector.The problem arises when I have to account for the speed over shooting the distance between the current interpolated point on the spline and the next interpolated point. // Calculate the distance travelled this frame float object_Distance_Travelled = (position_Final - position_Start).LengthSquared(); // If the distance from the object's original position to its new position is greater than the distance to the next node // [I.e. The object has overshot the node by a certain distance] while (object_Distance_Travelled > node_Distance_To) {// If the final node has not been reachedif (node_Index + 1 < spline_CatmullRom.point_List.Count){ float object_Distance_Remaining = (float)Math.Sqrt(object_Distance_Travelled) - (float)Math.Sqrt(node_Distance_To); //Console.WriteLine("Overshot node " + node_Index + " by " + object_Distance_Remaining); // Set position to current node position_Start = spline_CatmullRom.point_List[node_Index]; // Get the next node node = spline_CatmullRom.point_List[++node_Index]; // Find the direction to the next node based on the object's position node_Direction_To = node - position_Start; node_Distance_To = node_Direction_To.LengthSquared(); node_Direction_To.Normalize(); // Set final position to current object position position_Final = position_Start; // Calculate new final position based on the distance remaining position_Final += object_Distance_Remaining * node_Direction_To; // Calculate the distance travelled this frame // If the distance has overshot the next node then this process will begin again object_Distance_Travelled = (position_Final - position_Start).LengthSquared();}else{ position_Final = spline_CatmullRom.point_List[node_Index]; finished = true; break;} }I can create the final position of one node, but how do I obtain the correct movement vector for the spline in the above scenario?Thanks. | |
Developer looking for 3D artist for FPS/RPG | Old Archive;Archive | I'm an indie developer who has worked on several commercial games including "Battle Cruiser Millennium" and "Purge". I have been developing a sci-fi FPS/RPG with open-world gameplay set on an alien planet. I am currently doing all development including programming, modeling, texturing, etc. But I realize it's time to ask for help.What I am looking for is someone who can make a few hi-tech gun models and maybe some alien creatures. You wouldn't need to devote many hours to this project, only whatever time you have. I can't pay anything right now, but I do intend to sell the game online. But if you are interested it should be because you want to have some fun making models for a game. Of course as a team member you will have input on the game design and so on.I'm using the A7 engine with my own rendering dll. Some features include ambient occlusion, shadow mapping, normal mapping, a tree rendering system, large terrain area, day/night cycle, and dynamic skies. So far I have mostly finished the rendering system, terrain, trees/plants and other terrain details. I am working on gun models and creatures now. If you are interested in helping out please PM me.Here are some screenshots: | |
Volumetric Light Scattering as a Post-Process (GPU Gems 3) | Graphics and GPU Programming;Programming | Hi!I'm haveing problems implementing Volumetric Light Scattering with DirectX 10 from GPU Gems 3 article "Volumetric Light Scattering as a Post-Process".I've read it several times, but I can't figure it out completely.I render all the occluding objects black, and a sphere (which is the sun) white, and saves it to a render target. That's all I've done so far.Now my problem:1. Should I use another render target to the Additive Sampling, by using the render target with all the occluding objects?2. Then use a render target for the "normal" scene?3. Use a fourth render target to blend the additive sampling render target with the "normal" scene-render target?I'm not really sure how it "should" be done. Does it require four render targets in total?Any help would be appreciated!Thanks in advance! | Hi there,Please see this tutorial:http://www.mathematik.uni-marburg.de/~menzel/index.php?seite=tutorials&id=2The author used the same article and he made an excellent tutorial as well. Hope you find it useful. ; Hi b_thangvn!Thanks a lot for the tip!I managed to figure out how to implement it myself, so I now have working volumetric light scattering, so I'm really happy =)I will take a look at that tutorial though to see how he/she implemented it ;>Thanks! |
My array is empty when filling it from another class | General and Gameplay Programming;Programming | Okay, this problem is driving me nuts and I'm sure the solution is simple, but I can't find where it is.I'm calling from some class A to a method in class B which fills an array (or a vector or a pointer, I tried them all) defined as an attribute in B, this method works fine and inside it the array/vector/pointer is correctly filled with my elements. The problem is, when I get back to class B for other operations, the array/vector/pointer is completely empty.I debugged the whole thing but can't find the exact point in which the array is emptied.Any ideas?PD: I'm using C++ under VS2008.PD2: It's not a matter of me explicitly clearing or emptying the array; the only references to it are the moment I fill it with elements, and the moment I read those.PD3: If I call the filling function from inside class B, it seems to be working fine. | Post your code and we might be able to spot the error. It sounds like it's a matter of stack allocated containers going out of scope. But it's hard to give a definite solution without knowing your implementation.; Sounds like you pass the array by value where you should be passing by reference:bad:void foo( std::vector< int > x ) { x.push_back( 1 ); x.push_back( 2 ); x.push_back( 3 );}good:void foo( std::vector< int > & x ) { x.push_back( 1 ); x.push_back( 2 ); x.push_back( 3 );}Same for a native array:bad:void foo( int * x ) { x = new int[3]; x[0] = 1; x[1] = 2; x[2] = 3;}good:void foo( int *& x ) { x = new int[3]; x[0] = 1; x[1] = 2; x[2] = 3;}Otherwise, post some code. ; Method in class A (CScene):void CScene::initFirstTimeSkeletons(){vector<CSkeleton>::iterator skeleton;for(skeleton = sk.begin(); skeleton != sk.end(); skeleton++){if ((*skeleton).isCreated()){(*skeleton).createBoneConstraints();}}}Source of createBoneConstraints in class CSkeleton:void CSkeleton::createBoneConstraints(){bone_contraints.push_back(Constraint(bList[17],bList[16]));bone_contraints.push_back(Constraint(bList[16],bList[24]));bone_contraints.push_back(Constraint(bList[24],bList[25]));bone_contraints.push_back(Constraint(bList[25],bList[26]));bone_contraints.push_back(Constraint(bList[26],bList[27]));bone_contraints.push_back(Constraint(bList[16],bList[19]));bone_contraints.push_back(Constraint(bList[19],bList[20]));bone_contraints.push_back(Constraint(bList[20],bList[21]));bone_contraints.push_back(Constraint(bList[21],bList[22]));bone_contraints.push_back(Constraint(bList[18],bList[14]));bone_contraints.push_back(Constraint(bList[24],bList[14]));bone_contraints.push_back(Constraint(bList[14],bList[12]));bone_contraints.push_back(Constraint(bList[12],bList[3]));bone_contraints.push_back(Constraint(bList[12],bList[8]));bone_contraints.push_back(Constraint(bList[12],bList[1]));bone_contraints.push_back(Constraint(bList[8],bList[9]));bone_contraints.push_back(Constraint(bList[9],bList[10]));bone_contraints.push_back(Constraint(bList[3],bList[4]));bone_contraints.push_back(Constraint(bList[4],bList[5]));bone_contraints.push_back(Constraint(bList[12],bList[8]));bone_contraints.push_back(Constraint(bList[19],bList[24]));bone_contraints.push_back(Constraint(bList[16],bList[14]));bone_contraints.push_back(Constraint(bList[1],bList[7]));bone_contraints.push_back(Constraint(bList[1],bList[3]));}function in class CSkeleton that uses elements in the array:void CSkeleton::drawConstraints(){for(int i=0;i<bone_contraints.size();i++){bone_contraints.at(i).satisfyConstraint();bone_contraints.at(i).draw();}}Out of reference, here is class Constraint:class Constraint{private:float tolerance;public:float rest_distance; CBone *bone1,*bone2;Constraint();Constraint(CBone *p1, CBone *p2);inline CBone* getBone1(){return bone1;};inline CBone* getBone2(){return bone2;};void setRestDistance();void draw();void satisfyConstraint();float calcDistance();};I also found out it's not only a thing of collections, every change I make on those elements calling a function from outside class CSkeleton are not properly "saved". (I.E. I tried creating "Constraints" beforehand, calling from inside CSkeleton, and then initializing some needed values of them from CScene: they are correctly set inside the function, but on getting back on the class Constraint they are again zeroed. ; Solved it. My bad. CSkeletons on CScene were not pointers but simple objects.Thanks! |
Displacement for games | Graphics and GPU Programming;Programming | There has been a lot of speculation regarding hardware tessellation and displacement support. Especially after Unigine Heaven benchmark release - http://unigine.com/press-releases/091022-heaven_benchmark/.I wanted to make sure is displacement suits our needs for upcoming game project but my 9600GT does not support DX 11. So I've drawn a height map and tried to displace a polygon in 3dmax but it appears a nightmare - model is often corrupted, UV coords are not preserved and subdivision creates too many polygons to work with. I've checked several similar tools and got the same result..After that I decided to implement simple displacement by myself just to test how it would look like. As a result I got a model with 16002 polygons from 64x128 height map.Here goes: Original model (2 triangles), Displaced model, Displaced wireframe (16002 triangles)As you can see there is a lot of simple planar polygons that can be merged to optimize the model. After two days of coding I have a tool that is able to optimize displaced model up to 23 (!) times - from the monstrous model above it creates a cutie with 699 triangles that looks exactly the same:May be it is not as precise and complex as hardware displaced model can be, but.. Adding 699 polygons at closest LOD is not a problem for modern hardware. Even ancient cards like 6600GT should eat this. Of course, it is not a realtime displacement and there is a lot of potential problems, factors and height map requirements. But we really can start making games with such displacement. And when "DX 11 era" starts, we'll just switch from offline processing to hardware displacement with same height maps.Those who can read Russian (or skilled in translation magic) can read some details at my blog. There is also clickable slideshow that allows to compare original and displaced models:http://blog.runserver.net/2009/11/blog-post_20.html | Here is short video of this technology in real-time environment. Note that displacement task lasts 2-3 seconds, so you can't paint on the model like in ZBrush, it is not possible to animate displacement map or displace curved surface, etc."> |
C++ and Code Page 437 | General and Gameplay Programming;Programming | Hi there,I'm using a bitmap font in my application which is based upon the IBM code page 437 (http://en.wikipedia.org/wiki/Code_page_437).I'm having some trouble getting it to display the correct characters, however. Characters 0-127 display fine, but anything over that always displays an incorrect glyph. In most cases, the glyph that is selected by the program to display is always 1 line above or below the character I actually do want to display.I'm using strings in my bitmap font parser instead of char*s but I haven't noticed a different between either of those methods.A char in C++ is, to my understanding, in the range of 0-255. However, I can't figure out if there is some problem with my parser or perhaps the compiler (VC9). It doesn't make sense that characters over 127 would be shifted in either context.Here is my parser. Tell me if you see any problems with it or have any other ideas. It has been designed to take input such as /b02 and /f12 and change the background and foreground colors based on those codes.void Text::write( string input, int x, int y ){row = 0;line = 0;glMatrixMode( GL_PROJECTION );glLoadIdentity();glMatrixMode( GL_MODELVIEW );glLoadIdentity();glDisable( GL_BLEND );glDisable( GL_TEXTURE_2D );gluOrtho2D( 0, 640, 400, 0 );modifier = 0;palette.set_color( 00 );for( int a = 0; a < (int)input.size(); a++ ){if(input.at(a) == 47 && input.at( a + 1 ) == 98 ){string foreground = input.substr( a + 2, 2 );palette.set_color( atoi( foreground.c_str() ) );modifier += 4;a += 3;}else if( input.at(a) == 47 && input.at( a + 1 ) == 102 ){modifier += 4;a += 3;}else{vx1 = x * char_width + ( a - modifier ) * char_width;vx2 = vx1 + char_width;vy1 = y * char_height;vy2 = vy1 + char_height;glBegin( GL_QUADS );glVertex2f( vx1, vy1 );glVertex2f( vx1, vy2 );glVertex2f( vx2, vy2 );glVertex2f( vx2, vy1 );glEnd();}}glMatrixMode( GL_PROJECTION );glLoadIdentity();glMatrixMode( GL_MODELVIEW );glLoadIdentity();glEnable( GL_BLEND );glEnable( GL_TEXTURE_2D );glBlendFunc( GL_ONE, GL_ONE_MINUS_SRC_ALPHA );gluOrtho2D( 0, 640, 400, 0 );glBindTexture( GL_TEXTURE_2D, font.get_texture() );glTexEnvf( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE );modifier = 0;palette.set_color( 42 );for( int a = 0; a < (int)input.size(); a++ ){if(input.at(a) == 47 && input.at( a + 1 ) == 102 ){string foreground = input.substr( a + 2, 2 );palette.set_color( atoi( foreground.c_str() ) );modifier += 4;a += 3;}else if( input.at(a) == 47 && input.at( a + 1 ) == 98 ){modifier += 4;a += 3;}else{row = input.at(a) % 16;line = input.at(a) / 16;tx1 = row * char_width / font.get_width();tx2 = ( tx1 * font.get_width() + char_width ) / font.get_width();ty1 = line * char_height / font.get_height();ty2 = ( ty1 * font.get_height() + char_height ) / font.get_height();vx1 = x * char_width + ( a - modifier ) * char_width;vx2 = vx1 + char_width;vy1 = y * char_height;vy2 = vy1 + char_height;glBegin( GL_QUADS );glTexCoord2f( tx1, ty1 ); glVertex2f( vx1, vy1 );glTexCoord2f( tx1, ty2 ); glVertex2f( vx1, vy2 );glTexCoord2f( tx2, ty2 ); glVertex2f( vx2, vy2 );glTexCoord2f( tx2, ty1 ); glVertex2f( vx2, vy1 );glEnd();}}} | There are two potential problems that I can immediately think of.Are you sure you have the characters are encoded with the correct values? A character you want to draw may appear correct in, say, the editor, but it may not correspond to the same glyph in your character map.Arithmetics on the character codes may not behave as you expect. For example;row = input.at(a) % 16;line = input.at(a) / 16;If the compiler treats char as a signed value, which Visual C++ does by default, arithmetics on it will be unsigned also. Especially the remainder-operator may give you unexpected results. Cast the result to an unsigned value the first thing you do.; I tried this but it didn't work:row = unsigned( input.at(a) % 16 );line = unsigned( input.at(a) / 16 );How can I make the result unsigned like you said?For reference, here's my Text class:class Text{private:Texture font;GLfloat char_width;GLfloat char_height;Palette palette;int row;int line;int modifier;GLfloat vx1;GLfloat vx2;GLfloat vy1;GLfloat vy2;GLfloat tx1;GLfloat tx2;GLfloat ty1;GLfloat ty2;public:Text::Text();Text::Text( char* path );Text::~Text();void Text::load_texture( char* path );GLuint Text::get_texture();void Text::write( string input, int x, int y );void Text::draw( char input, int x, int y, int background, int foreground );};; Use unsigned char to represent values in the range 0~255. You can either modify your methods to use them directly, or cast where appropriate (i.e. before performing any operation on them that may yield a signed result).I'm afraid I'm not familiar with the nuances of C++'s casting, butrow = ((unsigned char)input.at(a)) % 16;would be how I'd do it in C. |
Overclocking laptop GPU or CPU | GDNet Lounge;Community | I'm buying a cheap laptop to get back into programming, been without a decent PC for quite a while now, and it's about time I got myself something new.I'm buying the Acer 15.6" AS5516-5474 Laptop PC with AMD Athlon 64 TF-20 ProcessorIt has a 1.6ghz processor and a radeon xpress 1200 integrated video card.Is overclocking a laptop possible and/or safe? | I would generally say that it's probably not safe. In my experience, most notebooks already push the limits in terms of heat generation, and the additional heat produced by overclocking is going to push it over. And there's not many options for customizing your heat dissipation (e.g. in a desktop, you can at least put in a bigger fan, more fans, etc). ; I see, hmmmm, with Windows 7 would I see a significant increase in speed from 2 gigs to 4 gigs of ram? ; Also does a 64 bit CPU give me any kind of advantage? ;Quote:Original post by JWColemanI see, hmmmm, with Windows 7 would I see a significant increase in speed from 2 gigs to 4 gigs of ram?Having just upgraded my RAM from 2gb to 4gb I can definitely say that there is a huge increase in speed with Windows 7.EDIT: Also, if you plan on having that laptop for a while, you'll want to fill out all of its memory slots before DDR2 prices start going up once DDR3 becomes the norm. ; Yeah, I would have to second not overclocking your laptop. With low heat mitigation, and no real ability to add powerful cooling systems, it would be an accident waiting to happen. ;Quote:Original post by JWColemanAlso does a 64 bit CPU give me any kind of advantage?All standard consumer CPU's are 64 bit for years already. What matters is whether you install a 32-bit or 64-bit version of your operating system. If you want to go for 4GB RAM and are using Windows 7, then you should go for the 64-bit version of Windows 7 to be able to use all your RAM, with 32-bit I don't know exactly where it ends, but it's below 4GB. ;Quote:Original post by jackolantern1Yeah, I would have to second not overclocking your laptop. With low heat mitigation, and no real ability to add powerful cooling systems, it would be an accident waiting to happen.I also want to raise my hand against OC'ing laptops. A friend of mine says this is terrible habit for laptops in general and especially bad, according to his experience (I am just reporting) with AMD-powered ones.Basically expect to cut in half machine's technical life in the best scenario.; Don't overclock your laptop. Just... don't.If you wish for more speed, install an Intel solid-state disk. It makes the biggest difference out of any upgrade you can do to a PC right now. |
[MMO]Seeking 3D Artist and Programmer | Old Archive;Archive | Team name:Psy Sun StudioIndie game development studio from germany berlin.Project name:Moji - The Land of MojiBrief description:The project was started in summer 2009 but the plan todo so bugged me since i played "The Fairy Tale Adventure" back in 1989.Moji is a MMORPG "Massivly Multiplayer Online Role Playing Game", takeing place in a realistic alike fantasy world, full of orcs, fairys, trolls, daemons and other player accounts. Just think about movies such as willow or LOTR, the goal is to transport such environment into a MMORPG and let the user explore the game on his own - instead of guideing him through the gameplay experience. Less boundries are more - the sky is the limit :)Features- Unique Battle System- Addicting gameplay experience- non-linear questing- Randomness- Level System- Auction house- Ladder- PvP- Bots- Crafting system with real world impact. Target aim:Pay once and digital download. There are currently no subscription plans but i cannot rule such model out.Compensation:As compensation, your name and position on the offical game website.Payment once revenue is generated or in case i find funding/sponsoring before.A specific percentage of the revenue is possible but there are not exact plans/contracts regarding this currently, but im working on it and can provide them in time if someone has intrest in working for the project.Technology:The target platform is PC and maybe Linux. The software suite to build the game around is not choosen at this time. Currently to be determined.Talent needed:Lead 3D - ArtistCreating the main character classes & enemys.You can create realistic natural looks (i.e. body proportions) and are able to fit your design into the existing world look.3D - ArtistIcon creation, Terrain, UI & GUI design, ModelsYou can create realistic natural looks (i.e. body proportions) and are able to fit your design into the existing world look.Lead ProgrammerYou will have a oversight about the scripting takeing place and establish the main codeing.Skills C++/OOP, Script languages, related to the game engine environment.Network Administrator/ProgrammerYou are responsible for the Server/Client connectivity (i.e.Darkstar/RakNet) and administrate it. RequirementsAt least 18 years of age and the skill and self motivation to move mountains.To apply to a position, simply sent us an email containing your own work examples (such as links to your project web).Team structure:CEO & Production Manager - Myself, including the web development.Website:http://moji.psysunstudio.comContacts:info at psysunstudio dot comPrevious Work by Team:There is no previous work.Additional Info:For anything else please visit the project website or use the contact form from the website or above email to contact us.Feedback:Actualy im just here to search for devs. If someone like to comment on the project go ahead :)Best Regards, Psy Sun Studio[Edited by - PsySunStudio on November 21, 2009 11:07:17 PM] | I just don't understand why every man and his dog must create an MMORPG. What is your project about? I've reviewed your website (which looks like it was made today) and it looks like every single other fantasy MMORPG out there. What makes your project special enough that people will work for free and pay you for funding?Story"You wake up in a small room and cannot remember how you got there ..."Doesn't sound like even you know the story very well. ; Hi,yes the website was setup yesterday.Im creating a MMORPG because i think now is the time that the technology is there to start something on your own. The reason for this is that there are simply no good game designers (or very few) out there. You can have the biggest budget/funding, the best looking visuals whatsoever but in most cases it means fail, due to a series of design flaws.I play games since i got my amiga 1000 and had a lot game development and related experience since than.Yes, i know its currently a trend that many try to accomplish an addicitve game. Cheers ; May I ask what skills you bring to the table? On a forum dedicated to Game Developers, it doesn't sound wise to generalize that most of them are useless. ;Quote:Original post by PsySunStudioI play games since i got my amiga 1000 and had a lot game development and related experience since than.CheersPlease format your post to conform to the mandatory posting template.Please Remember: Playing video games does not mean you can adequately develop them, nor does it mean that you're ideas are better than everyone elses. It simply means you like playing games.In either case, good luck with your project.;Quote:Original post by shwasasinPlease format your post to conform to the mandatory posting template.done. ; Some has already asked you but you really haven't answered the question. What skills do you bring to the team? Nothing in your post really shows what skills you have. You say your the lead designer well sorry but everything in your design has already been done so it's easy to list features from other games but what new features are you your self designing that would show you can design a game? You can't expect to find a team that is going to work for you well you sit around on your rear-end all day doing nothing!I am creating a MMO myself and I have posted a help wanted post just like you but unlike you I am designing and programming our whole client/server technology from the ground up and I have screenshots to back up my work.You really need to give us more to go on if you expect to find people interested in your project enough to volunteer for it. Also you say that at this time your not planning on having a subscription model. How do you intend on paying for maintaining the game after launch? You will need to rent at the very least 1 server if not a whole bunch of them. for 1 server it ranges from about $50 to as much as $500 or more a month. Will you be able to afford to maintain the game after you have made it? ;Quote:Original post by EmpireProductionsWhat skills do you bring to the team?My inital idea has been to point people to my website and let them judge from what they find there. But as you are the second person asking about my personal qualification i will try to answer this now. And i apologize but im not very good in advertise my skills :) (Otherwise i would not post here i guess).My skills are to come up with great game ideas, concept them, organize and setup the game and everything in the process. My skills range and degree varies, some skills include (in no particular order)- Working with 3DSMAX - Used to work with all kinds of editors and software basicly.- Running a Mailbox with a 2400 baud modem- Level/Map Design (Starcraft & Never Winter Nights "beta", and a lot of game titles i do not remember now from the amiga days)- Creating a Flash - actionscript game with highscore.- Image editing & logo design - Web-design- Icon & Typo design (Pixel by Pixel editing)- Flyer, Poster design- Script languages such as php or html- Basic understanding of assembler and C++/OOP programming.- Setting up a server environment (Apache, Mysql & PHP)- Setting up Lan - Composing sounds & music- Working with game engine suits such as TGE and currently a few more while evaluating.- Painting in various forms, especialy characters and scenes.- Writing short storys- Playing a lot of games and role playing games such as "Das Schwarze Auge".- Movie creation with After Effects and or FlashQuote:You say your the lead designer well sorry but everything in your design has already been done so it's easy to list features from other games but what new features are you your self designing that would show you can design a game? For example "Bots" are forbidden in most games i came across. There are some who allow them to some extend, but most of these are basic shop bots.And i do not plan to implement something totaly new rightnow. But who knows ;)I belive it's the right "recipe" which makes a game great. Grafics are cool, sound impressive but after the day what counts is the fun factor. This does not mean i don't try to make those part as great as the rest but actualy these are not as much importend as the game fun factor. And when it comes to mmo's, grinding is defintly not much fun.And than how the storys are made is also key.I think it's how you prepare the world, the interaction, how the value of each entity is setup ( How Combat or Player Stats System are setup). The overall look and gameplay feeling.Quote:You can't expect to find a team that is going to work for you well you sit around on your rear-end all day doing nothing!The next step for me personaly is to create the world with the world & terrain editor maybe even 3rd Party tools and than starting implement functionality such as player navigation & movement. Quote:You really need to give us more to go on if you expect to find people interested in your project enough to volunteer for it. Also you say that at this time your not planning on having a subscription model. How do you intend on paying for maintaining the game after launch? You will need to rent at the very least 1 server if not a whole bunch of them. for 1 server it ranges from about $50 to as much as $500 or more a month. Will you be able to afford to maintain the game after you have made it?The exact plan is not unfold yet, as it depends on some factors which are still in the process of emerging. I can think of "Ad's" on the game loading screens. And didn't "Guild Wars" just is retail than thats it?Cheers[Edited by - PsySunStudio on November 22, 2009 5:41:15 AM]; Not sure about Guild wars since I have never played it but Guild Wars also has a AAA company backing it that not only created Guild Wars but also creates other AAA games that the profit can be used to support Guild Wars.But anyways I am trying to get into the habit of not giving other MMO teams advice because one day they could be competition for me and my team. We have had sort of a little set back with our MMO. Got a new programmer and we might be totally redoing the Networking but in the end it will turn out better. So good luck and I hope you find the help your looking for. ;Quote:Original post by PsySunStudioThe reason for this is that there are simply no good game designers (or very few) out there. You can have the biggest budget/funding, the best looking visuals whatsoever but in most cases it means fail, due to a series of design flaws.But yet I can see no proof that you fit the bill for a good game designer, what skills or knowledge do you posses that make you better than most game designers out there? The ones you listed are those that most any game designer has.I also would advice against repeating a phrase such as that on this site. As this is your first project or just MMO, you'll find that there is much to learn yet about designing a game. One of those things is having a bit of respect for those that have more knowledge than you in your field, even if you believe you have better ideas that might surpass theirs. Like I said before, there are many little things that must be designed in a game that you may not be thinking of in advance.Quote:Original post by PsySunStudioFor example "Bots" are forbidden in most games i came across. There are some who allow them to some extend, but most of these are basic shop bots.And i do not plan to implement something totaly new rightnow. But who knows ;) I'm not sure what you mean by this. Were you just pointing out the existence of bots, or trying to hint about a part of your design that you don't wish to talk about because someone might steal the idea. Quote:Original post by PsySunStudioI belive it's the right "recipe" which makes a game great. Grafics are cool, sound impressive but after the day what counts is the fun factor. This does not mean i don't try to make those part as great as the rest but actualy these are not as much importend as the game fun factor. And when it comes to mmo's, grinding is defintly not much fun.And than how the storys are made is also key.I think it's how you prepare the world, the interaction, how the value of each entity is setup ( How Combat or Player Stats System are setup). The overall look and gameplay feeling.How do you plan to reduce/eliminate grinding to make this fun world?Are you a registered company, or just using the name for now?What is the reason you are limiting yourself to under 18? I know of quite a few very skilled people that have more time on their hands because they are younger and don't yet have the responsibility's that are to come.I would suspect there are about a dozen people on average that post here looking to make an MMO. What makes your game different or better than theirs that would make a person want to join your team?I hope I don't come across as rude, and wish you the best of luck with your game. Many games are started on here and never finished, and usually it is because lack of planning/design. |
HLSL no FX | Graphics and GPU Programming;Programming | Hi,I'm coding a project in which i use DX10 (using shader model 4) and i don't use FX.The only sample of doing that in the SDK is quite poor in content.The part i'm missing the most in the documentation is, what is the "connection" between texture/sampler variable in the shader code and the ones i set in the DX API calls.for example - i create a sampler state:m_device->CreateSamplerState(&sampler_desc,&m_pSamplerState);i also create few textures, create shaderResourceViews to them, and set them as active.in the HLSL code i doTexture2D txTexture_1;Texture2D txTexture_2;Texture2D txTexture_3;sampler samp_1;(i wish to use the same sampler for all of them)so should i assume that the order of variable i create in the hlsl matches the array order of the shaderResourceViews i set in the API ?Thanks for your time,Yoel. | The Effects system uses the shader reflection API to determine which slot each variable is using. You can also use reflection or to get around this, you can assign texture and sampler objects to specific register location in the HLSL code which allows you to assume the order from the API side. The compiler does not guarantee any specific ordering of resources otherwise.Same goes for samplers, or any other slot group. ; Thanks!Assigning texture and sampler objects to specific register location in the HLSL code was what i was looking for =) |
C++ Inline get/set methods | General and Gameplay Programming;Programming | Well, maybe someone asked this before, but I couldn't find it on the forums.I've been programming for a good amount of time, but I always had this doubt in my mind. If I declare a class data member as private and use inline get/set methods to access it, will I have performance gains? I mean, in terms of speed, will it be the same as if I declared the data member as public?I always think about that because I have some templated classes for point, vector and matrix and I use inline operators and methods to access the data members. As in my applications speed is required, I always wondered if I should abandon the good programming practices of declaring things private in order to obtain better performance.Thanks all! | Well, making the data public is the most straightforward way, and manipulations does not require a function call, so they CAN be faster (not the other way around that you wrote but probably didn't mean).But, when compilers inline the get/set methods for private data members, there is neither the overhead of calling a function. Making get/set functions does allow you to do some checking, caching or other side stuff that must happen when a variable changes.I am unsure though when the compiler makes a function inline...even if you say inline it may even not inline it! I wish it wasn't a hint, but an order. So, when do functions get inlined? When the compiler thinks it's better to inline? ; It is unlikely to make a significant difference. ;Quote:Original post by antimouse...the good programming practices of declaring things private...This is not a general rule that produces good programming practice. Point, vector and matrix have no invalid values for their members, so therefore no checking of values is required. Good programming practice here IMHO is to make the members public.If you need to constantly validate a member, consider instead of having get/set methods rather move the processing that requires access to these into class methods that describe actions rather than values.Bad:class Person{private: int health;public: int GetHealth() const { return health; } void SetHealth(int v){ health=v; }}void f(Person &p){ int h=p.GetHealth(); h=h-2; if(h<0) h=0; p.SetHealth(h);}Better:class Person{private: int health;public: void Damage(int v){ health-=v; if(health<0) health=0; }};void f(Person &p){ p.Damage(2);};Quote:Original post by antimouseI always think about that because I have some templated classes for point, vector and matrix and I use inline operators and methods to access the data members. As in my applications speed is required, I always wondered if I should abandon the good programming practices of declaring things private in order to obtain better performance.Wrong thing to worry about.Look at it this way. If you need to set individual values one by one (x here, y and z there, x and y over there...) you are already using slowest possible way, one which will be marred by cache misses, branch mispredictions and other problems.If however you need to blast thousands of coordinates each frame - a memcpy or simd will do wonders for performance. Or better yet, off-load that to GPU altogether.The difference between two approaches we are talking here is 1000x.Function call overhead and cost of stack allocation and speed fo for loops and such are things from days long gone. All the speed today comes from how well you can utilize the cache, and streaming data linearly is clear winner here.;Quote:Original post by AardvajkQuote:Original post by antimouse...the good programming practices of declaring things private...This is not a general rule that produces good programming practice. Point, vector and matrix have no invalid values for their members, so therefore no checking of values is required. Good programming practice here IMHO is to make the members public.I would still keep them private for few reasons:- Easier to use IDE to find all accesses.- Easier to set breakpoint.- Ability to enable checking in debug build, for out of bounds, NaN's etc.Point, vector and matrix are used so widely, any changes to the accesses would cause major headache.For performace, I'd not inline them until the final touches before product ships, shown by profiler. I have seen simple getters jump in profiler to take like 1% of CPU. Usually this is fixed by not repeatedly dereferencing stuff or using getter in inner loops, and ultimately making them inline.Making them inline prematurely prevents them showing in profiler. ; I can't think of any situations in which you'd want to put a breakpoint on "all accesses of any Vector3's y member". More likely you'd put a data breakpoint on the specific one you're interested in, and that doesn't require getters/setters. As for catching out-of-range and NaN, the former doesn't exist in the math classes the OP was talking about, and the latter is better caught by enabling FP exceptions. ; I was being a bit unclear. I was thinking more in line of get set functions generally, not specially for math classes.But even for math classes, there isn't any disadvantage for making data private. I've experienced cases where 3rd party API return NaNs, but you're right the check for that doesnt belong in math classes. Changing matrix from row-major to column-major was suprisingly easy. ;Quote:Original post by FtnBut even for math classes, there isn't any disadvantage for making data private.You're right that the stakes on the other side are pretty low, so this is basically just me indulging in some bikeshedding, but IMHO per-element getters and setters make vector stuff awfully wordy. v.y = -1; is cleaner and nicer than v.SetY(-1);. It looks more like what it is, namely, changing an element of a utility struct, rather than issuing a message to an encapsulated, self-sufficient capital-O Object. ; First of all, thanks for all your replies so far.I liked the answer by Aardvajk, it made a lot of sense to me. But then I keep thinking why some well-known libraries, like CGAL (used for Computational Geometry) use private data members for vectors and matrices.And about what Sneftel said, I personally didn't use things like "v.SetY(-1)", I overloaded the [] operator for getting and setting, so it becomes a lot more clean "v[0] = -1" or "v[X] = -1" if I define some constants for the coordinates. |
what brdf model should i use for a "mud" or "clay" effect | Graphics and GPU Programming;Programming | hello guys,i'm working on my sculpturing tool idea. i want to give the model a clay like appearance, or maybe a bronze like effect. but i don't know what kind of brdf model i should use.i'd like to show you some examples of the effect that i want to achieve:i especially like this effect, it looks to me like a bronze sculpture, the highlight area turns into a little bit red.i'm now picking up the cook-torrance model. but really i don't know if it is the right one to use.[Edited by - billconan on November 23, 2009 6:45:41 PM] | i now have some screenshots to show to you.the first is the normal gl lighting, only it is a per fragment lighting in glsl:the second image is the cook-torrance lighting model, it looks like silk, not bronzemaybe i should try Oren–Nayar model instead? ; The effect you want is usually achived by using a blured cubemap with a simple cupmap texture lookup.if you'd like the specular highlight to move when you rotate the cam, you can calculate the reflection (or half) -vector and use it for the lookup into some seperate cubemap (or u can encode the specular intensity into the alpha channel of the diffuse-cubemap.you could checkout the FXComposer, I think it has some shaders that show that effect.btw. one nice effect you can get is by inverting the normal. It will look like some transluscent milky glass :).dont forget to check nvidia's sampleshttp://http.download.nvidia.com/developer/SDK/Individual_Samples/3dgraphics_effects.html |
DX9 fails on second CreateTexture | Graphics and GPU Programming;Programming | i got a problem when creating my own texture twice.IDirect3DTexture9* pDiffuseTexture = 0;IDirect3DTexture9* pNormalMapTexture = 0;HRESULT hr = 0;hr = g_pd3d9Device->CreateTexture(256, 256, 1, 0, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &pDiffuseTexture, 0)));hr = g_pd3d9Device->CreateTexture(256, 256, 1, 0, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &pNormalMapTexture, 0)));on first pass, it returns S_OK. But second pass it returns D3DERR_INVALIDCALL. The parameter is same.what is the problem actually?thanks. | I can't see a problem, but you're closing too many parentheses in the CreateTexture calls, which suggests that this is not your actual code.I'd suggest enabling the debug runtime (from the DirectX Control Panel application that comes with the SDK), and seeing if it prints anything about this error. ; Another vote for the debug runtimes. What graphics card do you have, and do you have the latest drivers? ; i did. but on output stream showed this message.Direct3D9: (ERROR) :Invalid format specified for textureDirect3D9: (ERROR) :Failure trying to create a texturei checked on caps viewier that my graphic card affords useing D3DFMT_A8R8G8B8. but i didn't understand, on second pass still fails.@Stevei'm using notebook. my graphic card is intelGMA965. i know that this card is not the latest one. but at least it should runs dx9 well.[Edited by - gedebook on November 23, 2009 10:51:59 PM]; Are you sure that's your exact code? That error means that the format passed to CreateTexture() is invalid (unsupported).It's also possible you have a weird driver bug, the Intel integrated chipsets are notoriously flakey. |
[C++/Lua] Can't get environment to recognize headers. | General and Gameplay Programming;Programming | I'm using Code::Blocks with the pre-compiled visual c++ luabind library that I downloaded from http://www.nuclex.org/articles/quick-introduction-to-luabind. I set Code::Blocks to compile using Visual C++ instead of MingW, and set up my files paths. It is necessary to include a header called luabind.hpp to use the luabind libraries. The specific include statement for this is #include "luabind/luabind.hpp"However, when I attempt to compile a simple test program using luabind, the compiler says that it can't find luabind.hpp.luabind.hpp is located in C:\luabind\References\luabind\include\luabind, and I provided C:\luabind\References\luabind\include as the search directory in the project settings.This PROBABLY isn't specific to luabind and is just me not understanding something about include statements, I guess.Anyway, what should I be doing, here? | Try replacing #include "luabind/luabind.hpp" with #include <luabind/luabind.hpp>.#include "" means search locally, #include <> means search globally though not all compilers enforce the difference. |
D3DX10CreateMesh limitations? | Graphics and GPU Programming;Programming | I've created a project that loads a few meshes, then creates mesh objects with "D3DX10CreateMesh". I can load up about 4, then the program crashes on this line:if (FAILED(D3DX10CreateMesh(dxdev, layout, 4, "POSITION", numverts, numtris, D3DX10_MESH_32_BIT, &objects[ocount].mesh)))It seems like I can load 1 or 2 more depending on whether I use low poly meshes of high poly meshes..is there some kind of limitations on using directx meshes? like max verts, or max indices or something?thanks for any *pointers[:)] | I tried this too:if(Failed(D3DX10CreateMesh(dxdev, layout, 4, "POSITION", numv, numt, D3DX10_MESH_32_BIT, &objects[ocount].mesh)))return 0;//--------------------------bool Failed(HRESULT hr){if(FAILED(hr)){const TCHAR*derr = DXGetErrorString(hr);const TCHAR*ddesc = DXGetErrorDescription(hr);MessageBox(NULL, ddesc, derr, MB_OK);return true;}return false;}and it doesnt even get to producing an error, but VC++ throws this one:Quote:First-chance exception at 0x75099617 in 3d.exe: Microsoft C++ exception: long at memory location 0x0012fcd0..Unhandled exception at 0x75099617 in 3d.exe: Microsoft C++ exception: long at memory location 0x0012fcd0..; This is embarrasing to admit, espessially after the *pointer joke, but I figured out the problem. I was statically allocating 2 elements for one of the arrays! I filled the two elements and VC++ just kept packing everything onto the end of it, even though I hadn't allocated the space for it....until it overwrote something important. I keep forgetting that the debugger doesn't catch that. ugh..on another note, while I'm here, can anyone tell me why the time limit for deleting your own post is so painfully short!? |
How to know an application depend | General and Gameplay Programming;Programming | Like the develop helpful tools dependency walkerThe question isHow to know an application need the run time libraryfor example:I write an application that need the run time library:c:\windows\winsxs\x86_microsoft.vc80.debugcrt_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_5490cd9f\MSVCR80D.DLL | |
Animating: Transforms and Deformers | Graphics and GPU Programming;Programming | I'm a little unclear as to how to make the associations between the weighting of the bones and the AnimationKey 4x4 matrix transform. Off of the top of my head I would find the difference between the rest pose of the character and the keyed frame with respect to the matrix values. I would then proceed to multiply the delta(matrix) by the vertex vector. Then I would multiply by the percent weighting and move the vertex accordingly and draw in a timely fashion. This must be very wrong however because the keyed frames contain the root, the effectors and the bones whereas the SkinWeights only contain the bones.Am I even remotely correct?? How is this put together??[edit]if root move allif eff move all children??[Edited by - Buttacup on November 22, 2009 7:46:02 PM] | if I have one cube and one bone which will have one root and one effectorD3DXMatrixMultiply(&prodMatrix,&M1,&M2);for(UINT i = 0; i < numVerts; i++){D3DXVec3Transform(&newVertex,&Vertex,&matrixOffset);D3DXVec4Transform(&newVertex,&newVertex,&prodMatrix);VertDest=D3DXVECTOR3(newVertex.x,newVertex.y,newVertex.z);}where M1 = root and M2 = boneshouldn't this just stand still????and if I switched out M1 and M2 with subsequent keyed frames would this not then move????<mine moves with any combination of anything even under condition A and is currently spinning around in a circle instead of translating left to right when it should.....>[edit] Well I have attained my Identity matrix through a chain of transforms, I am contented..... objects translate/rotate in a sort of appropriate manner.... so yeah :)[Edited by - Buttacup on November 24, 2009 4:45:04 AM] |
Artist&Animator looking for Flash programmers | Old Archive;Archive | Hi folks,I'm looking for Flash programmers for my first game project, a fresh and ambitious 2D beat/shoot 'em up. At the moment I only have a few concrete things to show, but I've been honing the design of this game in my head for over a year. Ideally I would want to team up with people who know Flash thoroughly, as I'm not an expert on it.Primarily I'd like to make this game a reality to help me get into the industry, in other words get one game under my belt. At the moment money is not involved.Unpolished animation sampleConceptual drawingsMy website Contact information:MSN & email: anssirajaniemi@hotmail.comPlease send me a message if you're at all interested! Also you're free to ask anything. Thank you very much.-Anssi Rajaniemi[Edited by - salmonsnake on November 20, 2009 8:13:10 PM] | This project seems to have great potential and I wish you luck. However in order to get more people to take you seriously(Although If they look at your well written post and concepts they should take you seriously)You will need to follow the Mandatory Posting Template Sticky, that is found at the very top of the Help Wanted forums.Good Luck. ; You can count me in, I love working with flash and have been doing so for the past 7 years but for websites only. Been trying to make a game in flash recently but not much motivation there since I'm doing it alone.Your graphics are pretty good, did you make that your self? Careful where you post that stuff, somebody could steal it. ; Thank you DorianC! I'll fill in the template in this post.Team name:NoneProject name:Two Man Army (working title)Brief description:2D side scrolling shoot/beat 'em up with a fresh take on comboing and tag team attacks, with plenty of weight on stylish action. Target aim:Big addition to everyone's portfolio + guaranteed internet sensationCompensation:None. I'll owe you one.Technology:FlashTalent needed:Flash ActionScript programmers who can also assist with the advanced technicalities of Flash animation when neededTeam structure:Consists of me and a couple of close friends.Anssi Rajaniemi - Game design, concept art, animation, environment design, sound design, story designRachel George - Assisting environment artistOssi Ilano - Assisting game design, sound design, composerWebsite:NoneContact:MSN & email: anssirajaniemi@hotmail.comFeedback:All kinds of comments are appreciated-EntryGames, I'm glad to hear this. :) Yes I created all the things I posted myself. About someone stealing this, not much I can do other than worry about it...Please send me an email or add me on MSN so I can keep track of things.Also I noticed you offered your services to JustSomeGuy10's project as well, are you sure you have time for both?[Edited by - salmonsnake on November 20, 2009 10:15:08 PM]; No problem, glad I can help :)EDIT: Also I checked out your portfolio and It is fantastic. If you find the right programmer to do this job, This will have some great quality art assets. ; I emailed you an offer Anssi. I hope you accept.All the best,Luke Hill ; I have replied to everyone now. I still encourage all Flash programmers to contact me if they're interested in working on this game. ; Bumping for more programmers! ; Sent a mail and would love to bump this one as well :)Awesome gameart/Andreas |
Graphic Design Service, Low Price | Old Archive;Archive | Hello, my name is Andrew YorkI am offering Low Price Graphic Design Services for Game DesignThe Rate is 12.00$ a hour but can work with you on cost, or creating set costs based on your needs and budget. I Have been doing 3D Graphic Design for 12 years and have worked freelance before, but just starting up again and wish to work with and for people in the game design industry.Please visite my website at http://sites.google.com/site/matherhorngraphicdesign/homeThanks, and remember, rates are flexable to your needs. | Are you sure this is the correct link to your portfolio?Because the work does not reflect on your 12 years of experience with 3D graphic.It looks more like someone with 3 months of experience would do, and $160 for the quality would seem ridiculous.Sorry if I am being a little harsh. ;Quote:Original post by mini_cheongBecause the work does not reflect on your 12 years of experience with 3D graphic. It looks more like someone with 3 months of experience would do...It would be OK 10 years ago. Andrewyork, how long "before" did you do your freelance stuff? |
core 2 quad | GDNet Lounge;Community | I have noticed that when doing anything on my PC that core 1 2 and 4 stay below 5% until core 3 reaches at least 80%I'm wondering if this is normalmy third core stays about 9C above all others due to this, on all OSs.i'm mainly wondering why this core gets all the loadmy PC specs2.66 GHz Core 2 quad @ 3.01 GHz8GB 800MHz DDR2 @~920MHz1TB HDDOS: XP x64, Vista Ultimate x64, 7 RC x64, UBUNTU x64, XP x86any ideas? | Quote:Original post by ThooverI have noticed that when doing anything on my PC that core 1 2 and 4 stay below 5% until core 3 reaches at least 80%I'm wondering if this is normalmy third core stays about 9C above all others due to this, on all OSs.i'm mainly wondering why this core gets all the loadmy PC specs2.66 GHz Core 2 quad @ 3.01 GHz8GB 800MHz DDR2 @~920MHz1TB HDDOS: XP x64, Vista Ultimate x64, 7 RC x64, UBUNTU x64, XP x86any ideas?A wild guess is that it could be more power efficient to let one core work hard than to have all 4 cores sit at 20-25% , as to why its always the third core i wouldn't know. (I could ofcourse be completely wrong and you're having a hardware problem of some sort). |
[web] Game client - mySQL db communication | General and Gameplay Programming;Programming | I'm currently working on a small game project and want to provide user statistics in a web frontend for the users. Getting the web/sql part done is no big deal but I'm having some trouble figuring out how I'd want the game client to transfer the data to the statistics server in a more or less secure way. I certanly don't want the client to directly insert sql querries but let it probably access a sort of incoming.php with parameters in the url to hand over the data. However, I still don't know how to make it at least a little secure so does anyone have any suggestions?SSL is no option by the way. :(Any kind of advice would be appreciated And sorry if this is in the wrong forum category, not sure where else to put this instead.- Lili | Quote:Original post by LilithiaI'm currently working on a small game project and want to provide user statistics in a web frontend for the users. Getting the web/sql part done is no big deal but I'm having some trouble figuring out how I'd want the game client to transfer the data to the statistics server in a more or less secure way.What does the client use to communicate with the server? JavaScript, Flash, regular form posts?And against what does it need to be secured? Submitting incorrect or malicious data, bogus requests made from outside the game?Quote:I certanly don't want the client to directly insert sql querries but let it probably access a sort of incoming.php with parameters in the url to hand over the data.Sounds okay.Quote:However, I still don't know how to make it at least a little secure so does anyone have any suggestions?What you at least want to do is check all the data first before you commit it to the database.For instance, lets say we are running a RPG that allows a player buy an axe with his gold. And lets assume we call a page called buy.php with a parameter telling us which item to purchase, ?item=23Among the things to check might be the following:Check if user is logged in (session state)Check if item to buy exists in the databaseCheck if user doesn't already own an axeCheck if user is allowed to buy an axe (perhaps this depends on his skill level or something)Check if user has enough goldEtc..That's where it all starts. On a non secure connection, you'll always be able to track the submitted URLs. You could obfuscate the transmitted query string, but will be trivial to decode. ; The game client itself is written in C# and there is no login at all. Every player has a unique (permanent) ID but thats about it whenit comes to identifying users. The game is pretty much completely done, too. The statistics system is just a little extra thing I want to add. But well, the problem is "how" to transmit the data from the client to the stats server("how" as in how to make it somewhat secure .. the technical aspect of getting the client to send something over with http for instance to the server is not the issue) ; If your statistics server is web based, you'll have to send them to a page like you said incoming.php with parameters.However, the security issue you will encounter is the authenticity of the submitted data. (a user can't compose the URL by hand and put it in a browser).So basically you should find some sort of encryption on the client side for the parameters and then decrypt the data on server and update the mysql tables.;Quote:Original post by LilithiaGetting the web/sql part done is no big deal but I'm having some trouble figuring out how I'd want the game client to transfer the data to the statistics server in a more or less secure way.What you need is input validation, maybe input sanitation, and proper escaping of values which are to be inserted into SQL queries. Security basically means that you must be paranoid very careful about your input data.A relatively secure way is to first validate your input data against basic data types. For example, if you expect some input variable to be a number, and a string with non-numeric characters comes in, you can be sure that it's either a bug in your client or a hacking attempt. Either way, the best way to deal with malformed input at this stage is to discard the message and return an error code.Second (this step is optional-ish, if you do the first and next step right), you clean (sanitize) the input strings. That means, removing any invalid input characters. This won't make much difference for non-string data, though, if you validated in the first step, but it can help with step three.Third, you'll need to escape the input data, especially string input, before inserting it into any SQL strings which will eventually be run on your server. This counters the threat from forged string input which could contain escapes (\0 characters, quotation characters) to run arbitrary SQL. There are functions in the MySQL client lib for escaping values. ; if it were me, then i would probably sanatise/escape any incoming strings, also I would definately concider including some kind of checksum hash with the submit. If the checksum doesn't match then throw the entire thing away.UserId=1234567&FirstName=John&LastName=Doe&HighScore=2000&checksum=(SHA1(FirstName + LastName + HighScore+ UserId + "salt"))perform that same operation on the server, and if the hashes don't match then ignore everything. Not 'secure' but between that and sting normalization it should probably suffice, protecting you from run of the mill sql injection attacks and lazy hackers. but anybody with a decompiler and some time to waste could probably fabricate a illegitimate request. ; I would recommend a form that has a hidden input field called "validrequest" the value of that field will be filled by an algorithm that you make. Let's say your secret algorithm works like this the first two figures are the current month number (with leading zeros) the last two are the hour of the request (with leading zeros 24 h time) and then in the middle you have a number that operated with mod(%)7 function always results with number 1(or to make it more complex the day of the month). It's no big deal to make something like this.Why this and not hash of certain data? because in the way I propose the solution a user will be time dependent and request dependent as you check the first and the last two letters to coincide with the current time on the server, meaning that a request used today will only work tomorrow at the same time (or next month at the same time, in the second case). So what if a user makes a request at 23:59 and presses the report button at 00:01? No problem, just tell him that his request has expired, and that he should try again. |
Diploma thesis | For Beginners | Hello :-) I am a student, and for my diploma thesis i am developing a racing game.The problem is that, making just the game is not enough.I have to do something special in my game ,for example applying AI algorithms or damage model. So , i would like to hear your suggestions :-) | The way you will be graded on this will be based on the technology you use not the scenario and your results have to be measurable. I'm sure you will have seen the terms qualitative and quantitative and if you haven't I suggest you start reading up on it.For my final year project I got a car to drive around a track on its own, I used an artificial neural network to do it. I done quantitative research as I was able to analyse the different configurations and say which one was better and why. This is important!If you want to make a damage model then you may want to look at comparing 2 different algorithms. Your results will explain which algorthm was better and why.The best advice I can give you is plan your project in the reverse order to the way you previously described. For example, I would say: I want to compare 2 mesh deformation algorithms - I could use a racing game, or I want to compare 2 path finding algorithms - I will create a maze game.Hope this helps ;-) ; Hi,Probably best approach could be implementing more than one algorithm or mechanism to a certain problem and compare them in some way...For example; if you work on pathfinding, you should start to work with A* but also you can try Potential Fields to show which approach works better and why. Then you can report them in a proper way.It is generally all about your supervisor to decide if your work is good or not so try to stay in touch as much as you can with him/her.Cheers ; With regard to damage: I don't know how much physics or material science background you have, but you may want to look at some of the open source collision detection/physics engines available (ODE, Bullet, etc.). They make an excellent basis for simulation, but they use rigid body physics for the most part and don't take into consideration energy absorption, which limits the ability to simulate damage. You could extend the physics of one of those libraries to better simulate energy conversion.Car bodies absorb a tremendous amount of energy (converting the energy of motion/friction to heat, sound and material deformation) when they hit walls and other cars, one effect being that the momentum loss on impact helps to prevent rollover and results in skidding or sliding instead. E.g., in general, Indy type cars with no outer energy absorbing materials tend to flip and roll more than NASCAR type car with outer shells as a result of contact with walls, etc.You may be able to demonstrate the benefits of crushable body panels. ; Well , i have already built some basic levels for my game with the game engine Unity 3D so i can't change engines.I think that unity has built-in PhysX from Nvidia.But you all gave a lot to think about and i have a lot of searching to do .Thank you :-)[Edited by - mcnikolas on November 24, 2009 1:12:28 AM] |
computing a dot product with very similar unit vectors | Math and Physics;Programming | Hi,I have a sphere in an application that has a very large earth scale radius. When I click a point on the surface I get the x,y,z point clicked and then make two vectors, one from the sphere centre (origin) to the camera position and one from the sphere centre to the click position. I use the arc cosine of the scalar returned from the dot product of the two vectors for the angle, which works fine for most cases to construct the angle/axis rotation. However, when I am very close to the surface and click a point (which in "game units" would still be classed as a few hundred metres away from where I am), the dot product returns values >= 1.0, or a value that is a significantly larger jump in rotation along the given axis (for the application anyway).So for example if I'm very close to the surface of the sphere and I select a point a few hundred metres away to rotate the camera to, it either wont move (>= 1.0) or move too far, because the two unitized vectors are so close together from origin. I have tried instead doing all the calculation using doubles instead of floats (the two vectors will always start in floating point x,y,z form), but that seemed to yield the same results. I also tried doing the dot product on non-unitized vectors and unitizing the result afterward, but still no good.Is there any way around this?Thanks for any help. | I'd try using the quaternion solution posted by jyk here. ; Thanks for that, it works nicely even with almost parallel vectors. :) |
Issue with failing depth test | Graphics and GPU Programming;Programming | I'm currently working on a deferred renderer. In order to debug I've set up a system so I can render a single step in the render pipeline.I'm working on the first pass of the deferred renderer (color, normal depth) and going through each of the phases to verify I am retrieving the values. Everything seems to work although I am having some annoying depth test issues.I currently use ID3DX10Font to render my FPS to the screen:font->DrawText(0, output.c_str(), -1, &fontRect, DT_NOCLIP, WHITE);To my knowledge this turns depth clip enable in the raster state to false. Maybe some other things happen behind the scenes that I am unaware of. In any case if I do not reset the raster state after this everything renders "fine". Meaning I see my geometry (the Stanford Buddha scan in this case) although since there is no depth clipping I see faces that should not appear.If I reset the rasterizer after this which should re-enable depth clipping I only see my font.device->OMSetDepthStencilState(0, 0);I have attempted to set the raster state to depthclipenable false originally and then render my geometry but I still fail the depth test for some reason (seen through PIX). I seem to only see my geometry when I draw test and use the DT_NOCLIP flag.Does anyone have a suggestion as to what I may be over looking? I do have a forward renderer which does work.Raster state setup:void DX10Device::SetRasterizer(int32 fm, int32 cm, bool multisample, bool aaline){D3D10_RASTERIZER_DESC rd;rd.FillMode = (D3D10_FILL_MODE)fm;rd.CullMode = (D3D10_CULL_MODE)cm;rd.FrontCounterClockwise = false;rd.DepthBias = 0;rd.DepthBiasClamp = 0;rd.SlopeScaledDepthBias = 0;rd.DepthClipEnable = true;rd.ScissorEnable = false;rd.MultisampleEnable = multisample;rd.AntialiasedLineEnable = aaline;ID3D10RasterizerState* rs;m_device->CreateRasterizerState(&rd, &rs);m_device->RSSetState(rs);}Depth stencil creation:HRESULT Deferred::CreateDebugDepthStencil(){HRESULT hr = S_OK;D3D10_TEXTURE2D_DESC descDepth;memset(&descDepth, 0, sizeof(D3D10_TEXTURE2D_DESC));descDepth.Width = m_width;descDepth.Height = m_height;descDepth.MipLevels = 1;descDepth.ArraySize = 1;descDepth.Format = DXGI_FORMAT_D32_FLOAT;descDepth.SampleDesc.Count = 1;descDepth.SampleDesc.Quality = 0;descDepth.Usage = D3D10_USAGE_DEFAULT;descDepth.BindFlags = D3D10_BIND_DEPTH_STENCIL;descDepth.CPUAccessFlags = 0;descDepth.MiscFlags = 0;hr = m_device->CreateTexture2D(&descDepth, NULL, &m_debugDepthStencilTexture);D3D10_DEPTH_STENCIL_VIEW_DESC descDSV;memset(&descDSV, 0, sizeof(D3D10_DEPTH_STENCIL_VIEW_DESC));descDSV.Format = descDepth.Format;descDSV.ViewDimension = D3D10_DSV_DIMENSION_TEXTURE2D;descDSV.Texture2D.MipSlice = 0;hr = m_device->CreateDepthStencilView(m_debugDepthStencilTexture, &descDSV, &m_debugDepthStencilView);return hr;}Render normal portion of the first pass:rtv is the render target view using the back buffer.debug depth stencil view was setup in the code above.//Set the render target, should not use the depth bufferm_device->OMSetRenderTargets(1, &rtv, m_debugDepthStencilView);//Clear the depth stencilm_device->ClearDepthStencilView(m_depthStencilView, D3D10_CLEAR_DEPTH, 1.0f, 0);//Clear the render target (use pink for debugging)#ifdef _DEBUGm_device->ClearRenderTargetView(rtv, D3DXVECTOR4(1.f, 0.4f, 0.7f, 1.f));#elsem_device->ClearRenderTargetView(rtv, D3DXVECTOR4(0.f, 0.f, 0.f, 1.f));#endifm_device->IASetInputLayout(m_aNDLayout);m_device->IASetPrimitiveTopology(D3D10_PRIMITIVE_TOPOLOGY_TRIANGLELIST);m_normalRenderTech->GetPassByIndex(0)->Apply(0);scene->Render(m_ANDWorldMatrixVar, m_ANDViewProjMatrixVar); | I'm currently uploading a video of the issue to YouTube. I started rotating the geometry in the video and at certain points it looks like I have depth clipping issues and then the rest of the time everything looks fine.I'm thoroughly confused.YouTube video: >link[Edited by - CornyKorn21 on November 22, 2009 11:30:36 PM]; SOLVEDKept over looking that I was clearing the wrong depth stencil view. |
Explosion Class (Particles lesson 19) | NeHe Productions;Affiliates | Hello,I have created a Explosion class based in the lesson 19 Nehe gamedev. In my program I load a texture to the background when I press the space bar the explosion is created and show but the background image is replaced by black color.I am using SDL with OpenGL, OpenGL draw all the graphics in the screen.What can be happening???Thanks,Regards. | Quote:Original post by cHimuraHello,I have created a Explosion class based in the lesson 19 Nehe gamedev. In my program I load a texture to the background when I press the space bar the explosion is created and show but the background image is replaced by black color.I am using SDL with OpenGL, OpenGL draw all the graphics in the screen.What can be happening???Thanks,Regards.You could post some code, that would be helpful! ; Hello, Yes, this is the code:main.cpp#include <stdio.h>#include <stdlib.h>#include "SDL_opengl.h"#include "SDL_image.h"#include "SDL.h"#include <GL/gl.h>#include <GL/glu.h>#include "Explosion.h"#include <cstdlib>#include <ctime>/* screen width, height, and bit depth */#define SCREEN_WIDTH 640#define SCREEN_HEIGHT 480#define SCREEN_BPP16/* Setup our booleans */#define TRUE 1#define FALSE 0GLuint background;GLenum texture_format = NULL;GLint nofcolors;/* This is our SDL surface */SDL_Surface *surface;Explosion *explosion;int loadBackground(){SDL_Surface *bg; // this surface will tell us the details of the imageif((bg = IMG_Load("images/bg.jpg"))){//if((bg = SDL_LoadBMP("bg.bmp"))){// Check that the image’s width is a power of 2if ( (bg->w & (bg->w - 1)) != 0 ) {printf("warning: image.bmp’s width is not a power of 2\n");}// Also check if the height is a power of 2if ( (bg->h & (bg->h - 1)) != 0 ) {printf("warning: image.bmp’s height is not a power of 2\n");}//get number of channels in the SDL surfacenofcolors=bg->format->BytesPerPixel;//contains an alpha channelif(nofcolors==4){if(bg->format->Rmask==0x000000ff)texture_format=GL_RGBA;elsetexture_format=GL_BGRA;}else if(nofcolors==3) //no alpha channel{if(bg->format->Rmask==0x000000ff)texture_format=GL_RGB;elsetexture_format=GL_BGR;}else{printf("warning: the image is not truecolor…this will break ");}// Have OpenGL generate a texture object handle for usglGenTextures(1, &background );// Bind the texture objectglBindTexture(GL_TEXTURE_2D, background);// Set the texture’s stretching propertiesglTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR );glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );glTexImage2D(GL_TEXTURE_2D, 0, nofcolors, bg->w, bg->h, 0, texture_format, GL_UNSIGNED_BYTE, bg->pixels);}else {printf("SDL could not load image.bmp: %s\n", SDL_GetError());SDL_Quit();return 1;}// Free the SDL_Surface only if it was successfully createdif (bg) {SDL_FreeSurface(bg);}return 0;}/* function to release/destroy our resources and restoring the old desktop */void Quit( int returnCode ){ delete explosion; /* clean up the window */ SDL_Quit( ); /* and exit appropriately */ exit( returnCode );}/* function to reset our viewport after a window resize */int resizeWindow(int width, int height){ /* Height / width ration */ GLfloat ratio; /* Protect against a divide by zero */ if (height == 0) height = 1; ratio = (GLfloat)width / (GLfloat)height; /* Setup our viewport. */ glViewport(0, 0, (GLint)width, (GLint)height); /* change to the projection matrix and set our viewing volume. */ glMatrixMode(GL_PROJECTION); glLoadIdentity(); /* Set our perspective */ //gluPerspective( 45.0f, ratio, 0.1f, 200.0f ); glOrtho(0,(GLint)width, (GLint)height, 0, -1, 1); /* Make sure we're chaning the model view and not the projection */ glMatrixMode(GL_MODELVIEW); /* Reset The View */ glLoadIdentity(); return(TRUE);}/* function to handle key press events */void handleKeyPress(SDL_keysym *keysym){ switch (keysym->sym){ case SDLK_ESCAPE: /* ESC key was pressed */ Quit(0); break; case SDLK_SPACE: explosion = new Explosion(rand()%SCREEN_WIDTH/1.0+1,rand()%SCREEN_HEIGHT/1.0+1); break; default: break;}}/* general OpenGL initialization function */int initGL(){ /* Enable smooth shading */ glShadeModel(GL_SMOOTH); /* Set the background black */ glClearColor( 0.0f, 0.0f, 0.0f, 0.0f ); /* Depth buffer setup */ glClearDepth( 1.0f ); /* Enables Depth Testing */ glDisable(GL_DEPTH_TEST); /* Enable Blending */ glEnable(GL_BLEND); /* Type Of Blending To Perform */ glBlendFunc( GL_SRC_ALPHA, GL_ONE ); /* Really Nice Perspective Calculations */ glHint( GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST ); /* Really Nice Point Smoothing */ glHint( GL_POINT_SMOOTH_HINT, GL_NICEST ); /* Enable Texture Mapping */ glEnable( GL_TEXTURE_2D );glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); /* Select Our Texture */ /* Reset all the particles */ /*for ( loop = 0; loop < MAX_PARTICLES; loop++ ){ int color = ( loop + 1 ) / ( MAX_PARTICLES / 12 ); float xi, yi, zi; xi = ( float )( ( rand( ) % 50 ) - 26.0f ) * 10.0f; yi = zi = ( float )( ( rand( ) % 50 ) - 25.0f ) * 10.0f; ResetParticle( loop, color, xi, yi, zi ); }*/ return(TRUE);}/* Here goes our drawing code */int drawGLScene(){ /* These are to calculate our fps */ static GLint T0= 0; static GLint Frames = 0; /* Clear The Screen And The Depth Buffer */ glClear(GL_COLOR_BUFFER_BIT);//glClearColor(0.0f,0.0f,0.0f,0.0f);glEnable(GL_TEXTURE_2D);glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);//glDisable(GL_BLEND);// Cambio a la matriz de proyeccion//glMatrixMode(GL_PROJECTION);// Recupero de la pila, la matriz de proyeccion original// asi no tengo que volver a indicar a OpenGL como quiero // la proyeccion. Sencillamente la restablezco.//glPopMatrix();// Cambio de nuevo a la matriz de modelo.//glMatrixMode(GL_MODELVIEW);//glTranslatef(0.0,0.0,0.0);//glColor4f(1.0f,1.0f,1.0f,0.5f);//glEnable(GL_BLEND);//glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);glBindTexture(GL_TEXTURE_2D, background);//glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);//glColor4f(1.0f,1.0f,1.0f,1.0f);glBegin(GL_QUADS);// Top-left vertex (corner)glTexCoord2i(0, 0);glVertex2i(0, 0);// Top-right vertex (corner)glTexCoord2i(1, 0);glVertex2i(SCREEN_WIDTH, 0);// Bottom-right vertex (corner)glTexCoord2i(1, 1);glVertex2i(SCREEN_WIDTH, SCREEN_HEIGHT);// Bottom-left vertex (corner)glTexCoord2i(0, 1);glVertex2i(0, SCREEN_HEIGHT);glEnd();glLoadIdentity();//glDisable(GL_BLEND);glDisable(GL_TEXTURE_2D);glTranslatef(100.0,100.0,0.0);glColor4f(1.0f,0.0f,0.0f,0.5f);glBegin(GL_QUADS);// Top-left vertex (corner)glTexCoord2i(0, 0);glVertex2i(0, 0);// Top-right vertex (corner)glTexCoord2i(1, 0);glVertex2i(100, 0);// Bottom-right vertex (corner)glTexCoord2i(1, 1);glVertex2i(100, 100);// Bottom-left vertex (corner)glTexCoord2i(0, 1);glVertex2i(0, 100);glEnd();glLoadIdentity(); if(explosion != NULL) { if(explosion->isDead()) { delete explosion; explosion = NULL; printf("explosion borrada\n"); } else explosion->update(); } /* Draw it to the screen */ SDL_GL_SwapBuffers(); /* Gather our frames per second */ Frames++; { GLint t = SDL_GetTicks(); if (t - T0 >= 5000) { GLfloat seconds = (t - T0) / 1000.0; GLfloat fps = Frames / seconds; printf("%d frames in %g seconds = %g FPS\n", Frames, seconds, fps); T0 = t; Frames = 0; } } return( TRUE );}int main( int argc, char **argv ){ /* Flags to pass to SDL_SetVideoMode */ int videoFlags; /* main loop variable */ int done = FALSE; /* used to collect events */ SDL_Event event; /* this holds some info about our display */ const SDL_VideoInfo *videoInfo; /* whether or not the window is active */ int isActive = TRUE; /* initialize SDL */ if ( SDL_Init( SDL_INIT_VIDEO ) < 0 ){ fprintf( stderr, "Video initialization failed: %s\n",SDL_GetError( ) ); Quit( 1 );} /* Fetch the video info */ videoInfo = SDL_GetVideoInfo( ); if ( !videoInfo ){ fprintf( stderr, "Video query failed: %s\n",SDL_GetError( ) ); Quit( 1 );} /* the flags to pass to SDL_SetVideoMode */ videoFlags = SDL_OPENGL;/* Enable OpenGL in SDL*/ videoFlags |= SDL_GL_DOUBLEBUFFER; /* Enable double buffering */ videoFlags |= SDL_HWPALETTE; /* Store the palette in hardware */ videoFlags |= SDL_RESIZABLE; /* Enable window resizing */ /* This checks to see if surfaces can be stored in memory */ if ( videoInfo->hw_available )videoFlags |= SDL_HWSURFACE; elsevideoFlags |= SDL_SWSURFACE; /* This checks if hardware blits can be done */ if ( videoInfo->blit_hw )videoFlags |= SDL_HWACCEL; /* Sets up OpenGL double buffering */ SDL_GL_SetAttribute( SDL_GL_DOUBLEBUFFER, 1 ); /* get a SDL surface */ surface = SDL_SetVideoMode( SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_BPP,videoFlags ); /* Verify there is a surface */ if ( !surface ){ fprintf( stderr, "Video mode set failed: %s\n", SDL_GetError( ) ); Quit( 1 );} /* Enable key repeat */ if ( ( SDL_EnableKeyRepeat( 100, SDL_DEFAULT_REPEAT_INTERVAL ) ) ){ fprintf( stderr, "Setting keyboard repeat failed: %s\n",SDL_GetError( ) ); Quit( 1 );} /* initialize OpenGL */ if ( initGL( ) == FALSE ){ fprintf( stderr, "Could not initialize OpenGL.\n" ); Quit( 1 );} /* Resize the initial window */ resizeWindow( SCREEN_WIDTH, SCREEN_HEIGHT ); //explosion = new Explosion(); explosion = NULL; srand(time(0));loadBackground(); /* wait for events */ while ( !done ){ /* handle the events in the queue */ while ( SDL_PollEvent( &event ) ){ switch( event.type ){case SDL_ACTIVEEVENT: /* Something's happend with our focus* If we lost focus or we are iconified, we* shouldn't draw the screen*/ if ( event.active.gain == 0 )isActive = FALSE; elseisActive = TRUE; break;case SDL_VIDEORESIZE: /* handle resize event */ surface = SDL_SetVideoMode( event.resize.w,event.resize.h,16, videoFlags ); if ( !surface ){ fprintf( stderr, "Could not get a surface after resize: %s\n", SDL_GetError( ) ); Quit( 1 );} resizeWindow( event.resize.w, event.resize.h ); break;case SDL_KEYDOWN: /* handle key presses */ handleKeyPress( &event.key.keysym ); break;case SDL_QUIT: /* handle quit requests */ done = TRUE; break;default: break;}} /* If rainbow coloring is turned on, cycle the colors */ //if ( rainbow && ( delay > 25 ) )//col = ( ++col ) % 12; /* draw the scene */ if (isActive)drawGLScene(); //delay++;} /* clean ourselves up and exit */ Quit(0); /* Should never get here */ return( 0 );}Explosion.cpp#include "Explosion.h"#include <iostream>GLfloat Explosion::colors[MAX_COLORS][3] ={ { 1.0f, 0.45f, 0.0f}, { 0.0f, 0.0f, 0.0f}, { 0.0f, 0.0f, 0.0f}, { 0.0f, 0.0f, 0.0f}, { 0.0f, 0.0f, 0.0f}, { 0.0f, 0.0f, 0.0f}, { 0.0f, 0.0f, 0.0f}, { 0.0f, 0.0f, 0.0f}, { 0.0f, 0.0f, 0.0f}, { 0.0f, 0.0f, 0.0f}, { 0.0f, 0.0f, 0.0f}, { 0.0f, 0.0f, 0.0f}, { 0.0f, 0.0f, 0.0f}, { 0.0f, 0.0f, 0.0f}, { 0.0f, 0.0f, 0.0f}, { 0.0f, 0.0f, 0.0f}, { 0.0f, 0.0f, 0.0f}, { 0.0f, 0.0f, 0.0f}, { 0.0f, 0.0f, 0.0f}, { 0.0f, 0.0f, 0.0f}};/*GLfloat Explosion::colorsRED[MAX_COLORS][3] ={ { 1.0f, 0.0f, 0.0f}, { 0.9f, 0.0f, 0.0f}, { 0.8f, 0.0f, 0.0f}, { 0.7f, 0.0f, 0.0f}, { 0.6f, 0.0f, 0.0f}, { 0.5f, 0.0f, 0.0f}, { 0.4f, 0.0f, 0.0f}, { 0.3f, 0.0f, 0.0f}, { 0.2f, 0.0f, 0.0f}, { 0.1f, 0.0f, 0.0f}, { 0.2f, 0.0f, 0.0f}, { 0.3f, 0.0f, 0.0f}, { 0.4f, 0.0f, 0.0f}, { 0.5f, 0.0f, 0.0f}, { 0.6f, 0.0f, 0.0f}, { 0.7f, 0.0f, 0.0f}, { 0.8f, 0.0f, 0.0f}, { 0.9f, 0.0f, 0.0f}, { 1.0f, 0.0f, 0.0f}, { 0.9f, 0.0f, 0.0f}};*/Explosion::Explosion(double x, double y)//, int size, int numParticles){ this->x = x; this->y = y; //this->SIZE = size; //this->MAX_PARTICLES = numParticles; slowdown = 0.095f; /* Slow Down Particles */ zoom = -40.0f; col = 0; LoadGLTextures(); for(loop = 0; loop < MAX_PARTICLES; loop++) { int color = (loop + 1) / (MAX_PARTICLES / MAX_COLORS); float xi, yi, zi; xi = (float)((rand() % 50) - 26.0f) * 10.0f; yi = zi = (float)((rand() % 50) - 25.0f) * 10.0f; ResetParticle(loop, color, xi, yi, zi); }std::cout << ".:EXPLOSION NUEVA:." << std::endl;}Explosion::~Explosion(){ glDeleteTextures(1, &texture[1]);}/* function to load in bitmap as a GL texture */int Explosion::LoadGLTextures(){ /* Status indicator */ int Status = FALSE; /* Create storage space for the texture */ SDL_Surface *TextureImage[1]; /* Load The Bitmap, Check For Errors, If Bitmap's Not Found Quit */ //if((TextureImage[0] = SDL_LoadBMP("data/particle.bmp")))if((TextureImage[0] = IMG_Load("images/particle.png"))) { /* Set the status to true */ Status = TRUE; /* Create The Texture */ glGenTextures( 1, &texture[0] ); /* Typical Texture Generation Using Data From The Bitmap */ glBindTexture( GL_TEXTURE_2D, texture[0] ); /* Generate The Texture */ glTexImage2D( GL_TEXTURE_2D, 0, 3, TextureImage[0]->w, TextureImage[0]->h, 0, GL_BGR, GL_UNSIGNED_BYTE, TextureImage[0]->pixels ); /* Linear Filtering */ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); } /* Free up any memory we may have used */ if(TextureImage[0]) SDL_FreeSurface(TextureImage[0]); return Status;}void Explosion::ResetParticle(int num, int color, float xDir, float yDir, float zDir){ /* Make the particels active */ particles[num].active = TRUE; /* Give the particles life */ particles[num].life = 1.0f; /* Random Fade Speed */ particles[num].fade = (float)(rand() %100) / 1000.0f + 0.05f; /* Select Red Rainbow Color */ particles[num].r = colors[<span class="cpp-number">0</span>];<br> <span class="cpp-comment">/* Select Green Rainbow Color */</span><br> particles[num].g = colors[<span class="cpp-number">1</span>];<br> <span class="cpp-comment">/* Select Blue Rainbow Color */</span><br> particles[num].b = colors[<span class="cpp-number">2</span>];<br> <span class="cpp-comment">/* Set the position on the X axis */</span><br> particles[num].x = x;<span class="cpp-comment">//100.0f;</span><br> <span class="cpp-comment">/* Set the position on the Y axis */</span><br> particles[num].y = y;<span class="cpp-comment">//100.0f;</span><br> <span class="cpp-comment">/* Set the position on the Z axis */</span><br> particles[num].z = <span class="cpp-number">0</span>.0f;<br> <span class="cpp-comment">/* Random Speed On X Axis */</span><br> particles[num].xi = xDir;<br> <span class="cpp-comment">/* Random Speed On Y Axi */</span><br> particles[num].yi = yDir;<br> <span class="cpp-comment">/* Random Speed On Z Axis */</span><br> particles[num].zi = zDir;<br> <span class="cpp-comment">/* Set Horizontal Pull To Zero */</span><br> particles[num].xg = <span class="cpp-number">0</span>.0f;<br> <span class="cpp-comment">/* Set Vertical Pull Downward */</span><br> particles[num].yg = -<span class="cpp-number">0</span>.8f;<br> <span class="cpp-comment">/* Set Pull On Z Axis To Zero */</span><br> particles[num].zg = <span class="cpp-number">0</span>.0f;<br><br> <span class="cpp-comment">//return;</span><br>}<br><br><span class="cpp-keyword">void</span> Explosion::update()<br>{<br> <span class="cpp-comment">//glLoadIdentity();</span><br><br><span class="cpp-comment">//glTranslatef(0.0,0.0,0.0);</span><br><br><span class="cpp-comment">//glEnable(GL_TEXTURE_2D);</span><br><span class="cpp-comment">//glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);</span><br><span class="cpp-comment">//glBindTexture(GL_TEXTURE_2D, texture[0]);</span><br><br> <span class="cpp-comment">/* Modify each of the particles */</span><br> <span class="cpp-keyword">for</span>(loop = <span class="cpp-number">0</span>; loop < MAX_PARTICLES; loop++)<br>{<br> <span class="cpp-keyword">if</span>(particles[loop].active)<br>{<br> <span class="cpp-comment">/* Grab Our Particle X Position */</span><br> <span class="cpp-keyword">float</span> x = particles[loop].x;<br> <span class="cpp-comment">/* Grab Our Particle Y Position */</span><br> <span class="cpp-keyword">float</span> y = particles[loop].y;<br> <span class="cpp-comment">/* Particle Z Position + Zoom */</span><br> <span class="cpp-keyword">float</span> z = <span class="cpp-number">0</span>;<span class="cpp-comment">//particles[loop].z + zoom;</span><br><br> <span class="cpp-comment">/* Draw The Particle Using Our RGB Values,<br>* Fade The Particle Based On It's Life<br>*/</span><br><br><span class="cpp-comment">//glEnable(GL_BLEND);</span><br><br><span class="cpp-comment">//glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);</span><br><br> glColor4f(particles[loop].r,<br> particles[loop].g,<br> particles[loop].b,<br>particles[loop].life);<br><br> <span class="cpp-comment">/* Build Quad From A Triangle Strip */</span><br> glBegin( GL_TRIANGLE_STRIP );<br> <span class="cpp-comment">/* Top Right */</span><br> glTexCoord2d( <span class="cpp-number">1</span>, <span class="cpp-number">1</span> );<br> glVertex3f( x + SIZE, y + SIZE, z );<br> <span class="cpp-comment">/* Top Left */</span><br> glTexCoord2d(<span class="cpp-number">0</span>, <span class="cpp-number">1</span>);<br> glVertex3f( x - SIZE, y + SIZE, z );<br> <span class="cpp-comment">/* Bottom Right */</span><br> glTexCoord2d(<span class="cpp-number">1</span>, <span class="cpp-number">0</span>);<br> glVertex3f(x + SIZE, y - SIZE, z);<br> <span class="cpp-comment">/* Bottom Left */</span><br> glTexCoord2d(<span class="cpp-number">0</span>, <span class="cpp-number">0</span>);<br> glVertex3f(x - SIZE, y - SIZE, z);<br> glEnd();<br><br> <span class="cpp-comment">/* Move On The X Axis By X Speed */</span><br> particles[loop].x += particles[loop].xi/(slowdown * <span class="cpp-number">1000</span>);<br> <span class="cpp-comment">/* Move On The Y Axis By Y Speed */</span><br> particles[loop].y += particles[loop].yi/(slowdown * <span class="cpp-number">1000</span>);<br> <span class="cpp-comment">/* Move On The Z Axis By Z Speed */</span><br> particles[loop].z += <span class="cpp-number">0</span>;<span class="cpp-comment">//particles[loop].zi /(slowdown * 1000);</span><br><br> <span class="cpp-comment">/* Take Pull On X Axis Into Account */</span><br> particles[loop].xi += particles[loop].xg;<br> <span class="cpp-comment">/* Take Pull On Y Axis Into Account */</span><br> particles[loop].yi += particles[loop].yg;<br> <span class="cpp-comment">/* Take Pull On Z Axis Into Account */</span><br> particles[loop].zi += particles[loop].zg;<br><br> <span class="cpp-comment">/* Reduce Particles Life By 'Fade' */</span><br> particles[loop].life -= particles[loop].fade;<br>}<br>}<span class="cpp-comment">//for</span><br><br>glLoadIdentity();<br><br><span class="cpp-comment">//glEnable(GL_BLEND);</span><br><br><span class="cpp-comment">//glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);</span><br>}<br><br><span class="cpp-keyword">bool</span> Explosion::isDead()<br>{<br> <span class="cpp-keyword">for</span> (loop = <span class="cpp-number">0</span>; loop < MAX_PARTICLES; loop++)<br>{<br> <span class="cpp-keyword">if</span> (particles[loop].life > <span class="cpp-number">0</span>)<br> <span class="cpp-keyword">return</span> <span class="cpp-keyword">false</span>;<br>}<br><br><span class="cpp-keyword">return</span> <span class="cpp-keyword">true</span>;<br>}<br><br><br><br></pre></div><!–ENDSCRIPT–><br><br>Thanks,<br>Regards; please post source code within [source ] [ /source] tags. |
*UPDATED:01/07/10*Development Team Looking for more for Survival Horror / RPG game. | Old Archive;Archive | Team Name: Cubed StudiosProject Name: “Plague”Description:**This project was originally titles: iNFECTED, due to legal issues and other circumstances, the original team disbanded and regathered to create a new project based on our original idea. Only the name has changed.**Plague has just started its first month of planning and will begin official development later on next month. More Information will be released closer to that time. Until then, here are a few things to know about the game: Plagueis NOT the official name of the game; It is merely a placeholder until the project has reached alpha stages in testing. The game will be released exclusively for the PC platform. There will be other ports of the game available (iPhone, XBL Arcade, ANDROID, PSN, and Mac) in the future. Current release date for the completed game is October 31st, 2011.Here is a brief summary of the game:You are one thousand miles away from home; recently graduated from high-school and spending the rest of your summer alone in an old, quiet and boring dorm oratory. You do not know anybody here and it's hard meet other people as the entire city is quarantined due to a viral outbreak that has already killed dozens. You decide to do what you can to pass time; sleep. You are awakened by the violent sound of a gunshot, followed by sirens and ominous screams. You are instantly brought into a state of panic, you try to turn the light on, no avail, only the blue and red reflected lights flashing in your room offer you the only source of light you have. There is banging on your door, it is so violent, you watch as the hinges of your door are bending from the sheer force. Your heart is racing, you hands shaking you desperately search your room for a weapon...too late, the door slams open and reveals...what used to be your neighbor. Your life flashes before your eyes as you realize that you are seconds away from a gruesome death...or are you?Target aim: Our short term goal is to create a high-quality demo that we can release to publishers.Our long-term term goal is to complete game and release it as a retail game available exclusively for the PC, then periodically released on other platforms, (iPhone, ANDROID, Steam, XBL, PSN etc.) Compensation:At the moment, I will not be able to offer any immediate payment, however, those who are serious about joining our team and are willing to put in the work to create the greatest quality product will receive a cut of the total revenue of the game. This of course will be contracted. Percentages will be discussed with the individual. Technology:We will be using the Ogre Engine. Talent Needed:Currently we are looking for the following:3D Character Designer (2)3D Model Designer (2)Concept Artist (3)Level Designer (3)Writer(1)Programmer (4)Each person interested is expected to have some knowledge is what they do, have a portfolio ready as we will be asking to see some of your work. (an online site showcasing your ability is acceptable.)Team Structure:Armando Villanueva Jr: Creative Director / Lead DesignerJacob Leung: Lead ProgrammerDaniel Rico: Lead Artist | 3D DesignerWebsite:Our Website is under construction and should be up by the week's end. ContactsFeel free to contact me for more information:e-mail: armando.developer@gmail.comwebsite:Currently under construction, will be up with in the next few days.Previous workWe have over nine years experience individually with what we do, we have worked on many projects, none of them published, just things we did for fun. Additional Info This will be our first published title, we plan to put in as much work and effort as we can and expect those interested to have the same amount of dedication. This post will be updated weekly with more information about the game as well as other things regarding our development team.Thank you for reading this, I hope to hear from many of you soon! Any feedback is always appreciated, thank you again. ArmandoCubed Studios[Edited by - cubed_dev on January 7, 2010 11:56:36 AM] | EDIT: There was an issue with the e-mail on the contact and application on the website. These issues have been resolved now. Still looking for a few more individuals who are interested in joining our team. ; BUMP:Still looking for more programmers and a few artists. |
Language to make a learning type program | For Beginners | I want to create a basic learning program in Dakota and give it out around my area. Basically it'd show pictures of whichever word they choose, and then it'll have a fluent speaker say the word (I'll get that, too), and then they can just choose different words and have the speaker say the word.It's just going to be a very basic program in hopes of motivating some of the non-speakers around my area to pick up the language again. Possibly even make it into a game later on.My question is, which would be the best way to make this program? Which would be the best way to turn it into a game? Thanks! | Moving to For Beginners.What kind of experience do you have with programming, if any? ; I have some C++ experience as well as some Flash and just a tiny bit of Python. Thanks for moving this to the correct forum! ; Interestingly enough, I have been bouncing the same idea around as well and have been trying to determine what languages/API/framework to use. I am, at the moment, strongly considering a browser-based "game".Languages: Cplusplus : Beginner - IntermediateC : Beginner - IntermediateVB.net : IntermediateC# : Intermediatejavascript : BeginnerSilverlight (any version) : novice (as in lower than beginner)Java : noviceNote: I'd be willing to take learn any new languages if they better fit and complete task than what I have listed above. ;Quote:Original post by MahPIyaAteI have some C++ experience as well as some Flash and just a tiny bit of Python. Thanks for moving this to the correct forum!You could create a web application with Flash. That way you wouldn't have to physically distribute the program, updates (new words etc.) are centralized and people all over the world could use it. :) ; Thanks for the suggestion! ;Quote:Original post by Alpha_ProgDesInterestingly enough, I have been bouncing the same idea around as well and have been trying to determine what languages/API/framework to use. I am, at the moment, strongly considering a browser-based "game".Languages: Cplusplus : Beginner - IntermediateC : Beginner - IntermediateVB.net : IntermediateC# : Intermediatejavascript : BeginnerSilverlight (any version) : novice (as in lower than beginner)Java : noviceNote: I'd be willing to take learn any new languages if they better fit and complete task than what I have listed above.Just out of curiousity, how is Silverlight easier than C#? You can design the graphics in Expression Studio, but to add interactivity, you have to write C#. C# is to Silverlight what ActionScript is to Flash.As far as the OP, when you say Dakota, you mean the language, correct? Do Operating Systems currently support Dakota out of the box, or is it spelled out with the Roman alphabet? I am just wondering how to easily support it if it is considered an "uncommon language" that is not included on the Windows disc. ; [EDIT: Never mind; I did some research.] ; Yes, Dakota is an uncommon language, and traditionally there are characters that aren't in the Roman alphabet, but it's easily spelled with the Roman alphabet and exactly the same. ;Quote:Original post by MahPIyaAteI have some C++ experience as well as some Flash and just a tiny bit of Python. Thanks for moving this to the correct forum!Flash. No contest. |
What books did developer read for game development in the 1990s? | For Beginners | I want to make a game But I wonder how game developers worked in the 1990s, how they made games, how they learning before the Internet became as widespread as it is today. etc.how do they know how to build game mechanics as character ability power up system?how they know to reverse engineering game competitor company.what book I should read? | As far as I know (not being a programmer myself), books on the subject started appearing in the early 2000s. Up to that point, it was “learn by doing” and tips from one another. ;The first book that came to mind was Tricks of the Game-Programming Gurus: Lamothe, Andre, Ratcliff, John, Tyler, Denise: 9780672305078: Amazon.com: Books, which was geared toward beginners/students/amateurs. There were others, but that's the best selling pre-2000. After that point in time, game development became a hot topic in the book publishing world. Even GameDev.net has a series - Beginning Game Programming: A GameDev.net Collection (Course Technology Cengage Learning): 9781598638059: Computer Science Books @ Amazon.com.Otherwise, in the professional realm a lot was “learn by doing” as Tom said, or through word of mouth on early Usenet/IRC/websites (pre-GameDev.net in 1999 - see About GameDev.net). ;Computers in that era didn't have an OS like we have today. The machine booted, and you were dropped in a command shell or in an interactive BASIC interpreter. You basically programmed directly at the metal. Video memory was directly accessible, by writing in a known address range you could make pixels appear at the screen in various colors. The “OS” had a corner in the memory too for its data, but nothing prevented you from poking around there. Lua, Python, C#, C++ didn't exist, ANSI-C was just invented (K&R book about that was in 1989 iirc). Assembly language of course did exist (with books) and was used.Monthly computer magazines were published for all types of home computers. Tips and tricks were exchanged in that way, also program listings were printed in those magazines that you could then enter at your own computer. Studying those listings, and trying things for yourself is how you learned. There was also technical documentation about the computer.If you want to enjoy that stuff, today there is a retro-computing movement, that lives in that era, except with slight more modern hardware but still no OS, etc.;Alberth said:Computers in that era didn't have an OS like we have today.In the 1990s there was MSDOS, Several versions of Windows, and of MacOS. And that's not all the operating systems of the nineties, most likely.Like Linux, for instance.;Tom Sloper said:Alberth said:Computers in that era didn't have an OS like we have today.In the 1990s there was MSDOS, Several versions of Windows, and of MacOS. And that's not all the operating systems of the nineties, most likely.Like Linux, for instance.Yep. There were things like Windows 95, Win 98, and at the time I was still using a Commodore Amiga (AmigaOS) .To deal with the original question “what game dev books was I reading in the 90s?” Back in that era, one of my favorites was : The Black Art of 3D Game Programming by André LaMothe. ;Abrash was the guy who did the Windows NT graphics subsystem and worked on Quake.https://www.drdobbs.com/parallel/graphics-programming-black-book/184404919 ;There are a couple of" history of video games" books, that track the rise of the medium and genre.Just google for them. ;GeneralJist said:There are a couple of" history of video games" booksThat's not what the OP is looking for.;Thanks all |
Choosing a career in AI programmer? | Games Career Development;Business | Hello everyone, my name is Ramon Diaz; I am currently studying Game development and programming at SNHU. I have taken the initiative to learn about a professional career in AI programming. I have a lot of gaps in my development in the short term. I have blueprint experience with AI but not enough to choose a career in this profession. I would like to know how I can be competitive leaving the university in 5 months after finishing my studies. I am looking for knowledge from all of you who have been in the industry for years. | Entry level? Know your algorithms, it will help you at interviews. If you have made demos it can help you get jobs, but the market is wide open right now and should be relatively easy to find work for the foreseeable future. Overall, it reads like you are on the right path. When you graduate and start looking for work, be open to any positions rather than just an AI specialty. Once you have a job it is easier to transition into whatever specialty you prefer.;Thank you. ;I would like to know how I can be competitive leaving the university in 5 months after finishing my studies.Talk about last minute. Create AI projects? Or A game with character behaviors? Pathfinding examples. Crowd movements. Anything really. Learn how navigation meshes work.;@dpadam450 Character Behavior is what I doing in the project at this moment. Everything related to AI programming.;@dpadam450 Is it the same when learning C++ in AI as visual scripting Blueprint? If I were to make a demo, what kind of programming should I focus on my attention? ;@frob It is important to have a portfolio? ;Not for programming. You will need to show you know how to do the work, but it is usually some interview questions and writing some code of their choice. If you have something you want to share with them, you can do it if you want. Having done fancy demos can sometimes help get interviews, and can help show your interest and abilities, but it is generally not needed. It does not hurt, unless you do it badly and therefore becomes a cautionary warning. Build it if you want. I have interviewed and hired bunches of programmers without portfolios. ;I'm studying AI at the moment, in terms of statistical learning. I've learned so much about AI over the past few weeks. Check out: https://hastie.su.domains/ISLR2/ISLRv2_website.pdfandMachine Learning with R: Expert techniques for predictive modeling, 3rd Edition |
Newbie desperate for advice! | Games Business and Law;Business | Hi allI'm new to the game development community and need some advice.I've created 2 educational games with a simple idea but are sufficiently challenging for all ages. These could be played on pcs or phones.Is it worth patenting any parts of the games?What would be the best way to monetize?How should I market the games? | hendrix7 said:I'm new to the game development communityReally? Your profile shows that you've been a member here since 2004, and your last activity was in 2007, asking about raycasting.hendrix7 said:Is it worth patenting any parts of the games?Probably not. Expensive and there will be hurdles, and possible lawsuits after the patent is granted (if it is).hendrix7 said:What would be the best way to monetize? How should I market the games?There are several threads here in the Business and Law forum about that. While you wait for more replies from the community, you can read up on those previous answers to those questions. Mainly, “you should have thought about that before you finished your games.” (You wouldn't be “desperate” now.) Good luck with your sales!;@hendrix7 Filing for a patent can be expensive, and you need to document the solution and how it separates from anything else. I have developed software that solved problems in a way that no other software does, but there is only a very small portion of that that can actually be patented. Even though you can file an application yourself, I would recommend hiring an experienced IP attorney. This too is very expensive, though, so you are best off doing this if this idea can provide millions in income. If it can't, then it's actually not that harmful if anybody copies it.You could look at registering trademarks, design and other parts of the games. This is cheaper, but it will protect you brand more than your idea or solution.Again, if this is something that could turn a real profit, it might be worth looking into. If not, it's a very costly waste of time.As for marketing - my day job is actually creating videos and commercials etc., so naturally that's the first thing that comes to mind.Make videos for social media or other platforms where your target audience is likely to see it. Oh, and you need to define a target audience. Know where they are, what they respond to, what their struggles are and how your product will solve their problems, enhance their life experience or in other ways contribute positively to their life.There are several other ways to do this, but the list exceeds my level of expertise in the area.;patenting is costly, and time intensive. As said above, it depends on a lot if it's worth it. ;@hendrix7 Nothing is worth patenting unless you're willing and able to defend your patent. There is no patent police; you're responsible for finding and prosecuting infrigement.What you're patenting has to be novel and non-obvious to a person skilled in the art. You called your idea ‘simple’ which makes me wonder if it's obvious or already in use.;@Tom Sloper Thanks TomI have been programming for a while but not games until now.Thanks for getting back and your advice, particularly patents.;@scott8 Thanks for your reply.I see. The play of the game utilises basic maths skills so I'm guessing it'll be difficult to identify anything that's unique. I suppose, in a similar way, it would be difficult to patent something like ‘Wordle’. Am I right? |
Hi I'm new. Unreal best option ? | For Beginners | Hallo everyone. My name is BBCblkn and I'm new on this forum. Nice to virtually meet you 🙂. One of my biggest dreams is to make my own videogame. I love writing design as in text on how my dream game would be. Now I got no skills to create it. But who knows what life will bring. Is Unreal the best program to have fun with an experience ? Obviously I prefer a simple but capable program. Not pre designed auto drop. Why not install Unreal and roam into it and see if anything happens.My favorite games are in the genre of Fantasy, usually stone age with magic. Dota, Homm, Diablo and the odd one out is the genius Starcraft 1. But I played plenty of different games, especially when I way younger. I don't game currently at all but designing gets my creative juices flowing and is so inspiring and fun. Thanks for having me guys | BBCblkn said:My name is BBCblknI am truly sorry for you. Even Elons daughter has a better name than that.BBCblkn said:Is Unreal the best program to have fun with an experience ?Give it a try, but it's not meant for total beginners.Starting small always is a good idea. 2D is easier than 3D. You could try GameMaker, learn some programming language, learn some math, move on to more advanced engines like UE or Unity… ;There's honestly no perfect program for beginners. If I had to compare Unreal though at my skill level, I would probably pick Unity. However, It really comes down to your needs, and how much programming you want to learn. Furthermore, I would also keep in mind other engines.;@BBCblkn I'd recommend Gamemaker studio 2 as a first engine. It's easy to learn and I haven't had a problem making my game ideas in it yet.There are some good tutorials on YouTube to follow to learn it. Do note you'll be limited to 2D games with GMS2.Bit late to the post, but I hope it helps;gamechfo said:Bit late to the postTwo months late. Always consider whether you honestly believe that a question asked long in the past is still awaiting an answer. Thread locked. |
How to publish a book? | GDNet Lounge;Community | Hello, So, over the holidays I finished my 1st book. Do any of yall writer types know where I can find:an editorpublisherIt's like 99% done, just need to know what to do next. Also, it's cross genre, so it doesn't necessarily fit the standard model. | You've given nowhere near enough information to get a final answer, but I can suggest next steps for you. (For background, I've worked as an author, co-author, editor, and ghostwriter on 9 books so far.)Publishing is a business deal. You need to figure out what business services you need.Do you even need a publisher? Do you need a distributor? You already mention needing an editor. Do you need marketing? Do you need retail agreements? Digital or physical? If physical, POD or offset, how many each of hard or soft, what size of print run can you afford? What business services do you need? Publishers have an awful lot of potential features of what they can provide and what those services cost.Once you know the list of services you actually need, your favorite bookstore will have books that have listings of all the major publishers and hundreds of minor publishers, along with the services they provide and the specialties they work with. Work through the listings methodically, and talk to them all until you've got a deal. You'll also want to start shopping around for a lawyer at that point, both because they have connections and because they'll be working with the contracts you'll be signing.Once you know what you need and have talked with your lawyer the first few times, you will be ready to start shopping around. It's far better if you have more money and are using the publisher as a paid service. That is, you pay them for the services they provide up front. It will cost you many thousand dollars but you'll require far fewer sales to reach profitability. It can be better to do an online plus POD service starting out if you're self funded. If they need to front any of the money there will be two phases to the deal, one phase before it's profitable and another after a threshold is reached and it's profitable. The exact terms will depend on your needs and the services they'll be providing. Before you sign with anyone, you'll need to work back and forth more than once with your lawyer to help you negotiate what's fair in the agreement. Good lawyers understand the costs of the various services and can help you get fair rates.Just like publishing games, the more you need from them the harder your pitch becomes. If you need a lot of services the more it will cost you. If you're looking for them to invest in you, front you money, and pay for the books, don't expect a lot of money from the deal, and in addition your pitch needs to be amazing and you'll be rejected many times. If you've got the money to self-publish and are only looking for retail agreements that's rather easy. ;hmmmWell Self publish might work too. I'm looking for:an editor publishing distribution for ebookNo hard cover or physical book planned at this timemaking cover art. Future Audio book production. I think that's it. I'd be willing to do physical print if needed, but I don't really want to pay for that at this time. frob said:You've given nowhere near enough information to get a final answer The issue is I don't know what questions or criteria I should be asking or looking for. ;Have you considered publishing with Packt?https://www.packtpub.com/;GeneralJist said:2. publishing distribution for ebook 3. No hard cover or physical book planned at this timeFor distribution of an ebook there are plenty of options. Amazon is the biggest with kindle direct publishing requiring little more than an html file and an image for the title. If you are comfortable with software tools you can use that same document to build/compile every other format out there. You're on the hook for everything else with the business if you go that route, but it can work well if you are marketing through your own channels.There are many ebook publishers out there targeting specific platforms and specific readers or specific genres. I mentioned publisher lists, they also include electronic-only publishers. Understand the tools they use against piracy are also helpful since otherwise anybody with access to the file can make unlimited copies.Be careful of contracts, you almost certainly want something that has a non-exclusive agreement since you've done all the work yourself already. If a publisher wants an exclusive deal they need to be putting quite a lot on the negotiating table.GeneralJist said:4. making cover art.Find an artist with the style you like and contact them. Often it's in the range of a couple hundred bucks, especially for ‘unknown’ artists when they're starting with something that wouldn't have seen the light of day otherwise. Artist friends are best, and asking around at local art schools is inexpensive.GeneralJist said:5. Future Audio book production.If you don't need it now, it's something easily done later.GeneralJist said:1. an editorThis one is the most difficult. Skilled editors are amazing. If you go with a publishing house they'll provide professional editors, at professional rates. ;taby said:Have you considered publishing with Packt?https://www.packtpub.com/hmmm 1st time hearing of them.Looks like they are more of an educational option?My book is a mix of mental health journey auto bio, and Sci Fi elements. It's not really a standard “how to” for game dev. ;so I just heard back from my 1st publisher submission.https://triggerhub.org/And they essentially say they be willing to look at it deeper, and have extensive edits to focus on the mental health angle. but they would want me to cut a lot. From what they are hinting at, It sounds like they want to cut a lot of the Game dev and gaming journey, as they are a publisher focused on mental health.So, now I need to decide what to do.I sent them back an email saying I'm open to continued dialogue.Without knowing exactly what they want to cut, and edit, I don't know how to proceed.Also, would it be better to hold out, and find a publisher that is willing to accept most of the game dev journey, as I'm looking for a continued publisher to work with, aka accept most of the book as is. Any advice would be helpful.Thanks yall. ;GeneralJist said:Any advice would be helpful.Look into your own mind and heart.;hmmmok,So I've submitted to a few other places.We shall see.I submitted to this place called author House, and they got back to me really quick, but it looks like they want me to pay a couple thousand for a package:https://www.authorhouse.com/en/catalog/black-and-white-packagesI personally find that a bit frustrating.I mean, really, I wrote the book, I thought traditional publishers get paid from a % of sales?@frobWhat do you think?Is the above package a good deal?I was also a little put off, as it seems the person who called me didn't even read anything about my book, and asked me “so what's your book about?"beyond the above, how does this usually work? Edit: so, after a bit of basic research, it seems the above organization is a bit scamy. The hunt continues. ;You're unlikely to get a publisher deal, where the publisher pays you an advance and distributes your book to retail outlets.You'll have to self-publish, meaning you have to bear all the costs for printing, and nobody will distribute it for you. https://en.wikipedia.org/wiki/Vanity_press |
First-person terrain navigation frustum clipping problem | General and Gameplay Programming;Programming | I am trying to develop first-person terrain navigation. I am able to read a terrain and render it as well as to move around the terrain by interpolating the location of the camera every time I move around. The main problem I have is that depending on the terrain, i.e. moving on a sloping terrain, the near plane clips my view (see below). What is the best way to avoid this? Presumably, I can interpolate the heights for the bottom corners of the near plane … any help would be appreciated. | I believe this can aways be an issue. I mean if you are clipping to a near plane and that plane passes through geometry, it has to do something. That being said you technically don't have to clip to a near plane at all, however many graphics APIs require it. Another other thing to consider is once you have collision working, you can put your camera, including your near clipping plane inside a collidable object, for instance a sphere, such that this problem will never occur. If you are eventually going to make this a real first-person game, that should take care of the problem since your camera will be inside the players head. Even in a 3rd person game you can put them inside a floating sphere. ;Gnollrunner said:That being said you technically don't have to clip to a near plane at all, however many graphics APIs require it.The near clip plane is always needed, even if you use a software rasterizer. If you don't do the clipping, vertices would flip behind the camera, causing glitches way worse than what we get from clipping.mllobera said:What is the best way to avoid this? Presumably, I can interpolate the heights for the bottom corners of the near plane … any help would be appreciated.Yes, basically you want to ensure that the camera is in empty space (above the hightmap), not in solid space (below the heightmap).But in general you can not treat the camera as a simple point, because the front clip plane requires a distance larger than zero. So ideally you build a sphere around the camera which bounds the front clip rectangle of the frustum, and then you make sure the sphere is entirely in empty space, for example. In the specific case of your terrain not having too steep slopes however, it should work well enough to sample height below camera, add some ‘character height’, and place the camera there. That's pretty simple and usually good enough for terrain.It's quite a difficult problem mainly for 3rd person games in levels made from architecture. It's difficult to project the camera out of solid space in ways so the motion still feels smooth and predictable.Some games additionally fade out geometry which is too close, attempting to minimize the issue.Imo, the ‘true’ solution to the problem would be to let the clipping happen, but rendering the interior volume of the geometry as sliced by the clipping plane.That's pretty hard with modern rendering, which usually lacks a definition of solid or empty space. But it was easy to do in the days of Doom / Quake software rendering. When i did such engine, it was possible to render clipped solid walls in simple black color. This felt really robust and not glitchy, so while it does not solve all related problems, i wonder why no game ever did this. ;@undefinedJoeJ said:The near clip plane is always needed, even if you use a software rasterizer. If you don't do the clipping, vertices would flip behind the camera, causing glitches way worse than what we get from clipping.You can clip to a pyramid instead of a frustum. I used to do this many years ago on old hardware. So there is no near clipping plane. In fact you don't need a far clipping plane either.Edit: Just wanted to add as far as I know the near and far clipping planes mostly have to do with optimizing your Z resolution. If you are dealing with that in other ways, I think they aren't strictly necessary. I currently don't even deal with the far plane and let LOD solve Z-fighting issues.;Gnollrunner said:You can clip to a pyramid instead of a frustum.I see. You still have front clip. It is a point, formed indirectly as the intersection of the other other frustum planes.I've misunderstood your claim to be ‘you don't need a front clip’. But you didn't say say that. Sorry. But now i'm curious about the experience with z precision you have had. I guess it just worked? Which then would probably mean: All those painful compromises of ‘make front plane distant so you get acceptable depth precision for large scenes’, are a result of a bad convention being used by APIs?Or did you use no z-Buffer? ;@undefined My whole engine is based on aggressive LOD and culling. I don't do projection in the matrix. It's a post step. My Z coordinates are world distances. My current project does have a near clipping plane mainly because DirectX wants one, but it's not that relevant for my application.;Ah, so you use the pyramid for culling only. But for rasterization, the usual front clip plane at some distance i guess.Still an interesting question if ‘some distance’ is really needed, but i guess yes.I did some experiment about point splatting. It uses spherical projection, which is simple than planar projection:auto WorldToScreen = [&](Vec4 w){Vec4 local = camera.inverseWorld * w;if (local[2] < .1f) return (Vec3(-1)); // <- front clip at some distance of 0.1Vec3 screen = (Vec3&)local;screen[2] = length(screen); // if it was zero, i'd get NaN herescreen[0] = (1 + screen[0] / (screen[2] * camera.fov)) / 2;screen[1] = (1 + screen[1] / (screen[2] * camera.fov)) / 2;return screen;}; Planar projection would cause division by zero too, i guess.;Thanks for all your comments! I will need to investigate how to do what Gnollrunner proposed (about putting the camera inside of a sphere). ;This may be obvious, but in case it helps:Let me note that, as a first-person camera may be more likely than a third-person camera to draw very close to geometry, it likely makes some sense to have a smaller near-plane distance for the former than the latter.Now, this only ameliorates the problem, it doesn't remove it entirely: it means that the problem will still appear, but only if the player gets very close indeed to a surface. It's intended to be used in conjunction with one or another means of preventing the camera from approaching quite so near to a surface (such as the sphere-approach mentioned by others above).;Thaumaturge said:This may be obvious, but in case it helps:Let me note that, as a first-person camera may be more likely than a third-person camera to draw very close to geometry, I'm not sure that's so true. I mean in both cases you have to take care of the problem somehow. The case of a first-person camera is a bit easier because it should always be in the collision boundary of the player (sphere(s), ellipsoid, capsule etc.). As along as the near plane is also within that boundary, the problem should never occur. So if you have a 10cm radius sphere and put the camera in the back of it, that gives you maybe a 10 to 15 cm camera to near clipping plane distance to play with depending on the field of view you are going for. With a 3rd person camera, you can also get very close to terrain, in fact your camera can end up within terrain or some object if you don't do anything to solve that problem, and this will happen very often without separate camera collision. One typical way to handle this is just implement your following camera, ignoring terrain considerations. Then to figure out your camera's actual position, project a line back from the head of the avatar to the camera's ostensible position, and see if it intersects anything to get the camera's true position. In reality you should project a cylinder and not a line since your camera will need its own bounding sphere to contain the near clipping plane. In any case this means that as you move around your camera can jump forward to clear terrain and objects. I've seen this in a few MMOs. However, when you leave blocking terrain you have the option of implementing smooth movement back to the cameras desired location. If you want to get really fancy, I guess you could try to predict when your camera will need to jump forward ahead of time and try to do smooth moment forward too. Maybe you can have a second camera bounding sphere which is somewhat larger, that would trigger smooth movement, but I think you would still need a fallback camera jump routine to be safe. |
I should have made a backup. | GDNet Lounge;Community | I have been working on this project for the iPhone for quite a while now, and since iPhone stuff as far as I know can only be programmed on a Mac, I have been learning how to use a Mac as my workstation. The Objective-C language also took me awhile to get. I have gotten the hang of it for the most part, and it actually is quite nice.It turns out that after 3 weeks of near continuous programming, I found out I should have made my project an OpenGL ES project once I wanted to implement graphics (I really should have done this first). So I made a copy of my project, made a new project set up the way I wanted, and then copied in my code from the other project.Well I didn't need the copy folder anymore so I put it in the trash. Eventually I emptied the trash and my project completely fell apart. Unfortunately, the files I thought I copied, were really just references to the files I deleted.So I tried to use a file recovery program, it didn't work.Now that I have passed the denial and anger phases, I am starting it over better then ever, and all the wiser about how the Mac does things. | I once had a friend who tried to give me a program he'd found somewhere on a CD. The only thing on the CD was a desktop shortcut... ; Wow.This is one of the very good reasons for using source control even for personal projects. I learned this lesson in a different (but just as catastrophic) way a few years back. ;next time;Quote:Original post by kryatnext timeGood idea, I just downloaded it.; As much as I love git, the OP should know that git typically keeps all its versioning information in a hidden directory inside the source directory of your project. Meaning that if you made the same mistake again, you'd probably still lose everything.Using an off-site git repository is probably your best bet. ;Quote:Original post by Platinum314Now that I have passed the denial and anger phases, I am starting it over better then ever, and all the wiser about how the Mac does things.I hear Time Machine + an external drive is good for nice and easy backups on Macs. ; Xcode typically asks you if you want to copy the added files, or just keep references. Did you not see that dialog, or did you ignore it? ; Yeah, off site version control is always a nice thing to have.I delayed starting a project (partly) because I didn't have an offsite SVN setup yet. I've since set it up and, as normal, been commiting changes since day one.(also, because I'm lazy :D) ;Quote:Original post by jpetrieXcode typically asks you if you want to copy the added files, or just keep references. Did you not see that dialog, or did you ignore it?I don't remember seeing a dialog box asking me that. Perhaps it's the way I did it, I selected the files and dragged into the XCode project. Or maybe it did show up and I thought it was something else, I was exhausted at the time. In hindsight it's obvious to me that it just made the references to the files and added them to the project. |
Why would valve disable split screen coop play from left 4 dead for the PC. | GDNet Lounge;Community | Why would they disable split screen coop play for the PC versions of this games? It seems like that would cost them more to simply remove the feature then to leave it since I know it can be enabled with a simple config script and console commands. Any thoughts why? | Presumably because most PC users play with a keyboard and mouse. ;Quote:Original post by CodekaPresumably because most PC users play with a keyboard and mouse.This has nothing to do with it, you can still use a game pad, they just disabled the split screen and multiple controllers which as I stated before the source engine is fully able to support these features with out any added work. ; Ask Valve, instead of us? ;Quote:Original post by CodaKillerThis has nothing to do with it, you can still use a game pad, they just disabled the split screen and multiple controllers which as I stated before the source engine is fully able to support these features with out any added work.You're working backwards, however. Features don't automatically exist and require work to remove - features require work to implement. Even if the engine supports it, and even if it worked on the console doesn't mean it'll automatically work on the PC. At the very least, it would require additional testing.Now, given that most PC users play with a keyboard and mouse, it was presumably deemed not worth it to expose split-screen coop. ; 1) It wont be used much, if ever.2) The consoles have set hardware. Not just graphics and input devices, but sound devices as well. PCs don't.3) If its a menu activated feature, it becomes a support liability. And the developers simply didn't want to get tied down into writeing patches for a feature most players will never use...heck it may even require a totaly new sound engine to work properly with some integrated sound cards. ; I'm pretty sure the feature is there - there is/was a way to get it via the console (it exists for the Xbox version).I'm also pretty sure Valve said it would be added as a bonafide feature at some point after launch. But then they also said we'd get more videos, more (full length) maps, etc... ; A friend and I noticed this the other day (when he finally convinced me to play that thing).Yes, it is hobbled on the PC. He found a dodgy workaround which didn't actually do what it said on the tin and was very dubious, all it seemed to do was to allow you to have two controllers but not split screen or something IIRC.It's a lot cheaper to buy a second copy on the PC (got mine in a 50% off day a couple of weeks back so got that and TF2 for the cost of L4D's standard cost on its own), so that's the trade-off. ; cost / benefits problem. It's something that's not gonna be that much use on the PC. Even if they have the code base from the 360 build, it would take a fair amount of work to implement it to a decent quality level. It might work as a hack, but implementing and testing proper split screen / dual controllers is just too much hassle for what it's worth. They decided to allocate their resource elsewhere to something (presumably) more beneficial. - UI.- Networking.- Controllers.- Graphics glitches and performance.- Player management, joining lobbies, ect... ;Quote:Original post by CodekaAt the very least, it would require additional testing.Ding! They probably didn't want to bother wasting QA time on a non-essential feature.They small percentage that want the feature can live with a buggy unofficial version of it :/ |
Macrion: The Beginning NOW IN OFFICIAL DEVELOPMENT! | Your Announcements;Community | It is now official, Abhiware is finally properly working on Macrion: The Beginning, and I will personally track our progress here for wannabe game creators or indies who are just starting up. Of course I can't share everything but I will share as much information as I can.What I have learnt in the past years could save many of you starting out some time and aggravation.1. 90% of the game creation happens outside of the programming and testing stage. Thats the easy part!2. If you want to get your game into retail stores, no one will look at you if you dont have an esrb rating. The big money comes from MASS sales, not from one or two games sold. ESRB COSTS MONEY! Near $800 per title that you send in, and that too if they rate it as over 18 then no one will accept your game. Thats the silly part. There has been long debate on the ESRB, but for now its like Micro$Hoft, everyone uses it, and if you are serious into making a large game empire, you need to have ESRB ratings on your games.3. ALWAYS MAKE A DEMO! Its the best marketing tool you can have to show off to potential investors/clients/end users, what your game is and has in it. Download.com is a great place to put your game on as many users go there to download software. Shareware is tried and true, so stick with what works!4. TIME IS MONEY! Dont waste your time (If its your first few games) unless you have time and money to waste. Use RAD software (Rapid Application Development) for game creation if you dont know how to code the hard core C++ and stuff. For example at Abhiware, we have used several packages including Dark Basic Pro, Blitz3D and currently we are glued on 3D Game Studio.5. Never give up! Playing a game is easy, making a game is another thing all together! You have to think of every area that players dont even think of. What does every character in your whole game do when the user interacts with it? For example, the main enemy all the way down to the rock on the side which might have some magical power to talk?! lol Point is you have to think of everything and anything that the user can do, not just the key players.6. BARCODE IS A MUST if you are planning to get into the retail zone! If this is your first barcode, then it will run you around $60 or so (www.gs1.org)7. FIND a good printer for boxes and a company that will master the CD's. 8. Sell both online and retail box versions and learn how to market your product well. Sales skills are a must, but your demo will also help. 9. KEEP LEARNING! You never can know enough in the game industry, and even if you do, there is someone out there who knows 10 times more than you do, so suck it up, drop your pride and LEARN! It never ends unless you end learning, and when you end learning, well suffice it to say, your games wont grow.HOPE THOSE TIPS HELP. Now lets get onto it. Let me begin by letting you know that we are going to go through all those stages, and you can even join me up on twitter as I micro blog this (As well you'll also see some of our other deals which pop up from time to time). You can also visit our website at Abhiware.com and see the updates. This however will be the official area.Right, so now onto business (BTW, for the other developers out there, I would be so very greatful for your input as I am sure you can all teach me something as I am always learning, and I am so happy for the help. Thank you. If I do make any mistakes, please correct me nicely and we can all work together to help everyone grow their businesses):FIRST AND FOREMOST, OUR NEWBIE INDIE VIDEO GAME MAKERS MANTRA:I WILL make mistakes, I know this, this is a part of life and a part of making video games. If I persist at the final goal, I will achieve success. Through learning and growing I will create the most amazing games the world has ever seen, through help from others and the greater power many call God I will continue to persist until I achieve success. It is the hope that through persistence and learning I will make less mistakes over time and create a better game every single time! SO LETS BEGIN!1. Select the GENRE. Genre is a fancy term for what many in the game community consider as the game style. Some of the popular GENRES in games are RPG (Role Playing Game), STRATEGY, ACTION, etc. As you can tell, they follow in many cases what we refer to in movies as well when it comes to movie genres. In the case of my first game, Macrion, we will be using the RPG genre.2. Select the TYPE. The game type is the way the game is played. There are many different types of game types out there. Some of the common ones are FIRST PERSON (Where you dont see a character, and yet you are the character moving as if you are looking through their eyes). THIRD PERSON (Where you are behind the character and are moving the character, like a camera behind the character. TOP-DOWN is literally that where you are looking from the top, down onto the game world and character. The major ones are First and Third person however. Macrion is all Third Person.3. Select the Graphics style. 3D or 2D or ISO-METRIC (Simulated 3D). 3D is the current popular format, however there are still many games made in 2D. ISO-METRIC is a 2D style which simulates 3D by having images turned at a 45 degree angle. Sprites is a common term used in 2D video games and basically a sprite is an image with pixels removed to simulate an irregular shape even though in essence its a rectangular box. These same sprites are used in all video games for various things, such as power levels, special effects and even characters, however when people refer to a sprite its usually a game character in a 2D game. Macrion is in the 3D graphics style.4. Okay so now that we know that Macrion is an RPG and is a 3D game in Third Person, its time to create the story. Now fortunately for many years of toiling with Macrion I have the full story created. At this point every game (except a few, like sports games) have some type of story to it. Role playing games are the most story intensive games out there and if they dont have a story line, they end up being bad rpgs and thrown out the window by players. This is the point where you can go wild. Take some story writing classes and creative courses and come up with an exciting interesting story. Imagine this, you are a book writer, and as a game creator, you are going to take this book and make it come to life for the world to play this "book".5. Now that we have our story, we need to break it down. Who, what, where, when, why and how (5WH)! You've heard this before, but you have to go into details here. This will take you the most time! Hours, Days, Weeks, even possibly months (Especially if you are doing this alone. If you have a team this usually takes a big chunk of time but not as long)! Thats right, you have to write out every detail! Where is the first scene? what characters are there? If a user interacts with that character, what does the character say? Who are the action characters (Characters that the user needs to interact with to continue with the story)? How do you let the user know about these characters and the next step required to move along in the story? THESE QUESTIONS ARE VERY IMPORTANT! Once you have gone through your whole story like this you can then move onto the next step. (Currently we are on this step in Macrion and so it will take us a lot of time to complete this step).6. After we are done with the story break down, we need to start drawing out the STORYBOARD! This is where you draw physically on paper the major scenes and story step by step. It is a very important part to the whole game process. HAVE YOU NOTICED SO FAR we haven't even started sitting on a computer yet for any form of creation?!?!?! YA 90% happens outside of the actual creation/coding stages! Also in the storyboard, think of what kind of music will be required. During the storyboard stage, you are like a director of a movie. Think of the lights, the sounds, the image. What would fit in?7. Once you have drawn up the story board, it is time to start working on creating the characters and animations you need as well as music and sound effects. This is where modellers, graphics apps, sound apps and more are used heavily. 8. Once that is all done, the coding and testing stage begins (FINALLY) and this is usually fast as most of the stuff is done, its just a lot of plug and play and testing.9. After the game is complete, you need to create a demo to release. This demo will be your flagship marketing device for this game.10. Time to put up the demo on popular sites and create many demo discs to hand out to all the people you meet. Start booking meetings with the big boys (Walmart, Futureshop/Bestbuy, etc.) to go and show them your demo.11. Start creating the box for the game and send in the game to the ESRB for rating and get the UPC barcode setup. Once everything is done, you can find a good printer for box printing, manual printing, and cd creation.12. MARKET MARKET MARKET13. After the game is out, maintain it. There is a sales cycle which you have to realize in games. First the game is not known in the market. The price at this point should be introductory and on sale to get the game out there. Then the word spreads and your game grows in popularity at this point you want to put your main asking high price. After this point your game will climax out as many users have played it, beat it, got bored, and moved on. You start going into the decline phase. This is where you either create the next part, or hopefuly you coded a multiplayer option that will keep users playing more (For example a great strategy game which does this is Warcraft). However if its just a regular game, this is the time to bring out part 2 and start the whole process again.Okay thats it for this post. I will post along as I start developing more and more of the work... This is just a very basic overview of the whole process. Anyways, see you in my next post and GOOD LUCK!Nav[Edited by - abgupta4 on August 23, 2009 10:35:17 PM] | Thank you for sharing this info. This is very useful, and interesting to read. ; USER REPLIES:-------------taby: You're welcome :) Keep reading on as I post new info about the first official game Macrion. You'll get to see the whole process from beginning to end so its a great experience.CONTINUED POST:---------------Okay so onto the latest post. I have been thinking about all the details of Macrion from a creation point of view. I'm at the stage where i'm determining what tricks i want to use to create the game. I believe that I will be using a break apart methodology (I dont know the term so hopefully someone can enlighten me lol). The idea behind this method is that the game world is broken down into smaller parts so that we can load higher detail meshes into the world and have a more graphical experience for the user rather than loading the whole world and having the game move slow or not even well at all. Now if this is your first game you probably will be wondering about why you would want to think like this. This is actually not our first game as we have made many various examples in training to make some great games, however once you make several games or even learn the coding part, you will learn a very important term called LOD (Level Of Detail) which is basically how many polygon shapes your objects can have. The more polygons, the greater the images and game looks, however the slower it will go. Coming up with a balance between speed and detail is a very tricky game in itself and thats why I am putting it in here and thinking ahead.THIS however I know from my software engineering training is not a good idea (to try and determine HOW to make the game) as the current stage we are in is WHAT we want to make. But i'm gonna skip good advice for this little part here and go ahead by thinking this out as well because I know the next step. By the way, the break apart methodology is good for role playing or map type of games. A sports game probably wont work out so well for example with this methodology as you might want to load the whole world in one shot as the worlds are small (like a basketball court for example). Role playing games boast large vast worlds and it would be un-ethical with even our latest technology to place an entire world with such vivid graphics and designs all at once, unless we want to have a slow gameplay and freezing issues. Chunking it down using the break apart methodology will make sure that you adhere to the very critical balance between gameplay speed and game graphics. Another method that is used is to have what we call a fog panel which is a polygon which resembles fog and on the other side of it, load your objects so as the user moves, the objects come through the fog panel and it simulates as if you are moving through fog yet at the same time it is fast loading rather than loading the whole world. We will be using a mixture of these techniques in Macrion.Okay so back to Macrion, we want to use the break apart method and break the full map up into a thousand different puzzle piece sized zones. A user can move from zone to zone and that too with better speed than would have been achieved if trying to load all thousand+ parts of the map.Another thing is that our user will have to have a map window which will allow them to track their location while moving. it will most probably be a window in one of the corners, or even a menu option in the users guide. Every major role playing game always has some form of guide or stats viewer menu which allows them to see what items they have collected, what the stats are (magic, energy, etc.) and take other action and even view maps. After further thinking I've decided to put the map in the stats/guide area.Okay so now we have 2 more steps made towards the game. You can only complete things one step at a time. So there is 2 more steps :) lol.Energy is collected through...hmmmm lets call them halos of energy and halos of magic power as well as halos of knowledge. This is the fun part of game creation, you get to create things out of thin air in your mind and make it a reality in a game. This is what I fell in love with! So there is a 3rd step, i've now defined what are the major stats and how to obtain them via halos.So in this post we went over:1. Decide on the map of your game. If it is a sports game, the maps are usually small (except for car racing games). For rpg games and other games, maps can be large and vast. (Also once you start learning about coding you can decide how you want to display the world. Break it apart or load it all, or do a mix of the two. It will usually be one of these methods.)2. Next decide HOW the map will be shown to the user. In some games (like sport games) you may not need a map to show to the user because it is assumed that the user knows the map (Such as a football field or basketball court), but in a map the user would not really know, its best to show them what they need to know. Think about how you would feel lost out in the woods with no GPS! lol!3. Next we figured out what statistics the user would need to know such as health, magic and knowledge in our case. If its a racing game you might want to know damage level to your car or a basketball game would be Points in the game or even player energy to make a jump shot. Its all up to you, but define this area as it is required.Hope this helps as it has helped me in understanding what I want in Macrion.Nav ; Looks like a nice read. Gonna have to finish reading it later, but thanks. ; USER REPLIES:-------------HostileExpanse: Yes it is very interesting. A lot of years and training and money went into learning how to develop games and I'm always learning. I hope the information here will help you and others out there. ENJOY and continue reading and following us on twitter and our website as well as here :)CONTINUED POST:---------------Okay so now for today's post as I am so busy uploading new inventory to our website as we speak lol, is going to push forward another 3-4 steps in our game development for Macrion. Keep reading along if you want to learn some great things over time and as always if you have any great tips that can help anyone out, please post it as we are all here to learn and grow in the game development world! :)Now that we have defined the stats being used, we need to now define levels. For example, how many levels are there to the stats? Like in magic levels for example, I might make level 8 the most powerful magician out there and hence the magic meter would have to be filled 8 times and each time would get more and more difficult to fill up. If you've ever played some of the street fighter games (Marvel Vs. Capcom type of games to be specific) you'll know that there are 1-3 levels to the power move stats and based on how high your level is, you can do larger super moves. It then fills up again. In the rpg Macrion a user will have up to 9 levels of stats for each area, life/energy, magic and knowledge. The user will gain new size levels as their knowledge increases so everything increases together based on knowledge. Thats specific to Macrion.Those specific stats will be shown to user in another stat area, like the options menu. On the main screen there will be two fluctuating stat bars. One for magic and one for energy/life. This will be like a fuel gauge in a car and can go up and down based on use.So far we have a distinct menu system with statistics and from there a user can also do other administrative tasks like exit the game or change graphics and sound options.Next lets discuss how a user saves the game. Should the game be saved via the option menu or should there be a point in the game a user must reach in order to save? This is VERY important! If you keep the save in the option menu, it might make an RPG game too easy, but for a sports game, that might work. If you make the save game point too long to reach, if the system dies on a player, they will not want to re-play the whole world again just to get to the save point. We need to have a balance if we are going to use this approach, balance between time to next checkpoing/savepoint and complexity of level. If for example you have a complex level and only a few saves, it may frustrate the user. However if you have a complex level and multiple saves in major checkpoints, the game player will feel happy. Usually you want to keep a savegame checkpoint at every major interaction. For example, a user entered a new level/world, or the user just defeated a boss, it would be good to keep a save game option there as a reward. For Macrion we will be using the the checkpoint/savegame point to save the game for the user.Okay and how about fighting? Thats right FIGHTING! In RPG's this is a big thing. If you dont have major amazing battles, then an RPG is quite silly and doesn't make you really want to play (There are exceptions to this as always). There are several types of battle systems in role playing games. Some of the most common ones are TURN BASED and REAL TIME. Turn based is when each party gets a chance to take a shot. It is very common in Final Fantasy and similar types of games. REAL TIME is where the actions occur in REAL TIME meaning that when you see an enemy, you attack immediately with what you have. This is like God of War or Zelda type of battle style. We will be using this style in Macrion (REAL TIME BATTLE). There are other types of battle systems out there and it would be a good idea to research them. Now the battle system can be useful in the different types of games, for example in a racing game, battle such as crashes and hitting cars can be discussed. Burnout Revenge is a good example of how battle can be incorporated in a racing game! Use your imagination and who knows, you may come out with an amazing battle system! Strategy games are usually real time battle. Action games are also usually real-time.So in this post we took another 3 steps towards the goal of completing Macrion. We discussed the following:1. Stat Levels - You want to make sure you figure out how many levels your stats have, and which stats are fluctuating and which ones dont.2. Save Games - How you save games is important. Either you can save games via the options menu or you can save games via checkpoints in the game. Its up to you how you do it, but define this so that a user knows what to expect. Making it too hard or too easy to save can really ruin the whole game experience for a user!3. Battle Type - Selecting what type of battle system you want in your game is important and can really make or break a game. The most common battle systems are TURN BASED and REAL TIME.Please let me know if you like these posts, and keep on reading as we continue working on Macrion. Join us on twitter where you will also get more news on the game as well as other crazy IT tech deals along the way. Check out our website at www.abhiware.com.IF YOU ARE NEW TO GAMES AND THINK YOU'RE A HOT SHOT KNOW IT ALL...READ THE FIRST POST AND GO TO THE LINK PROVIDED! There you shall find out what can happen if you decide to act up (As I have started to read other threads and I can see there are others out there who are putting up their games and acting cocky only to be flamed by the forum :S) lol oh well they will have to learn the hard way like I did. ENJOY!Nav; Okay in this post (its very busy here lol) we will be going over something known as the DASH-BOARD. This is a place where all your project information is kept for developers to view. The second item is known as the STANDARDS BIBLE and what that is is a listing of all code methods that all developers must follow. The third thing we will discuss is the MASTER BIBLE which is where everything for the game is placed. This is the place where all people working on the game, from developers, to musicians, to sound effects crews, to artists and so on will all join in and read from. IT IS THE SOURCE for the game!1. THE DASH-BOARD:When you have many developers working on a game, you need a common place to meet. A dashboard serves that purpose as many times developers are dispersed throughout the office/city/province/country and even world. An online method of connection to share all the data, ideas and other items related to the game, must be made so that it is easy for all types of developers to get things done. The dash board we have is a php/mysql based custom built dashboard which lists the project as well as gives us chatting tools, online file sharing tools, and other custom built tools that we build as we go forward. Our custom dashboard also has a project management and ticketing system which can send email notifications to developers on project dates and targets.2. THE STANDARDS BIBLE:This is a document or a set of instructions that all developers will follow when creating the game. This is usually used in coding houses to keep consistent code, but in the game world there are other parts of developers that use this. For example, how do you name a file? If a file is a sound file, what is its name? Maybe snd_ as its starting. Having these conventions helps all developers code and create so that no matter where in the world the code is happening, everyone will be on the same page. For example what should the sound effects team do for every sound they create? Is there a way to convert it to mp3 format from wav? Or are wav files the only thing needed? Are files that are music files supposed to be in midi format? How about the artwork? Is there a standard that all art must be done in a certain way? How about the story? Should it be written in theatrical format so that it could later be ported to a movie or an actual production? You have to think long term! Maybe someone looking at the project in the future is trying to follow what you have done and by having an actual set of standards it is very easy for future developers to pick up where you have left off and hence make a part 2 or part 3 of a game or even PORT IT to a different system such as going from PC to CONSOLE (PS or XBOX for example).3. THE MASTER BIBLE:This is the heart of the whole project. Everything and anything to do with the project is kept in the master bible. It is the ultimate resource for all developers in the game project to go to. This is where you keep everything from artwork to code! Its a place where all graphic concepts, hurdles, successes, etc. are all kept. Images, drafts, storylines, characters, music, sound effects, storyboard, and more is all here. It is the main point that all developers can go to to get the information for the project. Without it all developers would be lost. Imagine like a real bible or any book for that matter, if you are reading as a group, you would be pretty lost if someone else had the book and most didn't and you are trying to study for a test. You wouldn't pass an exam if you couldn't study could you? Same thing with the Master Bible, if developers and creators dont have something that they can refer to when creating the various parts of the game, it is very difficult for everyone to be on the same page.At Abhiware, our ABS (Abhiware Business System) is our dash-board where we keep all parts of the project and master bible. It actually has many other functions than just our game programming projects. We also have there our website programming as well as graphic arts projects and on-site tech support projects as well. Its a full system that is integrated for our business which also has a full accounting and invoicing system and ticketing system. It helps make sure our IT business is running and we can even update the website from it as well. Now a normal dashboard is not as extensive, just for Abhiware, we do a lot of other things as well.Okay so thats it for today, we have gone over another 3 steps towards creating our first game Macrion. After we have our dashboard completed at Abhiware (Check twitter for when this happens), we will then start working on creating the storyboard and character map (Listing of all characters and what they are and what they do) and start uploading into our master bible.PLEASE LET ME KNOW WHAT YOU THINK OF OUR JOURNEY TO CREATE OUR FIRST GAME MACRION! Also if you are a developer, I would be so greatful to get any ideas or input you have as well to help out our fellow game developers and newbs out there on game creation and development.Thanks guys and girls and aliens ;) and we'll see u at the next post! ; Hello everyone, and I do apologize about the delay, but running a company can be a lot of work LOL! I'm going to go slightly off topic for this post and talk about BUSINESS and more specifically MARKETING/SALES which you need to know which will help you out when you are selling/marketing/promoting your game.Here is the thing, when you create and finish a game and have everything done, you have several options of releasing the game. EITHER you release it on your own (SELF-PUBLISH) or you go and try and get a publisher to buy in on it (CONTRACT) or you sell off the rights and full ownership to a company/induvidual for huge money as they then own the complete game and code and everything (FULL SALE).1. SELF-PUBLISHSelf publishing is a TUFF road! However if you can make enough sales and do it successfully, firstly you are your own boss...secondly you keep ALL the money (No next company takes any of it) and you are not restricted to where and whom you sell to. The rewards are GREAT when done on your own, but it can also be one of the MOST DIFFICULT WAYS to sell your game. HOWEVER if you are serious about creating your own GAMING COMPANY, you have to become the publisher of the game and sell it yourself to various companies directly. Have meetings with various buyers from large companies such as Best Buy and Walmart. Line up as many major retailers and have meetings and presentations ready to show your stuff to them.As a self publisher you will need to use some of the following methods to show off your new game (If you have questions on how to do this or what to do exactly, simply ask and I can try and go into more detail for any of these marketing areas) MAKE SURE YOU HAVE EVERYTHING LINKED TO YOUR WEBSITE WITH AN EASY PAY METHOD LIKE PAYPAL or else how will you sell your creation?:-Game Demos to be placed on every download site, SPECIFICALLY get it on download.com by going to upload.com and signing up as a publisher. -Hire several guys/girls to hand out the games to people in the downtown core of your city for free (Have like 500-1000 cds created for handout and hire the guys/girls on like craigslist or something and pay them hourly cash, might cost you like $200 and take around 3-4 hours so you can get like 3-4 guys/girls hired easily at a fair price) Try and keep the people handing out the demos the age of what the target audience would be who are planning to buy/play the game. For example if its teens, hire teenagers, if its professionals, hire a 20's crowd. Usually games are associated with the teenage and 20s crowd, however do your research in this marketing vehicle to see if it would match your game.-Game ads created for various video sites like youtube-Game ads created for twitter, facebook and other social websites-Sell to Wholesalers and suppliers (This is one method to get into retail store)-Sell on consignment to consignment stores (This is another way to get into retail stores)-Book meetings with large retail chains to meet with their buyers who have certain amounts that they are allowed to spend to purchase goods for the company. If you can impress them enough and your product is on par with other games they sell, you may just score a large deal!!-HAVE GAME TOURNAMENTS LOCALLY WITH PRIZES! This method will build awareness and really get players pumped about the game! You can even charge a cover fee!-There are more methods, but i have just listed a few.IT WILL BE DIFFICULT but the rewards if done right can end up launching your company and you ultimately keep all the money earned. Plus once into large stores and everyone has seen a positive return on investment, it will make sure your future games are something they would be interested in buying! WEIGH this option carefully as sometimes, based on your costs, it actually might be more beneficial to get a contract with another publisher or even do a full sale, so it all depends on what your costs and profit margins are, but you will have to figure that out!2. CONTRACTThis is one that most people go for because they either dont want to go the self-publishing route or just want to have their game associated with a bigger well known company. In this way games are made for large publishers with their names and you either get a cut of sales (AFTER SALES), or a flat rate pay per piece (BEFORE SALES). The benefit here is that your game is attached with a known publisher and you also get to now have their massive publishing strength! You could see your game out in the market faster and in larger amounts than if you self-published. GETTING A CONTRACT is very hard as there are a lot of competitors out there! Everyone is trying to get in on a large contract with a game publisher as that can establish your company instantly. I can't go into full details in this area as at Abhiware we self-publish and do things on our own, however if you go down this route, it is amongst the popular ones.3. FULL SALEThis one is one of the last choices but is still a choice by people. Create the game, sell it off and let others own the whole thing (Without your name on it). They are basically buying all rights off of you. Now something like this can sell for good money and can be another option all together. The victory isn't as sweet as the whole world will not know that you created something, so if you create the next tomb raider and do a FULL SALE, you could end up crying loud in the end just because you saw short term quick cash...on the other hand if you create 10-20 of these games it can get you up and running so you can start working on self-publishing and contract work.SO THERE YOU HAVE IT. Thats just a little bit of off topic rants about how to get your game out there. If i am missing anything, please let me know, and also if you have any knowledge or can elaborate on any of these, then please help out our future game companies by writing it out here and letting us all know.You can keep up with our game development of Macrion here and also via twitter (Abhiware is our twitter name) and you can also ofcourse check out our website which is abhiware.comUntil the next post, see ya! :)Nav ; Hello everyone, okay so back to the next post here, finally after many days of coding and contracts...this is very important...WHILE you are getting yourself established in the game world, understand that you still need a place for bread and butter to come in.The greatest music, movies, books, video games, etc. tend to come from the poor and starving artist...in many cases the geniuses of the world usually dont have the money, influence or power like others do to create or display their dreams.Luckily in our time, we have many FREE methods of promotion or creation, but keep in mind that as an indie of lets say 1-4 people, you still all need full time jobs until your game hits off and becomes big.For me thats my computer IT business. That way I can keep up with the computer world and have something related to what I love. My company provides, websites, on-site tech support and more!However all this helps to fuel my passion of game creation which in turn one day will become self sufficient and fuel my love for humanity and hopefully eradicating hunger worldwide one day.That being said, you need to have a MINDSET to do this stuff...one of the biggest things is that as you're creating games, you get to a point where you ask WHY THE HELL AM I DOING THIS? It brings in no money, everyone says i'm wasting my time, and I get only "Great job" from people testing out my games and demos...One thing I can tell you all is that if you have a dream and goal NEVER GIVE IT UP! You WILL encounter the "Nay Sayers" the ones who will put you down, make you wonder why you're even making video games. Listen...FIRSTLY understand this...just as the world needs doctors to heal human beings, it needs game creators like us to bring entertainment and a step out of reality for humans as well. YOU ARE REQUIRED and have a very important role in the development of humanity. UNDERSTAND that being a game developer IS as important as any other profession, and by spreading joy or meaning to the peoples lives who play your games, it can be a very gratifying feeling. Here are some common myths and misconceptions people try and put into us INDIE developers to try and scare us away from our craft:1. OTHER COMPANIES MAKE BETTER GAMES FOR CHEAPER, WHY ARE YOU EVEN TRYING?Its people like US in the game development world who CREATE those games in the first place, and if it wasn't for people like us who have been trying for decades, we wouldn't have a need for pushing computer technology, nor would that so called better game for cheaper even exist! Throw this scare tactic away! You are required, and its people and indie companies like you who help push the game development industry further. Even today the simplest games people still play such as tetris! Graphics doesn't necessarily make a great game as the hype would suggest. Heck look at that recent game with the moving block in which you have a block moving side to side and you have to stop it in the middle. It became so popular that now I see that same game in walmart for prizes! NO GRAPHIC QUALITIES whatsoever! Just a simple few pixels! ANY game can be amazing so dont sweat the small stuff. ALSO understand that the reason why the game is cheap could be for many reasons. Either the game is old, or the game was just not a popular game. Maybe the reseller bought a whole bunch and are blowing it out. You dont know what the reason for the price is, but normal price ranges as of today are below:-Jewel case games (various titles): $4.99-$14.99-Old game titles: $4.99-$19.99-Newest game titles: $29.99-$49.99-RPG game titles: $29.99-$99.99THOSE ARE PC GAME PRICES from various computer stores.SO trust me, that comment that people say to put you down, DONT LISTEN TO IT!2. YOU WONT MAKE A LIVING MAKING/PLAYING GAMES! GET A REAL LIFE AND A REAL JOB!Those sour pussy's are all jealous that you even have the BALLS to create something that they could never or would ever try to attempt. It takes courage to go against the grain. Firstly if done correctly, a game developer can make just as much as others in the market...thats if u are looking for a job. AS AN INDIE developer, you can actually become a multimillionaire making as much as the top doctors and even more! It all depends on how you run things, but NEVER give up, NEVER surrender (Galaxy Quest). These people have a low self esteem about themselves and usually are unhappy negative people who like bringing everyone down to their level. If you aren't there then they aren't satisfied...ask yourself this...are you living for their satisfaction or yours? Live your life and your dreams! If its family...well family will always try and put you down...you gotta work hard at being successful...the other thing that bugs people is that if you DO succeed, then they will kick themselves cause they working their asses off while u get paid to make video games which is a dream come true!My quote is, "Many dream a dream and wake up to reality...Some dream a dream and make it their reality!"DECIDE WHAT YOU WANT!FINAL TIPS FOR MOTIVATION:--------------------------1. Read the book Think and Grow Rich by Napolean Hill2. Never give up, keep on going, and you will succeed!3. There are more people becoming millionaires in the game industry DAILY!4. The game industry has grown into a multi-billion dollar industry SO THOSE NAY-SAYERS can go and suck a beach ball! LOL! YOU CAN AND WILL FIND WORK if you are looking for jobs.5. Pretty much now every household has at least 1 computer system. You're tellin me no one plays games!??!?!?! :P6. With the invention of facebook and other social sites, marketing your creation can be a snap!7. There are many companies and developers on gamedev.net who started off as single guys (EDIT: And Girls lol sorry bout that) with a dream and now have full video game companies! There is a LOT of information on how to succeed here and YOU WILL have all the help you need from these forums. Including myself, I am guiding you through the creation and business of our video game Macrion so you can see it go from conception to being sold in stores!! Now if you're serious about this stuff, then my posts will be invaluable just as many other posts you will find from other seasoned professionals...I dont consider myself a professional of game creation...just a lover of game creation as I'm always learning so I will never be the best ever...there is always someone out there who knows more than you so always remember that!Anyways until next post (And yes I will get back on topic of Macrion, but these are very important to the overall game development. Mindset is a KEY factor in creation! You need to know WHY you are doing all this in the first place!)Add us on twitter: AbhiwareCheck out our website: www.abhiware.comor email me personally if you have any questions: nav@abhiware.comUNTIL NEXT POST...KEEP ON GAMIN![Edited by - abgupta4 on August 17, 2009 8:24:51 PM]; K its been a while since I posted as I've been working on several company projects. Anyways, today's post is going to be on music.Listen to the following two songs on youtube:1.2.Ya ya you can join the fan page too on facebook if you wish lol.Anyways, those two tracks were created in a program called FL Studio (Fruityloops) which has taken on an industry level of recognition for its capabilities. Many new popular artists are using the software to create top class music such as Basshunter and many others.As video games have evolved, so has the music making capabilities. Competing in this area can be quite difficult, and having the right sounds and music in your game is VERY important.That being said we must understand what things a game has when it comes to music...HERE THEY ARE:1. SOUND EFFECTS2. MUSICAL SCORE1. Sound Effects: These are sounds in the game that users hear when some action usually happens. For example, the user slashes an enemy with a sword, or the user starts running, or the user is swimming. These are the environmental sounds that are heard and go ontop of any musical background. In Macrion we have many sound effects, from running to using weapons to even collecting various money and gems and orbs. Coming up with sound effects can be troublesome at times but it is all worth it when you see it in the game. For example, be creative...If you are in a battle scene and you want to represent the sound of someone's neck getting cracked when your character defeats them in battle...you can record yourself breaking a carrot or celery in half. For many years great movies have had their sound effects gurus use techniques like this to create some sound effects that SOUND like what we think we are seeing. Have fun with sound effects as they will help you out to make your game more interactive. Now remember, sound effects are always on and are ABOVE your music. Just because your music is playing in the background doesn't mean that your sound effects are off.2. Musical Score: This is the actual song that you want in the background. New games are using mp3's however the older generations and some current games still use two of the industry standard ones which are wav and mid. MIDI files were the MAJOR industry style for music and were put into the system via a midi keyboard or midi creation software. Many game developers may even still use this today, however everything is converting over to mp3s due to the higher quality of music that can be brought into a game. Great examples of this are actual songs by bands which are now in many driving games. Burnout Revenge for example has many rock songs sung by actual artists. If you ever played the original Zelda however, you'll notice the MIDI music score or even TETRIS, which also had a midi like score going on. To develop music for Macrion we are using FL Studio/Fruity Loops.Okay folks so there you have it, I hope this helps as game creation is a very long process and has a lot of things involved which is what we will be going over in these posts.Take care and see ya in the next post! :)Nav ; Its Map Making Time!!!In a previous post I discussed choosing the map of your game. Now its time in Macrion that we are going to CREATE THE MAP! In the previous post I discussed break apart mapping. We are using that method to break the map apart into square like blocks.Okay so now here is how we work on a map...FIRSTLY, choose your software!! Since in this case I am personally designing the map here for my staff to work with later I can walk you through the steps I'm using to make the map.I'm using a freeware map creation tool found online on download.com called MAP it (http://download.cnet.com/MAP-it/3000-6675_4-10842833.html?tag=mncol). Now there are some good map making software programs out there so choose whatever one you like but make it basic as we are simply creating the base maps here, its not the actual game, but an overview of WHAT AND WHERE things are and where they should be.Now we are working on an RPG game, so basically we are going to need to create several types of maps. The FIRST kind of map is known as the WHOLE WORLD MAP. This map is literally the whole world with all levels/areas in it. This works well in RPG's, but not so well on various level games which dont have a fluid land. In that case you may need several WHOLE WORLD MAPS or LEVEL MAPS if you wish to call them that. Since we are working on an RPG we have 1 main world map and actually a second one in another level. If there are many different areas you may wish to create many of these larger style maps.The second map that needs to be created are ZONE MAPS or MINI-LEVEL MAPS. In the game world, as coders, we dont really have the luxury of unlimited memory, speed or storage, and hence even though we are trying to grow our technology further to achieve this, it is still always a limitation. The smaller the ZONES the more higher the graphics you can keep in them and the better your game will look, however the smaller the size of the zone. If you want a LARGE open field for example, you need be creative to show this using either fog to load objects behind of or a sky or some form of barrier. ZONES usually consist of a full area that can be moved around in and as you move from one zone to the next, it actually has to load the level and the game gets paused and you usually see a loading screen. ZONE MAPS are good when you are going to require a mix of detail and size. However keep in mind, you can't keep it too large or things will just slow down. Think of Tomb Raider games, when you went from one area to the next, even though the world seemed large, it was all a zone.UNLIMITED MAPS are the fog or cloud sampled ones and they allow for unlimited size as you can continuously load objects behind fog or cloud cover. If you aren't sure about this technique, then you can easily look it up online in google for how to load objects like this.In Macrion we are using a cross between ZONE MAPS and UNLIMITED MAPS.There are other types of maps as well, which are very popular however I've just highlighted the 3 major ones that we are using and most of the time you will probably use some version of these.Once again for overview:1. WHOLE WORLD MAPS/LEVEL MAPS2. ZONE MAPS / MINI LEVEL MAPS (Within a level itself)3. UNLIMITED MAPS (Within a level itself)I will return with more details, on what happens next, such as placement of actors/characters/monsters and then proper scripting of these characters for major outcomes (Such as bosses or major enemies). Unfortunately I cannot share the map creation itself of Macrion as you will have to wait for the release of the game for that one so that it doesn't spoil the game for future players.Ask any questions or even post a positive comment as all your great comments help me to make my posts even more better for you all :)Nav |
Matching words with wildcards | General and Gameplay Programming;Programming | I'm not entirely sure if there is a fast, simple way to do this... I'm thinking regex is probably the simplest way of doing this. What I need to do is be able to compare strings that may or may not have wildcard characters in them.For instance I may have a list of >strings< like this:112251123?4862255*785??99745And I will be trying to match other strings to this list.I will loop through the list looking for a match. There will only be one possible match in the list, and I will be comparing one at a time until I find a match.* is a wildcard that any number of any characters can match? is a wildcard that matches any single character in its placeanyone good with regular expressions?Thanks | You could use a regular expression library like PCRE, however if you're only ever going to support '?' and '*', they're trivial enough to implement. If you encounter a '?', then skip the corresponding character in the match string since you don't care what it is. If you reach a '*', then you terminate immediately since it's an automatic match ('*' is greedy). There might be a few edge cases I'm not thinking of but that's the gist of it.I can tell you this, the regular expression library certainly won't be faster since it's also juggling about a million other things, but the benefit is that you have the full power of regular expressions that you can leverage at any time.Quick disclaimer, I assumed you were using C++, but most other languages already have standard libraries with regular expression support if you don't implement those operators yourself. ;Quote:Original post by ZipsterIf you reach a '*', then you terminate immediately since it's an automatic match ('*' is greedy). There might be a few edge cases I'm not thinking of but that's the gist of it.The problem is a patterns such as 'a*b*a', when paired with an input such as 'abbbbbbaba' - there are many correct parse trees, and many ways for a naively implemented operator to get stuck.Greedy operators like '*' generally require some sort of recursive descent or stack-based parser to handle everything correctly. ; That's correct, I guess I assumed that '*' would be used at the end of the pattern as per the example. If you want the full functionality, then a regex library would be the best solution since it's already designed to handle all those special cases. |
New to programming, what to learn first? | General and Gameplay Programming;Programming | As the title says, I have basically 0 experience with any programming language. I'm looking for advice on what people would recommend I learn first, and if possible recommendations for educational materials for that language. I'll list some goals of mine that may help in formulating any advice.My main goal is to work as a level designer, so firstly I'm looking for a language for scripting use in level design. I'm leaning towards python right now, but I don't have much of a basis for that decision.Second, is something to piddle on the side with to try to make some small scale games like you'd see on xbox live arcade.Third, I'm not looking to create an entire mmo, but I am interested in trying to develop aspects of one, specifically a crafting system.I have a decent background in math and physics if that makes any difference.Thanks | Quote:Original post by XoEnder... I'm looking for a language for scripting use in level design. I'm leaning towards python right now, but I don't have much of a basis for that decision...I can vouch for Python as a suitable first language - it's code is arguably more natural and easily human-readable than the average language.The most important thing to know is that programming/scripting is a skill hugely transferable between languages - once you understand how to use Python, it will generally not be a massive task to apply this knowledge to another language. Do not get hung up on choosing the language you want to learn with - really any will do, so you might as well go ahead with Python (Python also has some fairly simple and intuitive tools for creating 2D games, such as PyGame).There are a few fundamentals (which apply to almost all languages) that you will need to learn. In a university course, these are often covered in just a couple of lectures:Variables and assignmentUsing what is basically algebraic notation to perform calculations and store values.e.g. attackDamage = playerStrength * 50Conditional statementsPerforming checks and taking different action depending on the outcomee.g.if playerHealth < 0 then print "You are dead"else print "You are alive""Looping" constructsAllowing you to repeat parts of your game code several timese.g. (this is how many games are set up in the most basic sense)do this update player character and enemies based on input and AI draw player and enemies to screen until (player pressed the ESC key)There are of course a few more basic concepts, but this is the stuff that makes up the majority of programming.http://www.sthurlow.com/python/ looks like a decent beginners tutorial which assumes no experience - after taking a couple of hours to work through that, you should have the basics you need to begin thinking about games.PyGame will then allow you to load an image from a file and position it on the screen using coordinates - from there you can combine the techniques you have learned to create interactive programs. Consider this example (like all the examples here, this isn't actual Python code, but shows the logical flow of programs and scripts):player_x_coordinate = 100player_y_coordinate = 100do this if left_arrow_key_is_currently_held_down then player_x_coordinate = player_x_coordinate - 1 if right_arrow_key_is_currently_held_down then player_x_coordinate = player_x_coordinate + 1 draw player ship at location (player_x_coordinate, player_y_coordinate)until ESC key is pressed; Thanks, just have a couple more questions now.Would you recommend spending some extra time learning non-language specifics of programming in general, or to start programming with python off the bat and learn programming basics as I go using practical application?What version of python would you recommend? python.org says "If you don't know which version to use, start with Python 2.6.3; more existing third party software is compatible with Python 2 than Python 3 right now." Since I don't have any idea what I may need in the future I'm thinking of 2, but at the same time I prefer to use more up to date programs when available, as long as they're stable.One more I just thought of, do you know if there's any issues concerning compatibility or stability on 64bit platforms since that's what I'm using now? ;Quote:Original post by XoEnderWould you recommend spending some extra time learning non-language specifics of programming in general, or to start programming with python off the bat and learn programming basics as I go using practical application?I would say that learning Python (or any other language) will always involve learning the non language-specific parts of programming anyway - for example, the tutorial I linked to focuses on fundamentals largely applicable to any programming language with only superficial changes in the way the code looks. It only mentions a couple of things that are really specific to Python.I wouldn't suggest learning these basics in a totally abstract way outside of a language - Python is as readable and easy to understand as any pseudo-language that might be used in teaching these concepts. The main benefit of learning with a real language is that it allows you to try and check things for yourself.Quote:Original post by XoEnderWhat version of python would you recommend? python.org says "If you don't know which version to use, start with Python 2.6.3; more existing third party software is compatible with Python 2 than Python 3 right now."Python 2.6 should be perfectly acceptable - it has perhaps slightly better compatibility than 3.1 at the moment with things like PyGameQuote:Original post by XoEnderOne more I just thought of, do you know if there's any issues concerning compatibility or stability on 64bit platforms since that's what I'm using now?AFAIK Python has had 64-bit support since before version 2.5 and was generally considered to have strong/reliable support since 2.5 ;Quote:Original post by XoEnderWhat version of python would you recommend? python.org says "If you don't know which version to use, start with Python 2.6.3; more existing third party software is compatible with Python 2 than Python 3 right now."I remember reading somewhere that using version 2.5.* over 2.6.* can often save you some headaches, especially when using third-party libraries. Can someone confirm this? ; Hi XoEnder, I'd just like to suggest that once you decide upon a language you should go out and buy a book on the language. Learning a language is much easier when you have the details on paper in front of you, and an index you can easily search through without losing your page.Personally, I'd recommend C# or C++ since those are commonly used in the games industry. C++ has been the professional standard in the industry for the longest time. Besides, I'd say that once you get the grasp of one language it would do you well to learn at least one other. :) Different languages operate in very different ways and you can learn a lot about programming from the variety that's out there. ;Quote:Original post by BravepowerHi XoEnder, I'd just like to suggest that once you decide upon a language you should go out and buy a book on the language. Learning a language is much easier when you have the details on paper in front of you, and an index you can easily search through without losing your page.I agree with this entirely - a language book is really an invaluable resource. Online tutorials are normally perfectly OK for Programming 101 type work, but there are always things to be learned and a deeper understanding to be gained from a good book.Quote:Original post by Bravepower Personally, I'd recommend C# or C++ since those are commonly used in the games industry. C++ has been the professional standard in the industry for the longest time.I'm not so sure about this for a complete novice - it is hard to deny that C++ introduces complications such as memory management, pointers, static typing etc. which can be very confusing when learning the basics and are certainly less applicable to scripting languages (which is what the OP expressed interest in learning about). I am in the camp that thinks that eventually gaining an understanding of C/C++ pointers is pretty much a requirement for a professional level programmer, but learning should start at a high level before delving into more complicated underpinnings.C# alleviates the memory management burden but is more strongly tied to a specific platform, is less lightweight and it is generally much harder do things like set up a window to draw graphics (when the learning programmer wants to focus on slightly higher-level program logic at this stage), for example. As a compiled language there can also be more non code-related complications with project dependencies etc. It is certainly something I'd consider moving onto after learning the very basics of programming, especially if the OP is interested in XNA/XBLA stuff. Quote:Original post by BravepowerDifferent languages operate in very different ways and you can learn a lot about programming from the variety that's out there.While there are more esoteric languages available with wildly different paradigms, the vast majority of commonly used languages feature extremely similar procedural imperative/OO paradigms and there are relatively minor intricacies unique to specific languages. For a more experienced programmer I think it can be refreshing and even enlightening to dabble with reflective and functional programming in Ruby, Smalltalk or even Python. ;Quote:Original post by Gage64Quote:Original post by XoEnderWhat version of python would you recommend? python.org says "If you don't know which version to use, start with Python 2.6.3; more existing third party software is compatible with Python 2 than Python 3 right now."I remember reading somewhere that using version 2.5.* over 2.6.* can often save you some headaches, especially when using third-party libraries. Can someone confirm this?This might be true in some cases - I often use Python+PyGame for prototyping game ideas and held off on the move from 2.5 to 2.6 for a long time, but after moving haven't really encountered issues.I've also used PyOpenGL and TKinter with 2.6, but can't speak for many other libraries ; unrealscript thats my vote but python would work ; unrealscript is awesome, I remember making mutators for UT1 back in the day |
C# - Accessing last element in a List. | For Beginners | Hi,I have a question about accessing the last element in a list. I am entering a function and creating a new sprite object which is stored into a List. I then need to access the sprite object I just added so I can further do work on it. I am stumped on how to make sure I access what I just added. // A collection of sprite objects private List<Sprite> sprites; public void AddNewSprite(string filePath) { sprites.Add(new Sprite(this,appReference.GetContentManager())); //I need to acces the element I just added so I can all the following function on it //sprite.LoadSprite(filePath); }Any help would be great.RegardsChad | // A collection of sprite objects private List<Sprite> sprites; public void AddNewSprite(string filePath) { sprites.Add( new Sprite(this,appReference.GetContentManager())); Sprite sprite = sprites[sprites.Count-1]; sprite.LoadSprite(filePath); }; There's no need to get the last element if you just write code that is a bit more explicit and readable...public void AddNewSprite(string filePath){ Sprite newSprite = new Sprite(this,appReference.GetContentManager()); sprites.Add(newSprite); newSprite.Load(filePath);}But, if you must get the last element you can do as mentioned above by Cyansoft, or if you are including System.Linq:sprites.Last().LoadSprite(filePath); |
Questions about networking and open source networking libraries. | Networking and Multiplayer;Programming | Hello,I have some questions about networking and open source networking libraries.I am currently designing a 3D game engine and need to implement networking for it.I found Boost.Asio online and it appears to be a good open source networking library from what I heard and read about it.Question 1)Is Boost.Asio a good route to go for open source networking? People seem to swear by boost in general.Ok, so I am new to networking programming. It is my understanding that UDP is the way to go for games since (if I recall correctly it has been a long time) TCP is slower although more reliable.Question 2)Should I use UDP for my 3D game networking?Question 3)What is the difference between synchronous and asynchronous networking, and which would you recommend for a 3D game engine?Question 4)Are there any tips/suggestions you would recommend for a newbie networking programmer to know during design/implementation of a 3D game engine networking solution?Thank you for your help.Jeremy | Boost.asio is a very decent library, although the reactor paradigm can take a bit of getting used to if you aren't familiar with it.However, you should keep in mind that a game-oriented library such as RakNet will provide explicit support for essential services such as reliable messages, flow/congestion control, object/attribute replication, remote procedure invocation, etc.If you choose to go with Boost.asio, you are going to have to roll all of these on your own, and believe me when I say that a robust implementation of all of these features is far from trivial [smile] ; I personally like ENet, which provides many of the features you want in a UDP library, but nothing more. RakNet is great, but it's like the swiss army knife of networking - it's got everything bar the kitchen sink (coming in the next version [wink]).My only wish was that ENet had NAT punchthrough functionality, which can be tricky to do...Boost.Asio is good for high-performance networking (e.g. if you're doing a server) but for games, the additional functionality provided by ENet/RakNet is invaluable. That's been my experience anyway. ; Thank you very much for your help.That definately points me in the right direction.I appreciate it.Jeremy |
Focus lost(processing halts stops) when hover inside/out window boundaries | Graphics and GPU Programming;Programming | Hi guys,I have this weird problem and I don't understand what exactly is going on.I feel like it might have to do with how you set up openGL.So I create a window and I set the display and idle functions.I have cout statements in both of them printing display and idle respectively.Now when I rollout of the window(without having any pressed any mouse button.so i'm not dragging.i'm just going out the window) and roll-in and keep on doing this back and forth, many a times after rolling out of the window the processing stops. It stops printing the display,idle messages too. Its exactly the same as what happens when you are dragging around the opengl window.The moment I roll into the window or click on visual studio 2005 window it starts processing again.Can someone explain this behavior and how to solve it?Thanks.Chit | |
Server communications | Networking and Multiplayer;Programming | I am planning to make a multi-node game server. But I can't actually figure out, how they communicate with each other. If one node is a login server and all other are seperate "shards" (or how do you call it), the haw do these shards know that user has logged in? One method would be to store the session in database, but I don't know if it is OK. And what if multiple nodes serve the same world, how do player positions etc. stay synced on all nodes? | One way to do this is a "state node"Example:Login_Node , State_Node, Shard1_Node , Shard2_Node ....Connection connects to login node.... Login_Node adds user updates State_Node to Connection State == Shard1_NodeLogin_Node then forwards connection to the Shard1_Node.Connection wants to go to Shard2_NodeShard1_Node updates State_Node to Connection State == Shard2_Node Shard1_node then forwards Connection to Shard2_NodeThis is a very simple example but I hope it gets my point across. Also on more advanced things you can do.. Check the state see if Connection has admin access then process command if he does. And if he doesnt then kick him.. That kind of thing. peace ; One common solution for making multi-node game servers communicate internally is to use a central server, often called a naming service or directory server. When a server process starts up, it connects to the naming service and sends its server type ("login", "shard", etc) as well as the port on which it listens for IPC connections. It then receives a list of all other servers in the cluster, their types, and their ports. Then, the naming service sends off messages to all nodes but the one that just connected, informing them of the new node. That way, all nodes are always aware of the existence of every other node. They can then open connections to one another and exchange information. The primary benefit of the method I described above is that it requires no routing service. That is, there is no need for the naming service to route messages from node A to node B; it just gives the two nodes all the information they need to communicate among themselves. This makes the system rather robust, even when faced with a naming service crash, as the nodes will maintain an individual node cache.A popular alternative to allowing direct connections from external clients to internal nodes, is to introduce a front-end or proxy server. The proxy acts as a bridge between the server farm and the internet, passing messages back and forth. The benefit of introducing a proxy is that it is rather easy to smoothly redirect clients from a crashed server to a newly started replacement. If the client were to connect directly to the internal nodes (a la RanBlade's suggestion), hiding crashes would be difficult, and the server farm would be much more exposed to malicious crackers trying to break in. With all that said, I think you may want to reconsider whether you actually need to build a distributed, highly scalable and parallel server system. I'm assuming that you are working on an MMO. If so, how many players to you expect to host at any one time within the next few years? Be realistic. Probably not many enough to justify developing, testing and debugging such a notoriously complex system. If I were to ask you right now what your main bottlenecks will be in the final server, what would you say? Sure, you could guess, but would you know? Probably not. Is it CPU or memory? Will you need multiple proxy servers or is one sufficient? How should you ideally split the server up - geographically (as in a few small areas per server) or in some other way? All of these questions can only be answered by someone who has actually built and tested a real MMO server, and measured the performance of the various components.My point is that rather than taking on the huge task of building a multi-node game server, you may want to consider starting out small with a simple server that is designed such that it can be expanded upon (or indeed distributed) later, if the need arises. Otherwise you will spend so much time getting the server working that you will have no energy left to make a game at all.EDIT: And if you, against all odds, do manage to produce a working server, you are likely to find that you solved the wrong problem (i.e., tried to fix what was never broken, because you didn't know what would be the real issue) and end up with a server that performs much worse than expected. Embrace the idea of YAGNI and KISS. ; There general question of "how does place A know that place B has authorized something" is usually solved through a Hashing Message Authentication Code (HMAC). Typically, the servers in this case share a known secret, and issue a token to the player when logging in, which consists of playerid,logintime,hash(secret,playerid,logintime). This means that any server can verify the token, and know that the playerid and logintime is legit.There's more information in the Forum FAQ, as well as in a MMO thread in this forum from just a few days ago.; Really big thanks for all of your replies!Windryder, you encouraged me to continue working on my simple server and implement those multi-node things only when (and if) needed. |
VSM filtering | Graphics and GPU Programming;Programming | What's best practice for getting nice VSM shadows in OpenGL on recent hardware?1. Render to a MSAA renderbuffer and then resolve the renderbuffer to a standard FBO color texture (in OpenGL) and perform the blur on that FBO.2. Render directly to a MSAA texture and use GL_TEXTURE_2D_MULTISAMPLE to sample from the texure (but when: only in the first blur pass, or keep both blur FBOs as multisample textures?) Would there be any performance benefit compared to using a larger shadow map?Or is there even a better alternative? | I would just resolve the MSAA texture right away...if you perform your blur on the individual subsamples it's going to cost you a lot in terms of performance. ; Resolving then blur is the easiest. There's one clever thing you can do by sampling the MSAA texture though ("custom resolve"), and that's converting from depth to the VSM/EVSM representation on the fly, while resolving. This allows you to render to a "standard" multisampled shadow map (one fp32) and then convert to a VSM/EVSM and resolve on the fly. This saves memory footprint and bandwidth as well as enabling some of the more efficient hardware "Z-only" optimizations. These aren't as significant as they used to be, but they can still make a differenceIn either case, it's probably always best to do the resolve before the blurring. ;Quote:Original post by AndyTXResolving then blur is the easiest. There's one clever thing you can do by sampling the MSAA texture though ("custom resolve"), and that's converting from depth to the VSM/EVSM representation on the fly, while resolving. This allows you to render to a "standard" multisampled shadow map (one fp32) and then convert to a VSM/EVSM and resolve on the fly. This saves memory footprint and bandwidth as well as enabling some of the more efficient hardware "Z-only" optimizations. These aren't as significant as they used to be, but they can still make a differenceYeah I was reading the recent presentation from the Little Big Planet devs and they mentioned that they did that so they could use double-speed Z writes on the PS3. Neat stuff!; I tried to custom resolve from a single float 32 channel, too. I am very pleased by the performance, but I am under the impression, that the quality is slightly worse compared to resolving from float 2x32. Is this to be expected, or am I probably doing something wrong?To get the z-only optimizations I would have to use the z-buffer directly, without any color writes. Correct? ; If you're doing it from a z-buffer, you probably want to use a 1-z fp32 buffer for precision reasons. ; What do you mean by 1-z?Right now I am outputting the depth manually, but maybe I should give it a try to just sample from the z-buffer. ;Quote:Original post by B_oldWhat do you mean by 1-z?Right now I am outputting the depth manually, but maybe I should give it a try to just sample from the z-buffer.If you're writing something out manually it should be pretty much the exact same result as the hardware resolve if you're doing a box filter for the resolve step. With a "standard" depth buffer, to get more precision you can use 1-z together with a floating point depth buffer. See this paper for more details:http://doi.acm.org/10.1145/311534.311579 |
Creating game tools | General and Gameplay Programming;Programming | I was just wondering what toold people use to create their games. Right now I am makeing my own level desighner tool to make all my custome 2D maps so I dont have to write them out by hand. then all the levels can be loaded by my 2d engine automaticly.So what tools to other people make or buy to make thier games? | Personally, I'm a geek through and through. If I need something done, nine times out of ten I'll write my own tool for it. I feel more comfortable using code that I wrote because if it goes wrong I know what needs to be fixed and I don't have to jump through hoops setting up my environment and linking everything then digging through code I'm unfamiliar with trying to find the bug. Not to mention it's much easier to extend my own code.My current toolset is an editor along the lines of UnrealED. A level editor with a built-in GLSL IDE, texture file converter, mesh file converter and so on. The only outside tool I use is Milkshape 3D for models and MadTracker 2 for music. ; We usually just throw it together using the best tool we know about for it. If you know a language that can get it out quickly, use it.Use Python, Perl, Tcl/Tk, C# or Scheme or whatever you want. If you think a particular language can get the task done quickly, use it. If you think it will take a certain amount of time to make the tool, you should consider the cost (in time and money) of making it vs the cost of buying a tool or having somebody else make it for you. We are in the business of making games. We are not in the business of making tools. If we need a tool for something, spend the resources necessary to get the job done effectively, but don't agonize over it. ; The thing you need to keep in mind is the complexity of the editor.On virtually every game I've worked on I've spent most of my time on the editor. In fact the only games I ever finished were the ones without an editor.My current main project is an editor for creating visual novels. I wanted to make my own visual novel and started work on an editor/writer, but then somewhere along the way I trashed the game and decided to release the editor to the public instead. It's very easy to spend a lot of time on your editors, which is fine as long as that was your intention. Otherwise you need to think of it as just a tool to solve a specific problem in your game's development. ; Heres the thing I am planning on using one engine for all my 2D games. So i figured instead of writing out all the levels and game info in a text file by hand I would make an editor so I could do it visuely. i figured any one who made games with many levels made editors for their levels.Here is what I got.; For really simple games, an in-game editor might not be a bad idea. While playing a level, have a special console command or key combination that pops up a simple UI and lets you edit the map and save out the data again. ; I think it's a better idea to host the game engine inside a proper window so that you can build a proper UI around it. Too many ingame editors are like: press the secret key to activate a function, or scroll the mouse wheel to cycle through game objects for placement.That kind of editor are okay in some cases, but doesn't scale very well for more ambitious games. ; It's questionable why so many seem to want to create their own editors.Something to consider is for example this. Try to use file formats that allow the use of existing tools. XML or CSV files, as an example. I would even say CSV is the better choice of those two for most purposes (in games).Also, are you sure you need an editor at all which displays the game world? You could have your game "hot" update the world. As in, make the game automatically detect changes to the data files, and make it re-load them automatically if a change is detected.If you do that, you can edit your simple file format outside the game with whatever tool (like, in a spreadsheet application), save, and the game you would have running at the same time would automatically notice you saved the data file, and it would re-load the changed file.Do this on a computer with two monitors. Edit the data on one and use the game on the other. Hey, even cooler, have two computers, one edits the data, one runs the game, but still the game detects if the data changes and re-loads it automatically.I will have to add that for example a map for a 2D game can be created very far from a simple image. You define colours that act as 'keys' as to what should be placed at that point of the map. You paint the image in your favourite image editing program. And make your game to go through the pixels of the image and place objects accordingly on the map. This is a very simple idea and can work very well for a 2D game but this idea is used in 3D games as well.I guess my point here is that you should seriously consider what is actually necessary in your project(s). Don't use your time into developing all sorts of editors if your game projects are small and are unlikely to ever reach (good quality) commercial status. There are enough editors already developed which can be used right now. ; Good points, reptor. Yeah, .csv files are pretty easy to work with (Excel/Calc) and easy to process (using a scripting language - though be aware of encoding!). Not really suitable all kinds of data though. But yeah, keep things simple. :)As for automatically refreshing content, I think that can backfire when you accidentally save a file you just messed up - and boom, there goes the game. I'd rather refresh manually, but I haven't tried automating this so I can't tell how that would work out. I assume you've done this before? How would you say it worked out? Pros/cons?Using bitmaps for levels is something I'm not too keen on. I did it once, processing a bitmap to turn it into a tilemap, where black pixels were solid walls and white pixels were floors. The tool picked the right transition tiles based on the surrounding tiles. It works, but directly modifying the bitmap itself didn't work for me: it looked so different from the actual level that I found it hard to make the connection. From a level-designers point of view it was rubbish. I need to see what I'm building, a close resemblance to what it'll look like in the game. In-game editors aren't that bad of an idea, really. :)Either way, with a high-level scripting language and a few libraries, it's pretty easy to write a simple, get-things-done editor. Or to write a conversion script to turn an existing editors output into something useful for your game. I made a free-form 2D level editor with layer support and collision-line functionality in a couple of days, using Python, Pygame, pgu and pywin32. Still needs some tweaking, but I can already build levels (e.g. the visual and physical aspects) with it. Most time was actually spent on research and experimentation.@Scarabus2: true, such editors don't scale well, but that's ok if the game doesn't scale well either. ;) ; Captain P: Never work on your precious game without having it under source control! Messing up a file should never be something to worry about. |
Subsets and Splits