Jump to content


Photo

Awesome 2d Rts Engine (similar To Warcraft/strcft)


  • Please log in to reply
107 replies to this topic

#1 rude guss

rude guss

    GMC Member

  • GMC Member
  • 236 posts

Posted 03 March 2009 - 02:37 AM

Have you ever played starcraft or warcraft, and thought - i wish i could make something like this -- well now you can!! the awesome 2d rts engine is: an awesome 2d rts engine that works just like starcraft and warcraft. simply plug in your graphics, modify the stats of your units and building, design spells and create your map. Then you have your own awesome 2d rts.

GM Version: Gamemaker 7/8 Unregistered! (GM8 Pro required for Multiplayer version)

Download: https://www.box.com/...ncolurxhqd3pnwo ( [GM8] v0015.0 Unregistered Version )
Download: https://www.box.com/...elwh6kx9005xujg ( [GM8Pro] v0017.5 Multiplayer Version - Uses Faucet Network Extension 1.4.2)
Faucet Network Extension: http://gmc.yoyogames...howtopic=498062

How-To Guide: https://www.box.com/...9kzbntbqtsxlvwv (v1.2 This is a text document that explains how to do basic things)

What it has:
(most of the basic rts functions of warcraft 3)
- A movement and selections system
- 8 directional graphical system
- Battle system (melee and ranged)
- 8 - directions attacking
- Awesome sprite and damage sync-ing - so it does damage when you want, when the blade hits the enemy!! easily customizable to suit your OWN sprites.
- Attack cooldown - You dont want you unit continusously bashing away.
- basic ai - if there is an enemy close by they will attack it
- resource gathering system
- up to five different resources (you can add more but..)
- automatic gathering (once you select the resource to gather it will return it to the town center when finished, then go back to gther more)
- 2 collection types (in warcraft/starcraft terms 1. mining [woodcutting/crystal collecting] and 2. collecting [goldmines/vespene gas])
- partially modular - most most systems you can delete, or replace with your own, like the movement system, minimap, fog of war
- unregistered fog of war!!
- minimap!
- ablity to create building
- buildings can create units
- building can set waypoints for unit to go to when created
- HUD
- you can make spells and skills fo units
- buildings can queue units
- Magic system - units can cast spells, with cast time and cooldown
- Ailments System - units can be stunned, silenced and more
- HOtkey system - you can easily assign buttons a hotkey
- Notifications System - Get messages to the user ridiculously easy.
- Health Bars on units now show up!
- flexible and customisable
** Multiplayer **
- Teams
- Different Player Colors
- Races (eg. Human, Undead, Orc...)
- Chatting to team mates and to everyone else
- Up to ten players (obviously you can add more but it will get very slow)
- Neutral units

(Australian date format dd/mm/yyyy)
8/1/2013 - Added Multiplayer and updated the How-To document to include details on Multiplayer. Multiplayer requires Gamemaker 8 Pro and Faucet Network Extension 1.4.2.
28/1/2012 - HUGE update!! Added: Notifications system, Spell cooldowns, Hotkey system, Ailments system (units can be stunned, silenced and more!!), Unit Health Bars, and improved all the object templates, for easier updating!! I added several of my own made spells: Chain lightning, chain-stun (target ally units), heal, and Area of Effect Silence (target ally units). I will also be updating the How-To guide soon as well. I've added more pics that showcase the new features so check them out. Also fixed plenty of small bugs.
24/1/2012 - Quick UPDATE!! Just realised the magic system was actually missing quite a bit of code, so i fixed that up for you guys. I also improved the movement system so that it looks nicer. Units no longer pile up on each other.
23/1/2012 - New UPDATE!! fixed a little bug with the fog of war (that annoyingly no one mentioned), and added a Magic Casting System. This engine is now pretty complete. All that is left for me to do is write up a little how-to guide, which will be coming very soon. ENJOIZZ!!
1/11/2011 - Just wanted to say hi! Show me some of the game you have made with my engine already! It has been 2 and a half years!
29/6/2011 - (v 0013.0 update) LAWL!! how long has it been? 6 MONTHS?? You guy have probably thought I abandoned this, BUT fear not! After NOT working on this for such a long time, i have updated it! This update is very different from the previous it has:
- updated fog of war
- unit build queue
- some other crap, which i forgot about
This is nearly done, i might implement a magic system and a hero system. after that, i just need to write a tutorial and it is done!
2/11/2010 - LOL!! >1200 downloads for v11.2 (or 2000 downloads in total!!) :D nice!!. Oh, by the way for those expecting the update, im not releaseing it until ive done a bit more work. sorry for getting you guys excited :/
10/9/2010 - okay, so i came back from gamemaker's block and fixed a bug that was stopping my progress. expect to see an update at the end of this month or the start of next month
7/2/10 - UPDATE!! - this has a few speed improvements and fixes most of the bugs found by stumlehb.
6/2/10 - OIIII!! my fully sick bro, stumlehb, has notified me of a bug in the 0011.0 engine verion - to fix it got to line 21 of the step event of "object_unit_tempplate" and simply ADD " || gathering = true". what you can see in the next update - computer AI (skirmish AI) - you know those computer contolled players in warcraft 3? well they're coming to my awesome 2d rts engine.
25/1/10 - UPDATE!! - this includes: HUD - with minimap, buttons, Fog of war, Buildings. this version is very near completion
17/1/10 - upon fixing a bug, the game now runs 1.5 time faster, then i downloaded gm 8 (heard it was faster) and gained another 2x speed increase. expect another update at the end of janurary.
2/12/09 - i just finished adding fog of war but its too soon to relase another version so itll be with the next one.


