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
Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."
Your Computer: I make all my graphics myself, although sometimes when I'm trying to imitate a particular look I'll reference screenshots. In the Zelda-like game, for example, a sharp eye might notice that the tiles making up the walls are very close to the wall tiles used in Link's Awakening. My favorite graphics editor is a Mac-only app called Pixen, but I can't really recommend it to others- development has ceased on it and it has some pretty horrendous bugs I've learned to work around. Eventually (perhaps this summer) I intend to make a portable tile/sprite editor that provides the three features I consider essential:
  • Left-click draws, and right-click erases. Key-combos for alternating between the most commonly used functions is clumsy.
  • A configurable grid overlay, so I can see the boundaries of 8x8 tiles or 16x24 sprites or anything else that I need.
  • A quick and easy way to alter the transparency pattern/color. This is vital if I'm drawing anything where white or gray are the dominant colors.
A surprising number of graphics apps are missing at least one of these.

TheresaJayne: I knew several MUDs used Forth as a scripting language, but I've never worked with one myself. Would you like to share your experiences? In your opinion, are there significant advantages or disadvantages to that approach? Do you normally write code interactively from within a MUD client or is world-building an offline activity?

Adbot
ADBOT LOVES YOU

Dr. Dos
Aug 5, 2005

YAAAAAAAY!
I've been messing around with python and pygame for awhile now, and am only just now throwing around some simple concept for a Zelda style games in a wild west setting.

I've thrown together a simple room and I have a player that can walk around and shoot and be properly blocked by certain tiles.

The thing is, the movement just isn't very smooth and I'm wondering how other games do it. Right now the tiles are 32x32 on a 640x480 screen and pressing an arrow key will cause you to move 8 pixels in that direction.

This looks really clunky though and it's apparent that you're moving on a grid. It's easy enough to adjust things to move fewer pixels, but then it takes ages to move across the screen.

What's the standard method for doing this?

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
Apply a little bit of acceleration to your character. Have him start moving at 1 pixel on the first frame, then 2 pixels on the second, and so on until you reach a maximum velocity. To help the player not get caught on things, use the Link to the Past method of collision response: if the player is near a corner of a collision tile (I believe it was 3 pixels from the side of a 16x16 tile) automatically put him back on the grid and let him walk.

ynohtna
Feb 16, 2007

backwoods compatible
Illegal Hen
Add flip-book layers to that sprite editor, Internet Janitor, and I'd be all over it.

And I really wish the MUDs I hacked on back in the day had Forth as the scripting language. They were all based on nasty string processing systems which got really messy, really fast. Particularly if someone was interacting with your room/objects whilst you were altering functionality.

Spatial
Nov 15, 2007

Internet Janitor posted:

  • A quick and easy way to alter the transparency pattern/color. This is vital if I'm drawing anything where white or gray are the dominant colors.
You can avoid that entirely by animating it.

Take this worst-case example where the only two colours are the transparency colours:


Animated:

Shalinor
Jun 10, 2002

Can I buy you a rootbeer?

Spatial posted:

You can avoid that entirely by animating it.

Take this worst-case example where the only two colours are the transparency colours:


Animated:

If you were to implement such, I wouldn't recommend it as a default feature. Focusing intently on a fixed point in front of a scrolling background is a pretty good way to induce motion sickness.

Spatial
Nov 15, 2007

Shalinor posted:

If you were to implement such, I wouldn't recommend it as a default feature. Focusing intently on a fixed point in front of a scrolling background is a pretty good way to induce motion sickness.
Yeah that's true. It's also not necessary most of the time.

e: I forgot to mention, it doesn't have to be scrolling either. Any sort of rhythmic change makes it stand out the same way, colour cycling for example.

Spatial fucked around with this message at 01:02 on Jan 12, 2012

dizzywhip
Dec 23, 2005

Dr. Dos posted:

This looks really clunky though and it's apparent that you're moving on a grid. It's easy enough to adjust things to move fewer pixels, but then it takes ages to move across the screen.

What's the standard method for doing this?

