Topic:   A quick question...   (Read 13110 times)


0 Members and 1 Guest are viewing this topic.

WarHampster


  • GMG Extraordinaire

  • ***


  • Posts: 1501

  • The People's Moderator
    • Arcade of the Absurd
A quick question...
« on: April 06, 2008, 09:49:19 AM »
Alright, the first silver creator question topic :D

I've been wondering, would it be possible to make a RTS game with SC? I think that all of the health and armor of the units could be handled with a variation of the RPG engine, and the enemy AI could probably be easily coded to run straight at your units at first, and then run away when their health is low.

My problem lies in the movement of the units, however. How do I make it so after you select a unit and then click on a location, the unit moves there? That is easy enough to do with a simple MOVESPRITE x "whatever" MOUSEX, MOUSEY, but how can I make so the unit actually travels to that location, not just appears there?

Please help me with this, I think that it would make a very interesting project!  

Gnome


  • GMG Extraordinaire

  • ***


  • Posts: 1073
Re: A quick question...
« Reply #1 on: April 06, 2008, 11:23:37 AM »
Well I use GM, but I think you can use the Grid Nav (I think SC calls it Smart Nav) and code the grid to your advantage. and program battles if two sprites collide.
This Cannot be, NOOOOOOOO!!!!

-Gnomes Cry when the McRib was discontinued again.

EqwanoX


  • Administrator

  • GMG Extraordinaire

  • *****


  • Posts: 1180
Re: A quick question...
« Reply #2 on: April 06, 2008, 12:19:48 PM »
first of all this is way to complicated for a first project, but you could take the coordinates of the sprite and subtract it from the destination, then divide both the x and y coordinates by 5 and push the sprite 5 times

Silverwind


  • ^ This guy is amazing.

  • ****


  • Posts: 2805

  • For the glory of my maker
Re: A quick question...
« Reply #3 on: April 06, 2008, 03:15:39 PM »
Quote
Well I use GM, but I think you can use the Grid Nav (I think SC calls it Smart Nav) and code the grid to your advantage.
Yeah, but just to be clear: the Smart Nav is a grid navigation system written by Melvin for Silver Creator, and is not an adaption of any GameMaker grid navigation system. There was a little confusion over this awhile ago, and both myself and Melvin were in danger of being falsely credited.

The grid navigation systems for GameMaker are simply named Grid Nav V*version number*, and often abbreviated as just V*version number*. The latest Grid Nav for GameMaker is V6, which contains only a slight but drastically important change to the previous version. V5 was originally written in Silver Creator by EqwanoX and ported to GameMaker by myself. V6 was originally written in GameMaker by myself.

While the grid navigation systems considerably reduce the work in making tile based games, they're kinda hard to understand when you first attempt to grasp the code. I recommend starting off with a none tile based game, as it can be very discouraging if a problem occurs and you figure out how to fix it.

Also, welcome to the boards WarHampster. :)
« Last Edit: April 06, 2008, 03:17:54 PM by Silverwind »
I survived the spammage of 2007

WarHampster


  • GMG Extraordinaire

  • ***


  • Posts: 1501

  • The People's Moderator
    • Arcade of the Absurd
Re: A quick question...
« Reply #4 on: April 06, 2008, 07:40:28 PM »
This isn't my first SC project, I've made some test RPGs...
Anyway, would someone be willing to make a RTS movement engine for me? I would understand it if I could see the code.

EDIT: oh yeah I forgot, would it even be possible to make a RTS using the grid nav system? From what I understand, in the grid system the player sprite is standing still while the grid moves around him.. I can see that making programming enemy units hell.
« Last Edit: April 06, 2008, 07:42:49 PM by WarHampster »

Mystor


  • GMG-er

  • **


  • Posts: 696

  • I am the myst that consumes us all.
Re: A quick question...
« Reply #5 on: April 07, 2008, 02:07:01 PM »
It actually works the other way around :P

Mist
"I'll lie to him."
"And if that doesn't work?"
"Then I'll tell the truth. We're allowed to do that, in emergencies. We can't plan for everything, you know."
   -Colonel Graff, Ender&

