Generic game programming / C# thread

Anything else
User avatar
Endoperez
Posts: 5668
Joined: Sun Jan 11, 2009 7:41 am
Location: cold and dark and lovely Finland

Generic game programming / C# thread

Post by Endoperez » Fri Sep 09, 2011 12:30 pm

So..


I've started at a new school. Last week, I finished a game. I started it a week before that, and worked on it for about 6 days. It was a sucky top-down shooter game where a guy shoots blob-guys.

Now I have two weeks (about) to finish a mini-game-project with more-or-less random team. I've programmed only one game using XNA so far. No panic? No panic, because this game will obviously be awesome. Perhaps even awesome enough that I will post a screenshot of it. Probably not the whole game, because I don't think it will be THAT awesome.

So yeah, if any others think they'd like to talk about their coding practices (e.g. doing too much of it, not getting enough of it done, both of the above...), feel free.

Also, if Korban happens to read this, perhaps we won't be derailing any more threads. :lol:

User avatar
Korban3
Posts: 4146
Joined: Tue May 31, 2011 9:14 pm
Location: 42nd St E, Hell

Re: Generic game programming / C# thread

Post by Korban3 » Fri Sep 09, 2011 5:26 pm

Yay! No more derailing. At least about code, we won't be...
I'm about to start up a game too. I'm using Visual C++ Express though. I just got SFML to work because this guy is awesome: http://www.youtube.com/user/SFMLCoder ... and his tutorials aren't out of date and deprecated. Went pretty smooth. What's XNA? I've heard it mentioned, but I don't have a clue what it is. ^_^

User avatar
Freshbite
Posts: 3256
Joined: Thu Jan 14, 2010 3:02 pm
Location: Stockholm, Sweden.

Re: Generic game programming / C# thread

Post by Freshbite » Fri Sep 09, 2011 6:18 pm

XNA is a programming environment, just like SMFL, developed by Microsoft used for creating games for the Windows Phone, the Xbox 360 and Windows-based computers.

It's mostly renowned for being the gaming library used to develop games released on Xbox Live. I think it's safe to say that Limbo was built using XNA, for example.

User avatar
Korban3
Posts: 4146
Joined: Tue May 31, 2011 9:14 pm
Location: 42nd St E, Hell

Re: Generic game programming / C# thread

Post by Korban3 » Fri Sep 09, 2011 6:50 pm

Oooooooh. I see. I thought it was an IDE for a minute. I was all like " Wuuuuut?". Well, now I know. CUZ KNOWLEDGE IS POWER!

User avatar
Endoperez
Posts: 5668
Joined: Sun Jan 11, 2009 7:41 am
Location: cold and dark and lovely Finland

Re: Generic game programming / C# thread

Post by Endoperez » Sun Sep 11, 2011 11:32 am

I've got the very, very barebones of the new adventure game done. The "engine" now draws a background, the mouse, and a character. The character moves towards mouse, and has separate walking and idle animations.

User avatar
Korban3
Posts: 4146
Joined: Tue May 31, 2011 9:14 pm
Location: 42nd St E, Hell

Re: Generic game programming / C# thread

Post by Korban3 » Sun Sep 11, 2011 11:38 am

