Gibbo3771
|
 |
«
Posted
2014-02-26 17:14:10 » |
|
I though I would go ahead and post what I am working on at the moment, currently as it stands it is just mainly working on an engine to work with. The main reason for working on this project is to practice engine design, file input and output and try to wean myself off the habit of looking for a "do everything" library, if that makes sense. I am currently using: LibGDXBox2D Physics Engine Pickup Test Level What is Code15?
Update 13/03/2014 - I have been brainstorming over the past week or so and I think I have a general idea of the story/setting, I am constantly writing down new ideas and putting them all together, here is a little teaser of the opening script for the tutorial/first level that fits in with what I have so far:
"Welcome subject, to the Code 15 Testing Facilities, please follow the instructions carefully so we can complete a medical and motor skills test.
*Controls intro*
Test complete, it seems you have not suffered any brain damage, congratulations you will not be euthanized today. Let us hope that you will last, it is notoriously difficult to extract new ones from their tube without causing severe damage.
Please follow the path to the next area, please, try not to trip and die.
To be continued....
Cheesy right ^ you can probably guess where it is going.
Currently as it stands, not much! However I can describe what it WILL be so you can picture it. It will be a top down shooter/puzzle game, imagine fast paced levels with lots of things going "boom", plenty of enemies to kill and different weapons to pickup/use.
All complete with Box2D physics, such as grenades exploding into many little bodies and damaging the environment, I aim to create semi-destructible levels, as in the boundary/walls themself will be unbreakable but anything else should be able to get destroyed.
With all this I want to implement fast paced, think on your feet puzzles, disarming bombs, collecting keys in order to progress etc etc.
Over all I have a plan, all wrote down and a design in mind. However I am keeping it SIMPLE as possible at first, I expect to have a playable level within a month (according to my time frame) with basic functionality such as collecting items, enemies etc etc.
What is currently done?
Currently I have focused on mainly coding a level loader (that I was intended to only practice with...) but last night I brain stormed and decided to make a project off it. - Done!
The level loader is simple, I could easily use Tiled but decided not to. At the moment the level loader is capable of loading a level of any size from an image file (each pixel = 1 box2d unit). That sounds boring right? Kind of is, however sort of proud that I actually managed that.
Oh and it also creates and places Star Trek doors at the appropriate locations complete with bad ass sliders and sensors! That I am proud of. Anyway...
What I am working on the now26/02/2014 - At the moment I am working on the core engine of the game while still trying to give myself visual progression, I have implemented working sliding doors and will most likely leave it as is for now and perhaps start working on player state and control system. So lets go with that, state/player controller. 13/03/2014 - Currently working on creating some levels using what code I have so far, although the level loader is complete I am most likely going to create a class that controls the config loading, as to keep the level loader class tidy. Will also be drawing some other sprites on the side and implementing more guns and items, I also have a bad ass throwable explosive concept planned on paper21/03/2014 - Properly coding a way to create, spawn and manage entities. Oh and I sort of need to actually create entities, I have no enemies at the moment. I am also working on a path finding demo, that allows you to create your own level of walls and doors and set an entity start point and end point, and watch them work their way across the map  Controls- WASD - Move
- Arrow Keys - Open respected doors
- O - Open all doors
- C - Close all doors
For now I present you with a Door Test Simulation: OLDDownload - BitbucketDownload - DropboxThe code is currently not going to be available until I develop further.
|
"This code works flawlessly first time and exactly how I wanted it" Said no programmer ever
|
|
|
JVallius
|
 |
«
Reply #1 - Posted
2014-02-26 19:29:04 » |
|
Download is not available without logging in BitBucket.
|
|
|
|
Gibbo3771
|
 |
«
Reply #2 - Posted
2014-02-26 19:51:29 » |
|
Download is not available without logging in BitBucket.
Will provide dropbox link, also implemented some visual graphicsso it's no longer Box2D debug stuff.
|
"This code works flawlessly first time and exactly how I wanted it" Said no programmer ever
|
|
|
Games published by our own members! Check 'em out!
|
|
trollwarrior1
|
 |
«
Reply #3 - Posted
2014-02-26 20:01:26 » |
|
I think you need to change your profile photo
|
|
|
|
Gibbo3771
|
 |
«
Reply #4 - Posted
2014-02-26 20:08:35 » |
|
I think you need to change your profile photo Yours appears to be missing :p
|
"This code works flawlessly first time and exactly how I wanted it" Said no programmer ever
|
|
|
scanevaro
|
 |
«
Reply #5 - Posted
2014-02-26 20:10:51 » |
|
I think you need to change your profile photo yes please haha
|
|
|
|
trollwarrior1
|
 |
«
Reply #6 - Posted
2014-02-26 20:17:11 » |
|
I think you need to change your profile photo Yours appears to be missing :p lol not 
|
|
|
|
VIrtueeL
|
 |
