New game: Top down city!

Talk about any other games here
User avatar
JernejL
Hitman
Hitman
Posts: 126
Joined: 21 Feb 2010, 22:03
GH nick: RedShirt

Re: New game: Top down city!

Post by JernejL »

I think i'll go at a more classical radar approach first, see how that works.

Got good news: i've managed to add your tank tracks idea, i also improved skidmarks quite by a lot, and am now succesfully testing scripting, i've updated the binary, but i'm working on new stuff already.

Logofero
Serial Killer
Serial Killer
Posts: 264
Joined: 09 Dec 2015, 14:18
Contact:

Re: New game: Top down city!

Post by Logofero »

Deleted. Not relevant.
Last edited by Logofero on 08 Oct 2020, 01:33, edited 1 time in total.

User avatar
elypter
Immortal
Posts: 1120
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: New game: Top down city!

Post by elypter »

gta2 does guide the player with arrows. maybe extend that feature instead to inform about things that are out of the screen. eg: show a symbol for a junction or a curve and an indicator for how far it is a away at the edge of the screen. just smaller and less ugly. the big red dot shows that the traffic light is red and the small green, yellow and red dots would appear gradually to indicate how far he is away from it. the curve above the juction shows what comes next if you go north. it can also be used to show where the next road is if you are off road. i think this could do some of the jobs a minimap has and targets could be incorporated with that as well.
Attachments
shows junction ahead of player
shows junction ahead of player
navigation.png (328.44 KiB) Viewed 10115 times
yur sa'nok ngeyä

Logofero
Serial Killer
Serial Killer
Posts: 264
Joined: 09 Dec 2015, 14:18
Contact:

Re: New game: Top down city!

Post by Logofero »

Deleted. Not relevant.
Last edited by Logofero on 08 Oct 2020, 01:34, edited 1 time in total.

Logofero
Serial Killer
Serial Killer
Posts: 264
Joined: 09 Dec 2015, 14:18
Contact:

Re: New game: Top down city!

Post by Logofero »

Deleted. Not relevant.
Last edited by Logofero on 08 Oct 2020, 01:34, edited 2 times in total.

Logofero
Serial Killer
Serial Killer
Posts: 264
Joined: 09 Dec 2015, 14:18
Contact:

Re: New game: Top down city!

Post by Logofero »

Deleted. Not relevant.
Last edited by Logofero on 08 Oct 2020, 01:35, edited 1 time in total.

User avatar
JernejL
Hitman
Hitman
Posts: 126
Joined: 21 Feb 2010, 22:03
GH nick: RedShirt

Re: New game: Top down city!

Post by JernejL »

An objective radar would be nice, one that shows only the target area on radar and specifies target.

Distance on arrows sounds like good idea too, i might have multiple, various options availible on how to hande this, but i dont think a road sign system would work good, it could fail depending on road network and wouldn't work on foot inbetween buildings.

Logofero
Serial Killer
Serial Killer
Posts: 264
Joined: 09 Dec 2015, 14:18
Contact:

Re: New game: Top down city!

Post by Logofero »

Deleted. Not relevant.
Last edited by Logofero on 08 Oct 2020, 01:35, edited 1 time in total.

User avatar
elypter
Immortal
Posts: 1120
Joined: 26 Dec 2009, 23:53
GH nick: elypter

Re: New game: Top down city!

Post by elypter »

JernejL wrote:An objective radar would be nice, one that shows only the target area on radar and specifies target.

Distance on arrows sounds like good idea too, i might have multiple, various options availible on how to hande this, but i dont think a road sign system would work good, it could fail depending on road network and wouldn't work on foot inbetween buildings.
it should resemble a satnav and be a feature the individual cars, just like radio. you could add the passways between buildings as well but that is a stylistic choice. gta4 and 5 have small driveways in their system but i think it would be bad for the game if they werent. its a question of balancing of things being useful but not too overpowered so you still have to use your brain and have a benefit from knowing the city. i thought of those as small hints rather than a full blown guidance system. you could and probably should still have a map that you can bring up with a button and have both features complement each other and not having to use a minimap. i always thought minimaps are a bit of a bad compromise. too small to be really useful and too big to not being distracting and you constantly have to move your eyes into a corner which often causes accidents or makes you miss something important.
yur sa'nok ngeyä