In addition to implementing acceleration as mentioned above, it sounds like you might be tying the movement speed to the frame rate. Rather than moving a fixed number of pixels per frame, you should move in pixels per second, so something like 150.0 * timeSinceLastFrame to get 150 pixels per second.

This will make the movement less jittery because the speed won't be affected by the frame rate.

Slurps Mad Rips
Jan 25, 2009

Bwaltow!

Internet Janitor posted:

My favorite graphics editor is a Mac-only app called Pixen, but I can't really recommend it to others- development has ceased on it and it has some pretty horrendous bugs I've learned to work around. Eventually (perhaps this summer) I intend to make a portable tile/sprite editor that provides the three features I consider essential:
  • Left-click draws, and right-click erases. Key-combos for alternating between the most commonly used functions is clumsy.
  • A configurable grid overlay, so I can see the boundaries of 8x8 tiles or 16x24 sprites or anything else that I need.
  • A quick and easy way to alter the transparency pattern/color. This is vital if I'm drawing anything where white or gray are the dominant colors.

Not sure if you're aware, but Pixen is still being actively developed on github. Their website is definitely out of date though.

dizzywhip
Dec 23, 2005

Internet Janitor posted:

My favorite graphics editor is a Mac-only app called Pixen, but I can't really recommend it to others- development has ceased on it and it has some pretty horrendous bugs I've learned to work around. Eventually (perhaps this summer) I intend to make a portable tile/sprite editor that provides the three features I consider essential:
  • Left-click draws, and right-click erases. Key-combos for alternating between the most commonly used functions is clumsy.
  • A configurable grid overlay, so I can see the boundaries of 8x8 tiles or 16x24 sprites or anything else that I need.
  • A quick and easy way to alter the transparency pattern/color. This is vital if I'm drawing anything where white or gray are the dominant colors.
A surprising number of graphics apps are missing at least one of these.

