Jump to content

  • Log In with Google      Sign In   
  • Create Account

AnnaMarie

Member Since 30 Jan 2011
Offline Last Active Today, 12:51 PM

#5292656 About resouce files

Posted by on 20 May 2016 - 11:36 AM

I misread and didn't see the line above getting the file format. Sorry! Just woke up :|

If you store the path defined in images along with the resource (you have a resource class, the image name is just a string member variable) then resources contain the file path and their own name. From there you can always find a resources image name.

If the resource only receives file data you could also find the extension (since you need the string to open the file) then pass the extension along with the file data.


#5292649 About resouce files

Posted by on 20 May 2016 - 10:42 AM

You could start at the end of the string and iterate towards the beginning searching for the period. When the period is found the extension is represented by everything between the period and end of the string.

If your language has a string class/type you can do the same with searching and using a substring. Hope that helps :)


#5263179 Quadtrees for terrain culling and more terrain questions

Posted by on 22 November 2015 - 02:39 PM

The first use for a quadtree I can think of in addition to your link deals with 2D collision detection. You can find more information on Wikipedia where there is a small list (here) as well. I think a quadtree for 2D is pretty common, though, I could be wrong. A more up to date article for a quadtree terrain (though in C# but you can translate it) I found was here.

 

There are more advanced terrain clipping/LOD systems you can do but I don't know the exact details of them. The node based LOD found on Rastertek has worked for my needs and was pretty easy to implement. I had a simple box for each terrain node/chunk, and I just did bounding box detection to know which chunks were to be rendered. This may not have been as efficient as other techniques but I didn't have any noticeable problems.

 

Normals are generated when I create the terrain and I just store then inside the buffer. If the terrain isn't changing there doesn't seem to be a reason to regenerate the normals each time using a shader. In the case where my terrain changed (when using a simple brush) I just recalculated and updated the buffer. 




#5232012 MMORPG networking Solutions

Posted by on 31 May 2015 - 01:52 PM

While more advanced networking is out my skill level I think it might help just looking at other real world events where networking is a problem. This video is pretty neat and I think it's worth the watch for the short segment on the WoW networking. While their numbers are much larger than yours, they need to be pushing 100 gbps just on WoW alone. Whether that's per data center or overall was not clear. Each realm comes bundled with a few database servers and instance servers as well, but some networking information gathered by a 3rd party showed you never change connection from the world server. The connection is only lost when moving to an instance (another blade).

 

How many players you have per server is entirely based down to both the server, type of game, and bandwidth. For example Hearthstone had a goal of 1,000 games per core at once, and ended up with 9-11,000 at once (see this at 21:00). It can get away with this because of the type of game, smart coding, and the bandwidth being extremely low. A quick search online shows something like 1MB per hour or so.. but I could only find the phone specs so PC may be different.

 

WoW would have a very difficult time trying to match that just because of the bandwidth differences. The world server itself for WoW was not as powerful as I originally thought (looking at the auction they had in 2011), though it has never been stated if a world server was split by region or not. Each server was also upgraded as necessary to help stability. 

 

As for the n^2 problem it comes down to both the upload and download speed. If you have 40 players in the same location the server is receiving and broadcasting updates for every person.. so each player sends his information and receives 39 other players information. The more players within a certain the range the bigger the problem.

 

Even today with Blizzards infrastructure this is a huge problem I can recall a few times recently where a streamer would gather hundreds of players and crash the server.. with the complimentary ban hammer falling down shortly thereafter smile.png Their CRZ (Cross Realm Zone) technology was meant to help mitigate rising costs and spread players out over the entire data center, but has some fundamental problems still that Blizzard said they can't solve.




#5226995 hello! just joined.

Posted by on 03 May 2015 - 01:03 PM

No worries at all smile.png

 

Since you said you had a reasonable understanding about C# Monogame should help you get up and running quickly. While not a game engine itself, it provides some decent infrastructure to build games with. There are numerous tutorials lying around on the internet that can be found using your favorite search engine. As Monogame was designed to be a drop in replacement for the now deprecated Xna framework usually tutorials for Xna will work in Monogame with some tweaking.

 

There are other options for C# which can be found online as well. These vary from full engines to just a simple graphics wrapper - leaving more or less work for you to do on your own. After gaining experience with a few small games you should have a better idea regarding how to best move forward.

 

 Just make sure to keep things simple at first cool.png




#5226990 hello! just joined.

Posted by on 03 May 2015 - 12:04 PM

Welcome to the site smile.png

 

Check out the FAQ as it is a good starting point for newcomers on the site. Also utilize the search to see the feedback given to others that have posted similar questions. The replies to those question should help to give you more understanding and options to choose from.

 

As for whether you 'should' be using a tool or making it from scratch, there is no right or wrong answer. If you are more interested in making games tools will definitely help as most of the grunt work is done already. If you are more interested in learning how those tools function, going your own route will help you better understand how things work under the hood. Regardless of what you choose each choice still requires some time and dedication to see any results.

 

Once you make a choice don't feel like you can only make games that way. You can always change your mind later on as you see fit smile.png

 




#5226861 How To Make An RPG

Posted by on 02 May 2015 - 12:46 PM

Could you be more specific on what you mean as far as 'how it works'? There may be some write-ups or something someplace, but finding anything as substantial as I think you are looking for will be extremely challenging. Part of the reason for this is the material doesn't really exist.

 

Going off just an in general sense:

If you are just curious about generic elements, say NPC dialog, the best resource for these are the games themselves. Just be sure to look at it from a purely technical point of view. In other words the story doesn't matter. What matters are the underlying systems for these things. From there it's relatively easy to extract the basic idea and think about how these would have been done. Skill/Tech trees are also shared across a wide variety of games, which are really just abilities or structures that have pre-existing requirements to unlock. Thinking of it in terms of pseudo-code might help you as well.

 

Hope that helps! smile.png




#5225670 Is AP Computer Science Worth It?

Posted by on 26 April 2015 - 11:19 AM

If nothing else seems particularly interesting to take instead I would say go for it. Also keep in mind schools aren't all the same smile.png

I know when applying to Southern Polytechnic State University I wasn't at any particular disadvantage for not having the credit. Honestly I don't even think it was considered since most of the students did not have it at the time. My high school didn't even offer it until last year I think? It was focused primarily on science, math, and reading (i.e. college prep) over courses like CS or engineering. 

 

SPSU at the time also capped how many courses the AP credit would apply for. Some students came in with 2 CS credits but at most you could only skip one of two introductory classes. From a purely credit standpoint that 2nd AP credit wasn't ever applied to anything. In order to get the 2nd course exempted it required a standard test you had to take. This resulted it in being marked as exempt rather than an AP class. Everyone I knew ended up taking both courses anyway, since it was suggested you do so in case you missed anything in HS.

 

As far as if you should or should not take it - it's rather hard to say. For me personally I don't think it made any difference had I taken it or not. There was never a time where I felt it would have helped me greatly.. except maybe pre-first semester anxiety about my skill laugh.png. For others they said it made a huge difference in that first year, but really by the 3rd semester it became pretty much irrelevant.

 

If you have the interest and a few hundred dollars for AP exam I say go for it. If you feel based off the opinions of friends that took it that it isn't for you, don't fret over it too much smile.png But if I had to choose between something like Art.. and AP CS... Definitely the CS one cool.png  




#5219354 Game Development Advice Along with Course Help

Posted by on 26 March 2015 - 10:37 AM

Now I just need Help and What courses to Take that make me from Beginner to Advanced.

 

 

Unfortunately courses alone (and books for that matter) won't be a substitute for time spent applying the knowledge. Much like you can read a book on 3D modelling - reading and doing are two completely different things. Likewise you can read a book of software architecture but early on you will still have some major flaws that you can't see. Spotting bad designs can really only come with experience. This is not to say that you won't learn any cool tips or tricks from books/courses, just that without applying them (or doing the activity on a regular basis) you won't see the results you are looking for.

 

As far as courses go, I would say get a CS degree and maybe toss in one or two game development electives if they are offered. The CS courses, at least here, offer a much more solid foundation to build upon than the game development courses. Everything from the CS side translates directly into game development. You don't need to take a ton of courses in gamedev as I think really only one or two are needed if you're unsure about how games work. I myself took a single C#/Xna course as I was tired of Java from my intro courses and it was enough to allow me to make games since.

 

This site is also very useful as you have 15+ (I believe it started in 1999?) years of questions and discussions. Granted some are irrelevant now, but most still apply. Hundreds of articles with new ones added weekly, blog posts where people explain what they did, and a great helpful community all in one place. 90% of the time if you are having a problem someone else on here had the same one. I encourage you to use it as often as you can! smile.png For more information regarding these starting questions the FAQ and beginner forum has hundreds of these with advice.

 

Good luck smile.png




#5217511 how to comunicate with diffrent exe files?

Posted by on 18 March 2015 - 07:16 PM

You might also want to look into shared memory using memory mapped files, a quick look on Google returned this library that can hook into C# (since the post was tagged with C#). There are other IPC options you can use that may be more in line with you're looking for but, as stated, without context it's hard to give a clear answer.

 

Hope that helps!




#5211526 Hiding savedata to prevent save backup

Posted by on 18 February 2015 - 02:32 PM

As stated briefly you must also strongly take into consideration playing the same saves on multiple computers. For example, I would play Kerbal Space Program at school in between courses and copy saves to my desktop. If you make saves too hard to find (or use some complicated scheme) I as a player would be greatly annoyed certain saves work only the computer that created it. A save is a save regardless of where it originated from. 

 

Beating a user who doesn't bother backing up saves (and one not prone to cheating) is relatively straight forward. Just adding a flag into the header to mark the character as dead is a solution. To add salt to the wound take all his gold and items as well, he won't need them in the afterlife anyway smile.png

 

Granted if he plays on more than one computer, or backs up his saves, it will break this but this may not be such a bad thing. For instance, lets say a child plays his father save and dies. If you can't restore the save you will end up with a potentially angry father and one terrified child! If he wasn't backing up saves before this, well, he most likely will be afterwards in case it happens again. If he did then a simple copy and paste will return hours of work over a simple mistake. 

 

If you feel very strongly about disallowing copying then just have a secondary file that's created in the users documents folder (ideally where saves are located as well). This file will keep a unique id associated with each save, and whether the save has been marked as dead. If this file is deleted or has an invalid header/crc you would have to remake it. How else would existing hardcore characters that didn't die be playable? The registry would also present the problem of fresh OS installs and the like..

 

Thus back to the start of the endless circle.. wacko.png




#5194451 Creating a game launcher.

Posted by on 24 November 2014 - 11:12 AM

1) Agent is primarily responsible for launching and updating the games, so a broken agent leads to a couple of problems. The launcher application launches agent which will go about updating the BNet launcher if needed. If agent requires an update the launcher will update Agent before it finishes opening.

 

