SpaceWar - WIP - name to be changed

Dear codeans,

Today I decided to start programming a bit more again, so I started a project which will take a while to complete, and on which I’ll work once or twice a week (since I am still busy with school etc)

Now, I will not be sharing any code soon, I first want to have it in a state that is acceptable to play.

What I am trying to do: you’re a cadet who just came out of space-academy, and you get a chance to be captain of your own spaceship for 1 mission (plot may change)

so the player controls a spaceship, the ship has shields which are visually seeable in the game (video further). The shields can be hit seperatly and will degrade over time untill they collapse and leave a part of your ship vulnerable (which you can avoid getting hit by turning your ship in such fashion that the open shield is never facing the enemies.

I might also make a local multiplayer (1 ipad, 2 players) where players fight against (or maybe even WITH) eachother.

Now why do I need input from the community you ask?
Well, I always like to hear people their opinions about how some feature can enhance the players experience, how controls might feel better etc

so let’s first watch this small video of what I’ve got so far:

http://youtu.be/sepbdFk7Itc

so let me explain: on the left side of the screen, you can get the slider joystick which controls the rotation of the ship

On the right side, there’s a button which controls the movement (in other words: forward when you press it)
this button has a ‘retry’ thingy because I had this sprite planned for something else but ended up not using it

on the bottom left, you can see this weird circle, for now that’s just pointing the red circle in the same angle as the ship, but will probably become a health-bar instead

The things I need some help with for now is: What kind of movement would be better…?
rotation: 1) a slider as it is now, fixed/loose 2) 2 buttons (left/right) 3) some kind of steering wheel

movement: 1) a button 2) a vertical slider 3) fixed movement, player does nothing

shooting: 1) a button 2) just press the right side of the screen

edit: another option would be a normal joystick, for example: when ship’s pointing down, and you move the joystick up, it would move forward while making a rotation to the ‘up’ position

If you have any further suggestions, please comment, I like feedback alot :slight_smile:

thanks guys :slight_smile:

@stevon8ter Your video doesn’t show on the forum, but I was able to view it off the forum. Looks interesting.

@dave1707 yes I noticed :confused: there’s probably some html I need to do for it to show up or so, idk :stuck_out_tongue:
edit: fixed it

and thx

Controls: Instead of a slider and a button, i would prefer a joystick. You don’t move if it isn’t active, but if it is you move in the direction of the stick.

I did a joystick library once, not much else got put into it :)) Anyways, the code is here: http://codea.io/talk/discussion/6124/utility-on-screen-controls-library
I think its ok to use, but anyways the params are set in the init function(x,y,mode) and the draw function is simply to draw the joystick, but it also returns either the rotation between the origin and the touch or the normalized vector in the direction of the touch,depending on the mode. 1 is the vector, 2 is the rotation. The touched function should be called in touched, of course, and accepts the one parameter as the touch. Anyways, you might not need this, but I wanted to provide it anyways
:)>-

@TheSolderKing thx, looks really nice and might be usefull in another project, but I decided to do a square joystick so that I still have control about forward/backwards and rotations with 1 joystick :slight_smile:

@stevon8ter Also, if you want an example of a space game, I made a HORRIBLY INEFFICIENT multiplayer space game…I neglected to ever improve the code but it’s still functional. Here is the code: http://codea.io/talk/discussion/5677/multiplayer-space-game

@TheSolderKing yeah I saw that game, and hey, it’s a decent game :slight_smile:

Tho I already have alot planned and put some thoughts down on paper, it’ll mainly be all about singleplayer (because we can’t easily integrate real time multiplayer :frowning: ) and just some local multiplayer to enjoy playing with a friend/family-member

@everyone, idk if I need to make a new thread for this or not, but I kinda have a question… I am considering about making it 2.5D kinda, meaning that the controls would be the same but the ship would be looked at from an angle, what would be the best aproach to this? I was thinking of having 4 pictures (left, right, front, back) in perspective, tho since the ship can move at all 360 angles, it’s not going to be that simple… Is there perhaps a way to do this with transformations and 2 sprite overlapping or so?

EDIT: I think the term I was actually looking for was isometric view and not 2.5D (if this makes any difference at all)

EDIT2: http://imgur.com/qDUxCCI this is a quick drawing I made to explain what I’m kinda looking for, so you see the translation from top to isometric (?)
I am thinking that this should be possible by having a shader adjust a picture of each side, on the hand of the angle it’s supposed to be at, I am not asking/begging for code btw, I am just wondering if any of you see this as possible, if not, I’ll just have to abandon this idea and get back to creating it in 2D (which should still be fine?xd)

Thanks, I quite liked that game myself actually. Take a look at crossy road, if those are not sprites I’m willing to bet that they are 3d models rendered from the side. Perhaps you could do that - render a mesh and display it in isometric view, rotating it as needed? Just a thought but that makes everything extremely difficult and makes it so the potential for good pixel art is a bit less.
I can help you if you want to make the model in blender or something, you might’ve seen my object converter and you can definitely use that. Although I for one prefer top-down games(Im a strategy nut) or platformer-view(gunpoint is a great example of a modern day platformer-play it and say it’s for “reference material” if anyone asks :D). I for one prefer straight up 2d but I’m not a graphics guy. I play Dwarf Fortress. Yeah.
Anyways, you gotta know your audience. If this is for you, do what you like.
If you have any questions concerning vector math, straight up math, or tables-let me know. That’s about all I’m really good at, and I’m sure you know more than me :stuck_out_tongue: but I still would love to help-looks like a fun project. Good luck!
TheSolderKing

