Zurück   Flashforum > Flash > ActionScript > Spielkonzepte und Spieleprogrammierung

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 05-07-2003, 18:28   #1 (permalink)
Trainman
 
Benutzerbild von Hamster2k
 
Registriert seit: Sep 2001
Ort: Wien, Österreich
Beiträge: 1.324
MarioKart style flash engine

Hi!
Hab das grade gefunden, finds ziemlich genial!!!!
Und dabei ist es so simpel
MfG
__________________
So much to learn and so little time.

Ich liebe dieses Forum!!
Hamster2k ist offline   Mit Zitat antworten
Alt 05-07-2003, 19:45   #2 (permalink)
Hirnverbrannt
 
Benutzerbild von NastyFrog
 
Registriert seit: Aug 2001
Ort: AUSTRIA
Beiträge: 2.020
Geil, so machen die das beim GameBoy also.
__________________
50 Seiten hardcore ActionScript von den Grundlagen bis zu 3D Darstellungen.... eben eine Abendlektüre.

Dogs fucked the Pope, no fault of mine. Watch out! ... Why money? My name is Brinks; I was born ... born? Get sheep over side ... women and children to armored car ... orders from Captain Zeep.(Hunter S. Thompson)
NastyFrog ist offline   Mit Zitat antworten
Alt 05-07-2003, 19:47   #3 (permalink)
[+]
 
Benutzerbild von André Michelle
 
Registriert seit: Dec 2002
Ort: cologne
Beiträge: 2.271
Ich habe es auch gestern entdeckt.
Wir sitzen schon seit 6 Wochen an einem Spiel mit der Darstellung.

Mann, haben wir gestern Muffe bekommen :o)
Die Leude sind ja fix bei Flashkit.
Man ist ja sogern erster bei solchen Sachen, naja.

Egal, nur noch ein paar Tage...
__________________
aM

blog | laboratory | tonfall | processing

Audiotool.com
André Michelle ist offline   Mit Zitat antworten
Alt 05-07-2003, 19:52   #4 (permalink)
[+]
 
Benutzerbild von André Michelle
 
Registriert seit: Dec 2002
Ort: cologne
Beiträge: 2.271
Zitat:
Geschrieben von NastyFrog
Geil, so machen die das beim GameBoy also. :)
Yeah. Wenn man diesen Emulator mit MarioKart startet und sich die Speichergrafiken ansieht, dann sieht man, dass sie 2D sind.
Wenn man davon ausgeht, dass der GBA in diesem Spiel noch keine Texturen darstellen kann, dann kommt man drauf.

Der Witz ist, dass hätte schon in Flash4 geklappt, aber so richtig ist noch keiner drauf gekommen :o)
__________________
aM

blog | laboratory | tonfall | processing

Audiotool.com
André Michelle ist offline   Mit Zitat antworten
Alt 05-07-2003, 20:36   #5 (permalink)
unexplored MEDIA
 
Benutzerbild von theWEBster
 
Registriert seit: Aug 2001
Ort: 3xW
Beiträge: 139
lol, den thread kenn ich auch schon ein paar tage,
hatte mich schon gefreut den hier zu posten, allerdings wollte ich erst selbst noch ein kleines game zusammenbasteln

der thread ist definitiv der hammer und wie einfach das ganze ist, ist auch kaum zu glauben. auch wenn es bei flashkit vorher schon engines mit raycasting gab.

ich hatte ursprünglich vor den thread hier im forum als ein neues projekt zu starten. so wie es bei flashkit auch läuft. man könnte sich doch gemeinsam an verbesserungen machen und die ergebnisse anschließend bei flashkit posten.
somit würde quasi ein weltweites projekt draus

what do u think?
__________________
Öh, Signa ... Signawas? Tour? De France? Doping? Ich? Unerhört!!!

Geändert von theWEBster (06-07-2003 um 12:24 Uhr)
theWEBster ist offline   Mit Zitat antworten
Alt 06-07-2003, 17:01   #6 (permalink)
Hirnverbrannt
 
