Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • elmotabe/ohj1ht
  • jotapark/ohj1ht
  • tanelira/ohj1ht
  • akrasa/ohj1ht
  • mimaahin/ohj1ht
  • oihietan/ohj1ht
  • tie/ohj1/2024s/ohj1ht
  • anpahypp/ohj1ht
  • saelripa/ohj1ht
  • mapepess/ohj1ht
  • eamaki/you-lost-the-game-the-game
  • yubablum/yubablum
  • roelsuom/roelsuom
  • askoleax/hakkaa-uudelleen
  • palolala/ohj-1-ht
  • jasyvays/ohj1ht
  • ruviljam/ohj1ht
  • jookettu/ohj1ht
  • vervarjo/ohj-1-ht
  • conrcsir/ohj1ht
  • otananti/ohj-1-ht
  • eerepo/ohj1ht
  • vieeaape/my-megis-1
  • uaopolso/ohj1ht
  • miltarva/Milja
  • huotta/ohj-1-ht
  • rrisiisk/ohj-1-ht
  • vesal/vesal5
  • saniitty/ohj1ht
  • setilus/ohj-1-ht
  • stniemel/stniemel
  • hirvepjw/ohj1ht
  • pjyypiix/ohj1ht
  • erpajala/ohj1ht
  • eerjanho/ohj1ht
  • saeteppo/ohj1ht
  • jutautri/ohj1ht
  • pjgenas/harkkatyop-g
  • juhsansa/juhsansa
  • pellrata/qmoduuli
  • mvaalata/ohj1ht
  • visamata/ohj1ht
  • rlokilja/ohj1ht
  • tuohmawi/ohj1ht
  • itsario/ohj-1-ht
  • koivishe/teekkarin-taival-2048
  • peillips/ohj1ht
  • nkeuren/ohj1ht
  • sasoleht/ohj1ht
  • jooantni/ohj1ht
  • kivistve/ohj1ht
  • rmrintal/ohj1ht
  • maimatsa/ohj1ht
  • hiltunma/ohj1ht
  • timovaan/ohj1ht
  • palaakho/numero-peli
  • loukovjv/ohj1ht
  • julipits/ohj1ht
  • haelkaja/ohj1ht
  • otjomatt/ohj-1-ht
  • jejalaht/ohj1ht
  • mamiparv/ohj1ht
  • akharine/ohj1ht
  • visevima/ohj1ht
  • rtmatilt/swatter
  • linvilan/ohj1ht
  • eppkarki/ohj1ht
  • maaivasi/ohj1ht
  • saveveka/saveveka
  • laitozz/ohj1ht
  • mietmiaa/ohj1ht
  • suominsh/tankkipeli
  • osalo/ohj1ht
  • jniskane/ohj1ht
  • jniskane/ohj-1-ht-2
  • jniskane/jniskane
  • kainumee/ohj1ht
  • helijave/ohj1ht
  • eemjorto/ohj1ht
  • nmpuskzv/nmpuskzv
  • laiadevi/ohj1ht
  • tochmart/ohj1ht
  • roijerve/bit-survivors
  • essmarpe/ohj1ht
  • eeeeoino/ohj1ht
  • rikretel/ohj1ht
  • anilnikk/ohj1ht
  • sivupehe/ohj1ht
  • torkhema/ohj1ht
  • vvlaspa/ohj1ht
  • apenttin/ohj1ht
  • ruotvive/ohj1ht
  • jemanare/ohj-1-ht-1
  • reponaw/ohj1ht
  • hjmhilli/hjmhilli
  • oapaaso/vads-sovellus
  • jaemvahu/ohj1ht
  • lajoveps/pallopeli
  • thalolri/ohj1ht
  • niemimm/ohj1ht
  • kagwochx/ohj1ht
  • kkvalke/ohj1ht
  • jormlsuu/pako-matka
  • kkmartik/harjoitustyo-ohj-1
  • lainejee/ohj1ht
  • taelbevi/ohj-1-ht
  • tornittu/ohj1ht
  • iiaumaoi/ohj1ht
  • ovevalka/pyramidin-purkaus
  • ltvertai/ohj-1-ht-kissan-sieniretki
  • leoksamu/ohj-1-ht-avaajosuskallat
  • ekhoalas/ohj1ht
  • saarakka/ohj1ht
  • rantajsu/rantajsu
  • jaetykky/ohj1ht
  • tyynakka/ohj1ht
  • kousaepw/ohj1ht
  • tiiliksi/ohj1ht
  • kokkaree/ohj1ht
  • halolpvz/ohj1ht
  • salonevs/ohj1ht
  • mohamoah/ohj1ht
  • vihavi/Vihavi
  • sisjeany/ohj1ht
  • kalopali/ohjelmointi-1-harjoitustyo
  • aabdi/ohj1ht
  • nsmietyt/ohj1ht
  • pslohi/ohj1ht
  • eenorta/ohj1ht
  • kantsiii/ohj1ht
  • aichinos/ohj1ht
  • elvihave/ohj1ht
  • tukilo/ohj1ht
  • vilvalka/ohj1ht
  • vehakkar/ohj1ht
  • savolave/ohj1ht
  • myhesare/ohj1ht
  • jutaalko/ohj1ht
  • auvijeka/ohj-1-ht
  • miankort/ohj1ht
  • ahtiansu/ohj1ht
  • rekolapi/rekolapi
  • oparve/ohj1ht
  • tuoskopp/ohj1ht
  • kylkii/ohj1ht
  • mkvuonos/ohj1ht
  • eeemkarv/ohj1ht
  • ojbhuota/ohj1ht
  • pohtojoj/vainylos
  • seaaemla/ohj1ht
  • kotajuka/ohj1ht
  • pmikaiko/ohj1ht
  • heajuvon/ohj1ht
  • mannmiar/ohj1ht
  • juriloaa/ohj1ht
  • emmamaki/e-makinen-tapio-ja-hiisi
  • pjheimon/ohj1ht
  • ahonenvi/ohj1ht
  • joamaxma/ohj1ht
  • lktkyllo/ohj1ht
  • pirinpot/ohj1ht
  • nisknmyy/ohj1ht
  • mmleppis/ohj1ht
  • elle/ohj1ht
  • alevilpa/ohj1ht
  • pitksouu/ohj1ht
  • jukakorp/ohj1ht
  • lesatuom/kaarmetyo
  • joolmatt/ohj1ht
  • lailvout/ohj1ht
  • pepartyy/ohj1ht
  • siwpentt/ohj-1-ht
  • limasjoh/ohj1ht
  • nurmsajo/ohj1ht
  • laleiho/ohj1ht
  • kojotarn/ohj1ht
  • matijazz/ohj1ht
  • tuomiluu/ohj1ht
  • vperkkol/ohj1ht
  • vepajuna/ohj1ht
  • smrautio/sokkelo
  • aajualal/harjoitustehtava-mage-survival
  • laaajoke/ohj1ht
  • tmgartow/ohj1ht
  • pdanilei/ohj1ht
  • kaipainm/kalastaja-kalevi
  • hietaolo/ohj1ht
  • inkemiah/skatemania
  • inkemiah/ohj-1-ht
  • puhavezz/puhavezz
  • truhtejo/ohj1ht
  • eoelehto/jumping-moose
  • sediiv/ohj1ht
  • akjuhesa/ohj1ht
  • sasalons/ohj1ht
  • valltoha/ohj-1-ht-blackjack
  • aajataip/ohj1ht
  • lamakany/ohj1ht
  • eepihote/ohj1ht
  • jaaseepe/ohj1ht
  • arpaanan/ohj1ht
  • vuorelma/ohj1ht
  • isojarto/ohj-1-ht
  • mtkarjal/ohj1ht
  • samavakk/ohj1ht
  • viininkr/jalkapallo-peli
  • elkortti/nyrkkeily
  • heautuom/ohj1ht
  • alimyy/tasohyppely
  • haloneot/ohj1ht
  • launon/ohj-1-ht
  • jemvirzy/kirjoitus-peli
  • miniospa/miniospa
  • aeheiska/apina-peli
  • saheikkx/ohj-1-htt
  • kjsalova/ohj1ht
  • jalempel/ohj-1-ht
  • jujolaih/jump-guys
  • hejolesk/ohj1ht
  • akkasivu/ohj1ht
  • sajussin/ohj1ht
  • alhainai/ohj-1-ht
  • jamajuku/ohj1ht
  • eevharki/jalkapallopeli
