News

Montag, 22. November 2010

BCC #44 & #45

geschrieben um 18:29 Uhr von #Reaper (Noch keine Kommentare)


user posted image

BlitzMoritz gewann die BlitzCodeCompo #44 mit 23 von 34 Stimmen. Mittels einer Abstimmung wurde das nächste Thema passend zur Jahreszeit gewählt: "Advent, Advent, ein Lichtlein brennt..."
Wir der Name schon erahnen lässt, soll ein Spiel mit weihnachtlichem Inhalt programmiert werden. Auch dieses mal gibt es kein Codelimit, lediglich für alles andere gibt es ein Größenlimit von 2 MiB.

RELATED TOPIC: BCC #44 - Abstimmung
RELATED TOPIC: BCC #45 - Themenabstimmung
RELATED TOPIC: BCC #45 - Aufgabe

Donnerstag, 18. November 2010

BCC #44 - Abstimmung

geschrieben um 14:16 Uhr von #Reaper (Noch keine Kommentare)


user posted image

Die BlitzCodeCompo #44 ist zu Ende und die Abstimmung läuft seit gestern Abend. Das Thema lautete "Zum Lernen". Es sollte ein Lernspiel programmiert werden. Es nehmen vier Spiele an der Abstimmung teil.
Anders als sonst gab es diesmal kein Codelimit, lediglich durften externe Dateien zusammen maximal 5 MiB groß sein.
Die Abstimmung läuft drei Tage, beginn war gestern Abend.


RELATED TOPIC: BCC #44 - Aufgabe
RELATED TOPIC: BCC #44 - Abstimmung
RELATED DOWNLOAD: BCC #44 - Download aller Beiträge (13,8 MiB)

Montag, 15. November 2010

Blitzmax: Multicore aushebeln (Win).

geschrieben um 20:06 Uhr von Abrexxes (Noch keine Kommentare)


user posted image (Windows)
Der eine oder andere will sicher mal testen ob ein Programm auf einem "Single Core" genau so gut läuft wie auf dem heimischen "Multi Core".
James L Boyd (BRL Support) hat dazu für Windows einen kleinen Code gepostet der euch direkten Zugriff auf die Prozessoraffinität gibt. Für fortgeschrittene BM User sicherlich nicht uninteressant.

Code: [AUSKLAPPEN]

Extern "win32"

   Const CREATE_SUSPENDED=$4
   Const STACK_SIZE_PARAM_IS_A_RESERVATION=$10000
   
   Const INFINITE=$ffffffff
   Const WAIT_ABANDONED=$80
   Const WAIT_OBJECT_0=$0
   Const WAIT_TIMEOUT=$102
   Const WAIT_FAILED=$ffffffff
   
   Const THREAD_MODE_BACKGROUND_BEGIN = $00010000
   Const THREAD_MODE_BACKGROUND_END = $00020000
   Const THREAD_PRIORITY_ABOVE_NORMAL = 1
   Const THREAD_PRIORITY_BELOW_NORMAL = -1
   Const THREAD_PRIORITY_HIGHEST = 2
   Const THREAD_PRIORITY_IDLE = -15
   Const THREAD_PRIORITY_LOWEST = -2
   Const THREAD_PRIORITY_NORMAL = 0
   Const THREAD_PRIORITY_TIME_CRITICAL = 15

   Function ResumeThread( thread )
   Function SuspendThread( thread )
   Function CloseThread( thread )
   Function WaitForSingleObject( handle,timeout )
   Function GetThreadPriority (thread)
   Function SetThreadPriority (thread, priority)
   Function GetCurrentThread ()

   Const PROCESS_SET_INFORMATION = $200
   
   Function GetCurrentProcessId ()
   Function OpenProcess (desiredaccess, inherithandle, processid)
   Function SetProcessAffinityMask (processhandle, processaffinitymask)
   
End Extern





' -------------------------------------------------------------------------
' Get process and open process handle...
' -------------------------------------------------------------------------

Local proc:Int = GetCurrentProcessId ()
Local handle:Int = OpenProcess (PROCESS_SET_INFORMATION, 0, proc)

' -------------------------------------------------------------------------
' Force process to CPU...
' -------------------------------------------------------------------------

' First CPU:
SetProcessAffinityMask (handle, %00000000000000000000000000000001)

' Second CPU:
'SetProcessAffinityMask (handle, %00000000000000000000000000000010)

' First 2 CPUs (default on dual-core):
'SetProcessAffinityMask (handle, %00000000000000000000000000000011)
   
' -------------------------------------------------------------------------

Print "Open task manager and view process affinity (right click app, Set Affinity)..."

Repeat

   Delay 100
   
Until KeyHit (KEY_ESCAPE)

End


Rem

<a href="http://msdn.microsoft.com/en-us/library/ms686277(VS.85).aspx" target="_blank">http://msdn.microsoft.com/en-us/library/ms686277(VS.85).aspx</a>

