theSchap
|
|
« Reply #80 on: November 29, 2012, 07:57:16 PM » |
|
Great tutorial! I feel like I've learned a lot about Gamemaker through it. I'm going through this and trying to prevent the ship from spawning inside of a wall or enemy, and running to some trouble. Here is my revive code now. // Revive the player if he dies if (not instance_exists(oPlayerShip)) { if (reviveTimer > 0) reviveTimer -= 1; if (place_empty(view_xview[0]+64, view_yview[0]+reviveY)) { instance_create(view_xview[0]+64, view_yview[0]+reviveY, oPlayerShip); } else { reviveY += 32; } } else { oPlayerShip.x += 1; } My only thought is that because this code is running from the oGame object, there is no sprite for the check to use? I'm not sure if this is the right function to use, or if I need to incorporate similar code within the player object. It seems like I could do it here. Any help would be appreciated.
|
|
|
Logged
|
|
|
|
PogueSquadron
|
|
« Reply #81 on: November 30, 2012, 10:06:31 AM » |
|
I'm hoping to tackle this tutorial pretty soon. My pre-emptive question is - where do I go after this? Should I maybe find a tutorial that gears more in the direction of a kind of game I'd want to make in the future?
This series has been great for the basics. If, say, I want to make more of a top down Zelda/Secret of Mana type game, should I maybe look for tutorials that look at the basics of those kinds of games?
|
|
|
Logged
|
|
|
|
Code_Assassin
|
|
« Reply #82 on: November 30, 2012, 10:30:11 AM » |
|
I'm hoping to tackle this tutorial pretty soon. My pre-emptive question is - where do I go after this? Should I maybe find a tutorial that gears more in the direction of a kind of game I'd want to make in the future?
After you take about another 2-3 tutorials on Game Maker(similar to this one) then you should be able to make a basic game(something like Space Invaders) by yourself. After you've done more small projects and finished them to completion (start small go big) , then you should attempt to make a Zelda-like. IMO taking too much tutorials on how to make games isn't very good and can really limit your problem solving skills. Also get familiar with the Manual and the Documentation, they are really helpful!
|
|
|
Logged
|
|
|
|
PogueSquadron
|
|
« Reply #83 on: November 30, 2012, 01:16:51 PM » |
|
Finished the tutorial and managed to add a "Victory" state. When all of the enemies have been destroyed, then the state changes so that some text displays, and the player can press X to return to the title.
Here's a question if any one can help. I'm attempting to make a similar little game, this time having the ship face the top of the screen and fire upwards, Space Invaders style. What I'd like to do is have a little 'intro,' where the ship moves from below the screen to a certain point in the room. Then, I'd like the player to be able to take control. I suppose it wouldn't be unlike in a jRPG when a character is moving around in a cutscene, outside of the player's control? Would I want to accomplish this using a state?
That is, should I have an "INTRO" state that has its own set of rules, or is there an easier way to accomplish this?
|
|
« Last Edit: December 08, 2012, 03:25:47 PM by PogueSquadron »
|
Logged
|
|
|
|
JDM
|
|
« Reply #84 on: December 10, 2012, 12:37:51 AM » |
|
My solution would be to have either a scripted initial state (or depending on its complexity, multiple states) that transitions to player control, or create a dummy object that does the movement and animation you want, destroys itself, and creates that actual player object.
If you have a lot of objects that act according to whether or not the player object exists, that last option may be annoying to implement (been there!).
|
|
|
Logged
|
|
|
|
s0
|
|
« Reply #85 on: December 10, 2012, 02:56:11 AM » |
|
My only thought is that because this code is running from the oGame object, there is no sprite for the check to use? place_empty doesn't need a sprite if that's what you mean.
|
|
|
Logged
|
|
|
|
nekokoneko
Guest
|
|
« Reply #86 on: December 30, 2012, 11:16:15 AM » |
|
Really enjoyable to work through and i've been trying to wrap my head around each little piece works in conjunction with one another.
I've been tinkering with little movement related things and have got a dash working but i'm having trouble adding speed relative to player location. I could get this working with some ghetto approach using invisible walls setup within the room to trigger speed increases but i want it to be more fluid and per pixel.
In short, the further along the screen (view not room) the faster i want the player to go (xview and oplayership.x)
But i can't seem to work out how to check the player objects location within the view? Will i need to use a script similar to calculating where to draw text or is there a command im completely missing thats already giving out where the player is.
|
|
|
Logged
|
|
|
|
raczosala
Level 0
|
|
« Reply #87 on: January 03, 2013, 09:10:22 AM » |
|
I've been reading and playing with this series of tutorials during this week. Great work! I'm having some trouble running this tutorial. In object oInit, event Create, action 1 at line 2: Unkown function or script: font_add_sprite any help on this? can't find anything on google.
|
|
|
Logged
|
|
|
|
theSchap
|
|
« Reply #88 on: January 03, 2013, 11:17:45 AM » |
|
Make sure your font is named properly, and that you aren't using the lite version as font_add_sprite isn't available.
|
|
|
Logged
|
|
|
|
raczosala
Level 0
|
|
« Reply #89 on: January 03, 2013, 11:47:06 AM » |
|
Hi,
What you mean lite version? I'm running this tutorial on GameMaker: Studio™ v1.1.750
I didn't modify the source, just ran the game and the compile error occurs.
|
|
|
Logged
|
|
|
|
Code_Assassin
|
|
« Reply #90 on: January 03, 2013, 11:57:45 AM » |
|
When he says lite - he means the free version of Game Maker.
|
|
|
Logged
|
|
|
|
raczosala
Level 0
|
|
« Reply #91 on: January 03, 2013, 12:24:13 PM » |
|
ooh I didn't know that. I thought GameMaker Studio would have that feature, well thanks for your reply guys.
|
|
|
Logged
|
|
|
|
theSchap
|
|
« Reply #92 on: January 04, 2013, 07:53:38 AM » |
|
Yeah, sorry I didn't clarify more. I don't know the ins and outs of their pricing structure, but I believe you need Pro for that function.
|
|
|
Logged
|
|
|
|
JonathanO
|
|
« Reply #93 on: January 06, 2013, 06:25:53 AM » |
|
globalvar myFont = font_add_sprite(sFont, ord(" "), 0, -1);
This line gives me errors. I have eliminated it down to have just this one line in my oTitle and nothing in oInit. I wonder if the function has changed or something. The error is a runtime error that says "Unsure where these come from" I have a sprite called sFont with all the fonts characters as different frames in the animation. All 59 from ' ' to 'Z'
Thanks in advance.
|
|
|
Logged
|
|
|
|
sealionnn
Level 0
dude
|
|
« Reply #94 on: January 06, 2013, 06:43:08 AM » |
|
Hey, how would I shoot the bullets in 8 directions? Ex: (in degrees) 0, 45, 90, 135... I can't figure this out for the life of me.
|
|
|
Logged
|
|
|
|
Ant
Guest
|
|
« Reply #95 on: January 06, 2013, 06:55:37 AM » |
|
^ i=0; repeat 8 { obj = instance_create(x,y,Bullet); obj.direction = i; obj.image_angle = i; obj.speed = 10; i += 45; }
|
|
|
Logged
|
|
|
|
JonathanO
|
|
« Reply #96 on: January 06, 2013, 02:40:00 PM » |
|
You never say where the following code comes form:
// Revive the player if he dies if (not instance_exists(oPlayerShip)) { if (reviveTimer > 0) reviveTimer -= 1; else instance_create(view_xview[0]+32, view_yview[0]+112, oPlayerShip); }
You should put a not in about the revTimer
|
|
|
Logged
|
|
|
|
Glyph
|
|
« Reply #97 on: January 06, 2013, 02:50:09 PM » |
|
globalvar myFont = font_add_sprite(sFont, ord(" "), 0, -1);
This line gives me errors. I have eliminated it down to have just this one line in my oTitle and nothing in oInit. I wonder if the function has changed or something. The error is a runtime error that says "Unsure where these come from" I have a sprite called sFont with all the fonts characters as different frames in the animation. All 59 from ' ' to 'Z'
Thanks in advance.
I think you need to declare it separately: globalvar myFont; myFont = font_add_sprite(sFont, ord(" "), 0, -1);
|
|
|
Logged
|
|
|
|
aberrantmind
|
|
« Reply #98 on: March 03, 2013, 09:50:42 PM » |
|
Great tutorial Derek! Went through all 4 parts today. I've got powerups figured out, next thing I'm working on is getting the enemies to do something other than stand there waiting to be crashed in or shot at. My 5yr old son drew the enemy ships.
|
|
|
Logged
|
|
|
|
soundlust
|
|
« Reply #99 on: March 10, 2013, 09:37:57 PM » |
|
It seems the, font_add_sprite doesn't work in the free version? Unless I'm doing something terribly wrong. Anyone else having this problem?
|
|
|
Logged
|
|
|
|
|