Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

SimonForsman

Member Since 18 Oct 2005
Online Last Active Today, 02:40 PM
*****

#5040045 Football Manager - What language and API?

Posted by SimonForsman on 06 March 2013 - 11:10 AM

Does anyone know or have a qualified guess as to which graphics API is used for the Football Manager games?

D3D9 for Windows, OpenGL for Mac. (Qualified guess based on the system requirements for each platform) (For FM 2013)


#5039518 How to write console and pc games ?

Posted by SimonForsman on 05 March 2013 - 09:00 AM

Why do you expect that the answer this time will be any different from your last thread about game development on the PS3?

In last thread i asked more about publishing it, now i am asking can i do it in the same source code.

 

 

>>You don't, even Xbox has special code paths for certain things, even when you make a game for windows (live) the code path for it is not completely the same as the 360 version.

 

For now you should just focus on PC development, and keep making awesome small projects for it. When it comes time to apply for a job you can use those for your demos, after you finally get a job developing for consoles that is when you learn how to use them and what is different.

ok

 

 

 

You cannot write games for Playstation unless you work for a professional studio that has access to the Playstation SDK.

 

You cannot write God of War.  God of War was created by a team of hundreds of professionals and took years to create.  God of War III is a game that cost over $40,000,000.00 to develop.  

 

I don't intend to deflate your raft here but it's likely that you don't even have the fundamental skills required to complete a game at your age.  Stay in school and focus on mathematics and science based courses in high school; stride for good grades so that you can get into a good university study computer science or a related computer and information technology field.

Ya i accept that, God Of war is hard to make and hard to do it alone in my age. I should have been more specific, how did they write the coding for it

 

 

You write cross platform games in the same way as any other cross platform software, by keeping the platform specific bits as separated from the rest of the code as possible so that you can rewrite them easily for each supported platform.

 

If you want to get a basic idea of how to do it you could try to write a simple pong game that compiles and runs on both Windows and Linux without using any third party libraries such as SDL or SFML. (It gets quite a bit more complex with AAA Console games ,but it should give you a decent idea on how to tackle it)




#5038807 How do I update text (or anything) in a game, in real time?

Posted by SimonForsman on 03 March 2013 - 01:27 PM

a fairly simple and flexible approach is to just embed a html renderer (Webkit, Gecko, etc) in the game and display the newsfeed as a html page (Which you can retrieve from a webserver using curl (or some equivalent library)), You could also do the same with a custom renderer and json or xml data.

If updates need to arrive alot quicker (if you fetch http data you can't really have your client ask for updates too frequently or it will kill your server) you pretty much have to write a custom server and have the game open a connection to that (And then push out updates from the server rather than have the client ask for updates)


#5036268 System to create redeem codes

Posted by SimonForsman on 25 February 2013 - 12:26 AM

1) pick a serverside scripting language
2) pick a database server
3) generate a bunch of random strings.
4) store the random strings in the database.
5) create a website with a form.
6) write a serverside script that checks if whatever the user entered into the form is in the database.
7) mark the code as used, give the user whatever it is the user should get.
8) profit ?


#5034696 Creating an MMORPG - Connecting/Opening Ports?

Posted by SimonForsman on 20 February 2013 - 02:45 PM

The port you use shouldn't have any impact on security. for a browser to be able to access your server files your server has to explicitly make those available through the HTTP protocol.

clients should be able to connect to any port so the most likely issue is that your server (or a router between your server and the internet) is misconfigured


#5032600 What is OpenGl ? Should i start with it ?

Posted by SimonForsman on 15 February 2013 - 07:03 AM

Hello guys i have a doubt, what is opengl and should I start of with it ? And also is it necessary for anyone to make their game from open gl or they can start their own ??

 

OpenGL is a 3D rendering API that provides a reasonably uniform way for your application to talk to the GPU driver, on Mac and Linux it is the only option you have for hardware accelerated graphics. (Allthough there are higher level libraries that you can use instead but those all use OpenGL under the hood).

 

On Windows there is also Direct3D which does the same thing (and alot of people consider Direct3D to be cleaner and thus less painful to work with), Direct3D tends to also have better support on intels GPUs (So for semi-advanced -> advanced games on Windows it is often the better option of the two since it allows users with cheaper hardware to play aswell)

 