NOTE: nearly every thing that you need to modify, to suit your own sprites, can be located in the CREATE EVENT in the object called something like OBJ_UNIT_TEMPLATE, OJB_RESSOURCE_TEMPLATE or ONJECT ENEMY_TEMPLATE.
(most things you will need to edit will be in the create event of the object, and it has been commented)

pics - gathering in motion - http://img691.images...gatheringa.jpg/
fighting - http://img200.images.../fightingg.jpg/
buildings - http://i.imgur.com/OuGzH.jpg
unit queue- http://i.imgur.com/Fi4mI.jpg
magic system (casting fireball) - http://i.imgur.com/hCPi1.png
stunning and silence - http://i.imgur.com/nIkKC.png
notifications - http://i.imgur.com/KPNpW.png
chain lightning - http://i.imgur.com/UqUXI.png
multiplayer - http://i.imgur.com/0vw1e.png
multiplayer - http://i.imgur.com/FnE4r.png?1
(it looks a LOT better when you plug in your own graphics - ive had people send me a file including their own graphics and it just works so well - no extra codeing)

Downloads - (History)
version 0017.5 [GM8Pro] - https://www.box.com/...elwh6kx9005xujg (Latest Multiplayer version)
version 0015.0 [GM8] - https://www.box.com/...ncolurxhqd3pnwo (Latest Unregistered Version)
version 0014.4 [GM7] - http://www.mediafire...q4bgia8mbzimmow
version 0013.4 [GM7] - http://www.box.com/s...na0rk09e0o3avlp
version 0013.3 [GM7] - http://www.box.com/s...3exlgbhizkbiii6 (<- This on has an incomplete magic system.)
version 0013.0 [GM7] - http://www.box.net/s...qgcj978aiuv1ztb (1000+ downloads :D)
version 0011.2 [GM7] - http://www.box.net/shared/6edphh9onp (:o its reached 2600 downloads!! yay)
version 0011.0 [GM7] - http://www.box.net/shared/sjs4scq11k
version 0002.8 [GM7] - http://www.box.net/shared/ft6huqbmm6
How-To Guide 1.0 - http://www.box.com/s...i8288opyoz9hdkk
How-To Guide 1.2 - https://www.box.com/...9kzbntbqtsxlvwv

any questions, please ask or even just message (PM) me!

Thanks and good luck with your own RTS games

Edited by rude guss, 08 January 2013 - 07:07 AM.

  • 6
Check out my Awesome 2d RTS Engine - It's Open-source, Unregistered and now has Multiplayer!!

#2 mortalpico

mortalpico

    GMC Member

  • New Member
  • 556 posts

Posted 03 March 2009 - 09:24 AM

Nice Source man ive bin waiting for this one!Its looks like SC 1 & 2!

THNX!
  • 0
"Remembering ISHIMURA..."

#3 rude guss

rude guss

    GMC Member

  • GMC Member
  • 236 posts

Posted 03 March 2009 - 10:05 AM

Thanks it was starcraft that inspired me to make an rts, But remeber that it will only help you start, you have to do alot of work if you wnat an rts that works.
  • 0
Check out my Awesome 2d RTS Engine - It's Open-source, Unregistered and now has Multiplayer!!

#4 mortalpico

mortalpico

    GMC Member

  • New Member
  • 556 posts

Posted 03 March 2009 - 09:17 PM

Yeah i know that but THNX!!!
  • 0
"Remembering ISHIMURA..."

#5 stumlehb

stumlehb

    GMC Member

  • GMC Member
  • 200 posts

Posted 17 June 2009 - 09:56 AM

awesome..

thanks for posting this, I think I'll try plugging my graphics into it and mess with it a bit..

Edited by stumlehb, 17 June 2009 - 09:58 AM.

  • 0

#6 rude guss

rude guss

    GMC Member

  • GMC Member
  • 236 posts

Posted 21 June 2009 - 10:00 AM

Thanks for the relpy. Anything specific you want me to add or explain??
  • 0
Check out my Awesome 2d RTS Engine - It's Open-source, Unregistered and now has Multiplayer!!

#7 stumlehb

