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
MarsMattel
May 25, 2001

God, I've heard about those cults Ted. People dressing up in black and saying Our Lord's going to come back and save us all.
I've been reading that guide, and these tutorials seem pretty handy too.

Adbot
ADBOT LOVES YOU

ambushsabre
Sep 1, 2009

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

The Gripper posted:

Thanks, I must have stumbled across that one a while ago and not bookmarked it, there's a few visited links there! Also noticed that there's a PDF of that guide to throw on my ipad as well, so it seems like a perfect fit.

open.gl might be a good thing, although it seems pretty basic and is still WIP.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
An intro to modern OpenGL is pretty good, if stale.

Unormal
Nov 16, 2004

Mod sass? This evening?! But the cakes aren't ready! THE CAKES!
Fun Shoe

The Gripper posted:

I'm sure this has been asked and answered a dozen times, but I skimmed the last ~20 or so pages I didn't see anything relevant.

All my previous game development has been either Windows-only (plus Windows Mobile/Xbox, which are basically Windows at their core) so almost all of what I know is deeply rooted in Managed DirectX and related frameworks, and my code isn't particularly portable because of it.

I'm looking to switch to OpenGL or at least dip my feet in the water, but can't find any resources modern enough to commit to reading. I know the fixed function pipeline is deprecated as of 3.3 or thereabouts, and is unavailable in OGL ES 2.0, yet most of the suggested reading material from people saying "OpenGL hasn't changed since 2.1, retard!!!!" (every stackoverflow thread) is strongly based on it, to the point where it's hard to pick out what is required as part of the fixed function pipeline and what is considered more general opengl use.

Given all that, is there any particular resource for documentation that isn't just going to require going through each previous OGL version, or is that a necessity? Popular opinion seems to be "for every version of OpenGL after 2.1 you need to know the fundamentals of the previous version, so we're not going to bother explaining anything".

Browsing through GLSL examples looks useful enough for filtering out ffp-based resources, but honestly I just need a push in the right direction to make sure I don't get too deep into obsoleted tech. I suppose just outright knowing what features/techniques to avoid because they're obsoleted/superseded would be enough to get me on track.

I went through a lot of stuff a year or two ago to get up to date on the newfangled stuff, and this book was probably the best single source I found for modern basic patterns:

http://www.amazon.com/OpenGL-4-0-Shading-Language-Cookbook/dp/1849514763

Yoshi Jjang
Oct 5, 2011

renard renard renarnd renrard

renard


Mode 7 Ex



Sorry, I'm new to this thread, so I don't know what has already been discussed here. A couple of guys from the gif thread asked for some sort of info on how my roommate made this. Here's what he said on it:

quote:

This is done using the Mode 7 Ex object, a 3rd-party extension, in Multimedia Fusion 2, a game-making program. The mode 7 object was surprisingly easy to use, being quickly able to load an image for the basic mode 7 capabilities, and another for the voxel-based height-map. I loaded in a Super Mario Kart map to test it, and did a quick paint-over in Photoshop to get the hills, and then selected the walls' colors and upped their brightness in the heightmap to get them to stick out.

The character's movement is something I'm still working on, and isn't actually affected by hills and walls yet (aside from detecting the height of the ground beneath it, which the Mode 7 object provides). So far the character has a vector ( 2D direction and magnitude) to determine its momentum, and another vector to determine its acceleration, which are combined and translated to the X/Y of the world. This makes for rather slippery movement, so it's not perfect.

The Mode 7 object also has built-in functions for determining an object's size and position on the screen based on its position in the world, so I didn't even have to worry about that. Seriously, this object is really easy to use. It's going to be a little trickier once there are more objects on the map, though, as the whole thing is treated as a single object, and therefore other objects can't be partially occluded by hills and the like. So it's either relatively flat levels, or seeing things through hills.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
The standard "Mode 7" trick used in Super Mario Kart doesn't actually handle differing heights of a map, so that has to be a more clever trick, or actual 3D with some intentionally bad pixel interpolation. Given by the artifacts in the bricks in the first GIF as you get closer to them, I'm going to guess the latter.