You don't have to use either of them unless you need hardware acceleration, The only way to get hardware acceleration without using OpenGL or Direct3D (directly or indirectly) (On the PC, consoles normally have their own APIs but you don't have to worry about those at this point) would be to write your own driver for each GPU you want your game/API to support (This is extremely difficult since the necessary documentation is kept secret by the manufacturers and the number of different GPUs out there is growing constantly).

 

There used to be a few other vendor specific 3D APIs on the PC (Glide for example was used by the Voodoo series) but they're all dead now, any new PC GPUs that gets released must support Direct3D and OpenGL in order to work with existing software and game developers don't want to use an API that only works with hardware from a single manufacturer (unless its a console where all units will use the same hardware anyway) so introducing a new low level 3D API will be incredibly difficult.

 

If you don't need hardware acceleration you can use whatever 2D API your OS provides. (Or a higher level library).




#5028681 Which method is more effective?

Posted by SimonForsman on 04 February 2013 - 10:46 AM

I'd recommend against returning a structure as it would cause a rather unnecessary copy to be made(This can get quite expensive if the structure is large)(Unless C compilers are allowed/able to optimize this (Someone correct me if i'm wrong)), it would probably be better to pass a "out" frame by reference to the function and modify it in place instead and only return a error code in case the function fails for some reason.




#5027978 Max players with unity server

Posted by SimonForsman on 01 February 2013 - 05:26 PM

Butabee, on 01 Feb 2013 - 23:15, said:
Hmmm, if only 36 bytes are sent per update, it seems like a fair amount more than 100 could be supported for an action game with a moderate update rate. I'm aiming for a 1MB/sec connection speed.

The problem is the server, if you have 10 players and sync their 36 byte transforms 15 times per second the server has to send 9x10x36x15 bytes of data each second (thats 47.46 kbyte/s or 379kbps (37.9kbps per player)

with 20 players at the same updaterate you get 19x20x36x15 ~= 1600kbps (80kbps per player) (now its no longer possible to host the game on a DSL connection with 1Mbps upload, players can still play just fine with even a really weak 256kbps connection). at 50 players you get 49x50x36x15 ~= 10Mbps worth of bandwidth for the server (Still acceptable). at 100 players you'd hit ~40Mbps on the server at that update rate with just a single transform per player being synced. (Do you see where this is going ?) , 100 players in this scenario still only requires players to have a 400kbps connection (or one that never drops below that really) but the servers bandwidth requirements can start to making hosting difficult in some areas.

at 200 players the server bandwidth can hit 199x200x36x15 ~= 163Mbps, this is now pretty much impossible to host on a consumer connection (Allthough some regions have 1Gbps consumer connections now it is still fairly rare) and hosting costs for a commercial grade connection will be very high.

For an action game you probably want to update transforms atleast 15 times per second and you will have to send quite alot of other data aswell (a single transform per player isn't really enough for most games) so in order to keep the bandwidth usage on the server at a reasonable level you need to be a bit smart about it.

1) Keep the number of players in a given area low, the more players you got in a single area the more data your server has to send to each of them. (if you have 200 players on your server each playing in groups of 4 in their own little instance your server will only need to send 3x200x36x15 bytes/second instead of the 199x200x36x15 it would have to send if all 200 players were in the same area and able to see eachother)
2) Adapt the update rate based on distance or relevance. If playerA and playerB are far from eachother but still able to see eachother you can reduce the rate at which you send playerAs transforms to playerB and vice versa. (Not sure if unitys network views do this for you or not), if the game prevent rapid turning you could also avoid sending updates for things that lie too far outside the FoV

The exponential growth in bandwidth usage on the server is one of the harder problems to solve for large scale multiplayer games and it is the reason so many FPS games cap out at 64 players (Beyond that you will need a design that effectivly prevents large numbers of players from gathering in a single area or atleast discourages such gatherings so that they don't happen unless all players want it(and the inevitable lag that will follow) to happen), you might also have to write your own networking code rather than relying on Unitys network views (Unless they are more flexible than i've assumed)


#5027363 [C#/C++]Multithreading

Posted by SimonForsman on 30 January 2013 - 04:57 PM

