Month: April 2020

Repositório para investigação sobre videojogos

Encontrei mais um repositório de investigação :)

+infos(Tampere University of Technology): LINK

Tags : ,

Estatísticas…

A malta do superdataresearch.com lançou mais uma estatística relativa ao mês de Março, e que referem as vendas do mês de março :)

+infos(oficial): LINK

Tags : ,

Play Like a Game Designer por Alexey Shkorkin

Play Like a Game Designer

According to the authors of books and articles, it means you should play as much as possible. Play games in various genres. Don’t just play good games, but bad games too. Do everything you can to improve your gaming literacy.
There’s nothing wrong with improving your gaming literacy, but for some reason, it’s not obvious to everyone that literacy alone isn’t enough. You need to not just consume games, but take a critical approach to them as well.
The results of your critical analysis could take the form of an article or video about how the developers met certain objectives in the game.

1. PREPARATORY PHASE
What to do
1. Play the game. This might seem like an obvious requirement, but our main goal here isn’t to spend a few hours in front of the screen, but rather to examine all the aspects of the game from various perspectives in order to develop as objective feedback as possible.
a. It’s best to beat the game — as long as the game is beatable, that is. If it takes dozens of hours to beat the game, you need to at least finish the main storyline.
b. If the game features asymmetrical gameplay (as in StarCraft, for example) with various strategies, you need to play as various factions and against various opponents.
c. If the game has various difficulty levels, try playing them all.
d. If the game has various modes (single-player, multi-player, etc.), it’s preferable to try all of them. The same goes for board games — play with various configurations and with various numbers of players.

2. Your primary goal is not to have fun playing the game, but rather to make observations that you will then use to perform an analysis. There are no requirements for how to take notes on your observations — just make sure they’re easy to work with.
Try to focus on establishing a connection between design solutions and gameplay:
which solution was implemented
how this was reflected in the gameplay
which in-game resources were employed in order to achieve this
which goal was accomplished by doing so.
These solutions could reside in various aspects of the game, including interface, graphics, sound, balance, controls, game components, etc.

3. You should also take notes of your personal impressions. They won’t have a place in a critical article, but they could influence your thoughts on how a given solution affects the player’s experience.
Jot your impressions down in the form of a “developer’s solution — your reaction” pairing, e.g. “No rally point for trained units — irritating.”
What not to do
1. Don’t read previews and reviews of the game until you’ve played it yourself and written the first draft of your article. First of all, you probably won’t get anything useful out of reading that stuff (you’re more likely to find advertising, emotions, spoilers, unfounded judgments, and useless details). Second, other people’s opinions will just ruin your focus.
2. Don’t rush into your analysis until you’ve completed all the steps listed under “Play the game.” There’s a good chance that you’ll see the game in a whole new light during the later stages, and then you’ll either have to rewrite the whole thing (which will take up time) or just you won’t be in the mood to redo your work (which will hurt the quality of your work).
3. Make sure you take notes and don’t just rely on your memory. You run the risk of completely forgetting certain factors or wasting time looking for them in the game in order to pin down the details.
4. Don’t mistake the rough draft of your article for a complete analysis and publish it before it’s ready. Follow the recommendations from the next phase first.

2. ANALYZING THE GAME AND WRITING YOUR ARTICLE
What to do
1. During the preparatory phase, you identified the connections between design solutions and gameplay. Now you need to organize these connections and flesh them out. If you need to play for a while before you can do this, go ahead and play. The results could take the form of connections such as:
The game has no “fog of war.” This reduces the amount of information hidden from the player and increases the amount of time it takes to get ready to attack the enemy, which in turn increases the importance of scouting.
2. Identify the objectives the developer set for themselves (this is easier to do after doing some work with the connections you found in the previous step). Determine how these objectives were met (or not entirely met) and what was employed in order to achieve this. If the results aren’t clear, spell them out. Try to describe the objectives that were met in such a way that the solutions are reproducible. For example:
Objective: simplify the process of translating and localizing the game.
How this was done: the game has no voice-over — the words in the dialogs are replaced with incomprehensible gibberish, so all that had to be translated was the subtitles and the interface; there is no text in the game world.
Result: the game was released in ten languages simultaneously.
3. If there’s anything else in the game that demands your attention (e.g. a new mechanic, a surprising solution), identify it.
The same goes for elements you liked and for which you were unable to identify an objective or function — set these notes aside; they might come in handy later on.
4. If you have any recommendations on how the game could be improved, they should be specific and well-founded.
a. Specific recommendations are those that describe HOW to solve a problem — instead of “I’d readjust the weapon balance,” write about how you would change the attributes of a certain item.
b. Well-founded recommendations are those that clearly explain WHY a given solution should be changed. When developing well-founded suggestions, it’s best to refer to similar solutions in other games, and not just talk off the cuff.
5. Recommendations for the layout of the article:
a. Identify the developer, publisher, year of release, genre, and platform.
b. Provide a link to a gameplay trailer for readers who haven’t played the game — this will save them time, and they’ll appreciate it.
c. Provide visual aids in the form of screenshots from the game. Sometimes it’s better to make a gif.
d. SPOILER ALERT: warn about spoilers, and hide text containing spoilers.
e. If, despite these recommendations, you decide to talk about your impressions of the game, set them aside visually in such a way that they are distinct from the main text of the article.

What not to do
Here are some typical mistakes that occur when the author of an analytical article mixes their criticism up with something else.
1. Don’t assign the game a rating, and don’t evaluate its various aspects (e.g. 3 for graphics, 4 for gameplay). First of all, ratings aren’t very informative, and second, your goal is not to compare the game to other games. The quality of critical analysis and the quality of the game itself usually have very little to do with each other. The usefulness of analysis is determined by how much the reader can learn from it, and listing specific mistakes in an unsuccessful game can be more valuable than an emotional, praise-filled 10/10 review.
2. Don’t express your emotions. If you can’t stop yourself from providing an emotional evaluation of a certain solution, at least try to provide a logical basis for your point of view.
3. Don’t recapitulate the storyline. Describing the storyline usually isn’t very valuable to script-writers. It would be better to point out interesting storyline developments and how the storyline affects the gameplay.
4. Don’t recapitulate the rules (if we’re talking about a board game). A critical analysis isn’t a tutorial! Try to focus on how certain rules affect the way the game is played.
5. Avoid superfluous details, especially when describing mechanics. A critique isn’t the same as an exhaustive breakdown! A detailed examination of a jump mechanic could be important when analyzing a platformer, but for games in which this isn’t a key mechanic, it probably isn’t worthwhile. If your analysis includes mathematical formulas or lines of code, you’re probably on the wrong track.