stumlehb

    GMC Member

  • GMC Member
  • 200 posts

Posted 22 June 2009 - 06:03 AM

Thanks for the relpy. Anything specific you want me to add or explain??

yeah...

it would be awesome if you made the object5 unit which has the AI so that it would support multiple angels of movement.. I mean so it would use a different sprite when walking north and when walking northeast etc., just like the user controlled units .. also.. if you could add a combat system.. so that units can attack and die or run away when severely injured.. and shoot arrows so that a different sprite is used for the arrow from each angle of attack. and so that computer controlled units would attack your people and buildings.. have health points as well as armor points and recharging mana for spells..

also include some sort of inventory system so that units can hold items like armor or other upgrades, as well as keys to doors.. and have special items like spells which could be used as attacks.. and the ability to rescue units.


basically I'd like it if you could upgrade the engine to function like warcraft 1 or 2..
I'm not concerned about multiplayer abilities though. I'm more concerned about the combat system than resource gathering.. so think of the warcraft 1 dungeon levels.. but maybe with some enemy spawning locations like in gauntlet..


I'm using the unregistered version of GM 7 but will purchase GM8 when it is available.
  • 0

#8 rude guss

rude guss

    GMC Member

  • GMC Member
  • 236 posts

Posted 22 June 2009 - 09:53 AM

Thanks for the relpy. Anything specific you want me to add or explain??

yeah...

if you could add a combat system.. so that units can attack and die or run away when severely injured.

I'm using the unregistered version of GM 7 but will purchase GM8 when it is available.


don't worry i'm sticking with unregistered incase gm 8 doesnt come out soon (I havent been on here for 3 months, so i have no idea whats happening with gm8) .I took a look at your thread and i guess I'll start with the combat system since it seems that your game is combat based. everything else you asked for could probably be done easily so i will start with the hard things first. i'll keep you psted on my progress.

by the way your sprites are insane.
  • 0
Check out my Awesome 2d RTS Engine - It's Open-source, Unregistered and now has Multiplayer!!

#9 mortalpico

mortalpico

    GMC Member

  • New Member
  • 556 posts

Posted 22 June 2009 - 10:19 AM

Please Remove Your Rude And Behieveor (srry for grammar.)
  • 0
"Remembering ISHIMURA..."

#10 stumlehb

stumlehb

    GMC Member

  • GMC Member
  • 200 posts

Posted 22 June 2009 - 06:21 PM

Thanks for the relpy. Anything specific you want me to add or explain??

yeah...

if you could add a combat system.. so that units can attack and die or run away when severely injured.

I'm using the unregistered version of GM 7 but will purchase GM8 when it is available.


don't worry i'm sticking with unregistered incase gm 8 doesnt come out soon (I havent been on here for 3 months, so i have no idea whats happening with gm8) .I took a look at your thread and i guess I'll start with the combat system since it seems that your game is combat based. everything else you asked for could probably be done easily so i will start with the hard things first. i'll keep you psted on my progress.

by the way your sprites are insane.



awesome.... thanks.. keep in mind that the attackers should display a different animation for each angle of attack, so that attacking north would be a different sprite from attacking northeast... and arrows, dragon breath, and catapult fire, etc. would be displayed from a different angle as well, depending on which angle the attack was made from.. and thanks for the compliment on the sprites..


Would it be difficult to have multiple levels of height like in X-com? I'm intending to have buildings the same scale as the people, so they can enter, and it would be nice to have multiple stories in a building for which the view could be toggled.. I'd like walls to be destroyable so that a person could destroy a wall on a second floor building and then step outside the hole they've made, and fall to the ground receiving a little bit of damage from the fall.. are you familiar with x-com?
  • 0

#11 rude guss

rude guss

    GMC Member

  • GMC Member
  • 236 posts

Posted 30 June 2009 - 12:41 PM

I have just finished a battle system. Check the first post for download and details.

i'll say this again, i used a totally different engine that I made so i dont know if you'll be able to put it in to my older engine.

i'll get to ranged attacks soon, anyway its next on my list.

about x-com, i heard of it but ive never played it. And about what your asking, it sounds very difficult, as i have no experience at all in isometric height, but you should be able to easily find a forum member with exp or example/tutorial on what you want to do.

Good luck with your project.

I have a goal; To Create a fully functional and complete basic RTS Engine + A demo to go with it shocasing what you could do with it.
I have one question - Will i be able to do it??

Edited by rude guss, 30 June 2009 - 12:44 PM.

  • 0
Check out my Awesome 2d RTS Engine - It's Open-source, Unregistered and now has Multiplayer!!

#12 rude guss

rude guss

    GMC Member

  • GMC Member
  • 236 posts

Posted 30 November 2009 - 01:19 AM

I have just finished and added a resource gathering system to my engine

see the first post for more detailed information, pictures and a download link

Edited by rude guss, 30 November 2009 - 01:19 AM.

  • 0
