4 replies [Last post]
matabhaine
User offline. Last seen 1 year 51 weeks ago. Offline
Joined: 01/19/2017
Posts:

Firstly; not sure what this is. It came up when I clicked add new comment.

warning: Creating default object from empty value in /mounted-storage/home78c/sub005/sc43242-LIOJ/tallstudios.com/modules/forum/forum.module on line 220.

Well, after a slow start, I have managed to make a small asteroids type game. I am starting to even troubleshoot my own mistakes.

Q1 I would like the player to rotate left and right and thrust forward (If needed). When I press the thrust button, the player just goes up-screen regardless of which way the nosecone is facing and I do not want any reverse. I might have selected the wrong settings during the wizard setup. I wanted an old school 2D game. Probably selected cursor movement by mistake. I have tried to correct this. Also, is there a hyperspace type command, after the player dies, it starts dead centre, surrounded by all the other asteroids I failed to hit.

Q2 Lastly, do I need to use a specific codec when adding music. I added a song but it doesn't show up in level settings. I tried it in wave, mp3 and ogg formats. I created new music and named it Music - Goblin it shows up in sound editor at the bottom of the list but not in the level editor.

Thanx.

Tall Karen
User offline. Last seen 17 weeks 4 days ago. Offline
Joined: 02/26/2011
Posts:
Hi matabhaine,Thanks for

Hi matabhaine,

Thanks for letting us know about the website warning. We'll look into that. :/

I'm pleased you've made an asteroids style game and are starting to become more familiar with the Kit.

You can get the player movement you want by changing the Player Definition to Rotate 2D (you will find this on the General tab for the player). This does allow reverse movement. To stop this, select Player Definition on the Define menu window and then select Rotate 2D to open it. Scroll down to the bottom to find the controls. If you change Left Analog -Y to Unused the player will not reverse.

At the moment we support the ogg format for music. What isn't clear enough is that it is a 3 step process. It seems that you have copied the audio file into the correct location and the sound editor can see it. What you also need to do is create a new Sound Item which describes the audio. For music, make it a 2D sound type and set the Loop and Stream checkboxes. The final step is to create a new Sound Cue. A Sound Cue can be used to group together Sound Items to play randomised explosions, for example. In your case you probably just want to play a single music track. The Sound Cue will be selectable in the level settings.

We will add an option for automatically creating the Sound Cue, like we have done with the Sprite Editor where it can automatically create the Entity.

Thanks,
John

matabhaine
User offline. Last seen 1 year 51 weeks ago. Offline
Joined: 01/19/2017
Posts:
Rotate 2d

I have selected '2D game' in the wizard setup but when I select 'rotate 2d' the player corkscrews when the left or right keys are pressed. I used 'rotate' and it works now with reverse button unused.
It still requires some sort of random re-spawn, as soon as the player re-spawns it is blown up instantly by the asteroids. Also, is it possible to combine player definitions as the player is too slow to rotate. I used a 'default fast' definition so the ship could turn about fast enough but as you know I couldn't thrust forward with that.
The music now works a treat thanx.

Matt.

Tall Karen
User offline. Last seen 17 weeks 4 days ago. Offline
Joined: 02/26/2011
Posts:
Rotate 2d

You can change the player movement speed by editing the Player Definition. Increase Rotation Acceleration, Rotation Brake and Max Rotation Speed to increase the rotational speed, or Acceleration, Brake and Max Acceleration to increase the linear speed.

Random respawn is a great suggestion and we will discuss the best way to implement this. In the meantime you can set Time Invulnerable in the Player Definition which will prevent the player from being harmed for the set number of seconds after a respawn.

Thanks,
Karen

matabhaine
User offline. Last seen 1 year 51 weeks ago. Offline
Joined: 01/19/2017
Posts:
Thanx

Thanx