3. WHAT YOU CAN GET AS A RESULT
Your result can be something like this. Here’s part of my analysis of Firewatch, with no spoilers or superfluous details.
This is an analysis of a video game, but you can do the same thing with a board game. Board games are typically a little more difficult to analyze, since, first of all, they’re usually more expensive, and second, they’re physical objects (you need to go to the store and buy them, then keep them somewhere — if you’ve got 100 boxes, this could become a problem), but the main thing is that you need other players to play with on a regular basis. If this isn’t a problem for you, great.

Minimal menu-switching
The game doesn’t switch to another screen when you use the map and/or compass. The compass appears in your right hand, and the map appears on your left. Part of the screen ends up getting covered, but the game world doesn’t stop, and the protagonist can keep moving.
You can zoom in on the compass if you need to.
If you zoom in on the map, it will take up the entire screen, but it’s much easier to get around that way. However, the character can’t sprint when you’re zoomed in on the map.
Additional menus don’t appear when you pick up other items either.
You have the option of examining every item you pick up, even if it has absolutely no effect on the storyline.
● Rotating an item allows you to further immerse yourself in the game world (for example, if you pick up a book, you can examine not only the front cover, but also the spine, and read the notes on the back).
● Zooming in on an item allows you to read documents without opening a special menu.

Which objective is being met: immersion, since the player isn’t distracted by extra menus and doesn’t leave the game world.

Suggested improvements:
You can read the documents you find either as an image or as text by opening a separate menu. If you open the menu, the game is paused (this is clear because, for example, a dialog with Delilah will get cut off mid-word and continue when you’re done reading the document). Since the documents are fairly short, this menu could be gotten rid of. Instead, the documents could be reproduced as images, and the player could zoom in on them like the map. However, this kind of dual text is probably in place to make translation and localization easier.

1. Backpack with equipment
There is always a backpack full of equipment such as a rope and an axe next to the exit. Every time the player clicks on the tower door in order to leave it, the main character picks up the backpack before going outside.
Which objective is being met: this solution increases the player’s belief in what is happening in the game. The usual question of “so my character sleeps in his armor?” doesn’t arise here.
Enhancement of the solution: large items are only pulled out of the backpack when they are needed. For example, you can’t just pull the rope out and unwind it — you can only do it when climbing down a rock face. You can’t just wave the axe around either.

2. Character movement
In general, character movement is much more realistic than in an FPS or action-RPG. This fits well into the game world (after all, you’re playing a heavyset man in his forties with a full backpack on his back), but it could be painful for fans of these genres because of the character’s difficulty overcoming obstacles that the player could just hop over in real life.
Inaccessible areas:
Hills and underbrush. These are used to stop the player from going to places they aren’t supposed to go yet for storyline reasons. Once the character gets the rope and axe, these areas become passable.
Impassable obstacles. The character can’t enter the lake — not even up to his knees — but he can pass over small holes and clamber up gentle slopes.
Safety. The character can’t jump off a cliff or hurt himself in any other way.
Jumping. The character can only jump when necessary, i.e. to overcome obstacles. The player can’t just jump whenever they want to.
Sprinting. The developers made some concessions here. You can sprint at any time (except when using the map). There are also no restrictions on sprinting uphill. Running as fast as a motorcycle obviously isn’t realistic, but we’re all willing to suspend our disbelief here for the sake of saving time and cutting back on frustration.

As you probably noticed, the solutions employed by the developers of Firewatch were all focused on immersion in one way or another. Now the question is, “what do we do with this information?”

I suggest compiling a database of similar solutions. It doesn’t really matter what it looks like. The most important thing is that it will allow you to find several working options for ways to meet a given objective — for example, how to teach the player the controls, how to introduce an antagonist into the game, etc.

It would also be expedient to identify unsuccessful or unsatisfactory ways similar objectives have been met.

When it comes to posting things online, publishing individual breakdowns isn’t the best option for the following reasons.

1. First of all, it’s best to draw conclusions about specific solutions based on multiple breakdowns of games in the same genres rather than just a single game. The kind of breakdown I’m suggesting here is probably just a first step that will allow you to gather examples that you can then analyze and use a basis from which to draw conclusions.
2. Second, if you’re writing for a large audience, this audience will probably include a player who has already spent hundreds or thousands of hours on the game. And if your article is missing anything or contains factual errors, this player will point them out to you — in public.

It’s safer and more useful to only post conclusions with examples from multiple games in the same genre.

Once you’ve broken down a number of games (focus on twenty or so, as long as the games aren’t from very different genres), you’ll have enough material to make a “ten ways to…” video. These videos can be more content-rich and useful than most of the stuff on YouTube right now.

And if you’re disciplined, you won’t have any trouble with content going forward.”

e fica também uma história complementar “How indie developers from Russia make games for Google Play and social networks” e que também é interessante.

+infos(versão traduzida e fonte): LINK

+infos(original): https://habr.com/ru/post/491336/

+infos(história complementar): LINK

Tags : ,

Estatística no https://itch.io/

A plataforma do itch.io tem sempre disponibilizado boas ferramentas e uma plataforma boa, para que se possam divulgar o que se vai criando no mundos dos videojogos. Não tenho explorado esta tecnologia mas reparei que é possivel aceder à plataforma e observar o que vai surgindo por lá :)

Para além de indicar os game engines, também é possivel consultar os outros softwares que são mais usados nos projetos.

Interessante leitura:
game engine mais usado: Unity
+infos(oficial): LINK

Ferramentas:
ferramenta gratuita mais usada: EZ Sound Preview
+infos(oficial): LINK

Game assets:
o pack de game assets gratuito mais usado: Kings and Pigs
+infos(oficial): LINK