Check out my Awesome 2d RTS Engine - It's Open-source, Unregistered and now has Multiplayer!!

#13 stumlehb

stumlehb

    GMC Member

  • GMC Member
  • 200 posts

Posted 02 January 2010 - 08:05 AM

I have just finished and added a resource gathering system to my engine

see the first post for more detailed information, pictures and a download link


nice to see you're still working on it. I have a few changes to request:

1. Would it be difficult to change it to a grid type of movement or check for more collisions, so that only one unit can occupy a single space at one time? I'd like to see the people not walking on top of each other when walking in groups.

EDIT: nevermind, I've figured out how to solve this.. very simple.. just made the unit solid, and added "area_size = 0;" to the create event of the units.. seems to work.

2. I like the fact that the units spread out when they get somewhere, since that is better than having them stand on top of eachother, but the green lines showing the movement paths probably shouldn't ever be drawn. Note: if walking collisions or a grid system were used, then the units should return to their original formation

EDIT: thanks for the PM explaining where to fix that.

3. Could you also add death sequences, so they don't just disappear when they die, and then the corpse needs a rot sequence, in which the level of decay will affect the type of undead produced by necromancers.. (fresh = zombie, skeletal = skeleton)

4. I'd prefer if the tree stumps wouldn't be gatherable.

5. I would like the attack/harvest animations to only cycle through their specific sprite animation, and NOT revert back to the standing sprite after every cycle.

6. the resource gatherers should enter the townhall and goldmine when picking-up/dropping-off stuff , and have an adjustable time to stay inside.

Edited by stumlehb, 04 January 2010 - 01:03 AM.

  • 0

#14 MrJeeves

MrJeeves

    GMC Member

  • New Member
  • 79 posts

Posted 11 January 2010 - 05:26 AM

I used your engine as a base for my new rts Midaeon. I've changed nearly everything but it was the best example I found for starting a game on. Thanks so much for getting me started.

I can't wait to see the FOW system, I've had some ideas for one, but have been working on another part of the project.

Thanks again.
  • 0

#15 rude guss

rude guss

    GMC Member

  • GMC Member
  • 236 posts

Posted 16 January 2010 - 07:45 AM

thanks for showing interest in my engine

id also like to thank you for showing me you game because it has motivated me to make my engine so good, that it makes yours look like crap. this is good competition. before i had seen your game i really couldnt be bothered to complete this engine, now i have a reason to.

Edited by rude guss, 16 January 2010 - 07:49 AM.

  • 0
Check out my Awesome 2d RTS Engine - It's Open-source, Unregistered and now has Multiplayer!!

#16 Schyler

Schyler

    Noskcirderf Derf

  • GMC Member
  • 2680 posts
  • Version:GM:Studio

Posted 16 January 2010 - 12:42 PM

thank you for showing me you game because it has motivated me to make my engine so good, that it makes yours look like crap.

Can't show some mercy in your wording? That sounded a little harsh to me...
  • 1

#17 MrJeeves

MrJeeves

    GMC Member

  • New Member
  • 79 posts

Posted 16 January 2010 - 06:18 PM

thank you for showing me you game because it has motivated me to make my engine so good, that it makes yours look like crap.

Can't show some mercy in your wording? That sounded a little harsh to me...


no harm no foul :P

'sides, he's gonna have to work his butt off :P
  • 0

#18 jackyboyhenry

jackyboyhenry

    just jack

  • GMC Member
  • 466 posts

Posted 17 January 2010 - 01:55 PM

great engine! basing it on my game :D
  • 0
Im to cool for a nice signature.

#19 rude guss

rude guss

    GMC Member

  • GMC Member
  • 236 posts

Posted 18 January 2010 - 05:11 AM

dont start too soon! i have an update coming soon which will be a nearly finished version.
  • 0
Check out my Awesome 2d RTS Engine - It's Open-source, Unregistered and now has Multiplayer!!

#20 LazyBuhdaBelly

LazyBuhdaBelly

    GMC Member

  • New Member
  • 2 posts

Posted 18 January 2010 - 06:01 PM

Gah, I already started my game.
I like the engine, yet you wouldn't even recognize it.
Thanks for getting me started. I just game back from a Game Maker drought.
  • 0

#21 mortalpico

mortalpico

    GMC Member

  • New Member
  • 556 posts

Posted 22 January 2010 - 01:50 AM

I cant wait to have the finished engine!
  • 0
"Remembering ISHIMURA..."

#22 rude guss

rude guss

    GMC Member

  • GMC Member
  • 236 posts

Posted 23 January 2010 - 07:58 AM

Thanks for all of the support.

Update on progress: next update in 3 - 7 days - all i have to do is make it so buildings can make units/research tech and then the update will be released, and it will be pretty much finished - after that all i have to do is polish the engine so has near to no bugs. i will also make a manual to tell users how to use the engine but you can expect that to come out a lot later

Update has arrived!! refer to the first post for information

