home home

downloads files

forum forum

docs docs

wiki wiki

faq faq

Cube & Cube 2 FORUM


Enemy Territory + Cube 2 = wOOt?

by ezombie on 01/19/2008 16:25, 258 messages, last message: 04/03/2008 21:39, 185339 views, last view: 06/26/2024 10:53

I made an actual thread for this, since we are still yacking about it. To bring the others up to speed:

"Some of us weirdos have been kicking around the thought of making a community edition of Enemy Territory (the FIRST one). I suggested the Cube 2 engine might be a good base...

This would be a straight port of ETPro gameplay to a standalone open source game, using new 'HD' assets. Nothing too fancy, just better graphics and netcode are what we would be looking for."

Go to first 20 messagesGo to previous 20 messages    Board Index    Go to next 20 messagesGo to last 20 messages

#193: ..

by ezombie on 02/09/2008 10:19

Wish I could. But the point of the proxy classes is to let the VM access the members functions of the clientcom and fpsclient classes. So they have to both be in scope.

reply to this message

#194: ..

by ezombie on 02/09/2008 17:46

Erm... but if you do this:

comclient *c;

Anywhere but inside of fpsclient{}, you get a \'comclient not found\'. If you then #include \"client.h\" anywhere but inside of fpsclient{}, you get a \'fpsclient not found\' - since fpsclient is used inside of comclient...


client.h
---------
struct comclient {
fpclient &cl;
...
};

fps.cpp
---------
struct fpsclient {
#include \"client.h\"
...
comclient cc;
...
};


See, in order for client.h to be included, fpsclient needs to be in scope. But fpsclient also needs comclient to be in scope.

This is an old C++ trick I have seen before - you use it when class A needs to have a reference to class B, which has an instance of class A inside it. True, there are cleaner ways to do this, but they take quite a bit more code.

Are you *sure* you are the guy that works with this stuff? (LOL)

reply to this message

#195: ..

by ezombie on 02/09/2008 18:51

Got the first piece of logic ported to the VM and running nicely:

-- This script provides a VM implementation
-- of some of the fpsclient methods

-- create global proxy class instances
client = clientproxy(this)
clientcom = clientcomproxy(client.getcom())
player = playerproxy(client.getplayer())

-- let's add an extension onto one of them
clientcom.text = "BOING!"

function canjump()

-- fetch a current copy of the properties
_client = client:fetch()
_player = player:fetch()

-- have some testing fun
clientcom:chat(clientcom.text)

if(!_client.intermission) _client.respawn()
return (_player.state ~= CS_DEAD) and (not _client.intermission)

end


Now this script is compiled into bytcode with luac, then saved as client.dat for now. The game 'runs' it once when it first starts, effectively caching everything into memory. When you need to jump, the game calls the 'canjump()' function in the bytecode directly.

This means it's very very fast. WAY faster then java, almost as fast as the C++ code it replaces. And you can now change the jump logic *without* a recompile.

reply to this message

#196: ..

by ezombie on 02/09/2008 18:54

Oops! the line

if(!_client.intermission) _client.respawn()

should be

if (not _client.intermission) then client:respawn() end

Hope it makes more sense now for you Lua guys out there.

reply to this message

#197: ET:CE website is up

by ezombie on 02/09/2008 21:08

http://etce.usef-et.org/

reply to this message

#198: ..

by ezombie on 02/09/2008 23:46

I tried that, but the VM binding class (template class) won't let me.

It works good this way, I got almost everything in external files now. The fpsclient and fpsserver instances in REGISTERGAME can have their own seperate VMs as well, which is a good thing(c).

I profiled that canjump() function using C++ and Lua. C++ ~ 1-4 microsends, Lua ~ 20-30 microseconds. Keep in mind that the invocation cost of calling a function in the VM is about 15 micros.

So the performance looks great, and the code is itty bitty so far (only added about 200K to the binary so far).

Onwards and upwards!



reply to this message

#199: ..

by ezombie on 02/11/2008 02:01

Just trying to get some input. What do you guys think of this HUD?

http://www.usef-et.org/forum/attachments/hud1.jpg

The blue is health, the red is stamina (or maybe the other way around). The numbers show the current ammo in the gun/your total ammo, which is above the 'weapon card' that shows your current weapon. The green bar is the 'charge' level - used to perform class-specific activities (fire heavy weapons, repair stuff, hand out ammo or health packs)