2) I believe bundled with the steam updates is a process called SteamUpdater.exe which is launched either by pressing restart when steam bugs you for an update, or launched when steam opens after an update. The updater handles restarting the steam client as necessary.

 

Since Blizzard changed their update process when WoW came out here is what they did both before, and up until the BNet launcher came about:

 

Back in the Diablo 1 and SC1 days Blizzard had a program that would handle swapping out exes and what not. Since the exe's were stored inside the MPQ's all that was needed was to extract the file. This replaced the old one with the new one. Due to their archives having priority/chaining, all you needed was a new patch archive and the exe in order to continue playing the game. Users still had to manually press update as nothing was really automatic about it like it is now.

 

Something similar to this is still perfectly viable as the updater would be able to update everything but itself. How was the updater updated then? It was just replaced on the server and required a specific version number for the game exe in order to run. This also prevented patching your game multiple times, or patching to an earlier version.

 

For WoW they used a similiar two part process - they used a custom bittorrent downloader (see this for some more background information on that) which downloaded the data. This allowed them to leverage off users who already downloaded their game to save their own bandwidth. Each patch came with the downloader and upgrader application, with the upgrader being newer versions of their upgrade app they had been using over the years. Before this SC1, D1, and D2 all handled downloading the newest patch data themselves then running the updater.

 