@TheSolderKing well if I ever need someone, I’ll be sure to contact you ;p tho my math’s pretty decent so won’t be needing any help on that soon

I myself quite enjoy the 2D aspect of what it is now, but a friend suggested I should look into making it 2.5D, but I think it’s going to be way easyer to do straight 2D and hey… if I put some work in it, the result will still be nice :slight_smile:

and yes TheSolderKing, it’s a fun project, tho there’s a lot of tedious stuff, and it’s not something that will be finished in a month probably, I just hope I can actually finish something this time :stuck_out_tongue:

I know what you mean @stevon8ter…with school and skiing this Winter I barely have the time to finish a single project :stuck_out_tongue:
Back to the project, I think it would be extremely cool if there were ways to upgrade the ships. For example, I was working on a game in Java that was an online battle arena where you got to choose your stats beforehand, with a set number of upgrade points, and after that got to fight each other. Now, your game obviously won’t be online, but maybe you could implement the stats system? Speed for, well, speed, strength for attack strength, something like that?
Just a thought.
TheSolderKing

@TheSolderKing, I’ll might make a document on how I have everything planned, I think you’ll be pleased xD right now however, it is 3am so time for me to sleep

I’ll try working on the game a bit tommorow, and yeah… I’ll just see how it goes xd

@stevon8ter the code seems to be a bit broken but the player seems to work. Also it shouldn’t be hard to pull out what you need from it.

http://pastebin.com/R0d9iQxz

@luatee wow thx, that’s alot of code, I’ll certainly look into it if needed :slight_smile: thanks :slight_smile:

There is another thing by @npryce posted a long time ago. This is the github repository if you wanna look a bit of code : https://github.com/npryce/codea-planet-battle

@HyroVitalyProtago thanks, I’ll take a look at it tommorow, it’s to much work to copy each lua file seperatly, so it’ll be easier to do that on the pc xD But I’ll take a look at it thx

Tho I’m still going to try and do all the coding myself

I’m really determined to finish this project, even this determined that I worked 2 hours in photoshop just to get the menu done :stuck_out_tongue: As in the background etc, not even a working menu yet, but I’m really gonna do my best to have this finished one day, be it next year, or in 10 years xD

I don’t like double posts, but I have to add some documentation to this thread, these are my plans with this project

project spaceWars

  1. name
    the name will change, that’s for certain

  2. genre
    the game will be all around… guess what… War in space

  3. gameplay

  • What this game basicly will be, is an rpg which finds place in space, more specifically, in space ships.
  • You will have to do a tutorial first, which will be called ‘academy’ or something in the likes
  • You will then have to fly out to protect you headquarters and destroy rival species
  • The game will have several quadrants, which each are going to be bigger than the screen, you will travel to another quadrant when reaching the edge of the one you’re in.
  • You have quests to pick up and complete in your headquarters and outposts
  • in the outposts/hq, you can buy new ships, better weapons, modify your ships weapons and modules (extra shielding, cloak, …)
  • the better your ship, the more weapon/module slots it’ll have, weapon slots indicated on the sides of the ship, will be fired from the sides of your ships, so play it tacticle
  • your shields are divided in sections, each with its own ‘hp’
  1. The plot
    unknown for now, this will come along while I start adding quests etc

  2. Release date
    This is a huge project, I realise this, I’m also busy with school and real life, I will not pressure myself to have a release date
    This may take ‘only’ a year, maybe less, maybe more, I cannot give any estimations

  3. art
    I am terrible at making game graphics, and thus will be using free game assets for now, as a friend is willing to make some graphics, but this’ll take time as well

Thanks for your interests and time to read this

I really hope I’ll be able to finish this one day, I am not going to update this post awefuly lot, as I know how annoying it could get sometimes, you will see me update this more than enough to see decent progress tho, don’t worry ;p

I had a little bit of time so far and thus decided to create a main menu etc, it’s not alot, and it’s not ‘important’ code so I don’t mind sharing it with you, don’t have a video of it, but you can just run this in a project

supportedOrientations(LANDSCAPE_ANY)
displayMode(FULLSCREEN)
function setup()
    http.request("http://pastebin.com/raw.php?i=pdxesGYT",
        function(d) loadstring(d)() setup() end,
        function(e) print(e) end
    )
end

any suggestions about improvements/optimalisation are welcome, don’t mind the uglyness of the menu, I didn’t have an awful lot of time to create pictures (the background itself is from google, the frames I made myself, but they didn’t really succeed xd)

edit: if you get an error about sprite, just press the play button again, I didn’t feel like making a decent image loading xd

Ok guys, first of all, don’t mind me talking, I just need this discussion to have something to see my progress on xD

secondly, I had a little bit more time, so I created a custom font class so that I can use the font you see in the title thing, and I worked a bit on the menu

Here’s a quick little video of what it’s looking like, I wouldn’t mind any opinions about the menu itself and the popup thingy :slight_smile:

edit: derp, forgot to paste the link xd

http://youtu.be/V0DRN21Inkc

@stevon8ter are you still interested in doing an isometric projection? A week or so ago I posted on using an orthogonal projection with the 3D camera, which could be the effect you’re after. If you search for orthogonal it’ll come up