Silverwind


  • ^ This guy is amazing.

  • ****


  • Posts: 2805

  • For the glory of my maker
Re: A quick question...
« Reply #6 on: April 07, 2008, 03:08:07 PM »
Actually, I think most SC grid navs use a character centered system. Hey Eq, how do you go about moving all the non-stationary sprites on the map, such as NPCs that walk around? Do you load them into position at whatever their spriteXYs are plus the value of a "screenoffset" variable?
I survived the spammage of 2007

WarHampster


  • GMG Extraordinaire

  • ***


  • Posts: 1501

  • The People's Moderator
    • Arcade of the Absurd
Re: A quick question...
« Reply #7 on: April 07, 2008, 04:39:34 PM »
<<-- yeah thats why I think programming enemy AI for an RTS in the grid system would be hell :P

EqwanoX


  • Administrator

  • GMG Extraordinaire

  • *****


  • Posts: 1180
Re: A quick question...
« Reply #8 on: April 07, 2008, 06:05:00 PM »
Quote
I've made some test RPGs...
youve only made tests, this is way to advanced for beginners.
Quote
Anyway, would someone be willing to make a RTS movement engine for me? I would understand it if I could see the code.
so you want us to make the game for you.
Quote
EDIT: oh yeah I forgot, would it even be possible to make a RTS using the grid nav system? From what I understand, in the grid system the player sprite is standing still while the grid moves around him.. I can see that making programming enemy units hell.

when you move:

if move =1 then
for x=1 to 10
if spritevalid(x)=1 then
pushsprite x, pushx, pushy, 1      
end if
next
end if

EqwanoX


  • Administrator

  • GMG Extraordinaire

  • *****


  • Posts: 1180
Re: A quick question...
« Reply #9 on: April 07, 2008, 06:09:21 PM »
Quote
Hey Eq, how do you go about moving all the non-stationary sprites on the map, such as NPCs that walk around? Do you load them into position at whatever their spriteXYs are plus the value of a "screenoffset" variable?
it works exacly the same as the main character sprite, each object has its own gridX gridY variables, and theyre moved or placed starting from the maps pixel coordinates like, so to move something to the 5, 5 grid space would be

let x=5*30
let y=5*30
movesprite character, spritex(map)+x, spritey(map)+y
« Last Edit: April 07, 2008, 06:12:30 PM by EqwanoX »

WarHampster


  • GMG Extraordinaire

  • ***


  • Posts: 1501

  • The People's Moderator
    • Arcade of the Absurd
Re: A quick question...
« Reply #10 on: April 07, 2008, 08:56:49 PM »
Quote

 so you want us to make the game for you.

no, I want you to make a sample of RTS movement for me... how will learn to be better at silver creator if I only make easy, simple games?

EqwanoX


  • Administrator

  • GMG Extraordinaire

  • *****


  • Posts: 1180
Re: A quick question...
« Reply #11 on: June 10, 2008, 08:46:29 AM »
Quote

no, I want you to make a sample of RTS movement for me... how will learn to be better at silver creator if I only make easy, simple games?
(havent read this topic in a while) i think i might have one, i'll i'll upload it
« Last Edit: June 10, 2008, 08:47:44 AM by EqwanoX »

WarHampster


  • GMG Extraordinaire

  • ***


  • Posts: 1501

  • The People's Moderator
    • Arcade of the Absurd
Re: A quick question...
« Reply #12 on: June 10, 2008, 09:52:03 AM »
Too late, I made my own :P

Silverwind


  • ^ This guy is amazing.

  • ****


  • Posts: 2805

  • For the glory of my maker
Re: A quick question...
« Reply #13 on: June 10, 2008, 10:11:40 AM »
Cool. Did you make a game out of it?
« Last Edit: June 10, 2008, 10:11:59 AM by Silverwind »
I survived the spammage of 2007

WarHampster


  • GMG Extraordinaire

  • ***


  • Posts: 1501

  • The People's Moderator
    • Arcade of the Absurd
Re: A quick question...
« Reply #14 on: June 10, 2008, 11:03:16 AM »
It's going into my battle system.