Tags : ,

A ler: What is the best game engine for your game? e What is the best game engine: is Unity right for you?

Encontrei estes post do site gamesindustry.biz, cuja autora é Marie Dealessandri, e que apresenta uma discussão interessante acerca de software para o desenvolvimento de videojogos:
What is the best game engine for your game?
What is the best game engine: is Unity right for you?

+infos(link1): What is the best game engine for your game?
+infos(link2): What is the best game engine: is Unity right for you?

Tags : ,

Um grupo de trabalho, acerca de videojogos

Encontrei, durante o trabalho que estava a realizar, um grupo de trabalho, o Game Hub Scandinavia,  que tem desenvolvido um trabalho muito interessante dedicado ao perfil de saída dos alunos de três países: Noruega, Dinamarca e Suécia. Das leituras dos documentos dá para perceber que todos os alunos acabam por ficar nestes países a trabalhar e que tem havido uma melhoria no ensino e que talvez por esse motivo, nestes países têm saído para o mercado um grande número de videojogos com grande qualidade.

leituras que recomendo:
Working with Serious Games, de Björn Berg Marklund, Marcus Hellkvist, Per Backlund, Henrik Engström, e Marcus Toftedahl
Game Localization
Swedish game Education: 2001-2016, de Björn Berg Marklund
Higher Video-Game Education in Scandinavia
New handbook for indie game devs and educational institutions

+infos(oficial): LINK

Tags :

National Videogame Museum (em Sheffield, Reino Unido)

O National Videogame Museum em Inglaterra é um espaço onde se pode ver um pouco da história dos videojogos, mas é também um local onde se pode jogar. Neste momento eles estão a precisar de ajuda para manter o espaço e para isso está a decorrer uma campanha.

+infos(o museu): LINK
+infos(a campanha): LINK

Tags :

SO2 – Visão geral do sistemas Windows (“família NT”)

Windows família NT, principais características:
sistema de 32 bits / 64 bits
multiprogramado preemptivo reentrante
multi-thread
suporta uniprocessador e multiprocessador SMP

Os principais objectivos e impacto no desenvolvimento do SO:
extensibilidade
portabilidade
fiabilidade
compatibilidade
performance

A arquitectura do Windows NT é do tipo: cliente servidor (micro-kernel) e que tem como principais vantagens:
núcleo mais simples
maior fiabilidade
maior extensibilidade
maior adaptabilidade a computação distribuída (vários processadores)

Componentes do sistema:
parte em modo de utilizador (modo não privilegiado: subsistemas / servidores: proporcionam um ambiente de execução, de API, e integrais (por exemplo de segurança)
parte em modo de núcleo (modo de execução privilegiado)

Surge assim a estrutura do Windows NT:

As tarefas dos componentes do Executivo NT são:
gestão de processo e threads (escalonamento e despacho)
gestão das LPC (local procedures call)
gestão da memória do sistema /memória virtual
kernel, tratamento de interrupções e excepções
I/O, rede, sistemas de ficheiros, device drivers, gestor de cache
HAL, adaptação às especificidades das várias plataformas

A evolução na família NT teve em conta:
suporte para novo hardware
modelos dos device drivers
espaço de memória suportado
optimizações na comunicação com periféricos
interface com o utilizador
optimizações do processo de boot
modificações de subsistemas / modelos de programação

 

Tags : , ,

SO2 – apresentação

Bibliografia recomendada:
Windows System Programming, 4t edition, Johnson M. Hart, Addison Wesley, 2010
Windows NT4 Advanced Programming, Raj RajaGopal & Subodh Monica, Osborne McGraw-Hill
Windows NT programming, Herbert Schildt, Osborne McGraw Hill, 1997
Operating Systems Concepts, 6th edition, Silberschatz and Galvin, Addison-Wesley
Fundamentos de Sistemas Oeerativos, 3 edição, José Alves Marques, Paulo Guedes, Editorial Presença
Inside Windows NT, 2 edition, Microsoft PRess, 1998
Operating Systems: Internal and Design Principles, 3rd edition, William Stallings, Prentice-Hall, 1998
Structured Computer Organization, 4th edition, Andrew S, Tanenbaum, Prentice-Hall Internacional
The Design of the Unix Operating System, Maurice Bach, Prentice- Hall, 1999

Tags : , , ,

5th International Conference on Game Jams, Hackathons and Game Creation Events (conferência)

Chamada de trabalhos até 26 de abril, sendo que os temas são:
Communication skills
Games Done Quick
Community building
Group dynamics
Creativity
Ideation
Educational dimension of game jams and hackathons
Incentives and rewards in game jams and hackathons
Game design issues in game jams
Learning in game jams and hackathons
Game jam and hackathon attendance: who and why?
Makerspaces
Game jam and hackathon impacts
Rapid game development
Game jam and hackathon methodologies
Team formation
Game jam and hackathon resources and assets
Theme development

Os trabalhos apresentados nesta conferência podem ser consultados, em:
ICGJ 2016 (LINK)
ICGJ 2017 (LINK)
ICGJ 2018 (LINK)
ICGJ 2019 (LINK)

+infos(oficial): LINK

Tags : , , ,

Game Documentation (mais um video)

Mais um video encontrado para relembrar alguns dos aspectos acerca do desenvolvimento de um videojogos, que é o de manter um histórico acerca do que se vai fazendo.

Tags : , , ,

Programação avançada – capitulo 5

A composição e a herança:
por composição: quando temos uma classe cujos membros são referências para objetos de outras classes
por herança: quando se cria uma classe que seja de um tipo de uma classes que já existe (uma especialização). Quando não existe uma derivação vamos estar a criar uma classe derivada da class Object, sendo que esta classe é a classe base de uma hierarquia a que todas as classes em Java pertencem
Na herança, isto é na classe derivada, para se fazer uso de métodos da classe base temos que usar a expressão super (caso tenham o mesmo nome)

Um exemplo de composição:

package e13;

class Pagina {

    private int numero;
    private int quantidadePalavras;

    public Pagina() {
        this(1, 100);
    }

    public Pagina(int n, int qp) {
        numero = n;
        quantidadePalavras = qp;
    }

    @Override
    public String toString() {
        return "\n Pagina " + " numero " + numero + " quantidade paginas " + quantidadePalavras;

    }
}

class Livro {

    private boolean capa;
    private Pagina pagina;

    public Livro() {
        this(false, 2, 200);
    }

    public Livro(boolean c, int n, int qp) {
        capa = c;
        pagina = new Pagina(n, qp);
    }

    @Override
    public String toString() {
        return "\ncapa " + capa + " pagina livro " + pagina;
    }
}

public class e13 {

    public static void main(String args[]) {
        System.out.println("\n A composição de classes:");
        Livro l1 = new Livro();
        System.out.println("\n surge:" + l1);
        Livro l2 = new Livro(true, 3, 300);
        System.out.println("\n surge:" + l2);
    }
}

Um exemplo de Herança:

package e13;

class Pagina {

    private int numero;
    private int quantidadePalavras;

    public Pagina() {
        this(1, 100);
    }

    public Pagina(int n, int qp) {
        numero = n;
        quantidadePalavras = qp;
    }

    protected void setNumeroPagina(int p) {
        numero = p;
    }

    protected int getNumeroPagina() {
        return numero;
    }

    protected void setQuantidadePalavras(int qp) {
        quantidadePalavras = qp;
    }

    protected int getQuantidadePalavras() {
        return quantidadePalavras;
    }

    @Override
    public String toString() {
        return "\n Pagina " + " numero " + numero + " quantidade paginas " + quantidadePalavras;
    }
}

class PaginaComCores extends Pagina {

    private boolean cor;

    public PaginaComCores() {
        this(false);
    }

    public PaginaComCores(boolean c) {
        cor = c;
    }

    protected void setCor(boolean c) {
        cor = c;
    }

    protected boolean getCor() {
        return cor;
    }

    @Override
    public String toString() {
        return "\n PaginaComCores " + super.toString() + ", cor " + cor;
    }
}

public class e13 {

    public static void main(String args[]) {
        System.out.println("\n A herança de classes:");
        Pagina p1 = new Pagina();
        System.out.println(p1);
        PaginaComCores p2 = new PaginaComCores(true);
        System.out.println(p2);
    }
}

Escolher entre composição e derivação:
se um objecto contem objectos de outra classe – composição ( …”contém” …)
se um objecto é especializado de outra classes – derivação/herança ( … “é” …)

O uso de constantes de classe, pode se aplicado através do modificador final
O final associado a uma variável, torna a variável constante
O final associado a uma referência, torna a referência constante
O final associado a um método, impede que uma derivada possa redefinir esse método
O final associado a uma classe, impede que essa classe seja derivada

package e14;

class Pagina {

    private int numero0 = 0;
    private final int numero1 = 1;
    static final int numero2 = 2;
    public static final int numero3= 3;

    
    void setnumero0(int n0){
        numero0=n0;
    }
    
    int getNumero0(){
       return numero0; 
    }
    
    public Pagina() {
        
    }
 
    @Override
    public String toString() {
        return "\n Pagina " + " numero " + numero1 + " - " + numero2  + " - " + numero3;
    }
}


public class e14 {

    public static void main(String args[]) {
        System.out.println("\n O uso da expressão final:");
        Pagina p1 = new Pagina();
        p1.setnumero0(9);
        System.out.println(p1.getNumero0());
      
    }
}

Exemplo de erro aplicado a uma classe e construção de uma derivada

//v1
package e14;

final class Pagina {

    private int numero0 = 0;
    private final int numero1 = 1;
    static final int numero2 = 2;
    public static final int numero3= 3;

    
    void setnumero0(int n0){
        numero0=n0;
    }
    
    int getNumero0(){
       return numero0; 
    }
    
    public Pagina() {
        
    }
 
    @Override
    public String toString() {
        return "\n Pagina " + " numero " + numero1 + " - " + numero2  + " - " + numero3;
    }
}

class PaginaACores extends Pagina{
    boolean cores;
    
    PaginaACores(){
    
    }
    
}

public class e14 {

    public static void main(String args[]) {
        System.out.println("\n O uso da expressão final em classes:");

      
    }
}
Tags : , , , , , , , , ,

“Gastos com jogos online duplicam em Portugal”

Com o titulo “Gastos com jogos online duplicam em Portugal” surge a noticia de que os portugueses andam a gastar mais em jogos online do que gastavam

“Confinados em casa, os portugueses estão a gastar menos em restauração, mas mais em plataformas de gaming e de videojogos, bem como nas subscrições de serviços de streaming. Os dados são da Revolut, a fintech britânica que conta já com mais de 400 mil utilizadores em Portugal, e que comparou as opções de compra em março com as realizadas no mês anterior.

Steam Games, PlayStation e Nintendo foram as três marcas que registaram maior subida no número de transações feitas, com variações que vão os 73% no caso da Nintendo aos 241% mais da Steam. Os gastos com a PlayStation cresceram 136%. Mais moderados foram os crescimentos das compras à Apple e Google, que aumentaram 15 e 11%, respetivamente, enquanto as subscrições da Netflix foram 9% superiores a fevereiro.”

+infos(fonte): LINK

Tags :

Programação avançada – capitulo 4

Um package é um agrupamento de classes com algum significado em comum.
Num ficheiro de código fonte pode existir uma classe publica que deve ter o mesmo nome do ficheiro, sendo que só pode haver uma única classe publica em cada ficheiro de código fonte
Os package podem ter outros package por referência, isto é, podemos ter uma estrutura de um package declarado do tipo package pkg1.pkg2.kg3; e que está gravado pkg1\pkg2\pkg3
A instrução import permite identificar classes pertencentes a outros packages sem ser necessário indicar o caminho até ao interior do package

As classes só podem ter um de dois níveis de acesso:
publico
ou por defeito (sem especificador)

Podemos aceder aos membros das classes com a seguinte organização (private, sem especificador, protected, public):

A organização em packages permite:
evitar situações de problemas onde existem classes com o mesmo nome, mas com significados diferentes
proporcionar segurança nos diferentes níveis de visibilidade

 

 

Tags : , , , ,

Programação avançada – capitulo 3

Objetos
A palavra new permite criar novos objetos
Os delimitadores dos { } permitem define o scope dos objetos

Em java existe o Garbage collector, que detecta todos os objetos que foram criados por new e que já não são referenciados em memória, libertanto desta forma o espaço em memória correspondente (esta dinâmica não existe noutras linguagens como em C, ou o destrutor em C++)

Um classe é constituída por:
membros variáveis (do tipo primitivos ou referências para objetos) Para se usar os membros de um determinado objeto faz-se uso do . (ponto final)
por métodos (podem existir métodos com o mesmo nome na mesma classe, são os métodos overloaded )
por um ou mais construtores (é a forma de garantir a inicialização de todos os objetos de uma classe, e o construtor não pode ser chamado por um seu método)

package e08;

class Texto{
    String palavras;
    int numero_paginas;
    
    Texto(){
        palavras = "vazio";
        numero_paginas = 0;
    }
    
    Texto(String p, int n_p){
        palavras = p;
        numero_paginas = n_p;
    }
    
    boolean valida(int n_p){
        if(n_p <=0){
            return false;
        }
        return true;
    }
}

public class e08 {

    public static void main(String args[]) {
        System.out.println("\n O uso de classes");
        Texto t1 = new Texto();
        System.out.println("\n construtor por defeito: " + t1.numero_paginas + " - " + t1.palavras);
        Texto t2 = new Texto("pedro", 100);
        System.out.println("\n construtor overloaded: " + t2.numero_paginas + " - " + t2.palavras);
        
    }
}

A palavra chave this:
Permite aceder a uma variável ou a um método do próprio objeto
o this também pode ser usado dentro de um construtor, o this faz uma chamada explicita ao construtor (com ou sem argumentos)
um construtor pode então desta forma ser chamado a partir de outro construtor

package e09;

class Texto{
    String palavras;
    int numero_paginas;
    
    Texto(){
        this("vazio", 100);
    }
    
    Texto(String p, int n_p){
        palavras = p;
        numero_paginas = n_p;
    }
    
    boolean valida(int n_p){
        if(n_p <=0){
            return false;
        }
        return true;
    }
}

public class e09 {

    public static void main(String args[]) {
        System.out.println("\n O uso da referência especial this");
        Texto t1 = new Texto();
        System.out.println("\n construtor por defeito: " + t1.numero_paginas + " - " + t1.palavras + " - " + t1.valida(t1.numero_paginas));
    }
}

São membros static:
Aquelas variáveis ou os membros que não estão ligados a qualquer objeto em particular
Só existe uma versão de um membro variável estático, partilhada por todos os objetos
Antes de se criar um objeto, podemos executar o método static ou aceder a qualquer variável static
Os métodos static, não têm a referência a this
Não se pode aceder directamente a variáveis ou métodos não estáticos (pois eles estão sempre ligados a um objeto em particular, e assim só se pode aceder a membros não estáticos se for invocado a partir de um objeto)

package e10;

class Texto {

    String palavras;
    static int numero_paginas = -1;

    Texto() {
        this("vazio", 100);
    }

    Texto(String p, int n_p) {
        palavras = p;
        numero_paginas = n_p;
    }

    static boolean valida(int n_p) {
        if (n_p <= 0) {
            return false;
        }
        return true;
    }
}

public class e10 {

    public static void main(String args[]) {
        System.out.println("\n membros static");
        System.out.println("\n aceder ao métodos antes do objeto: " + Texto.valida(100));
        Texto t1 = new Texto();
        System.out.println("\n aceder ao métodos depois do objeto: " + t1.valida(Texto.numero_paginas));
    }
}

A inicialização
Os membros variáveis das classes se forem usados sem estarem inicializados vão dar erro
É preferível inicializar essas variáveis ou então fazê-lo no construtor, com valores pode defeito
Se forem membros estáticos, eles são inicializados apenas uma vez, quando a classe for usada pela primeira vez
Nos objetos:
são inicializados os membros variáveis e depois o construtor

package e11;

class Texto {

    String palavras;
    int numero_paginas = -1;

    Texto() {
        palavras = "vazio original";
        System.out.println("\n construtor do texto: " + palavras);
    }

    Texto(String p, int n_p) {
        palavras = p;
        numero_paginas = n_p;
        System.out.println("\n segundo construtor do texto: " + palavras);
    }

    static boolean valida(int n_p) {
        if (n_p <= 0) {
            return false;
        }
        return true;
    }
}

class Livro {
    Texto t1 = new Texto("no livro", 100);

    Livro() {
        System.out.println("\n construtor do Livro: " + t1.palavras);
    }
    
    void mostra(){
        System.out.println("\n mostra do Livro");
    }
    static Texto t2 = new Texto("static no livro", 100); //primeiro a ser executado
}

public class e11 {

    public static void main(String args[]) {
        System.out.println("\n inicialização:");
        Livro l1 = new Livro();
        System.out.println("\n no main:" + l1.t1.palavras);
        l1.mostra();

    }
}

Tags : , , , , , , , , , , , , ,

Programação avançada – capitulo 2

Acerca dos tipos primitivos:
foi removida a noção de unsigned

O Java faz uso do unicode

Existe o Boxing e o Unboxing em Java, sendo que um exemplo de Boxing é o da substituição automaticamente por um objeto da classe wrapper correspondente, isto é:

public class e01 {
    public static void main(String args[]){
            System.out.println("\n Primeiro exemplo de Java");
            Integer a = 100;
            Integer a2 = new Integer(101);
            int b = 200;
            System.out.println(a + " - " + b + " - " + a2);
            
        }
}

Os arrays de tipos primitivos:
podem conter tipos primitivos
ou
referências para objetos

Existem duas formas de os representar:
int [] agora;
ou
int ontem[];

public class e02 {
    public static void main(String args[]){
            System.out.println("\n Os arrays em Java");
            int [] antes = new int[12]; //para criar: reservar espaço em memória
            int depois [] = {1,2,3,4,5,6,7,8,9}; //array reservado em memória dinamicamente, atribuição de arrays
            
            antes[0] = 0;
            
            System.out.println("\n Aceder a um elemento do array: " + antes[0]);
            System.out.println("\n Aceder a um elemento do array: " + depois[1]);
            
            System.out.println("\n Aceder ao total de elementos do array: " + antes.length);
            System.out.println("\n Aceder ao total de elementos do array: " + depois.length);
            
            //copiar arrays
            int [] copy = {0,1,3};
            int [] paste = new int[3]; //tem que ter o tamanho do copy
            System.arraycopy(copy, 0, paste, 0, copy.length);
            
            System.out.println("\n Aceder ao total de elementos do array depois de copiado: " + paste[1]);
        }
}

Os arrays como argumentos de métodos

public class e03 {
    static boolean arraysiguais(int []c, int []p){
        if(c.length != p.length){
            return false;
        }
        for(int i=0; i < c.length; i++){
            if(c[i] != p[i]){
                return false;
            }
        }
    return true;
    }
    
    public static void main(String args[]){
            System.out.println("\n Os arrays em Java: arrays como argumentos de métodos");
            int [] copy ={100,200,300};
            int [] paste = new int [3];
            
            //preencher cada um dos arrays
            for(int i=0; i< copy.length ;i++){
                copy[i]=i*i;
            }
            for(int i=0; i< paste.length ;i++){
                paste[i]=i*i*i;
            }
            
            if(arraysiguais(copy, paste)){
                System.out.println("\n Iguais");
            }else{
                System.out.println("\n Diferentes");
            }
        }
}

Os arrays como retorno de métodos:

public class e04 {

    static int[] arrayRetorno(int []a, int b[]){
        int extra[]= new int[Math.min(a.length, b.length)];
        
        for(int i=0; i< extra.length; i++){
            extra[i]=a[i]*b[i];
        }
     return extra;   
    }
    
    public static void main(String args[]){
            System.out.println("\n Os arrays em Java: arrays retorno de métodos");
            int arg1[] = {1,2,3};
            int arg2[] = {3,2,1};
            int argC[];
            
            argC = arrayRetorno(arg1, arg2);
            
            for(int i = 0; i< argC.length; i++){
                System.out.println("\n infos: " + argC[i]);
                
            }
        }
}

Os arrays multidmensionais:

public class e05 {
    static int[][] preenche(int a[][]){
        int aux[][]=new int[a.length][a[0].length];
        
        if(a.length ==0 || a[0].length==0){
            return null;
        }
        
        for(int i=0; i< a.length; i++){ //numero de linhas
            for(int j=0; j< a[i].length; j++){ //numero de colunas
                aux[i][j]=(i+1)*(j+1);
            }
        }
        return aux;
    }
    static void mostra(int a[][]){
        System.out.println("\n numero de linhas:" + a.length);
        System.out.println("\n numero de colunas:" + a[0].length);
        for(int i=0; i< a.length; i++){ //numero de linhas
            for(int j=0; j< a[i].length; j++){
                System.out.println(a[i][j]);
            }
            System.out.println("\n");
        }
    }
    public static void main(String args[]){
            System.out.println("\n Os arrays em Java: arrays multidimensionais");
            
            int multi[][] = new int[2][3];
            multi=preenche(multi);
            mostra(multi);
        }
}

Os operadores podem ser aplicados a todos os tipos de primitivos (int, float,…) contudo existem operadores que se podem aplicar a objetcos (referências para, cópia da referência) e que são:
=
==
!=
outros operadores que também funcionam com a classe String:
+
+=

Exemplo da passagem de um objecto por referência:

class Texto {
    String txt = "ola Java";
}

public class e06 {
    static void funcao(Texto t) {
        t.txt = "Dentro";
    }
    public static void main(String args[]) {
        System.out.println("\n Passagem de objetos a funções");
        Texto txt1 = new Texto();
        txt1.txt = "Ola Mundo";
        System.out.println("\n primeira versão: " + txt1.txt);
        funcao(txt1);
        System.out.println("\n segunda versão: " + txt1.txt);
    }
}

Exemplo do uso do operador equals:

class Texto {
    String txt = "ola Java";
}

public class e06 {
    static void funcao(Texto t) {
        t.txt = "Dentro";
    }
    public static void main(String args[]) {
        System.out.println("\n Passagem de objetos a funções");
        Texto txt1 = new Texto();
        Texto txt2 = new Texto();
        txt1.txt = "Ola Mundo";
        
        System.out.println("\n primeira versão: " + txt1.txt);
        funcao(txt1);
        System.out.println("\n segunda versão: " + txt1.txt);
        
        //operador equals
        txt2.txt = "Ola Mundo!!!";
        System.out.println("\n comparação: " + txt1.txt.equals(txt2.txt));
    }
}

O método equals não poderia ser usado com o objecto txt1 e txt2, porque ele não estava redefinido dentro da classe Texto.

Existem também o operador cast, e que é utilizado para:
conversões de tipos de maior para tipos de menor capacidade
ou outro casos em que não seriam feitas conversões implícitas

public class e07 {
    public static void main(String args[]) {
        System.out.println("\n Conversões de tipo");
        System.out.println("\n uma conversão implicita");
        int a = 100;
        float b;
        b = a;
        System.out.println("\n a: " + a + "\t b: " + b);
        
        System.out.println("\n uma conversão explicita (cast)");
        float d = 200;
        int e;
        e= (int)d;
        System.out.println("\n d: " + d + "\t e: " + e);
    }
}

Para testar um determinado tipo de objeto podemos fazer uso do instanceof

class Testar{
    char t= 'p';
}

public class e07 {

    public static void main(String args[]) {
        System.out.println("\n Testar o tipo de objeto");
        Testar t = new Testar();
        System.out.println(t instanceof Testar);
    }
}

Existe aqui também uma variante do ciclo for, que é o foreach, e que pode ser utilizado com arrays e coleções

public class e07 {

    public static void main(String args[]) {
        System.out.println("\n O ciclo for(each)");
        int i[]={0,1,2,3,4,5,6,7,8,9};
        for(int aux: i){
            System.out.println(i[aux]);
        }
    }
}

por vezes é importante fazer uso das instruções continue e break, sendo que quando o break é executado dentro de um ciclo, o ciclo termina e a execução continua na instrução a seguir
já o uso do continue, dentro de um ciclo while ou do while, termina a iteração corrente, continuando o ciclo a ser executado na iteração seguinte.
o uso do continue, dentro de um ciclo for, provoca a passagem ao incremento do ciclo e em seguida à avaliação da expressão condicional.
podem ser usados label com o caso do “:” (sem aspas) que serve para identificar ciclos do tipo: for, while ou do while

public class e07 {

    public static void main(String args[]) {
        System.out.println("\n a intrução do break e do continue");
        int i[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
        System.out.println("\n primeira estrutura");
        primeiro:
        for (int aux : i) {
            if (aux > 5) {
                break primeiro; //ou break;
            }
            System.out.println(i[aux]);
        }
        System.out.println("\n segunda estrutura");
        segundo:
        for (int aux2 : i) {
            if (aux2 > 5) {
                System.out.println(i[aux2]);
            }
            if (aux2 == 8) {
                System.out.println("\n na segunda estrutura");
                continue segundo;
            }
        }
    }
}
Tags : , , , , , , , ,

Programação avançada – capitulo 1

Referências bibliográficas:

Introduction to Programming Using Java, Eighth Edition (http://math.hws.edu/javanotes/)


Java™ How to Program, 11/e (referência LINK)


Java: An Introduction to Problem Solving and Programming (8th edition) (referência LINK)

Por onde começar?
instalar o programa netbeans: https://netbeans.org/ a versão mais recente

public class e01 {
    public static void main(String args[]){
            System.out.println("\n Primeiro exemplo de Java");
        }
}

observações:
existe uma classe de nome e01
as aplicações Java iniciam a execução com a chamada ao método main()
public para se aceder ao main a partir de um contexto exterior
static, para que o método main seja chamado antes de existir algum objecto da classe
String args[], para aceder a argumentos a partir da linha de comandos
println() é o método invocado por System.out

Tags : , , ,

Um museu com história (em Leicester, Reino Unido)

O espaço museu Retro Computer Museum (RCM) em Inglaterra, mais concretamente em Leicester, está a pedir ajuda para manter as portas abertas. A larga colecção que eles têm começa com peças de 1960 e daí em diante, sendo que o visitante tem a possibilidade de jogar/brincar em todas elas. As receitas que vinham das visitas ao espaço, terminaram  e por essa via eles estão com dificuldades em manter o espaço. Surge então o pedido de ajuda com qualquer contribuição. O espaço:

+infos(campanha): LINK

+infos(o museu): http://www.retrocomputermuseum.co.uk/

 

Tags :

Archiving Online Video Games

Algumas referências sobre o tema “Archiving Online Video Games”:

    • Adrienne Shaw’s Rainbow Arcade exhibition – LINK
    • Strong National Museum of Play (where the International Center for the History of Electronic Games (ICHEG) is housed) – LINK
    • Software Preservation Network helpful – LINK
    • Rhizome collective – LINK
    • The reports from the Trope Tank at MIT – LINK
    • Galloway, P. K. (2011). Retrocomputing, archival research, and digital heritage preservation: A computer museum and ischool collaboration. Library Trends, 59(4), 623-636. – LINK
    • Newman, James. Best before: Videogames, Supersession and Obsolescence. Routledge, 2012. – LINK
    • Lowood, Henry. “Perfect Capture: Three Takes on Replay, Machinima and the History of Virtual Worlds.” Journal of Visual Culture 10, no. 1 (April 1, 2011): 113–24. – LINK
    • Stuckey, Helen, Melanie Swalwell, Angela Ndalianis, and Denise de Vries. “Remembrance of Games Past: The Popular Memory Archive.” In Proceedings of The 9th Australasian Conference on Interactive Entertainment: Matters of Life and Death, 11. ACM, 2013. – LINK
    • Brown, Samantha, Samantha Lowrance, and Catherine Whited. “Preservation Practices of Videogames in Archives,” 2018. – LINK
    • Winget, Megan A. “Videogame Preservation and Massively Multiplayer Online Role-Playing Games: A Review of the Literature.” Journal of the American Society for Information Science and Technology 62, no. 10 (2011): 1869–1883. – LINK
    • Nylund, Niklas. “Walkthrough and Let’s Play: Evaluating Preservation Methods for Digital Games.” In Proceedings of the 19th International Academic Mindtrek Conference, 55–62. AcademicMindTrek ’15. New York, NY, USA: ACM, 2015. – LINK
    • Flashpoint – LINK
    • Game Preservation Initiatives – LINK
    • Archaeogaming – LINK
    • 100 New Arcade Machines Added to the Internet Arcade – LINK
    • Strong Museum of Play – LINK
    • Preserving Virtual Worlds I and II. – LINK
    • Kaltman, Eric, et al. “A unified approach to preserving cultural software objects and their development histories.” (2014). – LINK
    • Dutch sound& vision institute – LINK
    • Video “Games as a service” is fraud. – LINK

 

Tags :

Umas lindas histórias..

Encontrei esta editora, a Bitmap Books, que tem publicado uns livros muitos interessantes, relacionados com as histórias dos videojogos. A quase totalidade do livros têm um destaque muito especial para imagens dos videojogos, acompanhados de algumas histórias acerca dos mesmos. Das publicações já consta uma lista muito interessante e diversificada, na qual se pode encontrar:
Commodore Amiga: a visual Commpendium
Super Famicom: The Box Art Collection
Generation 64 – How the Commodore 64 inspired a generation of Swedish gamers
A Gremlin in the Works
Sinclair ZX Spectrum: a visual compendium
Commodore 64: a visual Commpendium
NES/Famicom: a visual compendium
SNES/Super Famicom: a visual compendium
NEOGEO: A VISUAL HISTORY
SEGA® Master System: a visual compendium
The Art of Point-and-Click Adventure Games
The CRPG Book: A Guide to Computer Role-Playing Games
H.G. Wells: The War of the Worlds Illustrated
ARTCADE – The Book of Classic Arcade Game Art (Extended Edition)
Metal Slug: The Ultimate History
The SNES Pixel Book
Atari 2600/7800: a visual compendium
Micro but Many: an unofficial Micro Machines collection

Ainda não tive o prazer de conhecer nenhum dos livros mas irei sem duvida querer ter acesso a dois/três deles :) Guess what? :P

(8/9/2020) refiz a minha lista de leitura.. e vou atacar os livros:
The Art of Point-and-Click Adventure Games
The Games That Weren’t

+infos(Bitmap Books): https://www.bitmapbooks.co.uk/

Tags : , , , ,

Humble 7000 Icons Game Dev Bundle (uma campanha)

Mais uma campanha e desta vez um pack de icons:
Fantasy Weapon Icons
Blue Loot Box
Jewelry Icons
Armor icon pack
Flat Skills Icons
SpellBook. Page01
SpellBook. Page02
SpellBook. Page03
SpellBook. Page04
Sci-Fi Icons Pack
Sci-Fi Skill Icons Pack
Pirates Icons Pack
Witch Craft Icons
Fruit and Vegetables Icons
Gems Icons
Trading Icons
RPG Armor Sets
RPG Weapons Icons
Loot Icons
Herbal Icons
Prehistoric Age Icons
Bags And Boxes Icons
Scrolls and Books Icons
Magic Items
Potion Icons
Resources and Craft Icon Pack
Weapon and Armor Icon Pack
Fishing Icons
Hunting Icons
Forest Icons
Necromancer Icons
Sci-Fi Armor Icons
Mining Icons
Trophy Icons
Barbarian Icons
Engineering Craft Icons
Food Icon Pack
SpellBook. Page05
SpellBook. Page06
SpellBook. Page07
SpellBook. Page08
SpellBook. Page09
Skill Icon Pack
Sci-Fi Flat Skills
Strategy Game Icons

+infos(campanha): LINK

Tags : , , , , , ,

Emulador de jogos clássicos (cultura Japonesa)

Um emulador que permite jogar alguns dos jogos para PC desenvolvidos para o mercado japonês, e na sua maioria por japoneses.

“Atari, TANDY, Commodore, those are the names that give us fond memories of the 1980’s, when all kinds of computers and systems were popping up everywhere. In fact, the same situation existed in Japan at that same time. However, it wasn’t the IBM-PC or the Commodore 64 that was winning popularity, but instead totally unique computers.

The PC-9801, once called ‘the national computer’; the FM-7, which became the topic of conversation with its low cost and high performance; and the X68000, often called ‘Japan’s Amiga’ name just a few. A variety of computers existed, and all of the games that were being sold were also quite different than anything in the West. The influence those games had on the Japanese games of today is immeasurable. It must be said that these computers were the origin of the Japanese games industry. However, for a long time it was very difficult for anyone outside of Japan to get their hands on those games.

D4 Enterprise provides Project EGG so that you can enjoy the great games any time you want through re-released versions on Windows. We want to be thought of as a part of retro gaming history and culture and make that image known to even more people around the world as we bring them great entertainment.”

+infos(oficial): LINK

Tags : ,

Um revista dos anos 90 :)

Agora que o tempo passou a ser em casa, têm surgido alguns exemplares (fotos) da revista Crash ZX Spectrum, que nos anos noventa foi um “must” para se saber mais acerca das novidades para a “consola” que não é consolta, ZX Spectrum. Ficam aqui algumas das imagens que me fazem recordar boas leituras. O mais giro disto era a cassete que vinha com a revista e que trazia alguns jogos e demos :)

