Starling Stress Test [Passed]
Below, you can see something that would be impossible without the hardware aceleration, almost 700+ units running at a constan 30 FPS (at least on my machine)
107KG no Loader… if you dont see anything, wait:
Below, you can see something that would be impossible without the hardware aceleration, almost 700+ units running at a constan 30 FPS (at least on my machine)
107KG no Loader… if you dont see anything, wait:
I just uploaded my 4th game (and 1st game in a looooong time) to the Newgrounds portal.
This is the link http://www.newgrounds.com/portal/view/603125
And dont forget to read more info about the game!
Hi Pablo. I’m just beginning to mess around with papervision 3d for the second time. However, the only problem is that I am having trouble finding Character collada files which are Animated. I can get a lot of things to work I just need some DAE character files which have animations of walking and running, standing, jumping, etc. Do you have a bunch of files in that format which are animated that I could mess around with? In addition i tries google but didn’t find animations of characters, am I missing something? I have spent hours and hours and on looking for such a file and found one of yours that has a walk and shrug. Please help. Please email me some if you could mail me some or place to download them. Thank you.
you wotn find DAE file, you have to search for PK2 and PK3 files (quake files) you will find a LOT of them, and then you will have to convert them to DAE. I can’t remember the process but if you google arround you will get your answers.
Remember, PK2 and PK3 arte the file extension of quake characters files.
Thank you. However, do you know if they are animated characters? Thats what im having trouble finding them/.\\.
yeah, most PK2 and PK3 assests are model files with ALL the animations of each character in he same file (walk,run,hit,die,win,etc)
hey i meant MD2 and MD3, not PK2 and PK3…
I’m studying the so called “steering behaviours” described by the paper writen by Craig W. Reynolds. Another good resource for more on this subject are the serie of posts found in http://rocketmandevelopment.com/category/steering/ very nice examples and pseudo code. Without to mention the awesome Java Applets found here: http://www.red3d.com/cwr/steer/
This behaviours are aimed to simulate inteligent movement of moving objects. Starting from one simple -mother of all- behaviour (“seek”), you can stack several or one into an objects moving pattern and the resulting product will look like if the object had some kind of decition making behind it’s movement. What you basically do is to apply forces to an object’s velocity, with the intention of “steer” from or to a specific point in space. At it’s core, regardles of how complicated the calculations get, the resulting product is a force vector that one should apply to one or more objects.
The most basic behaviour it’s called “Seek“, which makes the object seems like if it were following a target. You always work with vector operations.
Steps to apply the seek behaviour to an object (pseudo code, assume a Vector class available):
Now you just move the object: object.position += velocityVector. This si the basic stuff. As an extra, you can for example, scale the steering force based on some factors, like, the mass of the object, or the distance from the target to the vehicle, etc… but the basics are done in thouse 3 steps. In every other steer behaviour, the calculations will turn arround finding an imaginary ideal position for the vehicle and then, make the vehicle seek that position.
Here what you basically do is to create a path, find the closest point form the “vehicle’s position in the future” to the path, and check if the distance from that point to the vehicle is greater than some distance you decide. If it is, then that means that the vehicle will eventually leave the path’s segment in which currently is, so we “seek” the vehicle to the farthest point in that future offset to the path. In the image below, that point would be the closest point in the red lines to the path.
So you basically calculate this imaginary point and then, back to the “Seek” behaviour. So you work here with two behaviours one on top of the other. Being the “path following above” and the “seek” bellow (in order of execution).
Only let the vehicle get X far form the path, if it goes beyong, then seek to the fartest point allowed.
I attempted to implement this in flash / actionscript 3 (my weapon of choise) and this is what i got (you need Flash player 10)
My implementation in flash (just for learning): https://dl.dropbox.com/u/400263/steer.swf
This is one made in java by someone else: http://www.red3d.com/cwr/steer/PathFollow.html
That’s it, more to come.
Hey Thanks a bunch
Lots and lots of Archers. When i finish this i will probably make all the sprites animated GIFs or something, because this kills my computer.
Hey pablo,
en vez de hacer gif animado, porque no haces frames cacheados en bitmap data? Ese sistema es muy utilizado para hacer sistemas de particulas animadas.
ej:
var m:MovieClip = new ArcherMC()
var archerFrames:Array = [];
var b:BitmapData
for (var i:int = 0; i< m.totalFrames; i++){
b = new BitmapData(m.width,m.height,true,0x000000)
b.draw(m)
m.gotoAndStop(i+1)
archerFrames.push(b)
}
y despues cada archer tendria en su contenedor un objeto Bitmap que cambie su propiedad bitmapData al frame que corresponda.
Ciertamente, me gusta la idea. Pero no se como se comportaría en el juego. Porque, por la forma en que tengo los MCs organizados, cada vez que salga del frame, el movie clip se destruiría y al volver nuevamente se repetiría el proceso.
Por ejemplo, lo mando al frame de lucha, luego al de caminar, el de lucha se elimina, el espacio en memoria queda ocupado hasta el el GC lo borre, y al volver se crea todo nuevamente repetido… podría crear un especia de singleton que contenga todos los sprites cacheados, si… mmm… sería un laburito importante (en cuanto a organización)
Creo que tendría que estudiar que me llevaría menos tiempo, eso o exportar todo como una secuencia de PNGs… pero si, lo voy a tener en cuenta.
Ahora mismo estoy planeando dedicarme a cerrar el tema de programación del juego y despues dedicarme a la gráfica a full.
Tambien podría usar esta classe de ByteArray que hace justamente eso que decís.
Una vez tuve que hacer algo similar y termine usando un singleton con una matriz de bitmaps que cacheaban algo similar a eso. Entonces recurría al bitmap adecuado según orientación/movimiento del personaje.
Uses o no PNGS creo que sería necesario el singleton con los bitmaps cacheados, así mejoras mucho en cuanto a uso de memoria y performance.
Lo bueno de utilizar bitmaps es que podes poner quality Low para el stage y estéticamente se conserva la calidad (siempre que no escales o rotes).
Y si tenés la posibilidad utilizá algo de HAXE para ganar algunos frames mas :D. Muy bueno el laburo que estás haciendo.
This video shows how i have everything setup so i can easily create units and formations without spending hours coding. Also i show here that the units has very few lines of code because everything is a composition of many individual parts.
Testing the walk animation of the Archer Unit + a complete change in internal architecture of the code. Now it’s easyer to experiment.
Internally, all Units (Warriors, Archers, etc) are defined by 3 objects now. The Unit Settings Object, the Unit Behaviour Object and the Unit Sprite Object. All these 3 objects interact with each other to make the Unit work.
Behaviour Objects uses Tasks Objects to make diferent stuff. Tasks uses a variable number of actions implemented as a Strategy Pattern.
The base of all the fun in the game, the projectile system!
Super early test, i just finished this, just a prototype.
Ok, time to some refactoring and optimization before doing anything else. I will be posting the ‘attack behaviour‘ preview in 1 or 2 days if i have time this weekend to work on it, or next week if i dont.
Simple behaviour, or i should say, Warrior behaviour: just go after the enemy, no fear 🙂
So now they can walk, move from obstacles, chase enemies, now they need to attack them. This system will be interesting because i will use an approach that i never used before. It’s gonna be fun 😀
Excelente Pablo, pinta muy prometedor el engine, y buena la idea de revivir un clasico.
Nicooooo hoy hay Sprint? jaja, si, lo que tiene de bueno este tipo de juegos es que se pueden jugar todo el tiempo, como el ajedrez. En unos dias ya voy a tener a los arqueros 😛 ahí empieza la diversión!
A little better, more fluid.
Yes, i was gonna do the attack behaviour, but decided to finish this behaviour first. Now the next step is “attack behaviour”.
YopSolo 7:22 AM on 23 April 2013 Permalink |
rock solid fps on mine too