Yoshi Jjang
Oct 5, 2011

renard renard renarnd renrard

renard


Suspicious Dish posted:

The standard "Mode 7" trick used in Super Mario Kart doesn't actually handle differing heights of a map, so that has to be a more clever trick, or actual 3D with some intentionally bad pixel interpolation. Given by the artifacts in the bricks in the first GIF as you get closer to them, I'm going to guess the latter.

It's still pretty far from 3D. It's Mode 7 with a height map. It's almost like seeing voxels, but not really.

The interpolation in the back is just mipmapping. It's using a lower resolution texture to look less messy. It has actual interpolation options for both height map and texture. They are turned off because they would make it look really muddy.

If you notice how the horizon is completely flat, that's because it's the boundaries of the mode 7 object. Hills can't actually "rise" above that horizon.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
Mode 7 does not have height maps or any sort of vertical adjustment. Mode 7 is just a way of scaling a sprite. If you adjust the scale and position between scanlines (hblank), you get a fake perspective transform. There's a separate trick to allow for vertical transformations, but it relies on tricky IRQ timing and specific SNES quirks (the hack doesn't work on ZSNES/snes9x, as they don't emulate everything perfectly), and doesn't rely on Mode 7.

Vivian Darkbloom
Jul 14, 2004


For a project in Pygame, should I be bothering to use Python 3, or just sticking with 2? It looks like 3 is a little better from a language design perspective, but it doesn't have any features that are super important.

Mug
Apr 26, 2005
I already posted this in the Making Games megathread but I'm posting it here too because I'm happy with it.

I finally made an in-game reason for my AI to fight against eachother, instead of it always being PvE. I noticed how entertaining and sometimes emergent it was when I made two AI on opposing teams run into eachother, so I've made a class of enemy character called a Sentry which behaves just like a normal enemy but they can be "HAYWIRE!"ed to cause them to switch over to your team and they'll fight for you.

Here's a video showing the first working one I made. It manages to kill everything in the level mostly because it has 9999 health and everyone else only has 150.
https://www.youtube.com/watch?v=_pxqlyhB49A

Markovnikov
Nov 6, 2010

Vivian Darkbloom posted:

For a project in Pygame, should I be bothering to use Python 3, or just sticking with 2? It looks like 3 is a little better from a language design perspective, but it doesn't have any features that are super important.

Does Pygame even work with Python 3? If it does, do you know if you'll ever need anything else that might not work with Python 3? As I remember it, most of the changes between Pythons were not very important (if compatibility breaking), so if you are sure everything will work with Python 3 and you wont miss tons of pre made code/answers for Python 2.7 go ahead and use it. I've been meaning to jump ships myself actually.

It's strange to me the change from Python 2.7 to Python 3 has been taking this long really.

I Lost My Password
Nov 12, 2009

Above Our Own posted:

Can you give an example of a task and how you would break it down, my autistic brain is having trouble deciding how small is too small.

Sure, here is a slightly contrived example of a user story that gets carried out every day somewhere in the world.

A user has requested that they be able to modify some data on the screen of a web app. There is a table on the screen displaying the data already.
Story: "As a User I would like to modify the list of Wizzbangs so that my wizbang configuration is correct."

You could produce a list of tasks based off of that:
*Build small editor
*add web service to receive changes
*add submit code to the database

Each of those can be broken in to tasks to do or questions to answer.
*Build small editor
- Validate data
- modify html to add editor
- update existing Model to deal with modified data
- update existing table to properly display modified values

*add submit code to the database
- deal with some random business rule edge case here

*add web service to receive changes
- cleanup the mess you left last time you had something really really important to do quick
- Can we use the code from the whoosit handler here?

