76 (edited by android272 2016-01-05 03:47:02)

Re: [TeeUniverse] Devlog

In the Internal Sprite Sheet for ModAPI thread we talked a little about vehivles.  I know @necropotame said that he was not going to work on vehicles any time soon that he was going to work on weapons. But that did not stop me from thinking about what common attributes vehicles could have.  Here are some of my ideas as to what vehicles might be able to do.

Speed: Max speed of vehicle on its optimum surface. Look at this stat in conjunction with Acceleration, because acceleration helps the vehicle get to its top speed faster. A vehicle with great top speed but poor acceleration may never see its top speed maxed out as it can't reach it before it has to slow down around another corner or obstacle. Max speed is reduced when vehicle is running on sub-optimum surface.

Acceleration: How quickly a vehicle can go from standing still to top speed.

Brake: How quickly you can bring your ride to a stop.  If you are pressing "D" to move right and you press "A" to move left your vehicle must brake first in order to turn around and go the other direction.  How fast you can do this depends on your speed.

Grip: Like how Tees slide and skid when you are moving fast one direction and quickly change directions, vehicles can slide before they can change direction. Grip also affects hill-climbing, as good grip helps your wheels dig in and get the acceleration going to get up the hill.

Health: How much damage can the vehicle withstand before being destroyed. 0 health means the vehicle is indestructible.

Armor: If a vehicle has armor it can protect the Tee inside. 0 armor means the vehicle will fully protect the tee and they will not receive any damage from on coming fire.  This does not mean that the vehicle can not be destroyed.  If the vehicle is destroyed with the Tee still inside/close by they will receive damage.

Passengers: How many Tees can ride along with the driver.

Positioning: where the driver and each passenger are located on the vehicle and how their ligaments are positioned? Where are the tires?  if the vehicle has a weapon where is it placed and how does it move?  if a vehicle can fly where are the propellers and jet thruster need?

Can use Gun: who in the vehicle can use their guns in the vehicle (driver or passenger).

Secondary gun: Use left click to use secondary gun if available. If not use hook if allowed.

Can use hook: who in the vehicle can use their hooks in the vehicle (driver or passenger).

Hookable: can external Tees hook the vehicle.

Weight:  The heavier the vehicle the less a hook can move it.

Weapon: Choose a weapon file from available weapons eg. the grenade luncher.

Can Fly: Yes No can the vehicle fly.

Flying Type:  There are two types of flying vehicles I see - hillicopters and airplains. The controles of each are very different from one another. http://www.puffgames.com/desertbattle/ vs http://www.miniclip.com/games/fighter-pilot-2/en/

Can Swim: No the vehicle will sink to the bottom of water and not work, yes then the vehicle will work in water.

Swim Type:  Boat or submarine.

Moves on rails: Yes No
Jesus is my Lord and Savior. Praise be unto God for giving us a way to live with him.

Check out my DeviantArt for all my TeeWorlds art and ideas for Teeoworlds

77

Re: [TeeUniverse] Devlog

To add to that, android272, Hook Lifts Vehicle, or just a weight variable. like, can the driver hook terrain to lift it, or just passengers, or just external tees, or none (e.g. tank) and, if driver hooks empty passenger seat, would they switch to that seat?