Benutzerbild von NastyFrog
 
Registriert seit: Aug 2001
Ort: AUSTRIA
Beiträge: 2.020
Ich spiel ja schon lange GBA: http://www.gbxemu.com/, aber ich bin noch nie auf die Idee gekommen, dass das so einfach ist.
Andererseits: Wenn das alles nur in Streifen geschnitten ist, wieviele Streifen hat dann so ein Spiel?? Hat der GameBoy auch Masken??
__________________
50 Seiten hardcore ActionScript von den Grundlagen bis zu 3D Darstellungen.... eben eine Abendlektüre.

Dogs fucked the Pope, no fault of mine. Watch out! ... Why money? My name is Brinks; I was born ... born? Get sheep over side ... women and children to armored car ... orders from Captain Zeep.(Hunter S. Thompson)
NastyFrog ist offline   Mit Zitat antworten
Alt 06-07-2003, 17:53   #7 (permalink)
Trainman
 
Benutzerbild von Hamster2k
 
Registriert seit: Sep 2001
Ort: Wien, Österreich
Beiträge: 1.324
Wahrscheinlich nicht Masken genau wie in Flash aber sicher etwas vergleichbares (nehm ich an)

Die Idee mit dem Projekt find ich gut und ich wäre dabei!
Vielleicht könnte man das dann aufteilen(also zB in Engine, KI usw.) und für jeden Teil nen Thread aufmachen? Ich glaub das Ganze wird zu unübersichtlich in nur einem Thread.
MfG
__________________
So much to learn and so little time.

Ich liebe dieses Forum!!
Hamster2k ist offline   Mit Zitat antworten
Alt 06-07-2003, 18:43   #8 (permalink)
Hirnverbrannt
 
Benutzerbild von NastyFrog
 
Registriert seit: Aug 2001
Ort: AUSTRIA
Beiträge: 2.020
Ach ja, an dem Projekt würd ich mich auch gern beteiligen.
__________________
50 Seiten hardcore ActionScript von den Grundlagen bis zu 3D Darstellungen.... eben eine Abendlektüre.

Dogs fucked the Pope, no fault of mine. Watch out! ... Why money? My name is Brinks; I was born ... born? Get sheep over side ... women and children to armored car ... orders from Captain Zeep.(Hunter S. Thompson)
NastyFrog ist offline   Mit Zitat antworten
Alt 06-07-2003, 23:23   #9 (permalink)
th.
Neuer User
 
Benutzerbild von th.
 
Registriert seit: Oct 2001
Ort: Bielefeld
Beiträge: 1.279
Nachdem ich das gesehen hatte, musste ich erst mal alles stehen und liegen lassen, und habe angefangen etwas vergleichbares zu basteln.
Ist schon erstaunlich, was 30 Zeilen Code bewirken können.

Hier meine Interpretation der Geschichte:
http://polyaktiv.de/temp/3dRace4.html
Gesteuert wird mit der Maus.

Hat ca. 3h gedauert, kann aber natürlich noch nicht was die "große" Engine auf Flashkit leistet...

(ca. 95kB ohne Preloader, wobei 94 auf das Bild fallen... )

Gruß,
Thorsten
__________________
polyaktiv.de
Flash 3D-Renderer
th. ist offline   Mit Zitat antworten
Alt 06-07-2003, 23:41   #10 (permalink)
asozial
 
Benutzerbild von bundi
 
Registriert seit: Jun 2001
Beiträge: 1.197
wow geile sache das!
...schade das ich immo keine zeit habe.
habe genug mit meiner A*Pathfinding engine zu tun. aber die wird ja auch al fertig. *g*

@th ... so weit biste ja auch nicht weg. maus einfach durch key ersetzen und schon passt dat. und kollision usw. ist ja eh 2D.

Geändert von bundi (06-07-2003 um 23:44 Uhr)
bundi ist offline   Mit Zitat antworten
Alt 07-07-2003, 09:24   #11 (permalink)
www.kruesch.de
 
