Game Maker's Garage Forum
Game Creation => SilverCreator => Topic started by: WarHampster 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!
-
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.
-
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
-
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. :)
-
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.
-
It actually works the other way around :P
Mist
-
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?
-
<<-- yeah thats why I think programming enemy AI for an RTS in the grid system would be hell :P
-
I've made some test RPGs...
youve only made tests, this is way to advanced for beginners.
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.
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
-
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
-
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?
-
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
-
Too late, I made my own :P
-
Cool. Did you make a game out of it?
-
It's going into my battle system.
-
how many allies and enemies does yours support? do they obay bounries on the map?
-
For allies I made a kind of unique system. Because I don't think that silver creator will let me draw a box around units to select them, when the battle starts you assign units to squadrons which all move and attack together. You select which squadron to move by clicking a button, and then clicking on the map. The engine can only support as many allies/ enemies as SC supports sprites (50 I think?) so that is the only limitation there. I'm still working on boundaries... the game likes to crash when ever you walk into something.
-
are there movements limited or do you move them anywhere in just one click
i found the demo i made, im cleaning up the code i'll try to post it tomarrow, it supports 2 allies, 3 enemies, so 5 characters on screen all together, their turn is selected at random, you move them with the keyboard up to 10 spaces (which can easily be edited) and you attack by walking into the enemies, its still kind of primitive but it was hard to do