Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
The Oid
Jul 15, 2004

Chibber of worlds

Strumpy posted:

In general though I'm not totally sold on the whole 'scripting makes things easier' front. Sure you may save some time compiling but I think it takes much longer to track down and fix bugs.

Yeah I'm in two minds about this. Having worked on projects with scripting languages in the past.

On one hand, if you do it right, it's great for debugging to just be able to write a lua or python script that creates an easy test-case for a bug you're working on. It's also pretty good to be able to easily throw something together, and move the slower stuff into C++ if it works out.

On the other hand, a lot of the justifications for scripting languages fall flat on their face in reality, in my experience. The idea of designers being able to write their own scripts is great in theory, but in my experience, designers don't really want to be programmers, they just want tools that let them express their vision. The grand vision of designers creating scripts, just tends to turn into programmers having to do the more difficult stuff for them, and having to do it with inferior tools. Trying to explain object-oriented programming to a designer, that really, to be fair, shouldn't have to know about such things. Not fun.

Scripting languages can come with their own set of hard to track down bugs too, Lua I'm looking at you. Spending an hour trying to figure out why the game is broken, only to find that someone accidentally mispelled a variable-name somewhere, that Lua just assumes is a new variable. Not fun.

To be honest, I think visual languages like the Unreal engine's "Kismet", are a better way to go. Can't say I've had any experience of using Mono for scripting, but I imagine being able to use C# as a scripting language would make things much less painful.

The Oid fucked around with this message at 13:34 on May 4, 2010

Adbot
ADBOT LOVES YOU

OneEightHundred
Feb 28, 2008

Soon, we will be unstoppable!

The Oid posted:

Scripting languages can come with their own set of hard to track down bugs too, Lua I'm looking at you. Spending an hour trying to figure out why the game is broken, only to find that someone accidentally mispelled a variable-name somewhere, that Lua just assumes is a new variable. Not fun.
I definitely like JavaScript's requirement that vars be declared in advance for this, but you actually CAN overcome this issue in Lua by, for example, hooking __index on the environment table and throwing an error if it's ever called.

I disagree a bit on the "designers don't want to be programmers" thing, Starcraft and Warcraft 3 proved a long time ago that they can digest programming concepts enough to create basic interactivity. While those also had visual tools, I think that is less important than the fact that implementing things was extremely clear-cut.

I've worked with designers and if you give them easy-to-digest stuff like...

code:
WorldObjects.button1.use = function()
    WorldObjects.door1.open()
    Wait(10)
    WorldObjects.door2.open()
end
... then they can handle it. Not to say this is ideal, but I think simplicity is the issue more than glossing it up in a GUI. This is especially the case when I can point at a few examples where an interactivity system glossed up in a GUI was more annoying than writing simple scripts would have been in a lot of instances. (i.e. Half-Life)

OneEightHundred fucked around with this message at 14:04 on May 4, 2010

Hanpan
Dec 5, 2004

In case anyone cares, the guys at Unity have published a new tutorial which is actually really decent:

http://unity3d.com/support/resources/tutorials/car-tutorial

Anyone working on a Unity megathread? I'd love to get one going.

Hanpan fucked around with this message at 16:08 on May 4, 2010

Hamled
Sep 11, 2003

Avenging Dentist posted:

I'd actively recommend would be Lua, though Stackless Python might be doable too (I'd be more inclined to recommend that if CCP actually released their changes to the public).

What makes you say that CCP doesn't release their changes? While I don't have specific knowledge of them releasing source code from EVE (except as bytecode with the game), they were a sponsor and participant in past sprints for Stackless Python. Although I'm not sure if they have those sprints anymore, seems like most of the developer attention has moved to PyPy...

Avenging Dentist
Oct 1, 2005

oh my god is that a circular saw that does not go in my mouth aaaaagh
There's a bunch of IO stuff that they did and never released, at least not back when I cared about it.

OneEightHundred
Feb 28, 2008

Soon, we will be unstoppable!

Hamled posted:

Although I'm not sure if they have those sprints anymore, seems like most of the developer attention has moved to PyPy...
Well yeah, PyPy has absorbed most of the Stackless feature set while being JIT-based.

I'm hard-pressed to recommend any Python implementation as a scripting language regardless. Right now the choice is basically Lua, V8, or Mono. SpiderMonkey being a runner up, since it's playing catch-up with V8 right now and the APIs are about just as usable.