Uma reportagem sobre a revista Crash pelo jornal Independent:

“A hugely successful videogame magazine from the 1980s is set to make a comeback later this year after fans of the original publication flocked to crowdfund a new edition.
Crash, which was dedicated to covering games made for the ZX Spectrum home computer, will be launched as a hardback annual in time for Christmas – 25 years after its last issue was published.
It comes as a hugely successful Kickstarter campaign to seal its return crashed past its target of £12,000. The crowdfunding attempt has attracted more than 1,000 backers so far and it is set to end on 20 August.
Crash originally launched in 1983 as a mail order software catalogue but it branched out and became a newsstand magazine in February 1984.
The publication became popular for its lively mix of news and reviews, most of which were written by school children in Ludlow, Shropshire where its publisher, Newsfield, was based. Readers would also enjoy the occasional cover-mounted cassette jam-packed with games.
Edited by Roger Kean, it carried striking cover illustrations by Swiss-born artist Oliver Frey and at its height, it was selling as many as 101,483 copies.
But although it printed its last issue – number 98 – in April 1992, it has never been forgotten by gamers of that era.
Kean and Frey have returned to helm the 99th issue along with adventure game specialist Stuart William and journalist Nick Roberts who used to compile the magazine’s tips page.
“Response to the Kickstarter campaign has been amazing, and if reaction to the final product matches the enthusiasm, we’ll all have to take time out to think whether it’s been the start of an extended comeback,” Kean told the gaming website Eurogamer.
It is not the first time a videogame magazine of old has been dusted down and revived. Commodore fans created a special issue 107 of Zzap!64 magazine in 2002 which was followed up by The Def Tribute to Zzap64! in 2005, copies of which were given away with the specialist gaming magazine Retro Gamer.
In 2008, a tribute to Amstrad Action magazine was also created. Covering Lord Alan Sugar’s series of 8-bit CPC computers, it gave closure to a long-lived publication which began in October 1985 but ended with issue 117 in June 1995.
The publication of a new Crash magazine (which comes with a badge and potentially a calendar of Frey’s artwork) coincides with huge interest in all-things Spectrum. A newly created 8-bit computer called the ZX Spectrum Next is due to be released early next year, boasting enhanced video modes, extra memory and a faster processor.
Capable of playing games developed for the original computer, it will come bundled with Wonderland Dizzy, a game reviving an egg-based character called Dizzy which sold in large numbers during the late 1980s and early 1990s.
It also follows the launch of the keyboardless Sinclair ZX Spectrum Vega, which raised £155,677 on Indiegogo, and the Recreated Sinclair ZX Spectrum – essentially a Bluetooth keyboard of the machine British entrepreneur Sir Clive Sinclair launched in 1982 – which attracted £63,194.”

+infos(independent.co.uk): LINK

+infos(archive.org): LINK

Tags : ,