Writing multithreaded code is easy, writing multithreaded game code that actually performs better than its singlethreaded counterpart is a bit harder and modifying a huge 10 year old serial codebase to execute well in parallell ... well ... thats borderline insanity.

Efficient parallell code is extremely different from efficient serial code, since EvE is a fairly old game there might be some low hanging fruit to pick but to get the big performance increases it might be cheaper to just start over from scratch with a new client engine.


#5026451 Design:Development Ratio - What's your orientation?

Posted by SimonForsman on 28 January 2013 - 12:26 PM

I start writing code pretty much as soon as i get an idea and just document things as i go if it becomes necessary, all my serious designs are based around a single core mechanic and don't require much in terms of planning (Imo a solid core mechanic and lots of polish is all you need to make a great game, if the core mechanic requires a set of complex supporting mechanics to be fun then it will most likely be too timeconsuming/expensive to turn into a properly polished game)

That said though, i have tons of ideas for large complex games, but i don't bother fleshing them out and putting them on paper since i would have to win the lottery to be able to afford spending the time required to keep up with technology while developing the game.


#5025070 '.' in filepaths

Posted by SimonForsman on 24 January 2013 - 05:51 AM

Thanks, I was wondering about that. So folder/file and ./folder/file would be the same directory?
Yes. The period is probably just for clarity for us humans, or it might have significant meaning in some DOS commands (just a guess), but with or without it is the same to the file system.


L. Spiro

 

On Linux ./executablefile and executablefile are not the same when used from the shell.

 

"./executablefile" will attempt to launch executablefile from the current directory, "executablefile" will attempt to launch it from the directories listed in the PATH enviroment variable which may or may not include the current directory(.) (most distributions does not include the current directory in PATH by default so you usually have to launch applications using ./executablefile)

 

on Windows and DOS the system will try the current directory before it tries the ones in the PATH variable  but using ./file should stop it from using the PATH so they shouldn't behave identically.

 

the system() function in C and C++ should launch the specified application using the same shell the host application started from (so system("pause") and system("./pause") should behave differently), i would guess that the same is true for shellexecute in Windows, things like iostream however doesn't use the shells enviroment variables so all non absolute paths should be treated as relative paths.




#5024431 OpenGL triangle example

Posted by SimonForsman on 22 January 2013 - 02:46 PM

Since you are using shaders ... post them.


#5022259 Making a game. Need some tips

Posted by SimonForsman on 16 January 2013 - 12:30 PM


There is a good 2D tutorial series at http://fixbyproximity.com/2d-game-development-course/" href="http://fixbyproximity.com/2d-game-development-course/">http://fixbyproximity.com/2d-game-development-course/" href="http://fixbyproximity.com/2d-game-development-course/">http://fixbyproximity.com/2d-game-development-course/
 
This will give you a great introduction to using Allegro 5 to build a 2D game.    Technically its in C++, but this course doesn't us OO.   There is a follow-up course (also on that site) which redoes the same game in a more OO methodolgy, but you need to do the other course first because its the one that actually explains Allegro
 
 
oh yeah this assumes you at least understand C/C++ already

 
 


How much C++ do you think we need to know before we can start?
 
 



You don't need to know anything to start(you can learn as you go if you really want to) but the more you know the easier things will be and the less likely you'll be to run into a brick wall. (The bigger your game is the harder it will be to avoid creating an unmanagable mess)

Keep your first game simple, If you havn't made a pong clone yet i'd strongly recommend that you make one, it will give you the basic idea of how games work and give you a better idea of where you stand).


#5021219 Java applet lags on web

Posted by SimonForsman on 13 January 2013 - 05:27 PM

<blockquote class="ipsBlockquote" data-author="Patriarch K" data-cid="5021209"><p>Hmm, intresting to hear about that. I've been reading about applets around the web and mostly I see that people don't really use it or like it, but it was worth a try. It has not taken a very long time to make this game (only 1-2 days) so it's not a big deal for me.<br />But if I wish to put my game on the internet on a web page. Would you suggest HTML5/Javascript then or what is the case? What do people use nowadays to put up stuff on the internet if they use Java? Or maybe they even don't use Java anymore?<br />And you mentioned Java App. I've only been making Java Apps before and that's why I wanted to try this thing with applet. Can you get a Java App up on the web or what am I supposed to do with that damned .jar-file?<br />I make a game and then it's finished but I can rarely get any use of the .jar because I can't put it on the net and I cant "sell" it and I can't put it on any web pages or anything. I can only let people download it and so on, but I myself have never downloaded a .jar-file and played it.</p></blockquote><br />Look into Java WebStart instead, it lets your user download and launch a normal java application from the browser, alternativly you can make a .exe launcher for it and distribute your game as a normal downloadable application. (For *nix its normally fine to distribute the jar as it is, its just on Windows that jar files can be problematic (software such as Winrar likes to hijack the .jar extension which makes them a pain to run)