THREAD_MODE_BACKGROUND_BEGIN = $00010000
Begin background processing mode. The system lowers the resource scheduling priorities of the thread so that it can perform background work without significantly affecting activity in the foreground.
This value can be specified only if hThread is a handle to the current thread. The function fails if the thread is already in background processing mode.
Windows Server 2003 and Windows XP/2000:  This value is not supported.

THREAD_MODE_BACKGROUND_END = $00020000
End background processing mode. The system restores the resource scheduling priorities of the thread as they were before the thread entered background processing mode.
This value can be specified only if hThread is a handle to the current thread. The function fails if the thread is not in background processing mode.
Windows Server 2003 and Windows XP/2000:  This value is not supported.

THREAD_PRIORITY_ABOVE_NORMAL = 1
Priority 1 point above the priority class.

THREAD_PRIORITY_BELOW_NORMAL = -1
Priority 1 point below the priority class.

THREAD_PRIORITY_HIGHEST = 2
Priority 2 points above the priority class.

THREAD_PRIORITY_IDLE = -15
Base priority of 1 for IDLE_PRIORITY_CLASS, BELOW_NORMAL_PRIORITY_CLASS, NORMAL_PRIORITY_CLASS, ABOVE_NORMAL_PRIORITY_CLASS, or HIGH_PRIORITY_CLASS processes, and a base priority of 16 for REALTIME_PRIORITY_CLASS processes.

THREAD_PRIORITY_LOWEST = -2
Priority 2 points below the priority class.

THREAD_PRIORITY_NORMAL = 0
Normal priority for the priority class.

THREAD_PRIORITY_TIME_CRITICAL = 15
Base priority of 15 for IDLE_PRIORITY_CLASS, BELOW_NORMAL_PRIORITY_CLASS, NORMAL_PRIORITY_CLASS, ABOVE_NORMAL_PRIORITY_CLASS, or HIGH_PRIORITY_CLASS processes, and a base priority of 31 for REALTIME_PRIORITY_CLASS processes.

If the thread has the REALTIME_PRIORITY_CLASS base class, this parameter can also be -7, -6, -5, -4, -3, 3, 4, 5, or 6.

End Rem


RELATED TOPIC Original Thema (eng)

BlitzBasic Portal News RSS Feed Halt dich auf dem laufenden!

Samstag, 6. November 2010

...doch nur zwei ... C'T meets Blitz

geschrieben um 19:05 Uhr von Abrexxes (1 Kommentar)


user posted image

In der aktuellen c't gibt es einen aktuellen Beitrag rund um Spiele am PC.
Tatsächlich hat es ein Spiel in Blitz3D geschafft in die Ausgabe rein zu kommen. Bei einer Fachzeitschrift fast ein Novum.

Glückwunsch DC!

UPDATE: Auch der kostenlose Fußball-Manager von Dirk hat es in die Ausgabe geschafft. (Danke an Tennisball und Lord Stweccys für die Info)

RELATED LINK Stranded Homepage
RELATED LINK
Fußball-Manager
RELATED LINK Home der c't
RELATED LINK Diskussion im Blitzforum

Wichtig: Eine Hardcopy des Artikels ist aus Urheber rechtlichen Gründen natürlich nicht möglich!

BlitzBasic Portal News RSS Feed Halt dich auf dem laufenden!

Dienstag, 2. November 2010

Blitzmax für MAC als Bundle Schnäppchen!

geschrieben um 21:29 Uhr von Abrexxes (14 Kommentare)


Heute gab es eine Menge Konfusion um einen angeblich illegalen Deal eines Bundle Anbieters. Die News die ich bereits geschrieben hatte wurde von mir daher aus Vorsicht entfernt.
Nun hat Mark Sibly offiziell bestätigt das dieses Angebot legal ist. Hier also noch mal die News.
user posted imageuser posted image
Ab sofort kann man Blitzmax und andere Programme bei "The Mac Sale" zusammen im Bundle für 49,99$ erwerben (Blitzmax bei BRL 80$). Die Lizenz gilt auch für die Windows und Linux Version, daher ist das ganze auch für Windows/Linux Nutzer ein Schnäppchen.
MaxGUI ist wie Ihr sicher wisst inzwischen gratis.

Ein durchaus interessantes Angebot.
Wichtig: Das Angebot endet am 15 November 2010.
Nachtrag: Es ist nicht gern gesehen (und wohl von BRL und TMS untersagt) das Bundle zu erwerben und die Lizenz von BRL einzeln weiter zu verkaufen. Nun, das ist nachvollziehbar.

RELATED LINK The Mac Sale
RELATED LINK Kommentar von Mark


BlitzBasic Portal News RSS Feed Halt dich auf dem laufenden!

Seite 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 [19] 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73