224 results
Show changes
Commits on Source (3)
Showing with 290 additions and 0 deletions
# Default ignored files
/shelf/
/workspace.xml
# Rider ignored files
/contentModel.xml
/projectSettingsUpdater.xml
/.idea.JormaVSJorma.iml
/modules.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="UserContentModel">
<attachedFolders />
<explicitIncludes />
<explicitExcludes />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
</component>
</project>
\ No newline at end of file

Microsoft Visual Studio Solution File, Format Version 12.00
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JormaVSJorma", "JormaVSJorma\JormaVSJorma.csproj", "{7A1123ED-E8C9-47FE-8880-67601AAFC5EE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7A1123ED-E8C9-47FE-8880-67601AAFC5EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{7A1123ED-E8C9-47FE-8880-67601AAFC5EE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{7A1123ED-E8C9-47FE-8880-67601AAFC5EE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{7A1123ED-E8C9-47FE-8880-67601AAFC5EE}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal
JormaVSJorma/JormaVSJorma/Content/JormaIdle1.png

1.38 KiB

JormaVSJorma/JormaVSJorma/Content/JormaIdle2.png

1.4 KiB

JormaVSJorma/JormaVSJorma/Content/JormaIdle3.png

1.4 KiB

using Jypeli;
using Jypeli.Controls;
namespace JormaVSJorma;
/// @author edukarroraimsi
/// @version 08.01.2025
/// <summary>
/// Jorma vetää turpaan.
/// </summary>
public class JormaVSJorma : PhysicsGame
{
private readonly Image[] jormaIdleAnim = LoadImages("JormaIdle1", "JormaIdle1", "JormaIdle2","JormaIdle2", "JormaIdle3");
private ListenContext pelaaja1Ohjaimet;
private ListenContext pelaaja2Ohjaimet;
public override void Begin()
{
SkaalaaKuvat(jormaIdleAnim);
Jorma jorma1 = LuoJorma(this, -100, Level.Bottom);
Jorma jorma2 = LuoJorma(this, 100, Level.Bottom);
jorma2.Turn(Direction.Left);
LuoKentta();
AsetaOhjaimet(jorma1, jorma2);
AsetaTarkistaja(jorma1, jorma2);
PhoneBackButton.Listen(ConfirmExit, "Lopeta peli");
Keyboard.Listen(Key.Escape, ButtonState.Pressed, ConfirmExit, "Lopeta peli");
}
public void LuoKentta()
{
Level.Background.Color = Color.White;
PhysicsObject vasenReuna = Level.CreateLeftBorder();
vasenReuna.X = -200;
vasenReuna.IsVisible = false;
PhysicsObject oikeaReuna = Level.CreateRightBorder();
oikeaReuna.X = 200;
oikeaReuna.IsVisible = false;
Level.CreateBottomBorder();
Camera.X = 0;
Camera.Y = -325;
Camera.Zoom(3);
}
public Jorma LuoJorma(PhysicsGame peli, double x, double y)
{
Jorma jorma = new Jorma(42, 81);
jorma.Image = jormaIdleAnim[0];
jorma.AnimIdle = new Animation(jormaIdleAnim);
jorma.AnimIdle.FPS = 8;
jorma.X = x;
jorma.Y = y;
Add(jorma);
return jorma;
}
public Hurtbox LuoOsumislaatikko(Jorma jorma)
{
Hurtbox laatikko = new Hurtbox(35, 70, jorma);
laatikko.Position = jorma.Position;
laatikko.Color = Color.Red;
Add(laatikko);
return laatikko;
}
public static void SkaalaaKuvat(Image[] Anim)
{
for (int i = 0; i < Anim.Length; i++)
{
Anim[i].Scaling = ImageScaling.Nearest;
}
}
public void AsetaTarkistaja(Jorma jorma, Jorma jorma2)
{
Timer tarkistaja = new Timer();
tarkistaja.Interval = 0.25;
tarkistaja.Timeout += delegate { Kaannyttaja(jorma, jorma2); };
tarkistaja.Start();
}
public void Kaannyttaja(Jorma jorma1, Jorma jorma2)
{
jorma1.Turn(Direction.Right);
jorma2.Turn(Direction.Left);
if (jorma1.X > jorma2.X)
{
jorma1.Turn(Direction.Left);
jorma2.Turn(Direction.Right);
}
}
public void AsetaOhjaimet(Jorma jorma1, Jorma jorma2)
{
pelaaja1Ohjaimet = ControlContext.CreateSubcontext();
pelaaja1Ohjaimet.Enable();
Keyboard.Listen(Key.D, ButtonState.Down, jorma1.Kavele, null, Direction.Right).InContext(pelaaja1Ohjaimet);
Keyboard.Listen(Key.A, ButtonState.Down, jorma1.Kavele, null, Direction.Left).InContext(pelaaja1Ohjaimet);
Keyboard.Listen(Key.E, ButtonState.Pressed, jorma1.Lyonti, null, jorma2).InContext(pelaaja1Ohjaimet);
pelaaja2Ohjaimet = ControlContext.CreateSubcontext();
pelaaja2Ohjaimet.Enable();
Keyboard.Listen(Key.Right, ButtonState.Down, jorma2.Kavele, null, Direction.Right).InContext(pelaaja2Ohjaimet);
Keyboard.Listen(Key.Left, ButtonState.Down, jorma2.Kavele, null, Direction.Left).InContext(pelaaja2Ohjaimet);
}
}
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Jypeli.NET" Version="11.*"/>
<PackageReference Include="Jypeli.FarseerPhysics.NET" Version="2.*"/>
</ItemGroup>
<ItemGroup>
<Folder Include="Content\" />
</ItemGroup>
<ItemGroup>
<None Update="Content\JormaIdle1.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Content\JormaIdle2.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Content\JormaIdle3.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
using System;
using System.Runtime.CompilerServices;
using Jypeli;
using Jypeli.Controls;
namespace JormaVSJorma;
public class Jorma : PlatformCharacter
{
public Jorma(double leveys, double korkeus) :base(leveys, korkeus)
{
Tag = "Jorma";
AddCollisionIgnoreGroup(1);
}
public void Kavele(Direction Menosuunta)
{
if (Menosuunta == Direction.Left && FacingDirection == Direction.Right) KaveleTaakse(-7000);
if (Menosuunta == Direction.Left && FacingDirection == Direction.Left) KaveleEteen(-10000);
if (Menosuunta == Direction.Right && FacingDirection == Direction.Right) KaveleEteen(10000);
if (Menosuunta == Direction.Right && FacingDirection == Direction.Left) KaveleTaakse(7000);
}
public void KaveleEteen(int nopeus)
{
Push(new Vector(nopeus, 0));
}
public void KaveleTaakse(int nopeus)
{
Push(new Vector(nopeus, 0));
}
public void Lyonti(Jorma lyoty)
{
BoundingRectangle osumisLaatikko = new BoundingRectangle(lyoty.Position.X, lyoty.Position.Y,
35, 80);
BoundingRectangle lyomisLaatikko;
if (FacingDirection == Direction.Left)
{
lyomisLaatikko = new BoundingRectangle(this.Position.X-40, Position.Y+20,
40, 20);
}
else
{
lyomisLaatikko = new BoundingRectangle(Position.X+40, Position.Y+20,
40, 20);
}
if (BoundingRectangle.Intersects(osumisLaatikko, lyomisLaatikko)) lyoty.Destroy();
}
public void Kaanny()
{
Turn(Direction.Inverse(FacingDirection));
}
public void OtaTurpaan(Jorma jorma)
{
}
}
public class Hurtbox : PhysicsObject
{
public Hurtbox(double leveys, double korkeus, Jorma jorma) : base(leveys, korkeus)
{
AddCollisionIgnoreGroup(1);
}
//FollowerBrain jormaSeuraaja = new FollowerBrain(jorma1);
//jormaSeuraaja.Speed = double.MaxValue;
//jormaSeuraaja.Active = true;
//laatikko1.Brain = jormaSeuraaja;
}
\ No newline at end of file
#region Using Statements
using System;
using System.Collections.Generic;
using System.Linq;
#endregion
namespace JormaVSJorma
{
/// <summary>
/// The main class.
/// </summary>
public static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
using var game = new JormaVSJorma();
game.Run();
}
}
}
\ No newline at end of file
suunnitelma/Jorma.png

19.7 KiB