I missed this earlier, but this would be awesome. It's surprising that there aren't really any good pixel editors out there on the Mac. Maybe Pixen is better now (I also didn't realize it was still being developed), but when I tried it out a year or so ago it had a bunch of issues.

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."

SAHChandler posted:

Not sure if you're aware, but Pixen is still being actively developed on github. Their website is definitely out of date though.

Woah. I saw it on github a while back, but that repository had been checked in once and was never modified for a year, so I assumed that was just a source dump. Thanks for the heads-up.

The Glumslinger
Sep 24, 2008

Coach Nagy, you want me to throw to WHAT side of the field?


Hair Elf
So I just started using UDK today, and there is one thing that is driving me crazy. Whenever I want to recompile my scripts, I have to close UDK entirely. What is the proper way to compile so that I don't have to wait for it to restart each time I make a change?

CaptainPoopsock
May 2, 2005


My dear cherry blossoms.. bloom in full splendor!

crazylakerfan posted:

So I just started using UDK today, and there is one thing that is driving me crazy. Whenever I want to recompile my scripts, I have to close UDK entirely. What is the proper way to compile so that I don't have to wait for it to restart each time I make a change?

The editor uses the scripts so you can't compile them while they are in use.

Shalinor
Jun 10, 2002

Can I buy you a rootbeer?

crazylakerfan posted:

So I just started using UDK today, and there is one thing that is driving me crazy. Whenever I want to recompile my scripts, I have to close UDK entirely. What is the proper way to compile so that I don't have to wait for it to restart each time I make a change?
Don't use UDK proper. Either use a text editor and compile/run through UnrealFrontend.exe, or grab nFringe. You only open UDK editor when you're working in Kismet or on level stuff.

... and when you're doing both, yeah, it gets obnoxious. Just try not to :sigh:

The Glumslinger
Sep 24, 2008

Coach Nagy, you want me to throw to WHAT side of the field?


Hair Elf

Shalinor posted:

Don't use UDK proper. Either use a text editor and compile/run through UnrealFrontend.exe, or grab nFringe. You only open UDK editor when you're working in Kismet or on level stuff.

... and when you're doing both, yeah, it gets obnoxious. Just try not to :sigh:

Well how would I run it without opening UDK editor? I am probably missing something simple, because I have been using the UnrealFrontend for my compiling.

TheresaJayne
Jul 1, 2011

Internet Janitor posted:


TheresaJayne: I knew several MUDs used Forth as a scripting language, but I've never worked with one myself. Would you like to share your experiences? In your opinion, are there significant advantages or disadvantages to that approach? Do you normally write code interactively from within a MUD client or is world-building an offline activity?

Well I mainly used TinyMuck which uses a scripting called MUF (Multi User Forth)
a snippet below...

code:
: ok_name?
    dup not                                 if pop 0 exit then
    dup 1 strcut pop "*" stringcmp 0 =      if pop 0 exit then
    dup 1 strcut pop "#" stringcmp 0 =      if pop 0 exit then
    dup 1 strcut pop "$" stringcmp 0 =      if pop 0 exit then  (Added by Natasha@SPR, 5 Sept 99)
    dup "=" instr                           if pop 0 exit then
    dup "&" instr                           if pop 0 exit then
    dup "|" instr                           if pop 0 exit then
    ( Check for ! at the start of each word )
    dup " !" instr                          if pop 0 exit then
    dup 1 strcut pop "!" stringcmp 0 =      if pop 0 exit then
    dup "me" stringcmp 0 =                  if pop 0 exit then
    dup "home" stringcmp 0 =                if pop 0 exit then
    dup "here" stringcmp 0 =                if pop 0 exit then
      
    pop 1 exit
;
With a Muck all the players can create rooms exits objects and you can then create scripts that are linked to actions and commands on objects or rooms.
I helped with and modified a space system which created dynamic rooms in a coordinate system so you could fly around and maybe miss the space station etc (my muck was based on Babylon 5 and had scripts to stop you entering the alien sector without breathing aparatus etc.)

TheresaJayne fucked around with this message at 12:17 on Jan 12, 2012

Shalinor
Jun 10, 2002

Can I buy you a rootbeer?

crazylakerfan posted:

Well how would I run it without opening UDK editor? I am probably missing something simple, because I have been using the UnrealFrontend for my compiling.
There is a button in UnrealFrontend that runs the game. It says "Launch" on it. So, you Script->Compile, Cook->Cook Packages (this may be skippable if you're only changing code packages), then Launch->Launch. Unless I'm misunderstanding what you're trying to do?

Rupert Buttermilk
Apr 15, 2007

🚣RowboatMan: ❄️Freezing time🕰️ is an old P.I. 🥧trick...

Ok, basic Unity question...

I'm working on a 2D platformer. Well, I'm in the planning stages right now. I'm working with 2 other people. I'm the main Unity dev (edit: still learning the basics for now, of course), plus the sound guy. I have a character artist, and a level/object artist who's familiar with Maya and 3DSMax. What would be the best way, from a technical point-of-view, for us to collaborate on level design, or for him to even design levels to begin with? Obviously, we should sketch them all out on paper first, but is it best if he just downloads Unity, makes a level, and then sends it to me? Would it make any sense for him to even make one in another program, and then have me import it?

Obviously, as this is a 2D game (with the potential for a LITTLE bit of 3D stuff, which is why I'm not using something like Flixel or Stencyl), the levels will be flat, so maybe the answer is to just stay in Unity, but I thought I'd ask anyway.

Rupert Buttermilk fucked around with this message at 17:06 on Jan 13, 2012

OneEightHundred
Feb 28, 2008

Soon, we will be unstoppable!

CaptainPoopsock posted:

The editor uses the scripts so you can't compile them while they are in use.
I haven't used UE since 2, but it let you recompile scripts then. What's it using them for in 3?

feedmegin
Jul 30, 2008

duck monster posted:

Forth in a sentence: Everything is stacks, you put things on a stack then you do something to the stack and put the result on the stack.

Interestingly, PostScript (as in the predecessor to PDF) is just a modified dialect of Forth. Probably the major commercial users of Forth are the people who write printer drivers and publishing applications; I certainly did when I worked for a company that wrote prepress software for publishing companies (basically, laying out PostScript pages in a grid with the various registration marks around the edge). It was pretty fun stuff, though as I understand it most people have moved to PDF now.

Winkle-Daddy
Mar 10, 2007

feedmegin posted:

Interestingly, PostScript (as in the predecessor to PDF) is just a modified dialect of Forth. Probably the major commercial users of Forth are the people who write printer drivers and publishing applications; I certainly did when I worked for a company that wrote prepress software for publishing companies (basically, laying out PostScript pages in a grid with the various registration marks around the edge). It was pretty fun stuff, though as I understand it most people have moved to PDF now.

As someone who did tech support for Adobe, I can tell you postscript is not dead. In fact, PDF files are created by taking a postscript file and running it through the Adobe Distiller to convert those postscript instructions into a .pdf/.ai document (really they're the same thing with a different extension. If you have illustrator, rename a downloaded PDF to whatever.ai and open it!)

Learning to read postscript sucked, and I don't remember any of it.

Unormal
Nov 16, 2004

Mod sass? This evening?! But the cakes aren't ready! THE CAKES!
Fun Shoe
Just a unity best-practices question. If I want to, say, build a basic game-turn-and-ui-manager to dynamically generate and manage a game screen, what's the general best-practice for stringing up the main manager object? Create an invisible stand-in object with the script on it? Hang it on the main camera?

Is there a less cludgy-feeling way than PlayerPrefs to pass game state around various scenes?

roomforthetuna
Mar 22, 2005

I don't need to know anything about virii! My CUSTOM PROGRAM keeps me protected! It's not like they'll try to come in through the Internet or something!

Unormal posted:

Is there a less cludgy-feeling way than PlayerPrefs to pass game state around various scenes?
I'm no Unity expert, but I gather you can flag an object to not be deleted between scenes, so I assume you could stick as many hidden values as you want on such an object. DontDestroyOnLoad is the thing to look up.

Shalinor
Jun 10, 2002

Can I buy you a rootbeer?

roomforthetuna posted:

I'm no Unity expert, but I gather you can flag an object to not be deleted between scenes, so I assume you could stick as many hidden values as you want on such an object. DontDestroyOnLoad is the thing to look up.
You can also load multiple scenes, and keep one scene loaded as your "global" scene at all times, whilst you load in and out your actual level scenes. (assuming you have Unity Pro)

... that said, we've got a ton of data living on PlayerPrefs. It's kludgy, but, that is one of the best tools that Unity gives you for persistence.

roomforthetuna
Mar 22, 2005

I don't need to know anything about virii! My CUSTOM PROGRAM keeps me protected! It's not like they'll try to come in through the Internet or something!

Shalinor posted:

... that said, we've got a ton of data living on PlayerPrefs. It's kludgy, but, that is one of the best tools that Unity gives you for persistence.
Also, someone in a thread says this works (in C#):
code:
static class PermanentValues
{
  public static float PlayersHealth;
}
Being accessed from anywhere like
PermanentValues.PlayersHealth = 15;

I assume you'd need to initialize all such values in some game-start script to avoid them also persisting between replays, if this method works.

Scaevolus
Apr 16, 2007

Winkle-Daddy posted:

As someone who did tech support for Adobe, I can tell you postscript is not dead. In fact, PDF files are created by taking a postscript file and running it through the Adobe Distiller to convert those postscript instructions into a .pdf/.ai document (really they're the same thing with a different extension. If you have illustrator, rename a downloaded PDF to whatever.ai and open it!)

Learning to read postscript sucked, and I don't remember any of it.
Postscript is also a useful attack vector for exploiting printers!

https://www.youtube.com/watch?v=PqL5P46m_zQ

Scaevolus fucked around with this message at 06:09 on Jan 14, 2012

gonadic io
Feb 16, 2011

>>=
So as part of my game in haskell and opengl, (https://github.com/Swooshed/Game-of-hexes I've just started to add a gui. At the moment I am drawing some simple rectangles in one of the corners with some sort script font on.
Surely the size of the buttons should eventually be some function of window size? Is there a better way of doing it than just making it some fraction of the window size?

Now I just need to stop finding interesting puzzles and actually code some gameplay...

Crash Bandicoot
Feb 23, 2007

by T. Fine
Has anybody tried using Chingu, Ray or any other Ruby-based dev library for game development?

I've read some opinions (like this and this) claiming that the GC is irredeemably awful and will gently caress up your game timing unless you're writing C-style code anyway. I'd really like to do a hobby project in Ruby and use the various testing tools but it sounds like it might be pointless.

Abrahamsen
Jul 1, 2009
I was wondering what this thread's posters' opinions are of the game engine Unity (Unity3d)?

OneEightHundred
Feb 28, 2008

Soon, we will be unstoppable!

Crash Bandicoot posted:

I've read some opinions (like this and this) claiming that the GC is irredeemably awful and will gently caress up your game timing unless you're writing C-style code anyway.
I hope Ruby doesn't allocate floats on the heap, that would be monstrously retarded.

I wouldn't single Ruby out in that you want to avoid allocations anyway, but the problem with dynamically-typed languages is that 3D games use a LOT of vector math, doing vector math without aggregate types is a pain in the rear end, and pretty much any dynamically-typed language without a JIT is going to require a heap allocation to do that. I wouldn't be surprised if some of them require it even with a JIT.

e: You can do it via multiple return values and tuples, but that certainly doesn't exempt it from "pain in the rear end."

OneEightHundred fucked around with this message at 00:32 on Jan 15, 2012

Shalinor
Jun 10, 2002

Can I buy you a rootbeer?

Abrahamsen posted:

I was wondering what this thread's posters' opinions are of the game engine Unity (Unity3d)?
(This is just my own opinion - we've been using it for a little over a year on a casual game)

It's great for small games, and at its absolute best when you're working with entirely artist-made assets in 3D. The further you stray from that (procedural geometry / 2D), the more obnoxious it will be. There is an add-on that will help with the 2D, but pre-defined meshed 3D is still where the engine/toolset shines.

It gets progressively less great as your game gets larger, and I would not personally recommend it for anything larger than a small 2-person-ish indie project. (ie. great for a typical iOS game, ok for a casual game or for something like Rochard, not a great idea if you're making a Shadow Complex or more complicated/larger).

For our part, we've found UDK to be greatly preferable, but we're doing games of a somewhat larger scale aimed at Steam. UDK also has a near vertical learning curve for the first month or so.

EDIT: In terms of cost, UDK makes slightly more sense for startups, given the front-loaded cost of Unity 3D. It's really a wash, though, and is just something you should evaluate yourself. Do up an Excel spreadsheet, and use it to analyze the break-even point based on team size, required Unity add-ons, and the number of titles you expect to make in a year.

Shalinor fucked around with this message at 22:58 on Jan 14, 2012

Slurps Mad Rips
Jan 25, 2009

Bwaltow!

OneEightHundred posted:

I hope Ruby doesn't allocate floats on the heap, that would be monstrously retarded.

How would a VM language avoid allocating any object on the heap, unless it was using a JIT? (just curious, not trying to sound insulting)

pseudorandom name
May 6, 2007

Tag bits.

OneEightHundred
Feb 28, 2008

Soon, we will be unstoppable!

SAHChandler posted:

How would a VM language avoid allocating any object on the heap, unless it was using a JIT? (just curious, not trying to sound insulting)
All values in Lua for instance are internally stored as:
code:
/*
** Union of all Lua values
*/
typedef union {
  GCObject *gc;
  void *p;
  lua_Number n;
  int b;
} Value;

/*
** Tagged Values
*/

#define TValuefields	Value value; int tt

typedef struct lua_TValue {
  TValuefields;
} TValue;
In theory, you can store any immutable object on the stack or directly in table/list data because you never have to worry about the copies being updated to contain different data. The problem is that you can only do it with things small enough to fit in the default value size, since dynamically typed languages have no clue that the list you're allocating is only going to take one size of data. If you create a list full of 3-component vectors, then you're still not stopped from trying to assign a 4-component vector to one of them.

OneEightHundred fucked around with this message at 23:55 on Jan 14, 2012

Slurps Mad Rips
Jan 25, 2009

Bwaltow!

OneEightHundred posted:

In theory, you can store any immutable object on the stack or directly in table/list data because you never have to worry about the copies being updated to contain different data. The problem is that you can only do it with things small enough to fit in the default value size, since dynamically typed languages have no clue that the list you're allocating is only going to take one size of data. If you create a list full of 3-component vectors, then you're still not stopped from trying to assign a 4-component vector to one of them.

Ahh ok. I was thinking that would be the problem (the in theory you can store anything on the stack), but I'm used to the 'in practice' portion not being all that true :)

duck monster
Dec 15, 2004

Rupert Buttermilk posted:

Ok, basic Unity question...

I'm working on a 2D platformer. Well, I'm in the planning stages right now. I'm working with 2 other people. I'm the main Unity dev (edit: still learning the basics for now, of course), plus the sound guy. I have a character artist, and a level/object artist who's familiar with Maya and 3DSMax. What would be the best way, from a technical point-of-view, for us to collaborate on level design, or for him to even design levels to begin with? Obviously, we should sketch them all out on paper first, but is it best if he just downloads Unity, makes a level, and then sends it to me? Would it make any sense for him to even make one in another program, and then have me import it?

Obviously, as this is a 2D game (with the potential for a LITTLE bit of 3D stuff, which is why I'm not using something like Flixel or Stencyl), the levels will be flat, so maybe the answer is to just stay in Unity, but I thought I'd ask anyway.

As long as your using Unity in a fairly bog-standard way, then yes, he should be using the unity editor to assemble the assets into levels. You do however want to think about how your passing stuff around and workflow. Unfortunately unity is rumored to be bit of a oval office with version control. I dunno, maybe drop box?

Or perhaps the asset serve (no idea, never used it)?

ambushsabre
Sep 1, 2009

It's...it's not shutting down!

duck monster posted:

As long as your using Unity in a fairly bog-standard way, then yes, he should be using the unity editor to assemble the assets into levels. You do however want to think about how your passing stuff around and workflow. Unfortunately unity is rumored to be bit of a oval office with version control. I dunno, maybe drop box?

Or perhaps the asset serve (no idea, never used it)?

I think when people say it's bad with version control, they mean version control that isn't the Asset Server. AFAIK the asset server was designed for Unity and therefore works really well.

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."
Did a Game Jam yesterday. Rather than a single topic, each team got assigned a random video game title, and we had to furnish everything else. I drew "We Love Cardboard Kombat".





It's basically a crazy smash-TV/bullet hell shooter. You play as a cardboard box in a recycling center fending off boxcutter-wielding workers. There are several weapons and powerups available. I originally intended to have a mechanic where you assemble other boxes to serve as allies, but we only had 12 hours and I ran out of time. It's unbalanced, but most people agreed that it's kinda fun. I may do a little more polish and add some features later.

Here's the source. (Forth, naturally.)

The next Jam will be either "Next-Gen De-makes" or "Tokyo Drift" (e.g. "Oregon Trail 2: Tokyo Drift").

Shalinor
Jun 10, 2002

Can I buy you a rootbeer?

Internet Janitor posted:

Did a Game Jam yesterday. Rather than a single topic, each team got assigned a random video game title, and we had to furnish everything else. I drew "We Love Cardboard Kombat".

I'm really looking forward to Global Game Jam at the end of this month. Stuff like Cardboard Combat just seems so straight-up weirdly awesome, but I've never wanted to invest the team's time in it previously.

Thinking of doing GGJ too?

Adbot
ADBOT LOVES YOU

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."
Shalinor: sounds like a ton of fun, but I live in the boonies. The closest location I can find on the GGJ site is about a 7-hour drive. :(

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