With that said the DLL approach is definitely the easiest, but if that wouldn't work with your game exe just use the separate programs.

 

Using the launcher to download and run an updater program will work. Just beam over your game version to get the correct patches smile.png If the launcher needs updating just make the updater end the launcher, or exit the launcher right after you start the updater. Hope that helps!




#5192874 How to destroy an Audio at a specific place in Unity3d?

Posted by on 14 November 2014 - 01:12 PM

As a quick solution, if you are defining the audio sounds using the inspector you can use an array to store the sound clips. I am assuming maybe these sounds are used for background music, or maybe some basic ambient noises. For example changing from birds chirping during the day to crickets at night.

 

Note that there are indeed more elegant solutions but for something basic it will work. I haven't used Unity in awhile but something along the lines below will allow you to change the audio. I am also assuming you aren't wanting to dynamically add a new sound component but rather change the audio from the existing one. It is also untested but if memory serves right it should work:

public class BackgroundMusic : MonoBehavior
{
	public AudioClip[] audioClips;
	public int currentSound;
		
	// Somehow you are going to change an audio sound
	// Maybe via trigger collision or time elapsed.
	void PlayNextClip()
	{
		currentSound++;
	}
		
	// Play a sound based off 
	void Update()
	{
		audioClips[(currentSound % audioClips.Length)].Play();
	}	
}

