Skip to main content

User login

What is OpenID?
  • Log in using OpenID
  • Cancel OpenID login
  • Create new account
  • Request new password
Register
  • Home
  • Browse
    • 2D Art
    • 3D Art
    • Concept Art
    • Textures
    • Music
    • Sound Effects
    • Documents
    • Featured Tutorials
  • Submit Art
  • Collect
    • My Collections
    • Art Collections
  • Forums
  • FAQ
  • Leaderboards
    • All Time
      • Total Points
      • Comments
      • Favorites (All)
      • Favorites (2D)
      • Favorites (3D)
      • Favorites (Concept Art)
      • Favorites (Music)
      • Favorites (Sound)
      • Favorites (Textures)
    • Weekly
      • Total Points
      • Comments
      • Favorites (All)
      • Favorites (2D)
      • Favorites (3D)
      • Favorites (Concept Art)
      • Favorites (Music)
      • Favorites (Sound)
      • Favorites (Textures)
  • ❤ Donate
2D Art

Tracks and trains

MarcusPotter
Wednesday, March 11, 2020 - 07:26

How do I assemble all of those pngs found on those two links: https://opengameart.org/content/hex-tile-railway-tracks https://opengameart.org/content/railway-locomotive-and-wagons

Into actual working assets for my game?

  • Log in or register to post comments
zombietom
joined 7 years 5 months ago
Wednesday, March 11, 2020 - 08:14

other than the obvious "place the images next to each other", how could we possibly know how to get them to work for your game. You have not even told us what your game is. are you asking for hlep coding your game?

 

  • Log in or register to post comments
MarcusPotter
joined 5 years 2 months ago
Wednesday, March 11, 2020 - 10:56

My game is a train simulation game with a bird's eye view called "All Aboard" that I intend to develop in Unity. It is however for educational purposes only and not for public use, as I am developing it for a college (UK definition) project.

  • Log in or register to post comments
MedicineStorm
joined 12 years 8 months ago
Wednesday, March 11, 2020 - 12:13
MedicineStorm's picture

That set consists of 72x72 pixel hexagons, so you could tell unity to slice up the atlas at every 72 pixels. Or you could slice them up into individual images with https://www.piskelapp.com/

Once you have individual sprites, you can place them next to each other as needed. However, because these are hexagons and not rectangles, every other row will need an offset. So the first row will have sprites placed at

(0, 0), (72, 0), (144, 0), (216, 0) ... and so on but the second row will be offset by x+36, y-18

instead of the typical (0, 72), it would start at (0+36, 72-18) and add x+72 as normal for the row after that:

(36, 54), (108, 54), (180, 54), (252, 54) ... and so on.

However, this set seems... incomplete. There are no tiles that allow turning back from an eastbound track to a westbound track. The tracks also seem to align poorly. Is that some of the trouble you're having? It would be easier if these hexagons were biaxially symmetrical so you could simply rotate them to get a new orientation.

You may consider using Xenodora's LPC mine Carts and Tracks instead. It is more of a 3/4 view instead of fully overhead view, but the track segments are designed with tighter tolerances.

 

 

--Medicine Storm

 

  • Log in or register to post comments
MarcusPotter
joined 5 years 2 months ago
Thursday, March 12, 2020 - 02:55

OK then I've chosen to use Xenodora's LPC mine Carts and Tracks instead. However I'm now encountering the new problem of how do I divide up the big image of tracks i.e. rails and sleepers combined? It won't let me do it in the Sprite Editor in Unity which is what my teacher suggested.

  • Log in or register to post comments
MarcusPotter
joined 5 years 2 months ago
Thursday, March 12, 2020 - 02:58

In fact getting all the bits of infrastructure split up so I can use them has proven impossible. Does anyone know a workaround?

  • Log in or register to post comments
MedicineStorm
joined 12 years 8 months ago
Thursday, March 12, 2020 - 12:05
MedicineStorm's picture

It should be 32x32 sections for Xenodora's stuff. What size and shape are you looking for? Unity Sprite Edtior worked great for me (see screenshot)

Slicing these up in something like piskel works great as well. It may help to tell us why it won't let you do it. Error messages? Or does it allow it, but doesn't divide them like you expected?

What is it you're trying to "work around"?

Every game is different but it seems we're expected to already understand the exact requirements of a game you haven't described in detail.

--Medicine Storm

 

Attachments: 
Preview
unity-editor.jpg unity-editor.jpg 99.7 Kb [76 download(s)]
  • Log in or register to post comments
MarcusPotter
joined 5 years 2 months ago
Friday, March 13, 2020 - 03:45

Thank you for your help.

This link shows the exact requirements to my game in a lot of detail: https://docs.google.com/document/d/1tEogskdrDJ8lYE-hF2WWAGsuHNeHAkbIDxgW...

 

  • Log in or register to post comments
MarcusPotter
joined 5 years 2 months ago
Friday, March 13, 2020 - 04:02

TLDR? I need tracks that are suitable for a passenger train to run over, and are compatible with a signalling system (it doesn't need to be too complex, I just need two aspects i.e. green (proceed) and red (danger)), as well as compatible rolling stock that is fit for carrying passengers, preferably by modern standards but 19th century ones will do. :D

  • Log in or register to post comments
MedicineStorm
joined 12 years 8 months ago
Friday, March 13, 2020 - 11:57
MedicineStorm's picture

Thanks for the details. That's one question down. Now for the rest of them:

  • Nothing in the game's specification hints at why these sprites are impossible to work with. What size and shape of sprites are you looking for? 
  • The Unity Sprite Edtior worked just fine for me. What are the details of it not letting you slice the tileset? Any error messages? Or does it allow it, but doesn't divide them like you expected?
  • What is it you're trying to "work around"?

--Medicine Storm

 

  • Log in or register to post comments
MedicineStorm
joined 12 years 8 months ago
Friday, March 13, 2020 - 12:07
MedicineStorm's picture

I just noticed the specifications do not require diagonal tracks. If you're not married to the idea of having diagonal segments of track, I think you can drastically simplfy the coding work you'll need. 

By using sprites that only connect North, East, South, and West tracks (and not diagonal northeast, southwest, southeast, and northwest tracks) then you can simplify the sprites down to 16 versions of 96x96 pixel sprites. No overlapping sprites, no pixel offsets for unusual shaped tiles. Heck, if that sounds like something useful, I can demonstrate exactly what I'm talking about. Let me know. :)

--Medicine Storm

 

  • Log in or register to post comments
MarcusPotter
joined 5 years 2 months ago
Monday, March 16, 2020 - 06:55

Please do, I'd find that very helpful.

  • Log in or register to post comments
MedicineStorm
joined 12 years 8 months ago
Monday, March 16, 2020 - 09:24
MedicineStorm's picture

Sure. Here is a quick tileset of 96x96 pixel tiles. They're numbered with each direction corresponding to a bit position. You don't have to care about that, but i figured it may make it easier to track: North = 1, East = 2, so north+east = 1+2 = 3

N E S W
1 2 4 8

Here is a breakdown of each row of the tileset:

  • 0: none, 1: north, 2: east, 3: north+east, 4:south
  • 5: north+south, 6: east+south, 7a: north+south>east, 7b: south+north>east, 8: west
  • 9: north+west, 10: east+west, 11a: east+west>north, 11b: west+east>north, 12: south+west
  • 13a: north+south>west, 13b: south+north>west, 14a: west+east>sotuh, 14b: east+west>south, 15a: north+east & south+west
  • 15b: north+west & east+south, 15c: north+south & east+west, 15d: north+south+east+west

There are a few more combinations of splits and joins not in this tileset, but it gives the basic idea. If this looks like it may be something you'll use, let me know and I can easily fill in the missing combinations. 

The second image is an example of the tiles in use. Can you get your train from point A to point B? There is only one valid path as far as I know.

--Medicine Storm

 

Attachments: 
Preview
tracks_96x96.png tracks_96x96.png 20.7 Kb [96 download(s)]
Preview
track_example.jpg track_example.jpg 170.5 Kb [14 download(s)]
  • Log in or register to post comments