Hey I added a new project to github for testing the FontBuddy:
FontBuddySample on GitHub
It just does some examples of each of the different font effects. Each is drawn with left, center, and right justification so you can see how they all behave:
Note that since this is a different project, it uses the FontBuddy as an external project, located in ./externals/FontBuddy. You might have to pull this down separately or something, idunno I’m a bit new to using externals in git.
man it sure is a huge pain the ass to draw text in XNA/MonoGame
FontBuddy makes life a quite bit easier… srsly
I put all the game timer code I use up on GitHub. It’s super useful for doing stuff like speeding up gameplay, slowing down gameplay, hit pause, etc.
I’ve found that Timers in games are very hierarchical. You’ve got the main clock, which is basically run off the cpu clock or whatever and never stops. You’ve got a game clock which can be paused, or if the game is kinda sluggish or frantic you can tweak the speed this clock runs at. Then you’ve got all the clocks that run off that, including character clocks, particle engine, physics clocks, etc. If these are run hierarchically, when you pause the main game clock all the ones underneath it pause too.
Also when playing a network game, can send those clocks from the server to all clients, and all the players will instantly be synched up. Very neat trick!
Anyway, this is the way I do it. From readme:
A bunch of timer objects that can be used for time effects like hiererchical time, slowdown, speedup, hitpause, etc.
The most important thing is that these timers can be used hierarchically. You can pass one gameclock into the update function of another one, which updates based on that dude's time. So the timer chain might look something like this:
/ | \
Character1Time ParticleEngineTime Character2Time
So like the MainTime is a GameTimer.GameClock and is updated first from the XNA GameTime object. This one always runs at realtime, so you don't want to pause or slow it down. Can problably run HUD or menu transitions off this clock.
The GameTime is also a GameTimer.GameClock and would be used to run the gameplay itself. This one can be paused for the Pause menu, or slowed down/sped up if the game play speed needs to be changed. Since all the clocks below this one are updated off it, they will also pause/slowdown/speedup.
Under that, you could have the ParticleEngine running off it's own clock separate form the player characters. That way when the players are punching the snot out of each other, you can add some hit pause to add crunch and the particles will still be flying around.
Idunno, that's just example how I use it in my fighting games. I also send these timers over the network to sync up the server & clients.
I put the input wrapper I use in all my fighting game sutff up on Github: HadoukInput (i know, the name is corny haha)
It’s a CSharp XNA/Monogame library for scrubbing, sanitizing, sorting, and pattern matching controller input for use in a 2d fighting game.
From the Readme:
This a dumb problem I ran into today that might help someone… upgrading an XNA 2.x project to mono, got a bunch of errors:
Error CS0518 : The predefined type ‘System.whatever’ is not defined or imported.
Open whatever .csproj in a texteditor, there is as hidden xml tag in those old .csproj files that needs to be removed:
Monogame is an open source replacement for the XNA game development library. It’s pretty neat, you can do a lot of cross platform stuff that XNA could never do. One of the biggest hassles though is that if you an existing XNA project and want to port it to Monogame, the content files need to be setup in a specific way and there’s really not an easy to do them all at once.
I’m gonna walk you through a couple simple copypasta find/replace tricks I’ve been using. Keep in mind, developing with Mono is always a moving target, so anything I post here is proooobably out of date by the time you read it 😉
Graph databases are a new type of database that stores all the data in a big funky web, instead of boring old rows and tables. Your “records” are stored in things called “nodes”, and nodes can be connected to each other by “edges”. Once you have all your data and connections in place, you can start to pull NEW data out it by examining the relationships between stuff. Think about like how facebook recommends friend-of-friend, or amazon recommends things-you-might-also-like.
One of the most popular graph databases out there and the one I’ve been playing with is Neo4j. I think it’s the most popular because it’s documented inside-and-out, making it really easy to work with. One of the way to examine data in Neo4j is using its Cypher query language, which is like SQL for graph databases. It’s really powerful, and once you figure it out can do some really cool stuff with it.
I’m gonna try to walk you through setting up Neo4j and doing some tricks with it. One of the example datasets on the Neo4j site is an IMDB database. So you’ve got this fancy new toy that can find connections between things, and a movie database, what’s the first thing you want to do? Write a Kevin Baconator, right? So that’s what we’re gonna do, setup Neo4j and find the links from any actor to Kevin Bacon.