Benutzerbild von flory
 
Registriert seit: Feb 2002
Beiträge: 1.057
wie wäre es mit ein paar Zeilen Code oder so?
ansonsten gehört der Thread ja dann doch eher in "Coolsites"...

versteht mich nicht falsch, ich find´s ja auch cool, aber in OOP passt es nicht - wer weiss, ob überhaupt OOP im Spiel ist und nicht nur Flash4-Syntax
__________________
www.planet-xaml.net
flory ist offline   Mit Zitat antworten
Alt 07-07-2003, 09:43   #12 (permalink)
helpQLODhelp
 
Benutzerbild von bokel
 
Registriert seit: Feb 2002
Ort: Köln
Beiträge: 8.505
@flory
Der ganze Code inkl. Flas ist im FlashKit Thread zu finden.

@bundi
ob th das schafft ?

mfg r.
bokel ist offline   Mit Zitat antworten
Alt 07-07-2003, 10:00   #13 (permalink)
www.kruesch.de
 
Benutzerbild von flory
 
Registriert seit: Feb 2002
Beiträge: 1.057
achso, hab mir leider nicht jede Seite angeschaut... sind zuviele

umso besser, dann können wir uns ja hier auch ein bischen über den Code unterhalten

@th: vielleicht kannst du das Grundprinzip mal erklären, oder ein paar Zeilen posten??
__________________
www.planet-xaml.net
flory ist offline   Mit Zitat antworten
Alt 07-07-2003, 12:17   #14 (permalink)
unexplored MEDIA
 
Benutzerbild von theWEBster
 
Registriert seit: Aug 2001
Ort: 3xW
Beiträge: 139
code und beispiel

so, da bin ich wieder.
hab auch mal ein kleines beispiel mit eigener strecke gebastelt.

[ spiel starten ]

hab übrigens bei dem movie quality noch auf high stehen, daher ist es auch ein wenig lahm. sitze nur gerade in der uni und kann es daher gerade nicht ändern.

und hier auch der code von flashkit:


Zitat:
To get it working, simply copy the code into the first frame.
Then you need two movie clips, the first is easy, and is the mask section. Just draw a horizontal box (no outline) that stretches across the length of ur screen, and make it a couple of pixels tall. (the code changes its height so doesnt matter the exact size, i used 3 pixels though). Make the mask into a movieclip called 'mask', align it so its reference point is at the top left corner.

Now you need your ground texture. Import your bitmap texture, mine was 1000x1000 pixels, if u using lower res, just stretch it on the screen to approx 1000x1000.

With all the reference points for movieclips below, make em centered.