User avatar
JernejL
Hitman
Hitman
Posts: 126
Joined: 21 Feb 2010, 22:03
GH nick: RedShirt

Re: New game: Top down city!

Post by JernejL »

elypter wrote:
JernejL wrote:An objective radar would be nice, one that shows only the target area on radar and specifies target.

Distance on arrows sounds like good idea too, i might have multiple, various options availible on how to hande this, but i dont think a road sign system would work good, it could fail depending on road network and wouldn't work on foot inbetween buildings.
it should resemble a satnav and be a feature the individual cars, just like radio. you could add the passways between buildings as well but that is a stylistic choice. gta4 and 5 have small driveways in their system but i think it would be bad for the game if they werent. its a question of balancing of things being useful but not too overpowered so you still have to use your brain and have a benefit from knowing the city. i thought of those as small hints rather than a full blown guidance system. you could and probably should still have a map that you can bring up with a button and have both features complement each other and not having to use a minimap. i always thought minimaps are a bit of a bad compromise. too small to be really useful and too big to not being distracting and you constantly have to move your eyes into a corner which often causes accidents or makes you miss something important.

Maybe a minimap compromise can be made.. i can guide player to goals using arrows + distance, and also use a full-size map in the menus where goals are marked on a full, proper city map where you can see where you need to go, and can plan your path.

Logofero
Serial Killer
Serial Killer
Posts: 264
Joined: 09 Dec 2015, 14:18
Contact:

Re: New game: Top down city!

Post by Logofero »

Deleted. Not relevant.
Last edited by Logofero on 08 Oct 2020, 01:35, edited 1 time in total.

User avatar
Sektor
Boss
Boss
Posts: 1390
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: New game: Top down city!

Post by Sektor »

That is a cool looking way to show a reload.

Logofero
Serial Killer
Serial Killer
Posts: 264
Joined: 09 Dec 2015, 14:18
Contact:

Re: New game: Top down city!

Post by Logofero »

Deleted. Not relevant.
Last edited by Logofero on 08 Oct 2020, 01:36, edited 1 time in total.

User avatar
JernejL
Hitman
Hitman
Posts: 126
Joined: 21 Feb 2010, 22:03
GH nick: RedShirt

Re: New game: Top down city!

Post by JernejL »

The idea is good, i might be able to add these animations in the future, first i'll work on scripting because that is cruical to get a online game working.

It's using javascript. Basic scripts work already (check for death, spawns, players joining and quitting), but i'm wondering what kind of additional functions are needed, what are your suggestions?

User avatar
Sektor
Boss
Boss
Posts: 1390
Joined: 04 Mar 2008, 06:51
GH nick: Sektor
Location: GTAMP.com
Contact:

Re: New game: Top down city!

Post by Sektor »

Teleport and coordinate set/get. All the features required for deathmatch, tag and racing. Checkpoints might be better as part of map editor so scripting isn’t required to make racing maps but always good to have script control aswell.

Logofero
Serial Killer
Serial Killer
Posts: 264
Joined: 09 Dec 2015, 14:18
Contact:

Re: New game: Top down city!

Post by Logofero »

Deleted. Not relevant.
Last edited by Logofero on 08 Oct 2020, 01:36, edited 1 time in total.

Logofero
Serial Killer
Serial Killer
Posts: 264
Joined: 09 Dec 2015, 14:18
Contact:

Re: New game: Top down city!

Post by Logofero »

Deleted. Not relevant.
Last edited by Logofero on 08 Oct 2020, 01:36, edited 1 time in total.

User avatar
JernejL
Hitman
Hitman
Posts: 126
Joined: 21 Feb 2010, 22:03
GH nick: RedShirt

Re: New game: Top down city!

Post by JernejL »

This is good - it's similar to what i started, a lot of things here are basically states (jumping, dead, running), and a lot can be implemented in scripting itself (line of sight, proximity triggers, etc.. )

The game engine only differentiate between actors, vehicles, particles and pickups.

(map) objects are vehicles, and are therefore easier to work with (no need for duplicate code to sync and handle - all that works on vehicles works on objects too)

This is the current script as used, it shows what is done, but is not everything yet - some things like getting car seats still need internal js framework wrappers to work in a object-oriented way.

Code: Select all

'use strict';

console.log(version());