#5021202 Java applet lags on web

Posted by SimonForsman on 13 January 2013 - 04:06 PM

<blockquote class="ipsBlockquote" data-author="Dan Mayor" data-cid="5021195"><p>Your question is a bit to vague without prior knowledge of what you are doing.  The immediate guess is that you could be loading resources off the server which take transmission time and that could be causing your lag (as locally it would be reading near instantly from disk).  It could be a particular browser's implementation of Java that is causing the problem (not quite as likely as Java is Java, it runs in the JRE the difference with browsers is that the rendering / input hooks are routed through browser bindings as opposed to direct control).<br /> <br />I'm sorry it's not a real answer but you will need to do some debugging of your own and find out what is actually causing the lag.  The easiest way I can think of is to create some logging system that you can record millisecond start and finish times of everything near the slow down.  Compare these start and finish times (giving you an idea of how long something takes) between online and offline versions and this should give you an incite to what is actually taking longer and causing the lag.<br /> <br />On a bit of a side note I should warn you that many people refuse to run java applets.  There was actually a recent "smear campaign" of sorts launched by Fox and NPR that warn's computer users to never trust Java applets as they expose security vulnerabilities that can lead to identity theft.  Although this is 100% true and has always been the case, trusting known providers of applets is ok to do.  The problem is your average web user won't trust you, and now that the mighty media has announced "Java is bad" we will see even less people actually allowing java applets to run.<br /> <br />My point?  You'r going to want to ditch your online java applet idea as it severely limits your potential audience.  Unless this is simply something you want for you and your friends you are shooting yourself in the foot proceeding down a path that we know most people won't accept and now even more will refuse.  If it's too late or this game simply can not be converted to either HTML 5 / Javascript or stand alone Java app you will want to adapt your design to allow the user to download and run the applet offline, however many browsers even while offline will still warn the user (stopping them from playing) that the applet shouldn't be trusted.<br /> <br />Sources:<br />    <a data-cke-saved-href="http://fox8.com/2013/01/11/homeland-security-warning-to-computer-users/" href="http://fox8.com/2013/01/11/homeland-security-warning-to-computer-users/">http://fox8.com/2013/01/11/homeland-security-warning-to-computer-users/</a><br />    <a data-cke-saved-href="http://www.npr.org/blogs/thetwo-way/2013/01/11/169156325/computer-users-should-disable-java-7-due-to-security-flaw-experts-say" href="http://www.npr.org/blogs/thetwo-way/2013/01/11/169156325/computer-users-should-disable-java-7-due-to-security-flaw-experts-say">http://www.npr.org/blogs/thetwo-way/2013/01/11/169156325/computer-users-should-disable-java-7-due-to-security-flaw-experts-say</a><br />    <a data-cke-saved-href="http://blogs.kqed.org/newsfix/2013/01/11/experts-warn-users-to-disable-widely-used-java-software/" href="http://blogs.kqed.org/newsfix/2013/01/11/experts-warn-users-to-disable-widely-used-java-software/">http://blogs.kqed.org/newsfix/2013/01/11/experts-warn-users-to-disable-widely-used-java-software/</a><br /><br /></p></blockquote>


Currently there is a known and not yet fixed security hole with Java applets so i wouldn't call it a smear campaign, it is very sound advice to deactivate your java browser plugins until it is fixed since hackers are exploiting it very activily at the moment(and often using legitimate sites to do so). I belive both Chrome and Firefox are blacklisting the Java plugin right now (so it is disabled by default).

Once the bug is fixed it will be reasonably safe to reactivate it. (The same goes for all browser plugins, if a serious security hole is found you should disable the plugin until it is fixed since website security tends to be crap and you never know if the site your visiting is safe)




PARTNERS