Clan: Riot (I'm one of three leaders: Mile, Deku, pie)
Host teeworlds maps on a fng/ctf/dm/ddrace server for testing:http://riotproductions.tk/teewo/ broken-need reinstall nginx http://riotproductions.tk/bounce?whatEven, Teeworlds NA Discord chat

78

Re: [TeeUniverse] Devlog

pielover88888 wrote:

To add to that, android272, Hook Lifts Vehicle, or just a weight variable. like, can the driver hook terrain to lift it, or just passengers, or just external tees, or none (e.g. tank) and, if driver hooks empty passenger seat, would they switch to that seat?

I forgot I was going to add a weight variable.  The heavier the vehicle the less a hook can move it and vice versa.  I think that Hookable is another good option. I think it would be funny to see Tees being dragged by vehicles.  Secondary weapon where if available left click would be the second weapon?

It would depend on the vehicle. You can choose to allow all passengers to use hooks including the driver or just one or the other. 

I did not think about how you would enter or exit the vehicle.  I think hooking an empty vehicle should bring you toward it and enter it. Initially I thought that you it would be first come first serve Driver, passenger 1, passenger 2 etc.  But there could be situations where I would want to just man the turret if the driver does not do that.  What about using the switch weapon keys to switch positions?  Should there be a new enter exit vehicle button?  Because if you hook it to enter you should hook to get out, and since using hooks is a possibility maybe this should not be the way to enter.

Jesus is my Lord and Savior. Praise be unto God for giving us a way to live with him.

Check out my DeviantArt for all my TeeWorlds art and ideas for Teeoworlds

79

Re: [TeeUniverse] Devlog

Either secondary weapon classically right click and disable hook or a co-driver

Having troubles finding servers in the serverlist? Go to Pastebin (its a referer cause there is daily a new pastebin) and add the lines to your settings.cfg (in %APPDATA%\teeworlds). Then open teeworlds and go to the favorites tab. (Note however, standard teeworlds client can only show 256 favorites, use ddnet instead)

80

Re: [TeeUniverse] Devlog

android272 wrote:

I know @necropotame said that he was not going to work on vehicles any time soon that he was going to work on weapons. But that did not stop me from thinking about what common attributes vehicles could have.

It's better to discuss it before the implementation wink Please continue!

b.t.w., just keep in mind that a "vehicle" could be a static turret, or an airplane, or a submarine, or a wagon on rails  ... so flexibility is needed. You can control it in a different way.

81

Re: [TeeUniverse] Devlog

necropotame wrote:

It's better to discuss it before the implementation wink Please continue!

b.t.w., just keep in mind that a "vehicle" could be a static turret, or an airplane, or a submarine, or a wagon on rails  ... so flexibility is needed. You can control it in a different way.

For turret should I make a variable can move? or is turret?  I forgot I wanted mine-carts, saw a mapper with those once and always wanted to ride them.

New variables.

Can Swim: No the vehicle will sink to the bottom of water and not work, yes then the vehicle will work in water.

Swim Type:  Boat or submarine.

Moves on rails: Yes No

Jesus is my Lord and Savior. Praise be unto God for giving us a way to live with him.

Check out my DeviantArt for all my TeeWorlds art and ideas for Teeoworlds

82

Re: [TeeUniverse] Devlog

Mhhh, we need much more abstraction for vehicles. Like you pointed out, the physics and the prediction is the most important and difficult part for vehicles. That said, I think that a vehicle is simply a tee with different graphics and different bounding box. Want a airplan ? Your tee could also be superman. Want a boat ? Your tee could definitely swim. Want a mine-cart ? Your tee should be able to move on ropes. Want a turret ? Your tee can sometime be stuck on ground but still able to shoot. I don't say that vehicle must be replaced by tees, but simple that the physics and prediction part are similar for vehicles and tees. In addition, the physics of the vehicle must be still activated, even if no players are inside. But it's the same for tees because we want NPC.

So ModAPI need to implement a new type of object able to describe the physics and prediction part of anything.

83 (edited by android272 2016-01-05 19:05:37)

Re: [TeeUniverse] Devlog

necropotame wrote:

Mhhh, we need much more abstraction for vehicles. Like you pointed out, the physics and the prediction is the most important and difficult part for vehicles. That said, I think that a vehicle is simply a tee with different graphics and different bounding box. Want a airplan ? Your tee could also be superman. Want a boat ? Your tee could definitely swim. Want a mine-cart ? Your tee should be able to move on ropes. Want a turret ? Your tee can sometime be stuck on ground but still able to shoot. I don't say that vehicle must be replaced by tees, but simple that the physics and prediction part are similar for vehicles and tees. In addition, the physics of the vehicle must be still activated, even if no players are inside. But it's the same for tees because we want NPC.

So ModAPI need to implement a new type of object able to describe the physics and prediction part of anything.

I think Tees should be able to swim, rope/vine/rock climb without the implementation of vehicles.  There should be a climb entity/tile which allows you to climb on adjacent tiles. So if there are many tiles verticel of one another the Tee can climb up and down, if they are horizontal of each other the Tee can climb left and right, or if there are tiles all around the Tee could climb up, down, left, or right.  There should also be a water which you can swim in, sail a boat in, or ...whats the verb for driving a submarine? and a acid/lava tile which you will die if swam in, but possibly could sail in?  While I am on tiles there could be an ice block that would be harder to walk on and when you gained speed would slid on much more then normal ground.

I have graphics for climing but I need to gain access to a drive I don't have access to right now.  And I will work on how liquid works soon.

For the most part I see only see six different types of vehicles. Ground can only really move left and right, possibly jump, possibly swing from hooks. Rails can only run on tracks and fly off if the track ends.  Plains, and helicopters fly a certain way.  Boats sail left and right, Submarines can sail on water and can dive under water and would work like this.  apart from that all the rest is what makes vehicles of the same type different from each other. All of these vehicles can be hookable, have health, armor, jump, have one or many passengers, have guns attached to them, vary in speed etc.

Does anyone see any other type of vehicle I have missed?

Jesus is my Lord and Savior. Praise be unto God for giving us a way to live with him.

Check out my DeviantArt for all my TeeWorlds art and ideas for Teeoworlds

84 (edited by android272 2016-01-06 00:59:45)

Re: [TeeUniverse] Devlog

Once again water and acid/lava should work mostly like this.  You should somehow have the ability to change the color, and wave size before you place the tile down.  like the video there is a lighter outline surrounding the liquid and the deeper the body of liquid the darker it becomes.

I have made the image below to show how water works.

water

1. Liquid at rest should stay at rest smile

2. when you enter a body of liquid large waves push away from the Tee

3. When you exit a body of liquid you push the water up and out.  Also while in a body of liquid you can double jump as much as you like, this is how you can swim out of water. also the double jump sound should be replaced with rushing water.

4. moving in a body of liquid makes small amounts of waves.

5. If a block of liquid drop one level then a 22.5° slope is made.  The blocks of liquid beside the slope and the slop it self looks as though water is moving down the slope at all times.  When the Tee is in the slope or below the slope you are gently moved right in this image.  Swimming against current is not that difficult.

6. If a body of water is stair stepped then 45° slope is made.  Everything is the same as #5 except the liquid and you move faster in the direction the water is moving. as well little bits of white is added to the slope and the adjacent blocks to look like rushing water. Swimming against current is a little more difficult.

7.  If two or more liquid blocks are placed in a vertical line without some liquid beside it then the liquid falls.  This time the liquid is much more viscous and moves your Tee quite fast.  Once again the adjacent blocks to the fall look as though they are being affected to the fall and white is added to look like plashing water. Swimming against current is difficult but not impossible to reach the top. This is a cartoon video game after all.

Jesus is my Lord and Savior. Praise be unto God for giving us a way to live with him.

Check out my DeviantArt for all my TeeWorlds art and ideas for Teeoworlds

85

Re: [TeeUniverse] Devlog

I prefer to separate the graphical part from the physics part. I think it's better if the strength of the stream is defined in one layer, and the graphical part, in a separated layer. So you can create vortex, waterfall, stream, ... For the graphical part, a new type of tilelayer could be added, that allows to anime tiles like you said. We need to think how define all these parameters.

86 (edited by necropotame 2016-01-06 01:28:35)

Re: [TeeUniverse] Devlog

Devlog: the new weapon system is one the way. We put all weapons mechanics into classes, so it become super easy to add a new weapons or to replace vanilla ones. You just have to create a new class and change some virtual functions. No more switch and conditions spread in character.cpp smile

The next step is to show custom weapon graphics for the client, based on the sprite system.

Edit: this is the list of virtual functions that a weopon must implement:

virtual int GetAmmoType() const;
virtual int GetMaxAmmo() const;
virtual int GetAmmo() const;
virtual bool AddAmmo(int Ammo);
virtual bool IsAutomatic() const;
virtual bool IsWeaponSwitchLocked() const;
    
virtual bool TickPaused(bool IsActive);
virtual bool TickPreFire(bool IsActive);
virtual bool OnFire(vec2 Direction);
virtual void OnActivation();
    
virtual void Snap(int SnappingClient, class CNetObj_Character* pChar);

87

Re: [TeeUniverse] Devlog

Devlog: we have licensed our work under the Apache license version 2.0 with the addition that project maintainers  can change the license at any time. This is to remove the individual rights of contributors on their code/images/whatever and give them to the project.

This DOES affect people who contributes to the project itself.
This DOES NOT affect people who want to fork it and create mods.

Having troubles finding servers in the serverlist? Go to Pastebin (its a referer cause there is daily a new pastebin) and add the lines to your settings.cfg (in %APPDATA%\teeworlds). Then open teeworlds and go to the favorites tab. (Note however, standard teeworlds client can only show 256 favorites, use ddnet instead)

88 (edited by necropotame 2016-01-06 13:37:01)

Re: [TeeUniverse] Devlog

android272 wrote:

anyway I think it would be much better if a modder could make their own entity pervade an image for the map editor and then when you load up the mod and go to the entity page in the map editor all the entity images would load alphabetically.  I hope this makes since...

I've implemented a part of it and called it "EntityPoint". The idea is:

In the editor, you can add an EntitiesLayer and associate to it a mod (TW07, Infection, DDRace, ...). Then, you can click to a button to add points inside. Each points contains a type. Based on the type id, an icon is displayed at the position of the point. You can move it and change the type at any moment.
In the server, when the map is loaded, the server reads each entity point and calls the GameServer for each of them. Then the mod can decide what to do with it.
In the client, nothing happens because entities points is only interesting for the server. The server could clean up this part before sending the map, to reduce the size of the map.

The mod part in the editor will be described by two files: an image (icons) and a text file. The text file contains the list of each type of entity, with the type ID, the name, a description and the list of parameters that it can take.

This system allows to place entities in world coordinate, not in tile coordinates. So it's more precise, but you can still align them to the grid if you want (Alt).

In the future, we could add also EntityLines and EntityQuads.

Edit: Screenshot of the editor in the current state. EntityTiles (the ones from vanilla TW) are shown by the usual square sprites. EntityPoints (the new ones) are shown by round sprites. The interface is far from perfect, but it's working wink

http://s14.postimg.org/bn0s1ntjh/modapi_entitieslayer.jpg

89

Re: [TeeUniverse] Devlog

Note: it would be good if the editor can read the .mod file containing everything relevant. So either the client saves the .mod file like maps and the editor loads them on click or mod creator publish the .mod file

Having troubles finding servers in the serverlist? Go to Pastebin (its a referer cause there is daily a new pastebin) and add the lines to your settings.cfg (in %APPDATA%\teeworlds). Then open teeworlds and go to the favorites tab. (Note however, standard teeworlds client can only show 256 favorites, use ddnet instead)

90

Re: [TeeUniverse] Devlog

The .mod file is being saved like maps oO
Or did I misunderstand you?

91

Re: [TeeUniverse] Devlog

AFAIK the mod file is sent to the client together with the map in order for the client to have good prediction, sprites,... 
I think the mod file should be read by the editor in order to provide a nice interface, so you have all information you need. Custom entities, entity points.....

Having troubles finding servers in the serverlist? Go to Pastebin (its a referer cause there is daily a new pastebin) and add the lines to your settings.cfg (in %APPDATA%\teeworlds). Then open teeworlds and go to the favorites tab. (Note however, standard teeworlds client can only show 256 favorites, use ddnet instead)

92

Re: [TeeUniverse] Devlog

The main problem is that most of players don't care about the editor. So they will have to download more images for nothing. Since download in TW is very slow, in particular in some countries, it's not an option :-/ I think that we could clean up the map from server-only information before send it to the client. We can also clean it from graphics if the client ask for it (for low connexion). A third parameters could be "download the Editor package".

Actually, there is a folder ./data/modapi/editor that contains mymod.png (image) and mymod.entitylist (text file). I will stay with that for now because it's super easy to edit. But we can think about a better solution, using the storage system of TW.

93

Re: [TeeUniverse] Devlog

Because many people who map already have to download additional things like custom entities, we could create a .modinfo or .mapinfo where we combine entities and things fire the editor and tell mod devs to make it available like entities

Having troubles finding servers in the serverlist? Go to Pastebin (its a referer cause there is daily a new pastebin) and add the lines to your settings.cfg (in %APPDATA%\teeworlds). Then open teeworlds and go to the favorites tab. (Note however, standard teeworlds client can only show 256 favorites, use ddnet instead)

94

Re: [TeeUniverse] Devlog

Clearly, the .modinfo file is the minimum that we can do, but sufficient for the first "release".

I return back to the weapon system. I confirm that custom animation (for tees and weapons) will be added. So hand fighting could be implemented with ModAPI smile Teeworlds has already an animation system but limited. So they hard code some other animation (recoil). It's not at all flexible enough for the custom weapon system of ModAPI, so we have to implement our own animation system.

We can discuss the structure of the new animation system (please don't talk about bones or meshes, TW a sprite-based game). There is two level of discussion, the animation of a sprite (CModAPI_Animation) and the animation of a tee (CModAPI_TeeAnimation) that should use multiple CModAPI_Animation.

For CModAPI_Animation, we can start from what is done in vanilla TW, multiple keyframe on a time line between 0 and 1. Each KeyFrame has a X,Y coordinate and an angle. The CModAPI_Animation must contain an option to change the interpolation system (linear, sin, ...).

For CModAPI_TeeAnimation, each body part could has its own CModAPI_Animation : body, left hand, right hand, left foot, right foot and eyes. Animation of hands can be oriented by default to the aim direction.

95

Re: [TeeUniverse] Devlog

Devlog: now two methods for Snap(), one to send to the vanilla client and one for the modapi client.

necropotame wrote:

Each entity implements Snap07() and Snap07ModAPI(). Depending of the client protocol, the 0.7 or 0.7 ModAPI snapshot is send. Each snapshot use different SnapID, so they are really independent.

Since all actual entities behaves similarly in 0.7 and 0.7 ModAPI, I've added CModAPI_EntitySnapshot07 that allow to define only a Snap() function, reused in both Snap07() and Snap07ModAPI(), but taking care of the difference of SnapID.

Having troubles finding servers in the serverlist? Go to Pastebin (its a referer cause there is daily a new pastebin) and add the lines to your settings.cfg (in %APPDATA%\teeworlds). Then open teeworlds and go to the favorites tab. (Note however, standard teeworlds client can only show 256 favorites, use ddnet instead)

96

Re: [TeeUniverse] Devlog

Devlog: I've implemented the custom animation system for sprites. When you create a mod, you can define some animations with a list of key frames. These animations will be downloaded by the client thanks to the .mod file system. If you define also an AnimatedSprite (a sprite associated with an animation and some options), then you can send during the game an animated sprite.
Concretely, this allows to create floating effect for flying sprites, but also complicated mini-boss with attack animation if you want since you can send multiple CNetOject_ModAPI_AnimatedSprite with a custom animation for each.

97

Re: [TeeUniverse] Devlog

Small change in how ModAPI will be developed: I will be the only one that can have write access to the github repository. I've removed anyone else, except teeworlds developers (but they don't accept the invitation, so they are not visible). I still want that everyone contribute to ModAPI, but since Henningstone contribute also to a spoofing system, I can really trust people smile The list of contributors in the README will not be affected. If you contribute enough, your name will be added.

So I count on you and I wait your push request wink

98 (edited by Henningstone 2016-01-17 19:16:12)

Re: [TeeUniverse] Devlog

I don't think it matters for ModAPI to what else projects I contribute, right? Also, apart from that: What you mean is not a "spoofing system"!! It is just another useless teeworlds client, which can send messages to an external server! Nothing bad about that!

Second, I don't understand why teeworlds devs should have write access but not the people who contributed actively to ModAPI. They seem to be really not interested in the ModAPI, and to be honest, there are only one or maybe two who would possibly do something for any mod.
But do what you want, it is yours project, so I will not argue about this.

99

Re: [TeeUniverse] Devlog

Woah. You are totally in your own worlds, dude. (@necrodude)

Real programmers don't comment their code - it was hard to write, it should be hard to understand.
Proudly verkeckt since 2010.

100

Re: [TeeUniverse] Devlog

Devlog: killa added CNetObject_ModAPI_Text and CNetObject_ModAPI_TextCharacter. It's now possible to display text in the world and to attach it to a character. OpenFNG community will like it, for sure wink