Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 13 14 [15] 16 17 ... 22

Author Topic: DrPoo's programming Jam, 100*C, a community project, that actually works.  (Read 42997 times)

GalenEvil

  • Bay Watcher
    • View Profile
    • Mac-Man Games

I am extremely happy to hear that Virex :D I should be able to make it work out okay then. Will we have to deal with what is essentially scheduling of the carts? Say we have 1 cart going one way and it happens that it would collide with another cart further down the track, would that be taken care of similarly to Railroad Tycoon (the lower priority train temporarily stops to let the other train pass if they would occupy the same track) or will we be having both single-wide track and double-wide track? I think the switches should be automatic, so that it isn't as much a burden on the player. Though since this is essentially an economy and logistics game it would be kinda cool to have scheduling and semi-manual switches.

I can make the reasonable angles work with pathing so they don't violate physics and cause crashes. Someone else will have to deal with making sure that the carts stay at reasonable speeds and don't crash into each other needlessly. I may have to take into account current or predicted track usage when making the pathfinder decide which track to use... so much complexity :P I like it! This is definitely going into my portfolio ^_^

EDIT!!!

Added two pages to the wiki, mostly to let everyone know what I am planning to do in a little more detail then the design doc. Also posted a question for clarification of what is expected of the pathfinding system on the design document so please fill that out when you are able if it is contrary to what I have put up on the Wiki. Or even if it is not contrary to it, so that there is both external and internal documentation of what is expected of the AI Pathfinding System.

I can probably add a few pages to the bottom of the document tomorrow once I have an absolutely concrete vision and outline of what I intend to do with the pathfinding system for both Robots and Minecarts, as they will be semi-separate with their initial natures but conducive with the overall plan.
« Last Edit: May 02, 2012, 03:44:27 am by GalenEvil »
Logged
Fun is Fun......Done is Done... or is that Done is !!FUN!!?
Quote from: Mr Frog
Digging's a lot like surgery, see -- you grab the sharp thing and then drive the sharp end of the sharp thing in as hard as you can and then stuff goes flying and then stuff falls out and then there's a big hole and you're done. I kinda wish there was more screaming, but rocks don't hurt so I guess it can't be helped.

Virex

  • Bay Watcher
  • Subjects interest attracted. Annalyses pending...
    • View Profile

I am extremely happy to hear that Virex :D I should be able to make it work out okay then. Will we have to deal with what is essentially scheduling of the carts? Say we have 1 cart going one way and it happens that it would collide with another cart further down the track, would that be taken care of similarly to Railroad Tycoon (the lower priority train temporarily stops to let the other train pass if they would occupy the same track) or will we be having both single-wide track and double-wide track? I think the switches should be automatic, so that it isn't as much a burden on the player. Though since this is essentially an economy and logistics game it would be kinda cool to have scheduling and semi-manual switches.
I was thinking of using a system similar to Simutrans or Transport Tycoon, with conditional switches that allow you to make two-track systems or bypasses. If two carts are on the same track section and there's nothing slowing them down, they're going to crash into each other.[/quote]
Logged

GalenEvil

  • Bay Watcher
    • View Profile
    • Mac-Man Games

I like that idea Virex. I think I have fixed things so that Minecarts will only route to an area if it has a full route with changes in track direction not exceeding 30 degrees. Had to use direction vectors along the connection between nodes to make it work right. It will immediately disregard any connection where the change is greater than allowed :D Need to work out a table that it can reference so it will not try to constantly do trig-math when working through the routes. Trig math is expensive on CPU time...
Logged
Fun is Fun......Done is Done... or is that Done is !!FUN!!?
Quote from: Mr Frog
Digging's a lot like surgery, see -- you grab the sharp thing and then drive the sharp end of the sharp thing in as hard as you can and then stuff goes flying and then stuff falls out and then there's a big hole and you're done. I kinda wish there was more screaming, but rocks don't hurt so I guess it can't be helped.

malloc

  • Bay Watcher
    • View Profile

I like that idea Virex. I think I have fixed things so that Minecarts will only route to an area if it has a full route with changes in track direction not exceeding 30 degrees. Had to use direction vectors along the connection between nodes to make it work right. It will immediately disregard any connection where the change is greater than allowed :D Need to work out a table that it can reference so it will not try to constantly do trig-math when working through the routes. Trig math is expensive on CPU time...
Something I learned very fast was that making lookup tables for simple functions is MUCH slower.
The reason is actually how trig functions are calculated on newer hardware. Compared to the slow approach of truncating and converting the input value, calculating offset and looking it up. Not that tables are useless, they are very important in dynamic programming algorithms, but for simple functions they are a useless waste of cpu time.

You can even avoid using trig functions all together by using some simple vector math.

Hello I have had a lot of different work to do this week. So I have not been doing any game coding, I will probably get dynamically sized terrains done this weekend.
Logged

GalenEvil

  • Bay Watcher
    • View Profile
    • Mac-Man Games

well yeah, it is basically vector math that I am doing. It would only be a very small amount of table that would actually be hard-coded into the AI. Since there are just 4 possible angle change values that are valid (0, 10, 20, and 30 degrees) it would be simple to associate a vector coordinate set for each of those. I have the values written down that I would need to make this work, just need to figure out how to get Unity to work with my current code >.> and now that I have the placeholder objects I can make a simplistic route and make a minecart run through it. Once I get it working of course :D

I am thinking of using a Vector Product to find the difference in direction: vector 1 = <1,0,0> and vector 2 = <sqrt(2)/2, sqrt(2)/2,0>. If I am doing the vector product right the Vp of 1 and 2 is <sqrt(2)/2,0,0> which corresponds with a 45 degree change in direction. This would be a slightly out of the valid values example but it was the quickest that I could come up with to show my point and not be really really longwinded.

I added a question to the design doc so that Anyone that has something that should be implemented into the pathfinding AI can put it there and i'll address it as soon as I can.
Logged
Fun is Fun......Done is Done... or is that Done is !!FUN!!?
Quote from: Mr Frog
Digging's a lot like surgery, see -- you grab the sharp thing and then drive the sharp end of the sharp thing in as hard as you can and then stuff goes flying and then stuff falls out and then there's a big hole and you're done. I kinda wish there was more screaming, but rocks don't hurt so I guess it can't be helped.

Kofthefens

  • Bay Watcher
  • Keep calm and OH GOD CAPYBARAS
    • View Profile
    • Marshland Games

I am proposing another IRC conference this weekend. Same place, same time. (Saturday 20:00GMT, in CodeJam on NewNet)
Sound good?
Logged
I don't care about your indigestion-- How are you is a greeting, not a question.

The epic of Îton Sákrith
The Chronicles of HammerBlaze
My website - Free games

Araph

  • Bay Watcher
    • View Profile

Works for me.
Logged

Virex

  • Bay Watcher
  • Subjects interest attracted. Annalyses pending...
    • View Profile

Good news, I got the spline division code running




I just need to figure out how to make a mesh out of it and how to make it double-tracked and we're good to go.


Edit: We got tracks baby!
Spoiler: Tracks! (click to show/hide)
« Last Edit: May 05, 2012, 02:00:42 pm by Virex »
Logged

Virex

  • Bay Watcher
  • Subjects interest attracted. Annalyses pending...
    • View Profile

Sorry for the double post, but in case anyone sees this, we're on IRC, but there's only 2 of us right now. Come make us less lonely! Link is irc://irc.newnet.net/CodeJam
Logged

DrPoo

  • Bay Watcher
  • In Russia Putin strikes meteor
    • View Profile

Good news, I got the spline division code running




I just need to figure out how to make a mesh out of it and how to make it double-tracked and we're good to go.


Edit: We got tracks baby!
Spoiler: Tracks! (click to show/hide)

Awesome! :D
Logged
Would the owner of an ounce of dignity please contact the mall security?

Kofthefens

  • Bay Watcher
  • Keep calm and OH GOD CAPYBARAS
    • View Profile
    • Marshland Games

The IRC conference is still going. Please join us.
Logged
I don't care about your indigestion-- How are you is a greeting, not a question.

The epic of Îton Sákrith
The Chronicles of HammerBlaze
My website - Free games

dreadmullet

  • Bay Watcher
  • Inadequate Comedian
    • View Profile

Sorry I missed the conference. 50 minutes of sleep turned into 8 hours.

@Virex: Awesome!
Logged

GalenEvil

  • Bay Watcher
    • View Profile
    • Mac-Man Games

I almost did the same thing dreadmullet. Only reason I didn't was because I ended up setting about 15 alarms from my phone and made sure my alarm clock was set for slighly after the last one would go off. I have a long phone alarm so it took some doing to find a time that would be just about 20-30seconds off from the end of the last alarm >.> scared the shit out of me when I woke up too. Also, Kof was nice enough to put up a transcript of the meeting (what little there was) onto the google doc :D
Logged
Fun is Fun......Done is Done... or is that Done is !!FUN!!?
Quote from: Mr Frog
Digging's a lot like surgery, see -- you grab the sharp thing and then drive the sharp end of the sharp thing in as hard as you can and then stuff goes flying and then stuff falls out and then there's a big hole and you're done. I kinda wish there was more screaming, but rocks don't hurt so I guess it can't be helped.

Mullet Master

  • Bay Watcher
    • View Profile

I'm kind of interested in helping out, but really don't know a ton about Unity.
Since I saw "Steam" and "Pipes" mentioned about 50 times in the thread and the design documents, I thought I would try to build some basic steam components for the game.
I did a quick boiler in sketchup (which will import pretty easily into Unity, I've did this today to verify). No textures applied, only colors.

There's obviously a few features - a steam output pipe, a water inlet pipe, and a pressure gauge that could be animated later on if desired. Perhaps a fire could be made inside?

If this has any interest, I will work on a few more.

Spoiler: Basic Boiler (click to show/hide)
« Last Edit: May 06, 2012, 05:51:19 pm by Mullet Master »
Logged

Virex

  • Bay Watcher
  • Subjects interest attracted. Annalyses pending...
    • View Profile

I'm kind of interested in helping out, but really don't know a ton about Unity.
Nice boilers. We're all kind of learning on the job, so don't worry to much about that. Hell, I managed to make those tracks with exactly 0 experience with unity and a very rusty memory of C# ;)
Logged
Pages: 1 ... 13 14 [15] 16 17 ... 22