The size of each item is a bit of a personal thing because its one goal in life is to keep you focused on what you are doing. It is very easy to get distracted while you code and start to give problems that are very immediate a much greater urgency than they deserve. Having a clear and attainable goal in mind can keep you working on the stuff that you actually feel is important and a chance to evaluate your new idea before you act on it.

I Lost My Password fucked around with this message at 04:20 on Nov 6, 2012

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!

I Lost My Password posted:

Sure, here is a slightly contrived example of a user story that gets carried out every day somewhere in the world.
Thanks for talking about this, by the way - I broke my game down into small pieces like that and it really helps me feel like I'm making progress on it when I'm working on the tedious GUI poo poo. At the end of a day of that I used to look at what little has changed and feel like I hadn't done anything, but now I can check off three or four boxes on my list so I know I must have done something really. Plus it means when I finish one thing I don't get stalled trying to decide what to work on next, I can just point at a random piece of the list and go "I'll do that now."

This is the only piece of agile development that has made any sense to me as a solo programmer, and coincidentally it's a piece that had never shown up when I'd gone looking for what agile meant, so thanks for bringing it to my attention!

(Still never going to call things stories though, that's just weird.)

Above Our Own
Jun 24, 2009

by Shine

I Lost My Password posted:

Sure, here is a slightly contrived example of a user story that gets carried out every day somewhere in the world:
Thank you, this is very helpful. Is it common to use a similar methodology for other game content, like art assets? Trying to figure out a way for me and my artist to stay on track together for our small project.

SneezeOfTheDecade
Feb 6, 2011

gettin' covid all
over your posts
I hope you'll forgive a tangential question. I'd like to give Unity a try - but I'm on metered internet. I have a free-download period from 2 AM until 7 AM, and usually I use a download manager to schedule large downloads (like Unity's half-gig bulk) for that period. But Unity's download page is stupidly obscured, and doesn't have a direct-download link - and if I feed my download manager the URL of the download page, it'll just literally pull down the HTML, because it's also pretty dumb.

So: does anyone have a direct-download link for the TRIAL version of Unity3D - the EXE that's freely available on their website - so that I can give it a try without blowing an entire day's worth of download capacity?

e: vv Not in Chrome, at least as far as I can tell. :shepface: Thank you. :)

SneezeOfTheDecade fucked around with this message at 19:04 on Nov 6, 2012

Don Mega
Nov 26, 2005
After the automatic download starts you can right click it and copy the link.

http://netstorage.unity3d.com/unity/UnitySetup-3.5.6.exe

Edit: You may be right. I did it in Firefox and the only reason I know is cause I was looking for the link the other day.

Don Mega fucked around with this message at 19:08 on Nov 6, 2012

Shalinor
Jun 10, 2002

Can I buy you a rootbeer?

Above Our Own posted:

Thank you, this is very helpful. Is it common to use a similar methodology for other game content, like art assets? Trying to figure out a way for me and my artist to stay on track together for our small project.
Yes. In scrum, everything is a story. Everything.

You also want a concept of user ("as a developer, I..." "As a customer, I...") to indicate if this is an internal task, art facing task, user facing you better polish til it shines task, etc. Finally, you want a "so that", to indicate why the story is important.

Example: " as a developer, I will implement the store UI system, so that players can upgrade abilities" would indicate a prototype/not-finished system. You might then have "as a customer, I can navigate the store UI, so that I can upgrade abilities" to indicate that the result should be fully polished and ship-able.

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!

Above Our Own posted:

Thank you, this is very helpful. Is it common to use a similar methodology for other game content, like art assets? Trying to figure out a way for me and my artist to stay on track together for our small project.
If you want to mix paradigms in a lazy way, you can do as I did when I adopted this "break things down into small parts" model. I have someone else for art too, and he's not in the same timezone so having a useful project breakdown is handy. So what I did is made a lovely spreadsheet in Google Docs, with variously highlighted tasks down the left side (giant bold ones for big things like "implement multiplayer", increasingly small things for the subcategory breakdowns), and then some columns to the right that auto-highlight in colors if they contain P, G or X. Then I just stick P in a column when it's a programmer task (red), G in the next column if it's a graphics task (blue), and we can replace our letters with X when the task is done to turn the block green. Since it's on Google Docs it's live-shared so there's no mucking about trying to keep each other up to date on what's happening.