«
Reply #7 - Posted
2014-02-26 21:35:13 » |
|
this is really cool =D
|
|
|
|
matheus23
|
 |
«
Reply #8 - Posted
2014-02-26 22:32:00 » |
|
Works quite nicely, the doors open just like they should be. It ran perfectly fine on linux. One thing that didn't work so well was pressing "W" and "D" at the same time. I couldn't be playing a top-down game if that wasn't possible!  Another thing is the reactivity. It's okay that the player takes some time to walking, but I think the effect is too slippery. And I also agree to the profile picture. I don't quite like it either. It's kind of .. uhh... distracting ^^
|
|
|
|
saucymeatman
|
 |
«
Reply #9 - Posted
2014-02-26 22:46:30 » |
|
Here is a little tip for file hosting with dropbox.
If you have a link your giving out, to a folder or file, try adding a ?dl=1 to the end of the link. It will automatically start downloading the file(s) and not link the person to the dropbox web pade with the big button that sais download.
Not that clicking the Download button is much of a hassle, but it is nice having it forcedownload.
|
|
|
|
Games published by our own members! Check 'em out!
|
|
Opiop
|
 |
«
Reply #10 - Posted
2014-02-26 22:53:52 » |
|
I'm pretty sure most links automatically download anyway. I had a game launcher that downloaded files from Dropbox, so it obviously couldn't click Download, but it still worked.
|
|
|
|
Gibbo3771
|
 |
«
Reply #11 - Posted
2014-02-27 08:16:02 » |
|
Works quite nicely, the doors open just like they should be. It ran perfectly fine on linux. One thing that didn't work so well was pressing "W" and "D" at the same time. I couldn't be playing a top-down game if that wasn't possible!  Another thing is the reactivity. It's okay that the player takes some time to walking, but I think the effect is too slippery. And I also agree to the profile picture. I don't quite like it either. It's kind of .. uhh... distracting ^^ The movement needs tweaking, I just slapped some if statements in there to get it going. Yeah, he is supposed to sorta speed up to a running pace then slow down quickly, needs fine tuning. The entire thing is WAAAAYYY off being a game it is a work in progress  @all about picture I had one with a monkey throwing shit at the camera, could be worse...
|
"This code works flawlessly first time and exactly how I wanted it" Said no programmer ever
|
|
|
wessles
|
 |
«
Reply #12 - Posted
2014-03-03 01:12:57 » |
|
Here is a tip for smooth movement: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
| public void update() { boolean key_left, key_right, key_up, key_down;
if(key_left) velocity.x += (-1); if(key_right) velocity.x += (1); if(key_up) velocity.y += (-1); if(key_down) velocity.y += (1);
x += velocity.x; y += velocity.y;
velocity.scale(.9f);
if(velocity.x < 0.0001) velocity.x = 0; if(velocity.y < 0.0001) velocity.y = 0; } |
Smooth movement guaranteed. 
|
|
|
|
Jimmt
|
 |
«
Reply #13 - Posted
2014-03-03 01:14:16 » |
|
Here is a tip for smooth movement: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| public void update() { if(key_left) velocity.x += (-1); if(key_right) velocity.x += (1); if(key_up) velocity.y += (-1); if(key_down) velocity.y += (1);
x += velocity.x; y += velocity.y;
velocity.scale(.9f); } |
Smooth movement guaranteed.  How does this make any sense, your character just constantly accelerates to inifinity.
|
|
|
|
Opiop
|
 |
«
Reply #14 - Posted
2014-03-03 01:15:18 » |
|
I think that's the point 
|
|
|
|
wessles
|
 |
«
Reply #15 - Posted
2014-03-03 01:23:10 » |
|
Isn't that the question, Jimmt?sorta-ish-kinda-relevantgood read thoYou will constantly be going at 90% of the speed of the last frame, so if you just tapped the button, the speed would go from 1, to .9, to .81, until one second has passed and it is only .9^60 = 0.00179701029. And that will just get smaller. That dampening will get it down to lower than 0.00001. At that point you would not even see the movement. If you really want, add this: 1 2 3 4
| if(velocity.x < 0.0001) velocity.x = 0; if(velocity.y < 0.0001) velocity.y = 0; |
wait, did I typo?!
|
|
|
|
BurntPizza
|
 |
«
Reply #16 - Posted
2014-03-03 01:29:36 » |
|
@wessles, I think Jimmt meant the speed is unbounded if the button is held down. How 'bout a logistic acceleration curve (note, completely untested, don't know how it would look): 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| public void update() {
if(key_left) velocity.x -= 1; if(key_right) velocity.x += 1; if(key_up) velocity.y -= 1; if(key_down) velocity.y += 1;
velocity.x = MAX_VELOCITY/(1 + (MAX_VELOCITY - 1) * Math.exp(-ramp * Math.abs(velocity.x))); velocity.y = MAX_VELOCITY/(1 + (MAX_VELOCITY - 1) * Math.exp(-ramp * Math.abs(velocity.y)));
x += velocity.x; y += velocity.y;
velocity.scale(.9f); } |
edit: fixed some things that didn't make sense
|
|
|
|
wessles
|
 |