V8 gives you a language which avoids the stupid points of both Python (i.e. terrible anonymous function syntax which it's doomed to have forever because of "whitespace is significant"), and Lua (i.e. no operate-and-assign, 1-based arrays), while having all of the crucial features, a usable API, and extremely good performance.

Lua gives you really effortless embedding.

Mono is kind of a sidegrade, it's faster and mistakes tend to simply not compile, but it's harder to hammer stuff out quickly.

Avenging Dentist
Oct 1, 2005

oh my god is that a circular saw that does not go in my mouth aaaaagh

OneEightHundred posted:

1-based arrays

I never understood why people complained about this. In a language with for each statements, how often do you actually need to explicitly write out array indices?

Hubis
May 18, 2003

Boy, I wish we had one of those doomsday machines...

Avenging Dentist posted:

I never understood why people complained about this. In a language with for each statements, how often do you actually need to explicitly write out array indices?

I imagine it gets annoying at the interface between the scripting language and the engine hooks.

OneEightHundred
Feb 28, 2008

Soon, we will be unstoppable!

Hubis posted:

I imagine it gets annoying at the interface between the scripting language and the engine hooks.
This actually isn't really the case. It's hard to explain why, but the jist is that you'll spend far more time worrying about stack offsets than array manipulation and the stack offsetting would be just as bad if it was zero-based.

(Lua doesn't give you direct access to object handles, you have to manipulate everything on the internal stack via the API, which is kind of weird because it's a register-based VM)

Avenging Dentist posted:

I never understood why people complained about this. In a language with for each statements, how often do you actually need to explicitly write out array indices?
I don't consider it to be a huge drawback, but I can name a few cases where it is an obvious drawback (i.e. indexing interleaved arrays), and can't really name any where it's a benefit, so I'd consider it a fault.

Lack of operate-and-assign is much more obnoxious, but it's actually not that hard to hack it into the compiler. Making it zero-based would be similarly easy, but you risk breaking a bunch of standard library calls (especially ipairs, select, and unpack) if you do that.

e: There's also the problem of it defaulting non-local identifiers to global scope, which is a debugging headache and (for somewhat esoteric reasons) is much harder to remedy via compiler mods, but you can remedy that at runtime:

code:
function defglobal(name, v)
    if v == nil then
        v = false
    end
    rawset(_G, name, v)
end

setmetatable(_G, {
    __index = function(t, k)
        error("Attempted to read undeclared global "..k)
    end,
    __newindex = function(t, k, v)
        error("Attempted to write undeclared global "..k)
    end
} )

OneEightHundred fucked around with this message at 16:27 on May 5, 2010

The Oid
Jul 15, 2004

Chibber of worlds

Hubis posted:

I imagine it gets annoying at the interface between the scripting language and the engine hooks.

Also potentially a recipe for bugs if you have developers that have to work both in C++ and Lua, as it's very easy to forget when switching between them.

nihilocrat
Jun 8, 2004

all the hep cats jam to "cat /dev/hda1 > /dev/audio"

Hanpan posted:

In case anyone cares, the guys at Unity have published a new tutorial which is actually really decent:

http://unity3d.com/support/resources/tutorials/car-tutorial

Anyone working on a Unity megathread? I'd love to get one going.

I've been working in Unity since the free version came out and have been absolutely loving it. It would be great to have a devoted thread.

Speaking of vehicles, whenever I get around to finishing my unnamed airplane bombing mini-game thing I'll release the source to give people an easy way of adding semi-realistic airplanes without having to learn how to code a flight model.

Jmcrofts
Jan 7, 2008

just chillin' in the club
Lipstick Apathy
How difficult would it be for me to start using XNA/C# if I've never programmed in C# before, only C/C++ and Java? Are there any good game development libraries for C++?

jonjonaug
Mar 26, 2010

by Lowtax

Jmcrofts posted:

How difficult would it be for me to start using XNA/C# if I've never programmed in C# before, only C/C++ and Java? Are there any good game development libraries for C++?

Not very difficult at all, C# is a C-like language like C/C++/Java.

OneEightHundred
Feb 28, 2008

Soon, we will be unstoppable!

jonjonaug posted:

C# is a Java-like language like Java.
Fixed.

(Seriously though C# is basically just Java with a few less retarded design decisions)

Jmcrofts
Jan 7, 2008

just chillin' in the club
Lipstick Apathy

OneEightHundred posted:

Fixed.

(Seriously though C# is basically just Java with a few less retarded design decisions)

Really glad to hear this, Java has always been more "fun" for me to program in than C++.

Jmcrofts
Jan 7, 2008

just chillin' in the club
Lipstick Apathy
Okay I got through the tutorials for XNA, it was super easy and basically just like java, so thanks for recommending it.

Now I got another question, is there a good free sprite drawing program out there? Preferably something that can make good 8-bit looking art. Sorry if this isn't the right thread for this.

GROVER CURES HOUSE
Aug 26, 2007

Go on...
Any image editor will do just fine. Paint.NET is a frequent choice, Photoshop if you have money.

Lurking Haro
Oct 27, 2009

As long as you can setup a grid and a custom palette, almost everything is suitable.

Drox
Aug 9, 2007

by Y Kant Ozma Post
I'm installing VC# and XNA... again... is there any reason to not use XNA 3.1 with VC# 2008?

PDP-1
Oct 12, 2004

It's a beautiful day in the neighborhood.
XNA 3.1 with VS2008 is the most current version available. XNA 4.0 will work with C# 2010, but it isn't out for another couple of months.

So yeah, go with XNA 3.1 and C# 2008 for now.


edit: There is an XNA 4.0 available for download right now, but it isn't a full version. It's just a pre-release for the Windows 7 Mobile platform, no PC or XBOX versions are included.

PDP-1 fucked around with this message at 02:56 on May 13, 2010

GuyGizmo
Feb 26, 2003

stupid babies need the most attention
Does anyone here have any experience using OpenGL for a Mac and Windows cross-platform project?

I'm wondering about how much discrepancy there is in features, how much of a performance difference there is, and if there's any other caveats to keep in mind when using OpenGL between operating systems. I do know that Mac OS X still only supports OpenGL 2 so I guess I'm only interested in that information as it pertains to OpenGl 2.

_areaman
Oct 28, 2009

I'm writing a multiplayer online game in java for a card game we enjoy immensely that has not been developed online yet. I've written the server from scratch (well, as much from scratch as you can reasonably expect using java) and it's basically set up like this:

Server initiates, spawns a new thread for the lobby. Server then listens for connections and when it receives a connection, it wraps the socket in a client object, and puts it in a data structure the lobby can access.

The game lobby repeatedly cycles through all client objects, seeing if there is any input from the socket. If there is, it interprets the input. If it's a chat message, it broadcasts it to all clients and it appears in their chat window. If it's a command, such as create a game or join a game, it sets up a new game lobby thread and runs that, or puts their client object into an already created game lobby.

Is this a decent way to run a game server? I tried to research game server design and didn't find much, so after some thinking this was the solution I came to. It's obviously more complicated than this but this is the basic structure. Is there some guide someone can point me to, or is there an obviously better way to do this?

OneEightHundred
Feb 28, 2008

Soon, we will be unstoppable!

GuyGizmo posted:

I'm wondering about how much discrepancy there is in features, how much of a performance difference there is, and if there's any other caveats to keep in mind when using OpenGL between operating systems.
Feature-wise, you're probably fine as long as you actually check for vendor extensions like you're supposed to and not just assume they're there based on something else.

Aside from that, get ready for two pieces of fun:
- Spending even more time debugging GLSL shaders that randomly break only on MacOS, in addition to your usual fare of GLSL shaders that only break on ATI or NVIDIA
- Random things being flat-out broken that Apple only patches once every major OS release provided they fix them at all.

Friendly Factory
Apr 19, 2007

I can't stand the wailing of women
post

Friendly Factory fucked around with this message at 08:14 on Jun 4, 2018

OneEightHundred
Feb 28, 2008

Soon, we will be unstoppable!
I'm kind of torn on how to respond to that. On one hand, I tried making an RPG once and learned a lot from that project. On the other hand, one thing I learned is that it is really loving hard. RPGs are extremely play-time oriented, which means it's impossible to just hammer something simple out, you need to make stupid amounts of content or it just doesn't fly.

If you aren't fazed by that, I'd recommend looking at stuff Jeff Vogul has made, which are essentially pretty freeform budget RPGs with D&D-inspired combat systems. It's probably the best indication of the kind of thing you can expect to put together with a small team or alone. That's not to say they're bad, quite the opposite, but if you want to hammer out something that looks like a Bioware or Square title, even one from 10 years ago, the odds are heavily stacked against you.

The other option is a dungeon crawler, eschewing adventure and focusing on combat instead.

Beyond that, RPGs are not very well-defined. There are practically no restrictions on how combat should work, or how exploration should work. Both can essentially self-contained games in themselves, so the first thing you should do is figure out how you want to handle those two aspects.

OneEightHundred fucked around with this message at 08:18 on May 17, 2010

Friendly Factory
Apr 19, 2007

I can't stand the wailing of women
post

Friendly Factory fucked around with this message at 08:14 on Jun 4, 2018

MasterSlowPoke
Oct 9, 2005

Our courage will pull us through
I'd suggest getting a copy of RPG Maker unless you want to spend a few years before you have anything worth sending to your friends.

Friendly Factory
Apr 19, 2007

I can't stand the wailing of women
post

Friendly Factory fucked around with this message at 08:13 on Jun 4, 2018

Lurking Haro
Oct 27, 2009

Friendly Factory posted:

This is a pretty strong argument. I may look into RPG Maker. Which of Xp or VX is the best one? And does it allow me to build on the foundation in some way? Can I add actual pictures as backgrounds and cinematic poo poo like that? Can I rework the battle system or game mechanics through coding or anything?

Of course you can use your own graphics and since XP, Ruby is supported for scripting. Custom battle systems can be made with scripts.

If you mean videos, no they are not supported.

Friendly Factory
Apr 19, 2007

I can't stand the wailing of women
post

Friendly Factory fucked around with this message at 08:13 on Jun 4, 2018

MasterSlowPoke
Oct 9, 2005

Our courage will pull us through
From my limited memory (I haven't messed with RPG Maker in like 6 years) VX is easier to get into but is limited in customization, and XP is more robust. All of the graphics should be replaceable. Neither are going to be as customizable as writing your own program, of course, but if you want to learn game design over game programming it's a better tool to start off on.

I used to post on this forum back when I did RPG Maker, they'd be more up to date than me: http://www.pavilionboards.com/forum/forumdisplay.php?f=52 Keep in mind they're extremely against piracy - just don't mention it if you didn't blow 60 bucks on a program you aren't sure you want to use.

Kire
Aug 25, 2006
Does anybody have any experience with the libtcod library for making roguelikes?
http://doryen.eptalys.net/libtcod/

I'm trying to figure out the mouse support in python. I want to print the coordinates where a user has clicked inside the terminal window.

Drox
Aug 9, 2007

by Y Kant Ozma Post
Does anyone know of a free sound effect collection that is suited for games, but kind of all-purpose beyond that?

SlightlyMadman
Jan 14, 2005

Most of these are pretty useless, but if you sort through it enough you can find just about anything:
http://www.freesound.org/

Drox
Aug 9, 2007

by Y Kant Ozma Post

SlightlyMadman posted:

Most of these are pretty useless, but if you sort through it enough you can find just about anything:
http://www.freesound.org/

Am I missing something or is there no way to just browse the samples? It seems to only be search or sorted by user uploaded.

SlightlyMadman
Jan 14, 2005

Under "Search/Browse" click "Tags."

Joe-Bob
May 12, 2005

GO BIG RED
College Slice

Kire posted:

Does anybody have any experience with the libtcod library for making roguelikes?
http://doryen.eptalys.net/libtcod/

I'm trying to figure out the mouse support in python. I want to print the coordinates where a user has clicked inside the terminal window.

I'm using that right now, only in C++. Have you looked at the documentation? I guess I'm not using the mouse, but it looks like all you have to do is call mouse_get_status().

Le0
Mar 18, 2009

Rotten investigator!
What would be a good book for an intermediate programmer but a beginner at game programming? I'm doing it mainly in C++ at the moment but I'm open to suggestions

MasterSlowPoke
Oct 9, 2005

Our courage will pull us through
When I was in your position, this book was really good:
http://www.amazon.com/Introduction-Game-Programming-Direct-9-0c/dp/1598220160

He has a DX10 version out, which is probably a tad bit more modern.

Adbot
ADBOT LOVES YOU

Le0
Mar 18, 2009

Rotten investigator!
thank you, I'll try the DX10 version I guess.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply