|
981
|
Developer / Tutorials / Pathfinding for a first-time RPG
|
on: November 28, 2011, 10:06:52 PM
|
|
I have literally been programming all day. This morning I realized that I was at a point where I could literally program everything that I've ever wanted to make (2d-wise). So I went back through my old notebook of ideas and started doing a bunch of prototypes.
ANYWAY...
I also realized that I haven't ever made an RPG (turn-based). I'm using Game Maker for my prototypes and would like some suggestions when it comes to enemy AI and more specifically, pathfinding.
I need my enemies to move 'x' number of spaces each turn, towards the player (or other party members) while avoiding walls and taking the shortest path.
A* ? Dijkstra's ? Another method entirely ?
I don't have much background when it comes to these algorithms, and would like some help, preferably help that could apply to GM.
|
|
|
|
|
982
|
Developer / Technical / Re: GML in Unity
|
on: November 28, 2011, 01:47:02 PM
|
|
Hmm, you're right. The components are very different from GM's structure, but honestly, I found this to be much simpler than the switch from a few simple functions defined in the GM Manual to the HUGE API that is found on Unity's website.
That's just me though. A few quick tut vids can help explain the components, but there will never be enough tutorials to show you what you can do with the numerous functions available to you.
This is why I think a small library with the relevant names taken from GM could be helpful.
|
|
|
|
|
985
|
Developer / Technical / Re: GML in Unity
|
on: November 26, 2011, 09:30:03 AM
|
I think I would start with a 2D platformer and basic code that would normally go inside of a player object step-event. if(keyboard_check(vk_right)){ hspeed += acceleration; }else{ if(keyboard_check_released(vk_right)){ hspeed = max(0, hspeed - decceleration); } }
//basic junk like this...
//followed by the equivalent for moving left, variable jumping, and gravity
edit: shit, didn't mean to bump it, lol.
|
|
|
|
|
986
|
Developer / Technical / Re: GML in Unity
|
on: November 25, 2011, 09:01:15 PM
|
|
That's kind of what my plan was in the original post. Basically explaining all of the Unity equivalents to Game Maker functions. I do think that I may need help finishing that though.
|
|
|
|
|
988
|
Developer / Technical / Re: GML in Unity
|
on: November 25, 2011, 12:17:51 PM
|
|
You're right. How would I go about making 3D in Unity as easy as learning 2D in GM?
Suggestions?
|
|
|
|
|
989
|
Developer / Technical / Re: GML in Unity
|
on: November 25, 2011, 11:43:26 AM
|
|
Hmm...A GML interpreter would be interesting. That's a possibility as well. I just figured that rewriting scripts would be fairly easy and wouldn't take too much time or effort (for most of them, anyway).
Things like instance_create(), point_distance(), point_direction(), etc are used extremely often. Also, drawing functions and sprite_index, image_index, etc.
|
|
|
|
|
990
|
Developer / Technical / GML in Unity
|
on: November 25, 2011, 09:25:19 AM
|
|
This is more of an idea than a question, but I thought that this was the best place to post it.
I have several friends and fellow developers who are somewhat new to programming. They have been working in Game Maker for all of their game projects, tutorials, and prototypes. When asked what engine they'd like to jump to next, they seem most interested in Unity (with Flash being a close second).
However, after looking at the Unity API documentation they become quite overwhelmed, and that is how I came across this idea. Basically, what I would be doing is hardcoding Game Maker functions in C# for them to use in Unity. This would be used as a starting point until they are comfortable with Unity. From there they could look through the code and figure out the code equivalents.
This wouldn't really let them jump into 3D right away, but they could at least ease into the Unity environment.
I would start with the keyboard_check_direct() functions and then move on to setting things up like hspeed, vspeed, etc. I'm not sure how things like place_meeting() would work because most of Unity's collision can be done for you (though it doesn't have to be).
Anyway...what do you guys think? Is this pointless or do you think it could help? And if it sounds good, is anyone willing to help?
|
|
|
|
|
992
|
Developer / Art / Re: Mockups, or the "Please say this is going to be a game" thread
|
on: November 18, 2011, 07:04:09 PM
|
HERE, GUYS!  Ok, ok, so it's not a mockup.... It's an in-game screenshot, but we're about two-three weeks from starting our devLog and I couldn't resist  Also, try not to cringe over the horrible background that I stole from Google images and stretched all to shit. EDIT: Pic was huge, so I swapped it for a thumbnail. 
|
|
|
|
|
995
|
Developer / Technical / Getting x and y speeds out of 'direction' and 'speed'
|
on: November 12, 2011, 05:46:33 PM
|
In the past, I have used the following code to determine the trajectory of a grenade sx=(target.x)-x; sy=(target.y)-y; dir=(arctan2(-sy,sx)+pi/2)/2; speed=sx/(cos(dir)*sqrt(2*(sy+tan(dir)*sx)/grav)); direction=radtodeg(dir); It returns the speed and direction of that the grenade needs to travel in order to land on top of its target. Now, I am using a different code structure where I adjust a variable and add it to the object's coordinates, rather than use built in variables. ex. x + = h; //(h = 3) //instead of... hspeed = 3; Can somebody help me get the correct h and v (horizontal and vertical speeds) so that I can still use the same math to determine trajectory. 2D Sidescrolling, btw. EDIT: I think this is what I need? Thinking about it in terms of vectors, unless I am just stupid...  EDIT#2: Maybe solved...if I choose not to figure out x_lengthdir()...I think that h = speed*(sin(dir)); should work. May need to convert dir to degree first.
|
|
|
|
|
998
|
Developer / Business / Re: Satire
|
on: November 08, 2011, 09:38:53 PM
|
Here's an idea; ask the IP owner's permission.
I'll end up doing this.^ Thanks for the insight, everyone.
|
|
|
|
|
999
|
Developer / Tutorials / Re: Writing an engine in C++
|
on: November 08, 2011, 10:00:35 AM
|
Haha^  I guess I just think of an engine as a starting point. Not really an engine that I can hand out to help other people with their games. When I think engine, I think about programming audio, grapics, and input handling. My bad 
|
|
|
|
|