«
Reply #17 - Posted
2014-03-03 01:32:25 » |
|
@wessles, I think Jimmt meant the speed is unbounded if the button is held down.
Well, collision aside, isn't that the case with most games? Also, yes; curviness is fun as well.
|
|
|
|
Jimmt
|
 |
«
Reply #18 - Posted
2014-03-03 01:46:09 » |
|
@wessles, I think Jimmt meant the speed is unbounded if the button is held down.
Well, collision aside, isn't that the case with most games? No, the player may keep moving but it doesn't keep accelerating.
|
|
|
|
wessles
|
 |
«
Reply #19 - Posted
2014-03-03 01:48:53 » |
|
Whoops! That was deceleration  . Actually, acceleration is only the rate at which the velocity changes, never specifying a decrease or increase.
|
|
|
|
BurntPizza
|
 |
«
Reply #20 - Posted
2014-03-03 01:51:56 » |
|
Realizing my 'logisitic' curve would probably not be the best idea, why not just set the acceleration to a constant on keypress, and then verlet integrate? The acceleration set could be computed from Newton's second law, so 'friction dampening' would be easy. 1 2 3 4 5
| double accelerationX = (keyPressedForceX - frictionForceX) / mass; double accelerationY = (keyPressedForceY - frictionForceY) / mass;
positionX = positionX + (positionX - lastX) + accelerationX * delta * delta; positionY = positionY + (positionY - lastY) + accelerationY * delta * delta; |
Of course there are better integration methods to use if so inclined. edit: added sample code
|
|
|
|
wessles
|
 |
«
Reply #21 - Posted
2014-03-03 02:49:29 » |
|
That would work; I personally would use a more simple way of moving. Just seems a bit unnecessary to use.
|
|
|
|
Gibbo3771
|
 |
«
Reply #22 - Posted
2014-03-03 04:31:20 » |
|
That would work; I personally would use a more simple way of moving. Just seems a bit unnecessary to use.
I have changed the movement, it now accelerates within a few milliseconds making it look like he goes from a walk to a run very quickly. He also has very light dampening to slow him down. Not changed enough to warrent an update atm.
|
"This code works flawlessly first time and exactly how I wanted it" Said no programmer ever
|
|
|
Gibbo3771
|
 |
«
Reply #23 - Posted
2014-03-13 07:37:57 » |
|
No playable update but have worked on some fun things  . Implemented level config files, I can now load in pretty much anything from a config file and create it in my world. That is kind of cool. I have added and tested 3 new itemsKeycard: Pistol: (This will actually be a final item) Bullet: Alright so nothing great, however the pistol was a test weapon. It was implemented in a very OO way, any entity will be able to equip it and shoot it. Couple of gun types can easily be made from the same class: Shotgun - Configurable bullet count and spread Assault Rifle - RoF can be changed, single, burst and auto are togglable Minigun - RoF can be changed, clip size can be altered greatly All with configurable accuracy/range that is multiplied by whatever value I want, player skill, powerups etc etc. Here is a screenshot of the new items lying on the ground ready to be picked up and used: Once I implement a basic AI and some enemies I will upload a test level for you guys to mess about in 
|
"This code works flawlessly first time and exactly how I wanted it" Said no programmer ever
|
|
|
ennix
|
 |
«
Reply #24 - Posted
2014-03-13 07:50:25 » |
|
i like the game-name: code15 - cool
|
be the hexagon
|
|
|
Gibbo3771
|
 |
«
Reply #25 - Posted
2014-03-21 20:05:54 » |
|
Seems like a good idea to actually show that I have visual progress. I have been doing a fair bit of work on the path finding AI, although it is ready to go and is capable of guiding whatever I want through the levels, I am here instead to show you some implemented test items! Coming nextAs soon as I code in a proper way to spawn and manage a basic enemy, as well as write all the code for them, I will fire up a pathfinding video and even a demo that allows you to place an enemy, create a maze, set a destination and watch them go! Dropbox Download
|
"This code works flawlessly first time and exactly how I wanted it" Said no programmer ever
|
|
|
Drenius
|
 |
«
Reply #26 - Posted
2014-03-21 20:07:21 » |
|
Private videos.
|
|
|
|
Gibbo3771
|
 |
«
Reply #27 - Posted
2014-03-21 20:08:32 » |
|
|
"This code works flawlessly first time and exactly how I wanted it" Said no programmer ever
|
|
|
|