A git repository is what I have for the actual working parts, but I don't think that would help much if it wasn't that my artist is also *enough* of a programmer to be able to easily compile and test things.

vvvv Spreadsheet screenshot PM'd.

roomforthetuna fucked around with this message at 19:01 on Nov 8, 2012

Above Our Own
Jun 24, 2009

by Shine
This might be too much to ask, but could I see that spreadsheet? I'm really getting into the nuts and bolts of this and I work best by emulation. If you could even PM me a screenshot or somethin'

thegasman2000
Feb 12, 2005
Update my TFLC log? BOLLOCKS!
/
:backtowork:
Do we have a Gamesalad thread I can't find? Have a silly issue that I could use help with. I want the mechanics of Locoroco in my game as in the gravity stays consistent (like gravity does) but the background and the actors making up the floor rotate moving the character along???

Don Mega
Nov 26, 2005
I had the brief idea to get into app development and was brain storming game ideas to try and implement. I don't play games on my droid so I never thought about it, but man is the touch screen a limited interface for gaming. Any idea I thought of wouldn't be possible due to the lack of controls provided by a smart phone. So I just went back to the ol keyboard and mouse that we all hold so dear.

OXBALLS DOT COM
Sep 11, 2005

by FactsAreUseless
Young Orc
Since it came up a little earlier, here's a good intro link for people itnerested in "hard" sci-fi:
http://www.projectrho.com/public_html/rocket/spacewarintro.php
http://www.projectrho.com/public_html/rocket/spacewarship.php

Paniolo
Oct 9, 2007

Heads will roll.

Don Mega posted:

I had the brief idea to get into app development and was brain storming game ideas to try and implement. I don't play games on my droid so I never thought about it, but man is the touch screen a limited interface for gaming. Any idea I thought of wouldn't be possible due to the lack of controls provided by a smart phone. So I just went back to the ol keyboard and mouse that we all hold so dear.

There are an awful lot of successful mobile games, it's kind of silly that you couldn't look at what's out there and get at least one idea for a game that could work on a touchscreen. Personally I think touch is fantastic for TB and RTwP strategy games and I think that genre is due for a huge resurgence as higher quality tablets become a bigger market share.

Don Mega
Nov 26, 2005
It's more that the types of games I wanted to create would not work properly on a touch screen interface. Obviously there are plenty of game types that can work on a phone.

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!

Don Mega posted:

It's more that the types of games I wanted to create would not work properly on a touch screen interface. Obviously there are plenty of game types that can work on a phone.
Did you consider tilt-based controls?

Don Mega
Nov 26, 2005
A world without a d-pad or wasd movement is a world I don't want to live in!

Unormal
Nov 16, 2004

Mod sass? This evening?! But the cakes aren't ready! THE CAKES!
Fun Shoe

Don Mega posted:

It's more that the types of games I wanted to create would not work properly on a touch screen interface. Obviously there are plenty of game types that can work on a phone.

I think this is probably not true, though you may have to go pretty far outside of the established box to get there. What sort of games are you thinking about?

You can do dual-stick FPS movement on a touch device pretty drat well. Hell you could even do stick + wads...

e: Maybe a little "stick" for wads-style movement, and then just gesturing on the screen to look would work best. I think it'd feel almost as natural as mouse+wads after a little practice.

Unormal fucked around with this message at 19:52 on Nov 13, 2012

Beef
Jul 26, 2004

Cream_Filling posted:

Since it came up a little earlier, here's a good intro link for people itnerested in "hard" sci-fi:
http://www.projectrho.com/public_html/rocket/spacewarintro.php
http://www.projectrho.com/public_html/rocket/spacewarship.php

Holy poo poo, this is an awesome resource. Thanks!

Pfhreak
Jan 30, 2004

Frog Blast The Vent Core!
Unity 4 is apparently out now. http://unity3d.com/unity/whats-new/unity-4.0

Looks like a lot of improvements in there. I'm wondering what the upgrade pain is like for 3.X projects though.

Unormal
Nov 16, 2004

Mod sass? This evening?! But the cakes aren't ready! THE CAKES!
Fun Shoe

Pfhreak posted:

Unity 4 is apparently out now. http://unity3d.com/unity/whats-new/unity-4.0

Looks like a lot of improvements in there. I'm wondering what the upgrade pain is like for 3.X projects though.

For what it's worth, I just upgraded my mobile roguelike project, and it looks like I've got some sort of problem with what I was doing with sprite collision detection in ex2D, but everything else seems to have come over just fine. So off the cuff, I'd say it probably depends a lot on your plugin usage, and how soon all the plugins you use get updates.

e: Ah it seems my raycasts are hitting render disabled objects?...
e2: Yeah it seems the behavior of collision/active/rendering objects is a little different now. Honestly it's probably better behavior, but I was relying on some squirrely behavior for my UI to work. Got it running again. Looks like changes relating to the new hierarchy-aware active state:

quote:

We have changed how the active state of GameObjects is handled. GameObjects active state will now affect child GameObjects, so setting a GameObject to inactive will now turn the entire sub-hierarchy inactive. This may change the behavior of your projects. GameObject.active and GameObject.SetActiveRecursively() have been deprecated. Instead, you should now use the GameObject.activeSelf and
GameObject.activeInHierarchy getters and the GameObject.SetActive() method.

e3: With that resolved, everything else seems to have upgraded without a problem.

Unormal fucked around with this message at 19:15 on Nov 14, 2012

Sex Tragedy
Jan 28, 2007

father of three with an extra large butt
What is the best way to "flatten" or "mash" xna texture2D objects together? I've got a collection of body parts associated with coordinates of joints and I want to combine them into a static 2d texture and return it from a function. Like making a paper doll out of the individual pieces.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
Why do you care about the 2D texture itself? Usually this sort of puppet transformation is done at rendering time.

Sex Tragedy
Jan 28, 2007

father of three with an extra large butt

Suspicious Dish posted:

Why do you care about the 2D texture itself? Usually this sort of puppet transformation is done at rendering time.

Your'e right. We decided to handle this the usual way a bit after I posted this, though if anyone has an answer on hand I'm still curious.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
I don't know XNA very well, but if you simply want it as a bitmap in memory, you can use some graphics library to do software compositing, like GDI or Core Graphics or cairo. If you want it in a GPU texture, you can use "render to texture" or a "frame buffer object" for OpenGL to redirect the drawing, and a "render target" given Direct3D.

Shalinor
Jun 10, 2002

Can I buy you a rootbeer?

Sex Tragedy posted:

What is the best way to "flatten" or "mash" xna texture2D objects together? I've got a collection of body parts associated with coordinates of joints and I want to combine them into a static 2d texture and return it from a function. Like making a paper doll out of the individual pieces.

The way I've handled that in the past is to rig a skinned one-size-fits-all paperdoll made of oversized boxes. Each box maps to a portion of a single texture, and alpha testing is used to cut those regions into whatever shape the body part requires.

From there, you can have a large set of body parts for each chunk. Per character at load, you render the appropriate body part into th appropriate portion of the texture, and boom, a bunch of unique paper dolls (which share textures if they happen to have the same body parts). If you really want to simplify it, you can architect the body part textures with a bunch of empty space such that merging them all into the final texture is basically just a photoshop layer merge... but that will slow your load down a bit.

