Jump to content
  • Advertisement

gsgeek

Member
  • Content Count

    8
  • Joined

  • Last visited

Community Reputation

163 Neutral

About gsgeek

  • Rank
    Newbie

Personal Information

  • Interests
    |designer|
  1.   Thank you very much for the answer! Now that begs new questions, like how come operators can be "shortcut" like && (i.e. operands are not evaluated before the body of the operator is executed) and methods seemingly can not. But then again my internal knowledge of c# operators themselves is lacking. I'll have to deep into the language specification further!
  2. Hello all,   First of all, sorry if this is kind of a dumb question, but I can't seem to find an answer for it. Let's say that in a c# project (in my case, a c# script inside a Unity3d game, if that changes something), I have  two methods defined as follows (in pseudo code): int x; int y; ​int z; ​int u; ​int v; // these ints are given values depending on the evolution of each game run, so they are not known at compile time. bool intToBool( int x ) { /*some complex block that computes a bool from the passed argument*/} int gdc ( int x ) { /* method that takes a int value dependent on the game run -that is, not known at compile time- and computes another int from it thorugh very complex and expensive calculations*/} void SomeStuff(int x){} //auxiliar methods called inside myMethod void OtherStuff(int x){} void MoreStuff(int x){} void myMethod(int a, int b, int c, int d, int e){   /* here goes code that references the arguments by name multiple name, for example:*/ SomeStuff(a); OtherStuff(b); MoreStuff(c); SomeStuff(d); OtherStuff(e); MoreStuff(a); SomeStuff(b); OtherStuff(c); MoreStuff(d); SomeStuff(e); OtherStuff(a); MoreStuff(b); SomeStuff(c); OtherStuff(d); MoreStuff(e); } void myMethodBis(int a, int b, int c, int d, int e){   if( intToBool( a )) { /*execute statemens*/ }   else if( intToBool( b )) { /*execute statemens*/ }   else if( intToBool( x )) { /*execute statemens*/ }   else if( intToBool( d )) { /*execute statemens*/ }   else if( intToBool( e )) { /*execute statemens*/ } } Further suppose that these methods are going to be called with arguments that are not known at compile time (e.g. because they depend on the evolution of the particular run on the game), like this: myMethod( gdc(x), gdc(y), gdc(z), gdc(u), gdc(v) ); myMethodBis( gdc(x), gdc(y), gdc(z), gdc(u), gdc(v) ); So, my question is, when are gdc(x)-gdc(v), etc. evaluated? Are they first computed at the start of the method calls and saved as local variables internally? Or are they computed each time they are referenced in the method's block? So, for example, if gdc(x) - gdc(v) are going to be computed regardless of wether they are called in the method's body, and gdc is very computationally intensive, I should rather inline MyMethodBis to save four of these computation. On the other hand, if they are computed not when the method is invoked but when they are used inside the method body, In myMethod I should first save a-e as local variables so I'm only computing them once, and use the local variables several times through the method's body. (Bear in mind that the main aim of my question is to know how is the code executed internally, rather than having to do the optimisations I meantion. That has been only the problem that has sparkled the theoretical question). Thank you in advance for any insight you can give regarding this topic.
  3. I want to start learning how to parse fragments of text -mostly, snippets of code in a custom language-, using Python. But I'm at a loss since all the material I find seems to be quite advanced, or at least it's terminology it's to foreign to me. So, is there any tutorial "for dummies"-style on parsing custom languages with Python? Could you perhaps point me to any good material? I know that there are many packages for parsing (PyParse, modgrammar, etc), but besides I needing some introductory material, I also am not clear as to wether they would work with Python 3.6 or not.   Any advice would be welcome. Thank you in advance.
  4. Hi, I'm starting prototyping a medieval strategy/simulation game with pygame. I want the core of the game to be based on a "game clock/calendar" (for lack of a better term) that is, have an object tracking the passage of in-game time. I want the player to pause/unpause and change the speed of this "game clock".   I want the different actors in the game to take the actions possibly simultaneously (though I guess it'd be sensible for each agent to only evaluate an action over a certain period of time -e.g. check wether to marry off his daughters only every in-game months)-.   So my problem is how to code it in a way that fullfills the requirements and make the passage of time uniform (i.e. every "tick" of the "clock" happens each n real-time seconds, depending on speed.   The main interface of the game will be a risk-style game which the player can zoom in and out and move the screen across. I figue it will not be graphics-intensive, but I don't want the ai calculations to make the game stutter....   So do you have any advice in how to apporach this problem?   Sorry if these explanations come across as little detailed or mbiguous. If so, tell me and I'll try to explain better whatever I may have failed to convey.
  5. You really think it would take a team of, say, 8 people less than 6 months to churn out a game like CK?  Your expectations are far higher than mine, but maybe the developers, artists, designers, writers, QA specialists and managers I've worked with are all generally sub-par in the productivity domain.   Nevertheless, if you've grown past modding you might consider going the browser-based route like Europe1300. That means using something like node.js, Python, or similar to generate HTML. A lot of the enabling technology is already taken care of and lets you develop ideas quickly with rapid turnaround time.  You can use it for rapid prototyping and then rewrite in another language when you start hitting walls again.     Alright, I've made a very gross miscalculation there. I apologise, I absolutely didn't mean to disrespect or downplay any developer's work. I can only be humble towards other's work. If I can ever be optimist about any possibilities of success in my project is due to the whole "dwarfs raising atop giants' shoulders".   That said, thanls for pointing to Europe1300, I didn't know of it so I'll have to check it out. It's strange that I can't find any iin-depth info of the game before signing up in it, though. Or it might be just me making a too quick search.   By all means go for it! But a project like a grand strategy is thousand times harder then creating a game like pong. Don't be disappointed if you won't succeed because something like Europa Universalis IV took a couple years to develop with a huge experienced team working on it. For solo indie developers it's best to create much smaller projects so you can finish it within a year of hard and dedicated work. If you want to finish something a lot bigger you need to be an expert programmer so you can keep implementing small pieces to the game without issues, in other words "you need to know exactly what you are doing". Other then that 2D or 3D has not much to do with the scope of a game, 3D could even cut off production time since animating thousands of sprites could take more work then modeling, texturing, rigging and animating. You can cut a lot of corners with 3D production.   To make a game moddable you have two good options. The first is to make everything you want to be moddable data driven. This means you have your program load in the data from a file, like xml or json. You (or even modders) can create tools to visually change these. Another option is to expose some of your code through an API, a great example of this is Dota2 and I think Oblivion and Skyrim also do this but they call it "Creation Kit". This kind of programming needs extreme planning and adds a lot of time to production, but obviously it can pay off enormously. My advice here is the same, try this in a much simpler game like a arcade game.   It's very noble of you to make the game free but expect a game like this will probably take a quarter of your life to develop. If you are good enough writing proper documented code you can setup a working prototype within a view years and go open source so everyone can jump in to make it a success.     Thanks! I'm starting with making the little games of the Unity tutorials, then "breaking" them apart to see how things work. Since I'm using unity, I'll have to head over to their forums and ask how to leave assets and such exposed to the public instead of being compiled into an exe.   Edit: I could have never thought that animating 3d would be harder than animating 2d, thanks for sharing that tip.   (I finally settled for Unity mainly because my current pc isn't fir tor UE4). For now, I'll be happy to have a map, an interface, and a pausable "clock/calendar" which controls the flow of in-game time. The first two I know how to do conceptually, but the latter is proving a hard nut to crack. I guess if I can't figure it out I'll open a new thread asking for advice on the topic.
  6.   Actually, while I kind of see your point, I have to disagree, As a matter of fact, being a modder for CK2 is what made me want to try my hand at it -my design needs are not fit anymore for the scripting abilities those games provide, and specially the ability to improve the interface is really limited, and that's not counting the language being execesively verbose.   I don't aim at matching a 10000 developer-hour game. (actually, Crusader Kings 1 had faaaar fewer than that). I'd want to do something smaller in scope, but more flexible in its moddability. And the design work, on an abstract level, I have already. What I want to learn is how to implement it. Even if I'm doomed to fail -which I'm probably am- I want to do it for the sake of learning and fun!
  7.   Thanks!   Would you mind point me to any text book on those topics, or any post around here listing sources?   Also, do you know of any place where I can check a list of available free development platforms?
  8.   That's very valuable advice, thank you!
  9.   That is my default plan if I don't get better directions. I gather that Unreal's C++ is faster/more efficient than Unity's C#, is that correct?   Which one would be easier to learn? (so far my programming experience is restricted to small programs in high-level languages, mainly Python and Ruby).
  10. I'm looking into making a little "grand strategy" game in the line of Europa Universalis or Crusader Kings by Paradox Development Studio, as a free time project for personal learning and amusement. It'd be focused on singleplayer (but I'd like to be able to implement multiplayer later on if I'm succesful).   For those who don't know these games, the main interface is a world map divided in provinces owned by entities (nations or characters depending of the game). Both characters/nations and provinces have a wide range of different stats and attributes. A player can select to control one nation/characters, and the AI controls all others.   As it'll be my first project, I want it to be wholly 2D. Also, since there is going to be a lot of calculations running constantly, I'd like to be able to get the most efficiency in the programming language as possible.   On the other hand, I want the game to be very moddable, with the end user being able to use a custom scripting language to manipulate the ui and the game mechanics.   Since I'm new to game development, I'd like to find a platform with a not too steep learning curve.   Lastly, as the title implies, I'd like it to be free.   I'm not sure if there any developing platform that fullfills this criteria, but if it isn't, which would fullfil most of them?  
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!