You essentially just store the clips into an array, add them via inspector, and then have a position of the current audio you wish to play. For example, if you have a radio/jukebox with 7 tracks you will just add the songs after you place the object into the world. You then can press the next button, insert some pocket change, ect. to adjust the song.

 

For some basic background ambient the idea is the same. Maybe when the sun goes down play crickets otherwise play birds chirping ect. When the sound changes is entirely up to what you would like to do (trigger, collision, time elapsed ect). 

 

I hope that helps some. Good luck! smile.png




#5189857 Help with matrix multiplication

Posted by on 28 October 2014 - 09:43 PM

I believe these have already been wrapped inside the Java matrix library in the link you already posted. 

 

If you are storing your matrix in a float array you can just use MatrixMM to have it computed with a provided float array. You shouldn't have to write any extraneous code as there are already wrappers over the native code on the link you provided. I personally haven't done much Java on Android but that method is static now inside the android.opengl.matrix class.

 

Does that answer your question or do you need more information? 




#5189495 Questions from a newcomer

Posted by on 27 October 2014 - 03:01 PM

I think you may be leaning more towards the programming side of things so I will gear my answer to that - though as stated above, it is hard to tell. Also note that, as stated above, making a large game such as that requires a team of people, though something much smaller scale in my opinion is achievable if you work at it :) 

 

Starting out with text based games such as number guessing and maybe even an old text based RPG are good projects to learn from. While drastically smaller in scale, they are still helpful in the learning process. After becoming comfortable with those moving onto 2D games is commonly the next step. Reason being 3D games add much more complexity to games and most of the math you learn in 2D applies easily to a 3D game. After doing many small 2D games, moving to 3D is a venture of its own complete with a unique set of challenges to solve :) There are plenty of helper libraries for things like graphics and sound if you are wanting to do and learn more than just using an engine.

If you just want things "to work" there are numerous free engines which support scripting. Rather then deal with how things work internally you can instead focus more on writing the game. While doing this removes the need to know how to use many different libraries you still need to know some math along side whichever language your engine uses.

 

Engines and libraries are relatively common questions asked here, so I encourage you to look around using the search to see what others suggest. 

 

Good luck :)






PARTNERS