Sex Tragedy
Jan 28, 2007

father of three with an extra large butt

Shalinor posted:

The way I've handled that in the past is to rig a skinned one-size-fits-all paperdoll made of oversized boxes. Each box maps to a portion of a single texture, and alpha testing is used to cut those regions into whatever shape the body part requires.

From there, you can have a large set of body parts for each chunk. Per character at load, you render the appropriate body part into th appropriate portion of the texture, and boom, a bunch of unique paper dolls (which share textures if they happen to have the same body parts). If you really want to simplify it, you can architect the body part textures with a bunch of empty space such that merging them all into the final texture is basically just a photoshop layer merge... but that will slow your load down a bit.

I'm a severe noob. What do you mean by "maps to a portion of a single texture"?

Bondematt
Jan 26, 2007

Not too stupid
Trying to get tooltips to work on a toolbar in Unity and it has got me stumped. GUI.tooltip never gets the tooltip string when I hover over the toolbar. Works fine if I use a button.

This is how I assign the values of GUIContent. The line break is to not break tables here.
code:
GUIContent[] toolbarTooltip = {new GUIContent("Interact", "Interact"), new GUIContent ("Remove", "Remove")
, new GUIContent ("Deck Plating", "Deck Plating"), new GUIContent ("Wall Plating", "Wall Plating"), new GUIContent ("Equipment", "Equipment")};
Then it is applied to the toolbar, and I know it is applied as it is displaying the text on the buttons.
code:
toolbarInt = GUI.Toolbar (new Rect(Screen.width - 500, Screen.height - 90,500,60), toolbarInt, toolbarTooltip);
	
Debug.Log("GUI.tooltip: " + GUI.tooltip); 
Using C# in Unity 4. Using a button with this exact setup works, except the GUIContent is just the one instead of an array.

Bondematt fucked around with this message at 12:14 on Nov 15, 2012

Shalinor
Jun 10, 2002

Can I buy you a rootbeer?

Sex Tragedy posted:

I'm a severe noob. What do you mean by "maps to a portion of a single texture"?
Pick a box-shaped region of your texture. That's where the left arm goes, always. UV map your big box-shaped arm to that box-shaped region. Now draw a left arm in that region, with alpha designating the arm part vs the empty part of the region. Draw your big genero-skinned object with that texture and alpha testing enabled.

Shazam, it's an arm.

To replace that arm, copy a different arm texture into JUST the arm region. Now the arm has changed without affecting any other body part.

The idea is to break the texture up into however many regions is required for your set of body parts. Usually, you'll want to pull tricks like using the same texture (mirrored) for both arms and both legs, to save space and allow higher-res parts.

Lucid Dream
Feb 4, 2003

That boy ain't right.

Sex Tragedy posted:

Your'e right. We decided to handle this the usual way a bit after I posted this, though if anyone has an answer on hand I'm still curious.

code:
RenderTarget2D _squashedTexture = new RenderTarget2D(GraphicsDevice, width, height);
GraphicsDevice.SetRenderTarget(_squashedTexture); // this makes draw calls draw onto the render target instead of the screen

GraphicsDevice.Clear(Color.Transparent);
            
_spriteBatch.Begin();
// draw whatever you want to draw to the texture
_spriteBatch.End();

GraphicsDevice.SetRenderTarget(null); // this switches back so that subsequent draw calls will draw to the screen

_spriteBatch.Begin();
_spriteBatch.Draw(_squashedTexture, new Vector2(0, 0), _squashedTexture.Bounds, Color.White); // This will draw the squashed texture to the screen
_spriteBatch.End();

It basically lets you draw to a new texture. Upside is that you don't need to draw individual components every frame, downside is that its not dynamic (although you can re-draw the texture whenever using the same process) and it uses more memory.

Adbot
ADBOT LOVES YOU

Sex Tragedy
Jan 28, 2007

father of three with an extra large butt
Thanks guys!

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