Edited by rude guss, 25 January 2010 - 04:18 AM.

  • 0
Check out my Awesome 2d RTS Engine - It's Open-source, Unregistered and now has Multiplayer!!

#23 jackyboyhenry

jackyboyhenry

    just jack

  • GMC Member
  • 466 posts

Posted 25 January 2010 - 04:57 PM

Error in code at line 112:
if build_target.is_built = false && build_target.is_placed = true

at position 26: Unknown variable is_built

that was in the update when i clicked on villager create
  • 0
Im to cool for a nice signature.

#24 rude guss

rude guss

    GMC Member

  • GMC Member
  • 236 posts

Posted 25 January 2010 - 11:40 PM

sorry mate, i know what the problem is: the "peon house" that you tried to click on is obsolete - and i forgot to delete it so you have to use "obj_building_template" instead of "obj_peon_house"

simply there is a big house and a small one - you cant use the big one, just make your own
  • 0
Check out my Awesome 2d RTS Engine - It's Open-source, Unregistered and now has Multiplayer!!

#25 msgundam

msgundam

    GMC Member

  • New Member
  • 2 posts

Posted 26 January 2010 - 11:47 AM

+9999 zillions for you,
thks alot for the engine, i got 1 request or question,

how can i add buy or sell npc? and the resource display kinda blured,,

some sprite example of my current project with your engine,

Posted Image

1. for now i have dificulty too add manual firing turrent at my sprite since the engine dint reconize the variable,
2. can you show me an example how to add buy and sell npc? so tht player can buy or sell stuff?
like buying a new ship or new turrent or new crew or even sell them, so when the player kills enemy they got a point and can trade for a new ship etc.
3. i'm trying to add custom quest mission, but still in learning progress,

i will show my mini project, when im done editing it.
thks in advance.
  • 0

#26 jackyboyhenry

jackyboyhenry

    just jack

  • GMC Member
  • 466 posts

Posted 26 January 2010 - 04:03 PM

sorry mate, i know what the problem is: the "peon house" that you tried to click on is obsolete - and i forgot to delete it so you have to use "obj_building_template" instead of "obj_peon_house"

simply there is a big house and a small one - you cant use the big one, just make your own


cheers.
  • 0
Im to cool for a nice signature.

#27 rude guss

rude guss

    GMC Member

  • GMC Member
  • 236 posts

Posted 27 January 2010 - 12:03 AM

2. can you show me an example how to add buy and sell npc? so tht player can buy or sell stuff?
like buying a new ship or new turrent or new crew or even sell them, so when the player kills enemy they got a point and can trade for a new ship etc.


- creating the button -
go to the buttons folder and duplicate the object "obj_button_template"
rename the duplicated object (for reference ill call it button_buy_ship)
go to the "left click event" of "button_buy_ship"
this is where you put the code to what happens when you click the button
so something like:
if global.points >= 10
{
global.points -= 10;
instance_create(ship);
}

THEN

- assigning the button -
youll wnt to assign this button to a building - so go to the building object you want and go to the "create event"
down the bottom you will find variables relating to the HUD button slots
just enter in that button_buy_ship into one of those slots.
  • 0
Check out my Awesome 2d RTS Engine - It's Open-source, Unregistered and now has Multiplayer!!

#28 mortalpico

mortalpico

    GMC Member

  • New Member
  • 556 posts

Posted 28 January 2010 - 09:29 AM

WOOT!LIKE THE UPDATE!
  • 0
"Remembering ISHIMURA..."

#29 stumlehb

stumlehb

    GMC Member

  • GMC Member
  • 200 posts

Posted 01 February 2010 - 04:04 AM

hmmm.. it came up with these error messages:

"
ERROR in
action number 1
of Step Event
for object obj_button_manager:

Error in code at line 49:
if obj_HUD.target.hud_gen_s1 != 99 { hud_gen_s1 = instance_create(-100,-100,obj_HUD.target.hud_gen_s1); hud_gen_s1.xpos = hud_slotx1; hud_gen_s1.ypos = hud_sloty1; }
^
at position 28: Unknown variable hud_gen_s1
"

"
ERROR in
action number 1
of Draw Event
for object obj_info_manager:

Error in code at line 4:
draw_text(view_xview[0]+namex-(string_width(obj_HUD.target.unit_name)/2),view_yview[0]+namey-(string_height(obj_HUD.target.unit_name)/2),obj_HUD.target.unit_name);
^
at position 65: Unknown variable unit_name
"


but it continued to work after I chose to ignore them. I did change the name in the unit_name variable in the execution code of the obj_unit_template .. am I supposed to change it somewhere else also?

Edited by stumlehb, 01 February 2010 - 04:12 AM.

  • 0

#30 rude guss

rude guss

    GMC Member

  • GMC Member
  • 236 posts

Posted 01 February 2010 - 06:14 AM