Epic. Mine is a 3D adventure/survival terror game with Doom-esque graphics. I'm going to take advantage of actually 3D levels sometime though. I'm still trying to get all the base features of my game working. So far I have a rectangle (It's going to have a set of sprites for it later.) that you can move using WASD, keeping in mid that I have no clue what an AZERTY keyboard's full setup is. I can change the angle the character 'faces' and moves, and it's totally independent of what direction the shape is facing. It also has some really basic physics. You can add to or remove from speed and rotation speed variables to make stuff happen. I'm currently working on getting a mouse controlled camera working. I'm really close, but it has a weird glitch where my screen turns white. Supposed to render black with the white shape, but I'm going to spend today debugging the mouse look.

User avatar
Korban3
Posts: 4146
Joined: Tue May 31, 2011 9:14 pm
Location: 42nd St E, Hell

Re: Generic game programming / C# thread

Post by Korban3 » Sun Sep 11, 2011 8:07 pm

Huh, not sure what's wrong with it. Maybe if someone is more familiar with SFML than I am they could tell me why this line

Code: Select all

sf::Mouse::SetPosition(center-of-screenVector2i, Window);
causes my screen to render white? Am I using it wrong if it's under the mouse movement event?

User avatar
Korban3
Posts: 4146
Joined: Tue May 31, 2011 9:14 pm
Location: 42nd St E, Hell

Re: Generic game programming / C# thread

Post by Korban3 » Sun Sep 11, 2011 10:55 pm

And I set up a Twitter just for the hell of it. Never thought I would, but here it is.
http://twitter.com/#!/GristelGames
I dunno what I'll really post on it. Progress with my learning? Yeah, like that's a lot of fun to read. :roll: Anyways, it'll probably be much more useful once I start making commercial endeavors with indie game design. No personal life crap, no relationship updates. Just games. before you know it I'll have a frikkin' blog and I'll check my Facebook more often than once a month. :lol:

User avatar
Korban3
Posts: 4146
Joined: Tue May 31, 2011 9:14 pm
Location: 42nd St E, Hell

Re: Generic game programming / C# thread

Post by Korban3 » Mon Sep 12, 2011 4:59 pm

Awesome loading screen.
I'm doubt it's the camera code. I can manipulate the camera via key presses, but it's just the SetPosition that causes issues. I'm sure I'm using it wrong and I just have to figure it out. Another thing I have to do is learn classes in C++. I have to make animation parameters, levels, items. I need classes. I also need to figure out a useful way to create levels. I'm really leaning towards a sector based approach like Doom, but I dunno.

User avatar
Untadaike
Posts: 1660
Joined: Mon Jan 05, 2009 7:46 pm
Contact:

Re: Generic game programming / C# thread

Post by Untadaike » Mon Sep 12, 2011 5:11 pm

Gosh, you programming noobs. I just finished my Applescript game with fully-functional dialog boxes and up to three buttons per window.

User avatar
Korban3
Posts: 4146
Joined: Tue May 31, 2011 9:14 pm
Location: 42nd St E, Hell

Re: Generic game programming / C# thread

Post by Korban3 » Mon Sep 12, 2011 5:53 pm

Noob game programming FTW :D

User avatar
Endoperez
Posts: 5668
Joined: Sun Jan 11, 2009 7:41 am
Location: cold and dark and lovely Finland

Re: Generic game programming / C# thread

Post by Endoperez » Tue Sep 13, 2011 2:07 pm

My adventure game has gained another ground-breaking feature: navmeshes!

A navmesh is a list of polygons in which the player can walk. Each scene has at least one navmesh that tells the game which areas of the scene the player can walk on. They can be exchanged on the fly.

This isn't true pathfinding though. The game only checks if the mouse was clicked inside one of the navmesh's polygons, and if this is true, the hero takes the most direct route from his current position to the clicked point. So he could cross gaps and whatever. I think I'll leave proper pathfinding for later, since it's a) not necessary in our current plans and b) I have 13 or so days left to finish everything else, including inventory and dialogue display and interaction systems, interactive objects and NPCs in scenes, moving from one scene to another, reading and writing all the info into files, etc.

I'll probably have to leave out some less important features such as main menu, save/load system, proper pathfinding, resolution-independent graphics and UI, and all other features which would make the game more enjoyable. :D

User avatar
underthedeep
Posts: 1099
Joined: Tue Apr 27, 2010 7:18 pm
Location: southern california
Contact:

Re: Generic game programming / C# thread

Post by underthedeep » Tue Sep 13, 2011 3:33 pm

C# IS FOR POSEURS
Attachments
andymemeprogramming.jpg
andymemeprogramming.jpg (123.88 KiB) Viewed 9223 times

User avatar
Korban3
Posts: 4146
Joined: Tue May 31, 2011 9:14 pm
Location: 42nd St E, Hell

Re: Generic game programming / C# thread

Post by Korban3 » Tue Sep 13, 2011 5:02 pm

Har har har. Well, I dumped my 3D project. I was on the IRC last night to confirm that I was learning classes right, and ExpiredPopsicle was all like "Remaking Doom is no way to learn C++, especially for your first project." So I was all like "Sigh. Fine. But I'm not making Pong. Too simple. I want a challenge."
Still haven't decided what I want to make though. I was leaning toward platformer. I dunno yet. So man design choices. But at least what I did get down on my 3D one was educational, and I have a minimal understanding of SFML and C++. And can write basic classes. That'll help :D I think an dark and gritty adventure platformer would be fun, maybe some parkour if I was boss enough to make that. It'd be a fun challenge for my n00bishness too.

EDIT: Navmeshes FTW!

User avatar
Endoperez
Posts: 5668
Joined: Sun Jan 11, 2009 7:41 am
Location: cold and dark and lovely Finland

Re: Generic game programming / C# thread

Post by Endoperez » Wed Sep 14, 2011 11:21 am

If you're going to do anything with a 2D tile-based interface, do aGame of Life for practice first.

Basically, you have tiles, each is either alive or dead, and the eight neighbours' states affect whether a tile is alive or dead in the next iteration. Very fast to do, and good practice for more complex stuff.

Post Reply