The radar has players in red or blue, depending on team. The yellow blips would be for objectives. The radar rotates so that up is where you are currently pointed.

reply to this message

#200: Re: ..

by rancor on 02/11/2008 02:12, refers to #199

Looks pretty good in general, just a couple of things:
Heath and stamina should be the other way around, as you implied. Red == health 99% of the time.
Also, you should indicate how much ammo is left in the clip, so something like
5/10
200

reply to this message

#201: ..

by ezombie on 02/11/2008 02:35

Huh?

The first number *is* the amount left in the clip. The second number is the extra ammo you are carrying.

reply to this message

#202: Re: ..

by yetanotherdemosthenescomputer on 02/11/2008 02:51, refers to #199

Looks good!

reply to this message

#203: Re: ..

by rancor on 02/11/2008 05:16, refers to #201

That's what I figured, I just remembered ET showing it pretty much like I suggested. Which it doesn't, rendering my point moot unless you have additional clip capacity as an ability.

One thing you might consider is making the display of the amount in the current clip larger. My experience between UrT and ET has been that it's easier to keep track of ammo in UrT, mainly because the HUD display is comparatively larger.

reply to this message

#204: Re: ..

by tentus_ on 02/11/2008 05:29, refers to #199

I very much like having a really simple hud: what you have there is very appealing. The one change/complication I would do personally would be to put a single letter beneath the bar that helps indicate what the bar represents. For example, a capital H underneath the health would be appropriate: if you felt like being shiny, you cloud make it so the H pulsates or glows when the health is critically low.

But in general that looks great.

reply to this message

#205: Re: ..

by demosthenes on 02/11/2008 05:59, refers to #204

Really simple hud?

The simplest hud I've seen yet is just your gun, in CoD4. It's quite neat, though I'm used to having a little more information on the screen.

reply to this message

#206: ..

by ezombie on 02/11/2008 06:23

There will be 2D icons (same style as the weapons card) under each bar. Having the health icon pulse (maybe in bright red) is a good idea.

I will do the text larger on the ammo, and add a black border around all the elements including the text.

LOL - I'm sure some of the pros might agree with you, demosthenes.

reply to this message

#207: Re: ..

by Q009 on 02/11/2008 10:47, refers to #199

Cool! =)

reply to this message

#208: Re: ..

by JadeMatrix on 02/11/2008 14:09, refers to #199

Any plans to put the map's map up in the radar? Something that always bothers me about ET is that the minimap doesn't rotate, so it's hard to tell where you actually are.

demosthenes:
No hud/crosshair is actually less realistic than it sounds. One, you're trying to play a 3D game on a 2D screen, and you can't actually feel your health/bullet hits. You need some kind of assistance with both.

reply to this message

#209: Re: ..

by enigma_0Z on 02/11/2008 19:21, refers to #114

@aard

LOL. I hate editing BSP maps (compared to sauer that is), but I don't think that that is going to happen anytime soon...

@scasd

As far as movement hacks, there is a simple hack that requires only editing a map... because the maps are all clientside, you could walk through walls and no one would be any wiser... But mastermode does put that in check as long as someone intelligent is the master...

As far as the "dumbish" master kicking you, well I believe that the TC servers have a way of starting a vote to kick the master "#kickmaster" comes to mind...

To devs... Perhaps some functionality along the lines of "#kickmaster" should be integrated into sauer's code?

reply to this message

#210: Re: ..

by enigma_0Z on 02/11/2008 19:23, refers to #209

oops. I was reading two threads at a time... please disregard line from "@scasd" to the end...

xD

reply to this message

#211: ..

by James007 on 02/11/2008 21:22

lookin good dude, keep it up.

reply to this message

#212: Re: ..

by demosthenes on 02/11/2008 23:13, refers to #208

Shooting from the hip, the only thing you get is a hit indicator, when you're actually hitting. But if you raise your gun and use the sights, then you have an aiming aid. It actually feels right, and doesn't cause me frustration.

reply to this message

Go to first 20 messagesGo to previous 20 messages    Board Index    Go to next 20 messagesGo to last 20 messages


Unvalidated accounts can only reply to the 'Permanent Threads' section!


content by Aardappel & eihrul © 2001-2024
website by SleepwalkR © 2001-2024
55269967 visitors requested 73123368 pages
page created in 0.073 seconds using 10 queries
hosted by Boost Digital