var game_interface = NewGameInstance();

game_interface.OnCreatePlayer = function(Player) {
	
	console.log('OnCreatePlayer');
	console.log(Player.playername);
	
	Player.spawn(true); // sets stuff
	
	if (Player.IsLocal == 1) { // if local player, create a car to play with.
		
		var somecar = new Vehicle('four', 53.5, 87.5, 2, 90); //
		Player.EnterExitThisVehicle(somecar, false, true);
		
	}
	
	// Player.health = 1.0; // default test
	
	Player.EchoMessage('~O~Top down city test! ' + '~T~Enjoy!', constants.fontSize.font_b);
	
}

game_interface.OnDestroyPlayer = function(Player, Reason) {
	
	console.log('OnDestroyPlayer');
	console.log(Player.playername);
	
	if (Player.IsLocal == 1) {
		
		console.log('game shutting down.');
		
	} else {
		
		console.log('Player disconnected: ' + constants.disconnectReason.toString(Reason));
		
	}
	
}

game_interface.OnModeChange = function() {
	
	console.log('engine mode has changed to: ');
	console.log(constants.engineState.toString(game_interface.EngineMode) + ' (' + game_interface.EngineMode + ')');
	
}

game_interface.OnDamagePlayer = function(player_actor, player_actor_2, HitOrigin, OldHealth, NewHealth, DamageType) {
	
	if (NewHealth == 0)
		console.log('KILL ' + player_actor.playername + ' was damaged by ' + (player_actor_2 == null ? "AI" : player_actor_2.playername) + ' (' + OldHealth + ' -> ' + NewHealth + ') ' + constants.damageType.toString(DamageType));
	else
		console.log('Damage ' + player_actor.playername + ' was damaged by ' + (player_actor_2 == null ? "AI" : player_actor_2.playername) + ' (' + OldHealth + ' -> ' + NewHealth + ') ' + constants.damageType.toString(DamageType));
	
}

game_interface.OnTick = function() {
	
	for (var i in actor_stack) {
		
		var Player = actor_stack[i];
		
		if (Player.health <= 0) {
			
			if (Player.DeadTime < 3000) // 3 seconds delay
				continue;
			
			console.log("player " + i + " has died and has been respawned.");
			
			Player.EchoMessage('~O~Oh no!~T~Enjoy!', constants.fontSize.font_b);
			
			Player.spawn(true);
			
		}
		
	}
	
}

// todo: should be global.console and prototyped from that.

Actor.spawn = function(position_too) {
	
	this.health = 100;
	
	//console.log(this.WeaponData());
	
	this.StripWeapons();
	this.GiveWeapon('m4gl', 5000);
	this.GiveWeapon('gren', 5000);
	this.GiveWeapon('gun1', 5000);
	this.GiveWeapon('flam', 5000);
	
	if (position_too == true)
		this.move(53.5, 86.5, 2, true);
	
	this.WantedLevel = 0;
	
	this.State = constants.actorState.AsNormal;
	this.ExtinguishFires();
	this.SetActorAnimation(constants.animation.anm_stand, false, false, true);
	this.NetworkSync(); // Synchronize player over network, if remote player.
	
	if (this.IsActorLocal() == true)
		game_interface.ResetCamera(53.5, 87.5, 2);
	
}

var somecar = new Vehicle('tank', 53.5, 89.5, 2, 45);

//console.log(somecar.health);
somecar.health = 10;
//console.log(somecar.health);

somecar.move(53.5, 89.5, 2, 45);

/*var myseats = somecar.seats();
console.log(typeof myseats);
console.log(myseats);*/

//somecar.free();
//console.log('valid: ' + somecar.valid());

/*
var loop = function() {
	
}
*/


Logofero
Serial Killer
Serial Killer
Posts: 264
Joined: 09 Dec 2015, 14:18
Contact:

Re: New game: Top down city!

Post by Logofero »

Deleted. Not relevant.
Last edited by Logofero on 08 Oct 2020, 01:37, edited 1 time in total.

Logofero
Serial Killer
Serial Killer
Posts: 264
Joined: 09 Dec 2015, 14:18
Contact:

Re: New game: Top down city!

Post by Logofero »

Deleted. Not relevant.
Last edited by Logofero on 08 Oct 2020, 01:37, edited 1 time in total.

Post Reply