Then follow this exactly
Select the image, F8 it (make it a movieclip symbol), call it 'movepic' and give it an instance name of 'move'. (Instance name is the important one here.

Now select your new 'movepic' movieclip, F8 it again, call it 'thepic' and give it an instance name 'pic'. 'pic' being the important thing again

Finally, select the 'thepic' movie clip again, and F8 it, call it 'pic', dont worry bout instance name.

Right, now that you have both ur mask and image inside several depths of movie clips. delete them from the stage, and in the library, right click on both the pic and mask (one at a time) and go to linkage and tick the 'export in actionscript' thingeee. Use the default names of 'pic' and 'mask'.

adjust the ms value in the code to increase or decrease the quality. 1 being the best quality, but very slow, 3 being reccomended, and any higher faster, but poorer quality

If you want to adjust where the land actually turns around (rotation point) edit the 'pic' movieclip and just nudge up 'thepic' 10 or so pixels.

any questions, post here. Any examples of what you've done with it, also post here



code:--------------------------------------------------------------------------------
ActionScript:
  1. _quality = "LOW";
  2. ms=3
  3. //attaches ground and mask
  4. // ms is set as the value u type in at the start.
  5. for (a=1; a<=(180/ms); a++) {
  6.     //grd = ground, mask = the mask movieclip
  7.     grd = attachMovie("pic", "pic"+a, a*3+1);
  8.     grd.pic._xscale = grd.pic._yscale=100;
  9.     grd._x = 275;
  10.     grd._y = 400;
  11.     //the ground is scaled only once, when created. not on every frame
  12.     grd._xscale = a*ms*10
  13.     grd._yscale = a*ms*10;
  14.     /// the below code happens on every frame for each bit of the ground.
  15.     grd.onEnterFrame = function() {
  16.         //the pic is rotated, but the 'move' symbol inside the pic is what is moved.
  17.         this.pic._rotation = _root.rotation;
  18.         this.pic.move._y += _root.cosness;
  19.         this.pic.move._x += _root.sinness;
  20.     };
  21.     mask = attachMovie("mask", "mask"+a, a*3+2);
  22.     mask._height = ms;
  23.     mask._y = 200+a*ms;
  24.     grd.setMask(mask);
  25. }
  26. //movement ripped from an earlier version of my GTA engine
  27. onEnterFrame = function () {
  28.     if (Key.isDown(39)) {
  29.         _root.rotation = _root.rotation-5;
  30.     }
  31.     if (Key.isDown(37)) {
  32.         _root.rotation = _root.rotation+5;
  33.     }
  34.     if (Key.isDown(38) and _root.speed<=20) {
  35.         _root.speed = _root.speed+0.6;
  36.     }
  37.     if (Key.isDown(40)) {
  38.         _root.speed = _root.speed-0.4;
  39.     }
  40.     if (_root.speed>0.2) {
  41.         _root.speed = _root.speed-0.2;
  42.     } else {
  43.         if (Key.isDown(40)) {
  44.             // _root.speed = _root.speed-0.4;
  45.         } else {
  46.             if (_root.speed<-0.2) {
  47.                 _root.speed = _root.speed+0.2;
  48.             } else {
  49.                 _root.speed = 0;
  50.             }
  51.         }
  52.     }
  53.     // calculate cos and sin for roads rotation just once every frame rather than in each
  54.     // road movieclip.
  55.     _root.cosness = _root.speed*Math.cos(_root.rotation*Math.PI/180)/2;
  56.     _root.sinness = _root.speed*Math.sin(_root.rotation*Math.PI/180)/2;
  57. };

viel spass damit
__________________
Öh, Signa ... Signawas? Tour? De France? Doping? Ich? Unerhört!!!

Geändert von theWEBster (07-07-2003 um 12:25 Uhr)
theWEBster ist offline   Mit Zitat antworten
Alt 07-07-2003, 13:25   #15 (permalink)
[+]
 
Benutzerbild von André Michelle
 
Registriert seit: Dec 2002
Ort: cologne
Beiträge: 2.271
Wir sitzen ja schon ein wenig länger dran.
Hier ein Beispiel ohne OOP, das zeigt, wie man Bitmaps auf die Strecke plazieren kann. Eine frühere Entwicklungsversion.

Wir sind bald soweit, unser Spiel zu veröffentlichen.
Mit an Board ist darin: ein OOP Handling für Kamera, AI, Usercontrol, ein RacingManager für Kollisionen, Trackcontrol, Display und ein 3dSoundSystem.
Ich denke, es erwartet niemand, dass ich den Quellcode davon poste :o)

Ein Wahnsinnsprojekt, was uns sau viel Spass gemacht hat.

4 Cars fahren auf 3 Tracks gegeneinander und es wird Extras zum Einsammeln geben :o)
Angehängte Dateien
Dateityp: zip place3d.zip (10,9 KB, 655x aufgerufen)
__________________
aM

blog | laboratory | tonfall | processing

Audiotool.com
André Michelle ist offline   Mit Zitat antworten
Antwort

Lesezeichen

Themen-Optionen
Ansicht

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks sind an
Pingbacks sind an
Refbacks sind an



Alle Zeitangaben in WEZ +1. Es ist jetzt 18:20 Uhr.

Domains, Webhosting & Vserver von Host Europe
Unterstützt das Flashforum!
Adobe User Group


Copyright ©1999 – 2012 Marc Thiele