stumlehb - i have a feeling that you copy and pasted units from the old engine version (02.7) to the new engine (11.0).
the problem is the units in the new version have more new variables than the ones that were in the old one, and some of the new hud elements require those new variables but cannot find them. what you can do to fix these errors is to compare the old create event with the new one and add the missing cariables yourself.

if a im totally of the mark, then can you tell me what to do to recreate these error messages.
  • 0
Check out my Awesome 2d RTS Engine - It's Open-source, Unregistered and now has Multiplayer!!

#31 stumlehb

stumlehb

    GMC Member

  • GMC Member
  • 200 posts

Posted 02 February 2010 - 01:13 AM

stumlehb - i have a feeling that you copy and pasted units from the old engine version (02.7) to the new engine (11.0).
the problem is the units in the new version have more new variables than the ones that were in the old one, and some of the new hud elements require those new variables but cannot find them. what you can do to fix these errors is to compare the old create event with the new one and add the missing cariables yourself.

if a im totally of the mark, then can you tell me what to do to recreate these error messages.


I did import them and checked them(hope I didn't miss anything though). I've been having some other error messages related to variables as well. but they seem to happen intermittently. for example it will say that the unit_hp variable for the enemies is not recognized, but I know that it is being used because I was able to kill some of those enemy units, before the error messages pop up for the same kind of unit later.. I'm wondering if it is a game maker bug of some sort, because I have had other random intermittent problems with game maker before.. for example, in another game, certain animations intermittently do not show all frames of animation, even though it shows all of them sometimes..

I'll try making all new objects from the templates again instead of using the imported ones...
  • 0

#32 rude guss

rude guss

    GMC Member

  • GMC Member
  • 236 posts

Posted 07 February 2010 - 03:50 AM

NEW UPDATE!!

see first post for details
  • 0
Check out my Awesome 2d RTS Engine - It's Open-source, Unregistered and now has Multiplayer!!

#33 Zargy

Zargy

    GMC Member

  • GMC Member
  • 235 posts
  • Version:GM:Studio

Posted 08 February 2010 - 11:45 PM

Very nice! I like it!
  • 0

A part of Studio Anjin

Need help with GML Topics including but not limited to: Visual Effects, Sprite Effects, Advanced CodingPM me! I'm an official Q&A Mentor!

----------------------------------------------------------------------------------------------------------

Looking for good GM Video Tutorials? Look to G.M.U., The Game Maker University!


#34 rude guss

rude guss

    GMC Member

  • GMC Member
  • 236 posts

Posted 09 February 2010 - 09:19 AM

if there is anything specific that you would like to know how to add to my engine please ask so i can help you
  • 0
Check out my Awesome 2d RTS Engine - It's Open-source, Unregistered and now has Multiplayer!!

#35 mortalpico

mortalpico

    GMC Member

  • New Member
  • 556 posts

Posted 10 February 2010 - 11:42 PM

Omg , the new engine is more way better!

I have a problem...

How can i make my Unit morph or Evolve into a new form with new skills?

Example:

First Form:Larva
Must Morph into Egg after 5 minutes...
Second Form:Creeps
And when i want it to build something it must morph into the building i want it to be!

How can i do this?
  • 0
"Remembering ISHIMURA..."

#36 rude guss

rude guss

    GMC Member

  • GMC Member
  • 236 posts

Posted 11 February 2010 - 03:11 AM

for the first part use an alarm

*create*
alarm[7] = 5mins;

*alarm[7]*
im_pro = instance_create(x,y,obj_creep);
im_pro.selected = true;
selected = false;
instance_destroy();

for the next part just make it so when the creep builds a building it gets destroyed, and for the building:
*step*
if is_built = false
{
build_progress += 1(or a larger amount if you want it to be built faster)
}
  • 0
Check out my Awesome 2d RTS Engine - It's Open-source, Unregistered and now has Multiplayer!!

#37 mortalpico

mortalpico

    GMC Member

  • New Member
  • 556 posts

Posted 11 February 2010 - 06:53 AM

Oh , thanks rude guss!

Finally fixed that thing!
  • 0
"Remembering ISHIMURA..."

#38 Music Minion

Music Minion

    GMC Member

  • New Member
  • 94 posts

Posted 23 February 2010 - 11:26 PM

This is a very impressive engine. the design is genius and the fact that you did this while able to use an unregistered version of gamemaker without the pathfinding functions is amazing. My only complaint is you added a comment /*var*/ every time there was a variable and since my computer is older it slowed my keyboard for typing in different things =( But other than that I give it a 10/10
  • 0

#39 Snopel

Snopel

    GMC Member

  • New Member
  • 61 posts

Posted 25 August 2010 - 05:30 PM

i know you probably don't go and check the comments anymore but if you do i'm haveing a problem with one of the codes when i try to build a house

ERROR in
action number 1
of Mouse Event for Left Pressed
for object Obj_Button_House:

Error in code at line 7:
   if obj_HUD.target.is_built = true
                     ^
at position 20: Unknown variable is_built

also if you could explain how to make it so when say i press the build worker button it subtracts 10 res3 from the stockpile and could you make a readme tutorial to better explain how to do everything

Edited by Snopel, 25 August 2010 - 09:11 PM.

  • 0

#40 stumlehb

stumlehb

    GMC Member

  • GMC Member
  • 200 posts

Posted 01 September 2010 - 12:36 AM

also if you could explain how to make it so when say i press the build worker button it subtracts 10 res3 from the stockpile and could you make a readme tutorial to better explain how to do everything



add stuff in the obj_button_worker 'left pressed' event. here is an example of a button that builds a monk in my game and

//clicking effect - start
spr_state = 1;
alarm[0] = 1;
//clicking effect - end

//your own code to what happens when you press this button
if obj_building_template.make_progress = 0
{

if obj_resource_manager.res1 >= 100
{
obj_resource_manager.res1 -= 100;


if obj_HUD.target.is_built = true
{
    obj_HUD.target.make_power = 20;
    obj_HUD.target.make_object = obj_unit_monk;
    obj_HUD.target.make_time = true;
}
}
}

here it is again with a different unit:
//your own code to what happens when you press this button
if obj_building_template.make_progress = 0
{

if obj_resource_manager.res2 >= 100 && obj_resource_manager.res3 >= 10
{
obj_resource_manager.res2 -= 100;


if obj_HUD.target.is_built = true
{
    obj_HUD.target.make_power = 20;
    obj_HUD.target.make_object = obj_unit_bar2;
    obj_HUD.target.make_time = true;
}
}
}




not sure about your is_built problem.. how do you know what the target of the hud is? I'm guessing its not what you think it is at that moment.. but maybe you just need to add an is_built variable somewhere?

Edited by stumlehb, 01 September 2010 - 12:38 AM.

  • 0

#41 sub

sub

    EVIL GENIUS

  • GMC Member
  • 1905 posts
  • Version:GM6

Posted 01 September 2010 - 03:19 AM

for example it will say that the unit_hp variable for the enemies is not recognized, but I know that it is being used because I was able to kill some of those enemy units, before the error messages pop up for the same kind of unit later..

sounds like the unit was just destroyed in the last (or current) step. this problem often happens in a draw event for a unit HUD (or tracking a dead/destroyed target), since the draw event happens BEFORE the step event, if the enemy was killed (object destroyed) the code is still trying to reference that object.

i usually do something like this for drawing a HUD or referencing targeted units..

if not instance_exists(target) exit;
draw_text(x,y,target.hp);




to add 'height' in to your game introduce a z variable for units and structures. (z=1 is ground level, z=3 is 2 pixels above ground level, etc)

to see how this works,
just make a small demo engine thing, add 1 object, give it x,y values and give it a z value of 1 in the create event. add a keypress event for up and down.

up code = z+=1;
down code = if z>0 z-=1;

in draw event add this;
draw_sprite(sprite,0,x,y-z);
draw sprite_ext(sprite,0,x,y,image_xscale,image_yscale,image_angle,c_black,0.2);

^ that needs registered mode.. to work around that, just make a black shadow sprite and draw that (without using the alpha and angle setting)

Edited by sub, 01 September 2010 - 03:44 AM.

  • 0

#42 rude guss

rude guss

    GMC Member

  • GMC Member
  • 236 posts

Posted 01 September 2010 - 01:23 PM

i know you probably don't go and check the comments anymore but if you do i'm haveing a problem with one of the codes when i try to build a house

ERROR in
action number 1
of Mouse Event for Left Pressed
for object Obj_Button_House:

Error in code at line 7:
   if obj_HUD.target.is_built = true
                     ^
at position 20: Unknown variable is_built

also if you could explain how to make it so when say i press the build worker button it subtracts 10 res3 from the stockpile and could you make a readme tutorial to better explain how to do everything


WOW! i rarely check this thread (about 6 months since last time i checked). It can be quite difficult to understand how to do things, most things can be achieved by duplicating a specific object and then modifying variables in the create event, to make it what you want. I wont have a written help file/instuctions until most of the bugs are fixed in the engine (enough to run smoothly). If you want to know how to do something please keep asking questions.

By the way, you obviously didnt find it too easy to use, but do you have any other comments on the engine, or suggestions?

EDIT:
@sub, thanks for your help mate.
AND i also see your making an rts too? is it in response to my poor rts engine? if so, BRING IT ON! and let the best rts win! :D

Edited by rude guss, 01 September 2010 - 01:28 PM.

  • 0
Check out my Awesome 2d RTS Engine - It's Open-source, Unregistered and now has Multiplayer!!

#43 sub

sub

    EVIL GENIUS

  • GMC Member
  • 1905 posts
  • Version:GM6

Posted 07 September 2010 - 10:55 PM

you're welcome. i'm just a fan of the genre. also a friend has been using your rts engine so i thought i'd drop by.
  • 0

#44 Snopel

Snopel

    GMC Member

  • New Member
  • 61 posts

Posted 24 September 2010 - 09:08 PM

ok i got my other problem fixed but i just want to know how to make something like a watchtower that does'nt move but it shoots a ranged attack at enemies
  • 0

#45 stumlehb

stumlehb

    GMC Member

  • GMC Member
  • 200 posts

Posted 25 September 2010 - 05:49 AM

ok i got my other problem fixed but i just want to know how to make something like a watchtower that does'nt move but it shoots a ranged attack at enemies


Make a regular unit, but set them up with a ranged attack in the create event code, and set their movement speed to 0. they will stay in one spot and shoot enemies in any direction. you can add different animated attacks for each direction of attack, so a cannon can fire smoke out of the left window when shooting left, etc.

you may need to adjust something in the step event so that they always attack the nearest target rather than always attacking the first one they've seen. It was easy to change the enemy ai to attack nearest instead of attacking first seen, by removing one line in the step event, so I imagine it should be similar in the regular units step event. This is the line to remove from the enemy units step event in order to make them attack nearest(so that they switch to a closer target when their first target runs away):
if able_to_move = false && state = 0 && attack_target = 99 //setting target if doing nothing and enemy is close

If you want the tower to be buildable, you might need to mess with and look into the building templates as well.. you might be able to transfer some of the building code to the regular unit. or maybe you could transfer the attack code from the regular units into a copy of a building template.

Edited by stumlehb, 25 September 2010 - 05:56 AM.

  • 0

#46 thechronicler

thechronicler

    GMC Member

  • New Member
  • 39 posts

Posted 30 October 2010 - 08:39 AM

This is awsome material ::lmao::
  • 0
Chronicler, the storyteller
at CThome
Posted Image

#47 AwkwardAvenger

AwkwardAvenger

    GMC Member

  • New Member
  • 14 posts

Posted 22 December 2010 - 05:18 AM

Hey guys, I've been working on an rts for a little while now with this system and its going great! Just a question though... You said they're all pretty modular, well I've completely overhauled the enemy ai... but one thing i'm clueless to changing is the movement system... Mine is topdown so i want to change the 8 directions movement system to something along the lines of image_angle = point_direction and point_direction = the area they're moving to... But i have no idea where to make the changes...any help?
  • 0

#48 stumlehb

stumlehb

    GMC Member

  • GMC Member
  • 200 posts

Posted 23 December 2010 - 04:10 AM

Hey guys, I've been working on an rts for a little while now with this system and its going great! Just a question though... You said they're all pretty modular, well I've completely overhauled the enemy ai... but one thing i'm clueless to changing is the movement system... Mine is topdown so i want to change the 8 directions movement system to something along the lines of image_angle = point_direction and point_direction = the area they're moving to... But i have no idea where to make the changes...any help?


I would guess that you could put that in the draw event for each unit, but you'd want to change or remove the stuff that looks like this:
if direction > 247 && direction < 292 {draw_sprite(state_anim[state,0],-1,x,y);}
if direction > 292 && direction < 332 {draw_sprite(state_anim[state,1],-1,x,y);}
if (direction > 332 && direction < 360) or (direction >= 0 && direction < 22) {draw_sprite(state_anim[state,2],-1,x,y);}
if direction > 22 && direction < 67 {draw_sprite(state_anim[state,3],-1,x,y);}
if direction > 67 && direction < 112 {draw_sprite(state_anim[state,4],-1,x,y);}
if direction > 112 && direction < 157 {draw_sprite(state_anim[state,5],-1,x,y);}
if direction > 157 && direction < 202 {draw_sprite(state_anim[state,6],-1,x,y);}
if direction > 202 && direction < 247 {draw_sprite(state_anim[state,7],-1,x,y);}

You might also want to change the stuff in the create event for each unit , where it says:
/* initializing sprites */


edit:

I would have guessed that 'movement system' would deal with things like potential step vs grid based movement, which would be in the step events of each unit.

Edited by stumlehb, 23 December 2010 - 04:16 AM.

  • 0

#49 Schyler

Schyler

    Noskcirderf Derf

  • GMC Member
  • 2680 posts
  • Version:GM:Studio

Posted 23 December 2010 - 04:59 AM

The people look like Minecraft.
  • 0

#50 rude guss

rude guss

    GMC Member

  • GMC Member
  • 236 posts

Posted 25 December 2010 - 12:33 AM

The people look like Minecraft.


Hahaha, If anything, that guy copied me!! I made those graphics before minecraft was even started!! Im pretty sure that this thread is nearly 2 years old.

@AwkwardAvenger - About how you want to change the graphics, stumlehb is pretty much right.
  • 0
Check out my Awesome 2d RTS Engine - It's Open-source, Unregistered and now has Multiplayer!!